feat(sqlite)!: drop support for sqlite3 and default to better-sqlite3#11836
feat(sqlite)!: drop support for sqlite3 and default to better-sqlite3#11836pkuczynski merged 59 commits intomasterfrom
Conversation
BREAKING CHANGE: TypeORM is now compiled for ECMAScript 2023, meaning old versions of Node.js are no longer supported. The minimum supported version of Node.js is 20.
* chore: disable eslint errors for chai assertions * refactor: make `no-unused-expressions` an error and fix code
* feat: support explicit resource management in QueryRunner * test: improve tests for explicit resource management * feat: commit transaction on QueryRunner dispose
# Conflicts: # .github/workflows/commit-validation.yml # .github/workflows/preview.yml # .github/workflows/publish-package.yml # README-zh_CN.md # README_ko.md # docs/docs/query-runner.md # eslint.config.mjs # package-lock.json # package.json # src/commands/InitCommand.ts # src/driver/sqlserver/MssqlParameter.ts # test/utils/xfail.ts
# Conflicts: # package-lock.json # package.json
# Conflicts: # DEVELOPER.md # package-lock.json # package.json # test/github-issues/3387/issue-3387.ts # test/github-issues/3837/issue-3387.test.ts # test/github-issues/3837/issue-3837.ts
…ect npm version (#11827)
# Conflicts: # eslint.config.mjs
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to 03d1c05
Previous suggestionsSuggestions up to commit 9aa2689
Suggestions up to commit 968bf5e
Suggestions up to commit 032bd31
✅ Suggestions up to commit 3813364
✅ Suggestions up to commit d4b4db4
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Code Review by Qodo
1. Test uses unsupported flags option
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewⓘ The new review experience is currently in Beta. Learn more |
Code Review by Qodo
1. Unescaped filepath in SQL
|
…n upgrade guide The file-open-flags test used sqlite3-specific C-level open flags which better-sqlite3 does not support. The test was rewritten to test enableWAL but enable-wal.test.ts already covers this, so remove the duplicate. Also document the flags option removal in the 1.0 upgrade guide.
Move boolean-to-integer normalization before logQuery and broadcastBeforeQueryEvent so that logged/emitted parameters match what better-sqlite3 actually executes.
Add choices constraint to the yargs --db option so unsupported database values are rejected before handler() runs, preventing partially-initialized project directories.
Code Review by Qodo
1. Test uses unsupported flags option
|
alumni
left a comment
There was a problem hiding this comment.
Nice work! I left a few comments :)
Code Review by Qodo
1. Test uses unsupported flags option
|
# Conflicts: # docs/docs/guides/8-migration-v1.md # package.json # pnpm-lock.yaml # sample/sample33-custom-repository/data-source.ts # src/data-source/DataSourceOptions.ts # src/driver/DriverFactory.ts # src/driver/sqlite/SqliteDataSourceOptions.ts # src/driver/sqlite/SqliteDriver.ts # src/driver/sqlite/SqliteQueryRunner.ts # src/driver/types/DatabaseType.ts
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewⓘ The new review experience is currently in Beta. Learn more |
| break | ||
| case "sqlite": | ||
| packageJson.dependencies["sqlite3"] = | ||
| ourPackageJson.devDependencies.sqlite3 |
There was a problem hiding this comment.
Funny thing, loading package.json did not work on certain configurations (e.g. PnP, default in yarn) + now we also don't have devDependencies because they get removed during the build. We'll figure out something, but not right now (or it would be just for a few weeks).
alumni
left a comment
There was a problem hiding this comment.
Thanks, I'm happy to get rid of this driver.
There's a duplicate test (that runs even when better-sqlite3 tests are disabled), could you remove it please?
I'll approve now so you can merge faster after that change.
Code Review by Qodo
1.
|
|
Great work @pkuczynski 🙌 |
Fixes #11718