Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

revert: rm databases,iagon #98

Closed
wants to merge 5 commits into from
Closed

revert: rm databases,iagon #98

wants to merge 5 commits into from

Conversation

mixmix
Copy link
Collaborator

@mixmix mixmix commented Jun 13, 2024

This PR is designed to remove the database and iagon packages

Checklist:

  • remove packages/database, packages/iagon
  • remove database mentions in the root README.md
  • ensure tests pass still
    • leveldb tests were dependent on database... did my best to replace that
    • found a bug with lerna, which I have chosen to side-step with verbose commands to ensure CI actually works 💀

TODO (in future PRs):

  • remove mentions of database from errywhere in READMEs
  • re-generate the /docs

@mixmix mixmix mentioned this pull request Jun 13, 2024
@mixmix mixmix changed the title rm databases,iagon revert: rm databases,iagon Jun 13, 2024
@mixmix
Copy link
Collaborator Author

mixmix commented Jun 14, 2024

This is messed up - this is failing locally because the tests depend on packages/database ....but CI is like ✔️

@mixmix
Copy link
Collaborator Author

mixmix commented Jun 14, 2024

Yeah can confirm that locally if you run

npm run coverage && echo "success"

You will see success printed out even though you can see tests failing in logs

Reading issues ... others have seen it but have said it's "fixed" ... is it our config of lerna 🫠

Comment on lines +41 to +61
const level1 = createLevelDBStorage({ dbPath: "./db1" })
const db1 = await createRxDatabase({
name: 'level-1-db',
storage: level1,
password: 'password-1'
})
await db1.addCollections(collections)
await db1.todo.insert({ id: '1', name: 'milk' })
const record1 = await db1.todo.findOne('1').exec()
expect(record1._data.name).toBe('milk')

const level2 = createLevelDBStorage({ dbPath: "./db2" })
const db2 = await createRxDatabase({
name: 'level-2-db',
storage: level2,
password: 'password-2'
})
await db2.addCollections(collections)
await db2.todo.insert({ id: '2', name: 'potatoes' })
const record2 = await db2.todo.findOne('2').exec()
expect(record2._data.name).toBe('potatoes')
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't sure how to test mulit-instance ok-ness... so I just spun up a db and did a read/write?

Totally up for this being better

@mixmix mixmix requested a review from elribonazo June 14, 2024 05:02
Comment on lines +12 to +19
"coverage": "run-s coverage:indexdb coverage:inmemory coverage:leveldb",
"coverage:indexdb": "npm --prefix packages/indexdb run coverage",
"coverage:inmemory": "npm --prefix packages/inmemory run coverage",
"coverage:leveldb": "npm --prefix packages/leveldb run coverage",
"test": "run-s test:indexdb test:inmemory test:leveldb",
"test:indexdb": "npm --prefix packages/indexdb run test",
"test:inmemory": "npm --prefix packages/inmemory run test",
"test:leveldb": "npm --prefix packages/leveldb run test",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got zero time to waste on lerna swallowing errors.
I feel sad about this, but I also have a life to live

@elribonazo elribonazo closed this Jun 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants