-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
feat!: drop support for node 16 and 18 #11382
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
Conversation
a626a51 to
4ad31af
Compare
commit: |
baedcb3 to
f2c905f
Compare
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughThis update modernizes the project’s TypeScript and Node.js environment, raising support to ES2023 and Node 20+/22+, and updates dependencies and driver versions accordingly. Several workflow files are reformatted and updated for consistency, with some jobs and input types adjusted. Multiple TypeScript classes now use Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant GitHub Actions
participant Node.js
participant TypeScript
participant Database Drivers
User->>GitHub Actions: Push/PR triggers workflow
GitHub Actions->>Node.js: Setup Node 20/22/24 (as per new matrix)
GitHub Actions->>TypeScript: Compile with ES2023 settings
GitHub Actions->>Database Drivers: Install updated drivers (e.g., better-sqlite3 11.10.0)
GitHub Actions->>GitHub Actions: Run tests and publish (using updated workflows)
Poem
✨ Finishing touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🧪 Early access (Sonnet 4.5): enabledWe are currently testing the Sonnet 4.5 model, which is expected to improve code review quality. However, this model may lead to increased noise levels in the review comments. Please disable the early access features if the noise level causes any inconvenience. Note:
Comment |
|
@coderabbitai full review |
✅ Actions performedReview triggered.
|
✅ Actions performedFull review triggered. |
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.
Actionable comments posted: 0
🧹 Nitpick comments (5)
src/driver/aurora-postgres/AuroraPostgresQueryRunner.ts (2)
13-13: Consider using theoverridemodifier for clarity.Since you’re declaring a property that exists on the base class (
PostgresQueryRunner), marking it explicitly withoverride(if your TS target supports it) makes the intent clearer and helps catch mismatches.
34-34: Useoverridewhen declaringdriver.Similarly, the
driverproperty here shadows the base class’s field. Replacingdeclare driver: AuroraPostgresDriverwith
override declare driver: AuroraPostgresDriverimproves readability and leverages TS’s safety checks.
README_ko.md (1)
4-4: Use the official “Node.js” spelling.Standardize on “Node.js” instead of “NodeJS” to match the framework’s official name.
🧰 Tools
🪛 LanguageTool
[uncategorized] ~4-~4: The official spelling of this programming framework is “Node.js”.
Context: ...">
TypeORM은 NodeJS, Browser, Cordova, PhoneGap, Ionic, Rea...(NODE_JS)
README-zh_CN.md (1)
23-23: Standardize on “Node.js” spelling.Replace “NodeJS” with “Node.js” in the intro for consistency with the official branding.
README.md (1)
24-24: Use correct spellingNode.js
The framework name is officially “Node.js”, not “NodeJS”. Please update the casing for consistency and accuracy.🧰 Tools
🪛 LanguageTool
[uncategorized] ~24-~24: The official spelling of this programming framework is “Node.js”.
Context: ...ect-relational_mapping) that can run in NodeJS, Browser, Cordova, PhoneGap, Ionic, Rea...(NODE_JS)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (26)
.github/workflows/codeql.yml(0 hunks).github/workflows/coverage.yml(1 hunks).github/workflows/database-tests-compose.yml(2 hunks).github/workflows/database-tests-windows.yml(0 hunks).github/workflows/database-tests.yml(11 hunks).github/workflows/default.yml(5 hunks).github/workflows/publish-package.yml(1 hunks)README-zh_CN.md(1 hunks)README.md(2 hunks)README_ko.md(1 hunks)gulpfile.ts(1 hunks)ormconfig.sample.json(1 hunks)package.json(5 hunks)src/commands/InitCommand.ts(3 hunks)src/driver/aurora-postgres/AuroraPostgresDriver.ts(1 hunks)src/driver/aurora-postgres/AuroraPostgresQueryRunner.ts(2 hunks)src/driver/better-sqlite3/BetterSqlite3Driver.ts(0 hunks)src/driver/capacitor/CapacitorDriver.ts(1 hunks)src/driver/cordova/CordovaDriver.ts(1 hunks)src/driver/expo/ExpoDriver.ts(1 hunks)src/driver/expo/legacy/ExpoLegacyDriver.ts(1 hunks)src/driver/sqlite/SqliteDriver.ts(0 hunks)src/driver/sqljs/SqljsDriver.ts(1 hunks)src/repository/MongoRepository.ts(1 hunks)test/functional/query-runner/stream.ts(1 hunks)tsconfig.json(2 hunks)
💤 Files with no reviewable changes (4)
- .github/workflows/database-tests-windows.yml
- src/driver/better-sqlite3/BetterSqlite3Driver.ts
- src/driver/sqlite/SqliteDriver.ts
- .github/workflows/codeql.yml
🧰 Additional context used
🧬 Code Graph Analysis (7)
src/driver/expo/ExpoDriver.ts (1)
src/driver/expo/ExpoConnectionOptions.ts (1)
ExpoConnectionOptions(6-23)
src/repository/MongoRepository.ts (1)
src/entity-manager/MongoEntityManager.ts (1)
MongoEntityManager(75-1211)
src/driver/sqljs/SqljsDriver.ts (1)
src/driver/sqljs/SqljsConnectionOptions.ts (1)
SqljsConnectionOptions(6-55)
src/driver/expo/legacy/ExpoLegacyDriver.ts (1)
src/driver/expo/ExpoConnectionOptions.ts (1)
ExpoConnectionOptions(6-23)
src/driver/cordova/CordovaDriver.ts (1)
src/driver/cordova/CordovaConnectionOptions.ts (1)
CordovaConnectionOptions(6-29)
src/driver/capacitor/CapacitorDriver.ts (1)
src/driver/capacitor/CapacitorConnectionOptions.ts (1)
CapacitorConnectionOptions(6-44)
src/driver/aurora-postgres/AuroraPostgresQueryRunner.ts (1)
src/driver/aurora-postgres/AuroraPostgresDriver.ts (1)
AuroraPostgresDriver(18-192)
🪛 LanguageTool
README_ko.md
[uncategorized] ~4-~4: The official spelling of this programming framework is “Node.js”.
Context: ...">
TypeORM은 NodeJS, Browser, Cordova, PhoneGap, Ionic, Rea...
(NODE_JS)
README.md
[uncategorized] ~24-~24: The official spelling of this programming framework is “Node.js”.
Context: ...ect-relational_mapping) that can run in NodeJS, Browser, Cordova, PhoneGap, Ionic, Rea...
(NODE_JS)
🔇 Additional comments (40)
.github/workflows/coverage.yml (1)
12-12: Properly formatted GitHub Action parameter.The explicit formatting of the
parallel-finishedparameter is correct and consistent with GitHub Actions best practices.test/functional/query-runner/stream.ts (2)
49-51: Good type annotation enhancement.Adding explicit
Promise<void>type annotation improves type safety and readability without changing functionality. This change aligns with modern TypeScript practices.
57-57: Good type annotation enhancement.Adding explicit
Promise<void>type annotation for the Promise handling the stream end/error events improves type safety and clarity.src/driver/expo/ExpoDriver.ts (1)
8-8: Correctly standardized property declaration.Changing the
optionsproperty to use thedeclarekeyword properly indicates that this property is expected to be provided externally (likely by the parent classAbstractSqliteDriver) rather than initialized in this class. This change is part of a broader standardization of driver class property declarations throughout the codebase.src/repository/MongoRepository.ts (1)
63-63: Correctly standardized property declaration.Changing
managerproperty to use thedeclare readonlykeywords improves type declarations while maintaining the readonly constraint. This property is injected externally rather than initialized within this class, and the declaration now properly reflects this pattern. This aligns with modern TypeScript practices and similar changes made throughout the codebase.src/driver/aurora-postgres/AuroraPostgresDriver.ts (1)
13-13: Consistent use ofdeclarefor options property
Switchingoptionsto adeclaremodifier ensures it’s a type-only declaration (no emitted JS) and aligns with the pattern across other drivers.src/driver/expo/legacy/ExpoLegacyDriver.ts (1)
9-9: Adopteddeclarefor typed connection options
Changingoptionstodeclare options: ExpoConnectionOptionscorrectly reflects that the property is provided externally (by the superclass) and avoids redundant initialization.src/driver/capacitor/CapacitorDriver.ts (1)
11-11: Declaredoptionsfor Capacitor driver configuration
Usingdeclare options: CapacitorConnectionOptionsharmonizes the property declaration style across all SQLite-based drivers and removes unnecessary initialization.src/driver/cordova/CordovaDriver.ts (1)
17-17: Standardizedoptionsdeclaration for Cordova driver
Thedeclare options: CordovaConnectionOptionschange cleanly indicates thatoptionscomes from the DataSource and avoids emitting default JS code.src/driver/sqljs/SqljsDriver.ts (1)
24-24: Type-onlyoptionsdeclaration for SQL.js driver
Switching todeclare options: SqljsConnectionOptionsmatches the refactor in other drivers, ensuring the property is typed without side-effect initialization.README_ko.md (1)
4-4: Align documentation with ES2023 support.The JavaScript version in the intro was correctly updated to ES2023, matching other README files and config.
🧰 Tools
🪛 LanguageTool
[uncategorized] ~4-~4: The official spelling of this programming framework is “Node.js”.
Context: ...">
TypeORM은 NodeJS, Browser, Cordova, PhoneGap, Ionic, Rea...(NODE_JS)
tsconfig.json (2)
2-2: Upgrade baseline to Node 20.Extending
@tsconfig/node20/tsconfig.jsoncorrectly aligns the project with the new Node.js support policy.
21-21: Explicitly disableuseDefineForClassFields.Setting
"useDefineForClassFields": falseensures backward-compatible semantics for class fields across your supported runtimes.README-zh_CN.md (1)
23-23: Update supported JS version to ES2023.This bump aligns the Chinese README with the project’s upgrade to the ES2023 target.
ormconfig.sample.json (1)
59-59: Enable MSSQL configuration.Changing
"skip"tofalsehere correctly activates MSSQL tests. Ensure corresponding CI jobs and service containers are prepared in workflows.README.md (1)
155-155: Trailing comma consistency
The addition of a trailing comma after"Saw",is consistent with updated linting standards and improves diffs..github/workflows/database-tests-compose.yml (2)
7-7: Usenumbertype fornode-versioninput
Changing fromstringtonumberaligns this workflow with other database-test workflows and enforces type consistency.
55-55: Usenpm cifor clean installs
Switching fromnpm itonpm ciensures reproducible, cached installs in CI environments..github/workflows/publish-package.yml (3)
6-6: Formatting-only change (blank line addition).
8-8: Rename job topublish
Updating the job name frombuildtopublishbetter reflects the job’s purpose and improves clarity.
13-13: Formatting-only change (blank line addition).gulpfile.ts (1)
67-67: Update compilation libs to ES2023
Aligning the TypeScriptlibwith the project’s ES2023 support ensures consistency across build targets..github/workflows/default.yml (5)
5-5: Rename workflow todefault
Renaming from “test” to “default” reflects its broader role in CI and matches repository conventions.
20-20: Use integer fornode-version
Switchingnode-versionfrom"20.x"to20matches other workflows and enforces consistent version specification.
34-34: Use integer fornode-version
Consistent with the formatting in the formatting and build jobs.
54-54: Update test matrix to support Node.js 20, 22, 24
Expanding the matrix to[20, 22, 24]ensures tests cover the newly supported Node.js versions.
66-66: Confirm Node.js version support for compose tests
Thedatabase-tests-composematrix omits Node.js 24. Please verify whether the compose-based tests should also include version 24 or if there's a specific constraint preventing it.src/commands/InitCommand.ts (3)
265-266: LGTM: ECMAScript target upgrade for Node 20+ supportThe update to ES2023 lib and ES2022 target aligns with dropping support for Node.js 16 and 18, as these newer ECMAScript features require Node.js 20+.
Also applies to: 283-284
712-712:Details
❓ Verification inconclusive
Significant version upgrade for better-sqlite3
The
better-sqlite3dependency has been updated to the latest major version^11.10.0. This is a significant jump that aligns with the Node 20+ requirement.
🏁 Script executed:
#!/bin/bash # Check better-sqlite3 compatibility with Node 20+ npm view better-sqlite3@11.10.0 engines.nodeLength of output: 46
To confirm Node.js compatibility for better-sqlite3@11.10.0, let’s fetch its full
enginesfield:
🏁 Script executed:
#!/bin/bash npm view better-sqlite3@11.10.0 enginesLength of output: 41
Verify Node.js compatibility for better-sqlite3@11.10.0
The
enginesfield isn’t published for v11.10.0, so we can’t automatically confirm it formally supports Node 20+. Please manually verify compatibility by checking the package’s docs or testing it under Node 20+.
- Location:
src/commands/InitCommand.ts(Line 712)- Snippet:
packageJson.dependencies["better-sqlite3"] = "^11.10.0"
718-718:Details
✅ Verification successful
Significant version upgrade for mssql
The
mssqldependency has been updated to^11.0.1. This version requires Node.js 20+ and drops support for older Node versions.
🏁 Script executed:
#!/bin/bash # Check mssql compatibility with Node 20+ npm view mssql@11.0.1 engines.nodeLength of output: 41
Significant version upgrade for mssql
The
mssqldependency has been updated to^11.0.1. This version requires Node.js 18 or higher, dropping support for older Node.js versions.package.json (5)
4-4: LGTM: Updated description to reflect ES2023+ supportThe package description has been updated to reference ES2023+ support, consistent with the ECMAScript target changes.
89-89: Added helpful typecheck scriptAdding a dedicated
typecheckscript improves the development workflow by allowing type verification without emitting output.
112-112: Updated tsconfig base to Node 20Using
@tsconfig/node20instead of a previous Node version aligns with the updated Node.js requirements.
125-125: LGTM: Updated dev dependencies for Node 20+ compatibilityThe development dependencies have been updated to versions compatible with Node 20+:
@types/nodeto ^20.17.50better-sqlite3to ^11.10.0typescriptto ^5.8.3These updates are necessary for the target Node version range.
Also applies to: 119-119, 162-162
239-239: Node.js engine requirement updated to v20.9.0+ or v22.11.0+The engine requirement now specifies Node.js 20.9.0 or higher, or Node.js 22.11.0 or higher, explicitly dropping support for Node.js 16 and 18 as intended.
.github/workflows/database-tests.yml (5)
7-7: Input type changed from string to numberChanged the
node-versioninput type fromstringtonumber, which is more appropriate for version numbers and consistent with other workflows.
31-31: Improved CI reliability with clean npm installsAll package installation commands have been changed from
npm itonpm ci, which is the recommended approach for CI environments as it ensures clean, reproducible installs based on the exact versions in package-lock.json.Also applies to: 59-59, 91-91, 133-133, 155-155, 177-177, 199-199, 240-240
69-70: Added Node.js version constraint for MSSQL testsAdded a conditional to only run MSSQL tests on Node.js versions ≤ 23, as the MSSQL client has compatibility issues with Node.js 24+. This prevents unnecessary test failures.
97-97: Simplified Coveralls flag namesThe Coveralls flag names have been simplified to follow a more consistent pattern, making it easier to track test coverage across different environments.
Also applies to: 246-246
213-213:Details
✅ Verification successful
Updated PostGIS matrix version
Changed the PostGIS version in the matrix from "14-3.5" to "14-3.3". This may be to address compatibility issues or to test with a more widely used version.
🏁 Script executed:
#!/bin/bash # Check if there are any issues reported with PostGIS 14-3.3 that might affect tests gh issue list --repo typeorm/typeorm --search "postgis 14-3.3" --state allLength of output: 76
🏁 Script executed:
#!/bin/bash set -e echo "Searching for any remaining references to PostGIS 14-3.5 in the repo..." rg "14-3\\.5" -n . echo echo "Verifying occurrences of the new PostGIS 14-3.3 entry..." rg "14-3\\.3" -n . echo echo "Listing all PostGIS matrix entries in workflows..." grep -R "postgis-version" -n .github/workflowsLength of output: 181
🏁 Script executed:
#!/bin/bash echo "Searching for any remaining references to PostGIS 14-3.5 in the repo..." rg "14-3\\.5" -n . || echo "✔ No references to 14-3.5 found." echo echo "Verifying occurrences of the new PostGIS 14-3.3 entry..." rg "14-3\\.3" -n . || echo "⚠ No occurrences of 14-3.3 found—unexpected." echo echo "Listing all PostGIS matrix entries in workflows..." grep -R "postgis-version" -n .github/workflowsLength of output: 946
All references to PostGIS 14-3.5 have been removed in favor of 14-3.3
- Verified no remaining
"14-3.5"occurrences in the repo.- Workflows updated in
.github/workflows/database-tests.yml(line 213) to["14-3.3", "17-3.5"].- Docker setup in
docker-compose.yml(line 31) now usespostgis/postgis:14-3.3.No open issues found for PostGIS 14-3.3 in the TypeORM repo. This change is consistent and ready to merge.
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.
Actionable comments posted: 0
🧹 Nitpick comments (5)
README_ko.md (1)
4-4: Updated supported JavaScript version to ES2023The documentation has been updated to reflect that TypeORM now supports JavaScript ES2023 features, which aligns with the PR's objective of dropping support for older Node.js versions (16 and 18) and supporting newer ones (22 and 23).
Consider updating "NodeJS" to "Node.js" which is the official spelling of the framework.
-TypeORM은 NodeJS, Browser, Cordova, PhoneGap, Ionic, React Native, NativeScript, Expo 및 Electron 플랫폼에서 실행할 수 있는 [ORM](https://en.wikipedia.org/wiki/Object-relational_mapping)이며 TypeScript 및 JavaScript(ES2023)와 함께 사용할 수 있다. +TypeORM은 Node.js, Browser, Cordova, PhoneGap, Ionic, React Native, NativeScript, Expo 및 Electron 플랫폼에서 실행할 수 있는 [ORM](https://en.wikipedia.org/wiki/Object-relational_mapping)이며 TypeScript 및 JavaScript(ES2023)와 함께 사용할 수 있다.🧰 Tools
🪛 LanguageTool
[uncategorized] ~4-~4: The official spelling of this programming framework is “Node.js”.
Context: ...">
TypeORM은 NodeJS, Browser, Cordova, PhoneGap, Ionic, Rea...(NODE_JS)
README.md (1)
24-24: Update supported JavaScript version to ES2023 and standardize "Node.js" spelling
The documentation correctly reflects ES2023 support, but consider replacing "NodeJS" with the official "Node.js" to maintain consistency and adhere to common branding.🧰 Tools
🪛 LanguageTool
[uncategorized] ~24-~24: The official spelling of this programming framework is “Node.js”.
Context: ...ect-relational_mapping) that can run in NodeJS, Browser, Cordova, PhoneGap, Ionic, Rea...(NODE_JS)
src/commands/InitCommand.ts (2)
265-266: Update ESM tsconfig lib and target versions
Bumpinglibto["es2023"]aligns generated projects with current language features. Consider also updating thetargetto"es2023"to match, unless there’s a specific reason to emit ES2022 bytecode for broader compatibility.
283-284: Update CJS tsconfig lib and target versions
Similarly, the CommonJS variant now uses["es2023"]. Again, you may want to bump thetargetto"es2023"for full feature support, or document the rationale for targeting ES2022.package.json (1)
89-89: Addtypecheckscript for CI type-only checking
The newtypecheckscript (tsc --noEmit) is a useful addition. Consider invoking it in your CI workflows (e.g., as part oftest:ci) to catch type regressions early.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (26)
.github/workflows/codeql.yml(0 hunks).github/workflows/coverage.yml(1 hunks).github/workflows/database-tests-compose.yml(2 hunks).github/workflows/database-tests-windows.yml(0 hunks).github/workflows/database-tests.yml(11 hunks).github/workflows/default.yml(5 hunks).github/workflows/publish-package.yml(1 hunks)README-zh_CN.md(1 hunks)README.md(2 hunks)README_ko.md(1 hunks)gulpfile.ts(1 hunks)ormconfig.sample.json(1 hunks)package.json(5 hunks)src/commands/InitCommand.ts(3 hunks)src/driver/aurora-postgres/AuroraPostgresDriver.ts(1 hunks)src/driver/aurora-postgres/AuroraPostgresQueryRunner.ts(2 hunks)src/driver/better-sqlite3/BetterSqlite3Driver.ts(0 hunks)src/driver/capacitor/CapacitorDriver.ts(1 hunks)src/driver/cordova/CordovaDriver.ts(1 hunks)src/driver/expo/ExpoDriver.ts(1 hunks)src/driver/expo/legacy/ExpoLegacyDriver.ts(1 hunks)src/driver/sqlite/SqliteDriver.ts(0 hunks)src/driver/sqljs/SqljsDriver.ts(1 hunks)src/repository/MongoRepository.ts(1 hunks)test/functional/query-runner/stream.ts(1 hunks)tsconfig.json(2 hunks)
💤 Files with no reviewable changes (4)
- .github/workflows/database-tests-windows.yml
- .github/workflows/codeql.yml
- src/driver/sqlite/SqliteDriver.ts
- src/driver/better-sqlite3/BetterSqlite3Driver.ts
🧰 Additional context used
🧬 Code Graph Analysis (6)
src/driver/capacitor/CapacitorDriver.ts (1)
src/driver/capacitor/CapacitorConnectionOptions.ts (1)
CapacitorConnectionOptions(6-44)
src/driver/cordova/CordovaDriver.ts (1)
src/driver/cordova/CordovaConnectionOptions.ts (1)
CordovaConnectionOptions(6-29)
src/driver/expo/ExpoDriver.ts (1)
src/driver/expo/ExpoConnectionOptions.ts (1)
ExpoConnectionOptions(6-23)
src/driver/sqljs/SqljsDriver.ts (1)
src/driver/sqljs/SqljsConnectionOptions.ts (1)
SqljsConnectionOptions(6-55)
src/repository/MongoRepository.ts (1)
src/entity-manager/MongoEntityManager.ts (1)
MongoEntityManager(75-1211)
src/driver/expo/legacy/ExpoLegacyDriver.ts (1)
src/driver/expo/ExpoConnectionOptions.ts (1)
ExpoConnectionOptions(6-23)
🪛 LanguageTool
README_ko.md
[uncategorized] ~4-~4: The official spelling of this programming framework is “Node.js”.
Context: ...">
TypeORM은 NodeJS, Browser, Cordova, PhoneGap, Ionic, Rea...
(NODE_JS)
README.md
[uncategorized] ~24-~24: The official spelling of this programming framework is “Node.js”.
Context: ...ect-relational_mapping) that can run in NodeJS, Browser, Cordova, PhoneGap, Ionic, Rea...
(NODE_JS)
🔇 Additional comments (38)
.github/workflows/coverage.yml (1)
12-12: Clean formatting improvement.The whitespace formatting change on the
parallel-finishedparameter improves readability and consistency, which is good practice for YAML configuration files..github/workflows/publish-package.yml (2)
6-8: Job name change and formatting improvements.Renaming the job from
buildtopublishbetter reflects its actual purpose - publishing a package to npm. The added blank line after the workflow trigger block improves readability by providing clear visual separation between workflow sections.
13-13: Improved YAML formatting.The added blank line after the permissions block creates better visual separation, making the workflow file more readable and maintainable.
.github/workflows/database-tests-compose.yml (2)
7-7: Improved type definition for node-version.Changing the input type from
stringtonumberis more accurate for Node.js version numbers and enables better version comparisons in the workflow. This aligns with the PR's focus on updating Node.js version handling.
55-55: Improved npm installation practice.Changing from
npm itonpm ciis a best practice for CI environments.npm ci:
- Installs dependencies exactly as specified in package-lock.json
- Deletes node_modules before installing to prevent leftover dependencies
- Provides more deterministic builds
This change improves build reliability and consistency.
test/functional/query-runner/stream.ts (2)
49-51: Improved TypeScript type safety.Adding the explicit
Promise<void>type annotation improves type safety and code clarity. This properly indicates that the Promise doesn't resolve with any value when awaiting the "readable" event.
57-57: Improved TypeScript type safety.Adding the explicit
Promise<void>type annotation for the Promise handling "end" and "error" events improves type safety and follows modern TypeScript best practices.src/driver/expo/ExpoDriver.ts (1)
8-8: Improved TypeScript class property declaration.Using the
declaremodifier for theoptionsproperty is a TypeScript best practice that:
- Clearly indicates the property exists but is initialized elsewhere (in the parent class)
- Improves type safety and code clarity
- Standardizes property declarations across driver implementations
This change aligns with modern TypeScript coding patterns.
src/driver/capacitor/CapacitorDriver.ts (1)
11-11: LGTM: Improved TypeScript declaration using thedeclarekeywordThe change from a direct property declaration to using
declareis appropriate. This indicates that theoptionsproperty is expected to be provided externally (likely by the superclass) rather than being initialized within this class, which matches the actual usage in the code.src/repository/MongoRepository.ts (1)
63-63: LGTM: Enhanced type declaration usingdeclare readonlyThis change correctly uses the
declarekeyword while preserving thereadonlymodifier for themanagerproperty. This is consistent with similar changes across the codebase and better reflects that this property is initialized elsewhere while still enforcing immutability.src/driver/cordova/CordovaDriver.ts (1)
17-17: LGTM: Improved TypeScript declarationThe change from a direct property declaration to using
declarefor theoptionsproperty correctly indicates that it's provided externally rather than initialized within this class. This aligns with how the property is actually used in the constructor.src/driver/aurora-postgres/AuroraPostgresDriver.ts (1)
13-13: LGTM: Enhanced type declaration in abstract classUsing the
declarekeyword for theoptionsproperty in the abstractPostgresWrapperclass is appropriate. It correctly indicates that subclasses are expected to provide an implementation for this property, which aligns with howAuroraPostgresDriverinitializes it in its constructor.src/driver/sqljs/SqljsDriver.ts (1)
24-24: Standard TypeScript pattern update: Addeddeclaremodifier to propertyThe change adds the
declaremodifier to theoptionsproperty, indicating that it's expected to be provided by the parent class (AbstractSqliteDriver) or through dependency injection rather than initialized in this class. This is part of a broader effort to standardize property declarations across driver classes.src/driver/expo/legacy/ExpoLegacyDriver.ts (1)
9-9: Standard TypeScript pattern update: Addeddeclaremodifier to propertyThe change adds the
declaremodifier to theoptionsproperty, consistent with the pattern applied to other driver classes in this PR. This indicates that the property exists but is initialized in the parent class or through constructor injection.src/driver/aurora-postgres/AuroraPostgresQueryRunner.ts (2)
13-13: Standard TypeScript pattern update: Addeddeclaremodifier to propertyThe change adds the
declaremodifier to thedriverproperty in thePostgresQueryRunnerWrapperclass, indicating that it's expected to be provided by the parent class or through constructor injection rather than initialized directly.
34-34: Standard TypeScript pattern update: Addeddeclaremodifier to propertyThe change adds the
declaremodifier to thedriverproperty in theAuroraPostgresQueryRunnerclass, following the same pattern applied to other driver-related classes in this PR. This is part of the TypeScript code modernization effort.ormconfig.sample.json (1)
59-59: Enable MSSQL connection in sample config
Changing"skip"fromtruetofalseactivates the MSSQL configuration inormconfig.sample.json, aligning it with the updated GitHub Actions workflows that now include an MSSQL job for Node.js ≤23.tsconfig.json (2)
2-2: Update TypeScript preset to Node 20
Extending from@tsconfig/node20/tsconfig.jsonensures the compiler settings match the new Node 20+ support dropped in this PR.
21-21: AdduseDefineForClassFieldscompiler option
The new"useDefineForClassFields": falsealigns class field semantics with the existing code, preventing potential behavioral changes when targeting ES2023.README-zh_CN.md (1)
23-23: Update Chinese docs to ES2023 support
The change from ES2021 to ES2023 in the Chinese README aligns with the overall ES2023 upgrade across the repository.gulpfile.ts (1)
67-67: Align browser compilelibwith ES2023
Updating the TypeScriptlibfrom an older ES version to["es2023", "dom"]ensures the browser build task leverages the latest language features after dropping support for Node 16/18..github/workflows/default.yml (4)
5-5: Rename workflow for clarity
Renaming the workflow from “test” to “default” aligns with its broader purpose of enforcing formatting, building, and testing across multiple jobs. Ensure any documentation or badges (e.g., in the README) referencing the old workflow name are updated accordingly.
20-20: Use numeric Node.js version inputs
Changingnode-versionfrom a string (e.g."20.x") to an integer (20) leverages the neweractions/setup-node@v4schema and simplifies maintenance. All other workflows should be audited for consistency with this format.Also applies to: 34-34
23-23: Switchnpm itonpm cifor reproducible installs
Usingnpm ciensures a clean, lockfile-respecting install and can improve CI reliability and speed. This update is applied consistently across both the formatting and build jobs.Also applies to: 37-37
54-54: Update Node.js version matrix to current LTS and latest
The test matrix now targets Node.js 20, 22, and 24 for containerized database tests, and 20/22 for compose-based tests, dropping 16 and 18. Confirm that any downstream workflows or documentation also reflect this version set.Also applies to: 66-66
src/commands/InitCommand.ts (2)
712-712: Bumpbetter-sqlite3driver version
Upgrading to^11.10.0ensures generated templates use the latest major release of the SQLite driver. This matches the pinned devDependency and peerDependency ranges inpackage.json.
718-718: Bumpmssqldriver version
Updating the defaultmssqldependency to^11.0.1keeps the scaffold in sync with the MS SQL Server driver’s current version.package.json (5)
4-4: Update description to reference ES2023+ support
Including “ES2023+” in the description highlights the library’s modern JavaScript compatibility. Ensure any marketing or READMEs are updated consistently.
112-112: Bump Node.js config packages to v20
Upgrading@tsconfig/node20and@types/nodeto Node 20–compatible versions ensures typing and tsconfig presets align with the new engine constraints.Also applies to: 119-119
125-125: Upgradebetter-sqlite3in devDependencies
Aligning the dev dependency version with the scaffold templates ensures consistency between development and generated projects.
162-162: Upgradetypescriptpatch version
Bumping to^5.8.3pulls in the latest fixes. Verify that downstream CI and linting configurations remain compatible.
239-239: Tighten Node.js engine requirement
Theengines.nodefield now enforces^20.9.0 || >=22.11.0, matching the CI matrix. This is correct, as it covers Node 20+ and all future versions ≥22.11.0 (including v24)..github/workflows/database-tests.yml (6)
7-7: Change input type fornode-versionto number
Defining the workflow input astype: numberstandardizes version handling across the CI pipelines and is compatible withactions/setup-node@v4.
31-31: Switch all installs tonpm ci
Replacingnpm iwithnpm ciacross all database test jobs ensures clean, deterministic installs. Great consistency improvement.Also applies to: 60-60, 91-91, 133-133, 155-155, 177-177, 199-199, 240-240
69-69: Limit MSSQL tests to supported Node versions
Theif: ${{ inputs.node-version <= 23 }}condition correctly skips the MSSQL job on Node >23 where the driver isn’t yet supported. No changes needed.
97-97: Standardize Coveralls flag for MSSQL
Changing tomssql-node:${{ inputs.node-version }}simplifies the flag naming. Ensure downstream Coveralls reporting aggregates as expected.
213-213: Update PostGIS matrix version for v14 tests
Switching from"14-3.5"to"14-3.3"ensures compatibility with the database image used. Confirm the image tag and its PostGIS version match exactly.
246-246: Adjust Coveralls flag for Postgres tests
The new flag-namepostgres:${{ matrix.postgis-version }}-node:${{ inputs.node-version }}captures both PostGIS and Node.js versions. This will improve coverage traceability.
61d8c59 to
fe66cfd
Compare
fe66cfd to
8db3c4c
Compare
gioboa
left a comment
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.
LGTM 👏 @alumni
Do we want to test with Node 24 as well?
Afair there's a dependency package issue that builds to the native code (some of the SQLite drivers), so bumping to Node 24 would also mean bumping that dependency to a newer version. |
OSA413
left a comment
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.
LGTM, I hope nothing will break
gioboa
left a comment
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.
Thanks @OSA413 for the clarification
Afair there was an issue with mssql failing the tests on node 24. I did not investigate last time why - there's no new version of the mssql client, maybe it's something in tedious (its dependency). I'll check if it got fixed and update it. Another potential issue we could have with node 24 is that it's using a newer version of npm (v11 instead of v10), so a different lockfile format. I'll check if it's a problem, but if it is, it needs to be done separately (that's why I was suggesting corepack + pnpm). |
| fail-fast: false | ||
| matrix: | ||
| node-version: [18, 20] | ||
| node-version: [20, 24] |
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.
It's working 🙌✅
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.
Yeah, hope it's okay to keep the old LTS (20) and the development version (24) of node.
Normally most companies seem to stick to LTS (22), so neither of them, but last time we had 3 different versions there were too many queued workflows 🤷🏻♂️
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.
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.
Description of change
Drop support for older versions of node (16 and 18) and setup tests for node 22 and 23.
Pull-Request Checklist
masterbranchnpm run formatto apply prettier formattingnpm run testpasses with this changeFixes #0000Summary by CodeRabbit
New Features
Improvements
Documentation
Refactor
Chores