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
Support @vscode/sqlite3 #4866
Support @vscode/sqlite3 #4866
Conversation
OlivierCavadenti
commented
Dec 1, 2021
- Actual mapbox sqlite3 have several vulnerabilities (and have no new releases since months) in dependencies so use a vscode fork instead.
- Closes Support @vscode/sqlite3 #4858
package.json
Outdated
@@ -122,7 +122,7 @@ | |||
"sinon": "^12.0.1", | |||
"sinon-chai": "^3.7.0", | |||
"source-map-support": "^0.5.20", | |||
"sqlite3": "^5.0.2", | |||
"sqlite3": "npm:@vscode/sqlite3@^5.0.7", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just use vscode/sqlite3 directly? It's a devDependency anyway, users will have to switch on their end too.
I would go one step further and explicitly require users to have vscode version of sqlite and import from that directly, not through alias. |
Peer dependencies are still out of date: https://github.com/knex/knex/blob/master/package.json#L87 (Can't really say if I like this happening at all, seems quite weird. But what can we do if the original package is not maintained 🤷) |
Apparently there are more things forgotten, e.g. after installation, without having the new sqlite fork switched, I get this error: Error: Knex: run
$ npm install sqlite3 --save
Cannot find module '@vscode/sqlite3' from 'node_modules/knex/lib/dialects/sqlite3/index.js' As the |
@B4nan driver name was left unchanged intentionally, so that simple package.json would suffice for migration, as per UPGRADING.md edit: ok, upgrading instructions are ambiguous. will fix |
I can see quite a lot of failures in schema diffing after upgrade, I can imagine there will be some changes needed also in the reflection of sqlite tables (https://github.com/knex/knex/blob/master/lib/dialects/sqlite3/schema/internal/parser.js). Namely I see problems with reflection of things like autoincrement, FKs and default values. And some of them are also in mysql tests, so might be something else than this particular change 🤷 Need to spend more time debugging this, it can be easily something on my end (tho everything is working as expected with 0.95). One thing I noticed is that sqlite queries now automatically include the
My point is that the error message is wrong, it suggests installing the old sqlite3 package. |