Skip to content

[Snyk] Security upgrade typeorm from 0.2.25 to 0.3.26#94

Open
cdobru wants to merge 3 commits intomainfrom
snyk-fix-de1351fbeda87210215459cdf59e6d6c
Open

[Snyk] Security upgrade typeorm from 0.2.25 to 0.3.26#94
cdobru wants to merge 3 commits intomainfrom
snyk-fix-de1351fbeda87210215459cdf59e6d6c

Conversation

@cdobru
Copy link
Owner

@cdobru cdobru commented Mar 25, 2026

snyk-top-banner

Snyk has created this PR to fix 1 vulnerabilities in the npm dependencies of this project.

Snyk changed the following file(s):

  • package.json
  • package-lock.json

Vulnerabilities that will be fixed with an upgrade:

Issue Score
medium severity SQL Injection
SNYK-JS-TYPEORM-13746469
  238  

Breaking Change Risk

Merge Risk: High

Notice: This assessment is enhanced by AI.


Important

  • Check the changes in this PR to ensure they won't cause issues with your project.
  • Max score is 1000. Note that the real score may have changed since the PR was raised.
  • This PR was automatically created by Snyk using the credentials of a real user.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.

For more information:
🧐 View latest project report
📜 Customise PR templates
🛠 Adjust project settings
📚 Read about Snyk's upgrade logic


Learn how to fix vulnerabilities with free interactive lessons:

🦉 SQL Injection

@cdobru
Copy link
Owner Author

cdobru commented Mar 25, 2026

Merge Risk: High

The upgrade from TypeORM v0.2.25 to v0.3.26 is a major version change with numerous significant and mandatory breaking changes that require substantial code refactoring.

Key Breaking Changes:

  • Connection API Overhaul: The entire connection bootstrap mechanism has been deprecated and replaced. Connection, createConnection(), and getConnectionManager() are replaced by the new DataSource class. All connection logic must be updated to use new DataSource({ ... }) and dataSource.connect(). [3, 5, 6, 7]
  • Node.js Requirement: The package compilation target is now es2020, which requires Node.js v14 or newer. [3]
  • Custom Repositories: The syntax for creating custom repositories has been completely changed, and the old methods have been removed. Code must be refactored to use the new .extend() method on a repository instance obtained from a DataSource. [3]
  • Find Method Changes:
    • findOne() and QueryBuilder.getOne() now return null instead of undefined when no entity is found. [3]
    • The join option within FindOptions is deprecated and developers must now use the QueryBuilder for queries with manual joins. [3]
  • Postgres JSON/JSONB Handling: For Postgres, values for json or jsonb columns are no longer automatically stringified and are passed directly to the database driver. [2]

Recommendation: This is a high-effort upgrade that will break existing application code. Developers must carefully follow a migration guide to update connection logic, custom repositories, and data access patterns. Thorough testing is required to ensure compatibility with the new API and behavioral changes.

Source: TypeORM 0.3.0 Release Notes [2, 3], Migration Guide Discussion [8]

Notice 🤖: This content was augmented using artificial intelligence. AI-generated content may contain errors and should be reviewed for accuracy before use.

@cdobru
Copy link
Owner Author

cdobru commented Mar 25, 2026

Snyk checks have failed. 13 issues have been found so far.

Status Scan Engine Critical High Medium Low Total (13)
Open Source Security 0 5 8 0 13 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@bojtetami
Copy link

bojtetami commented Mar 25, 2026

Snyk checks have failed. 13 issues have been found so far.

Status Scan Engine Critical High Medium Low Total (13)
Open Source Security 0 5 8 0 13 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@cdobru
Copy link
Owner Author

cdobru commented Mar 25, 2026

Snyk checks have failed. 13 issues have been found so far.

Status Scan Engine Critical High Medium Low Total (13)
Open Source Security 0 5 8 0 13 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

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.

3 participants