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

nsc-events-nextjs_11_141_upgrade-packages #142

Closed
wants to merge 2 commits into from
Closed

Conversation

Alzavio
Copy link

@Alzavio Alzavio commented Aug 13, 2024

Resolves 141, upgrading the packages in the repo. Including Node to 18 -> 22

Key Learnings: Had to learn how nestjs works to test this out properly (also needed to do this for a review for this project), and how we're using mongoose/mongodb with it.

Copy link

socket-security bot commented Aug 13, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@nestjs/[email protected] Transitive: environment, eval, filesystem, network, shell, unsafe +230 58.4 MB nestjscore
npm/@nestjs/[email protected] None +4 601 kB nestjscore
npm/@nestjs/[email protected] environment, filesystem +3 1.55 MB nestjscore
npm/@nestjs/[email protected] Transitive: environment, filesystem, network, shell +18 1.5 MB nestjscore
npm/@nestjs/[email protected] None +15 355 kB nestjscore
npm/@nestjs/[email protected] None 0 54.8 kB nestjscore
npm/@nestjs/[email protected] None 0 21.2 kB nestjscore
npm/@nestjs/[email protected] Transitive: environment, eval, filesystem, network, unsafe +83 2.72 MB kamilmysliwiec, nestjscore
npm/@nestjs/[email protected] Transitive: environment, eval, filesystem, network, unsafe +65 5.06 MB nestjscore
npm/@nestjs/[email protected] None +1 120 kB nestjscore
npm/@sendgrid/[email protected] Transitive: environment, filesystem, network +12 3 MB twilio-dx
npm/@types/[email protected] None 0 7.65 kB types
npm/@types/[email protected] None +9 108 kB types
npm/@types/[email protected] Transitive: environment, filesystem, unsafe +49 1.76 MB types
npm/@types/[email protected] None +1 2.19 MB types
npm/@types/[email protected] None +3 73.3 kB types
npm/@types/[email protected] None +2 55.9 kB types
npm/@types/[email protected] Transitive: filesystem, network +9 356 kB types
npm/@typescript-eslint/[email protected] Transitive: environment, filesystem +40 7.93 MB jameshenry
npm/@typescript-eslint/[email protected] Transitive: environment, filesystem +34 3.35 MB jameshenry
npm/[email protected] None +3 14.2 MB typestack-release-bot
npm/[email protected] None 0 20.8 kB lydell
npm/[email protected] Transitive: environment +8 498 kB jounqin
npm/[email protected] environment Transitive: eval, filesystem, shell, unsafe +87 9.91 MB eslintbot
npm/[email protected] Transitive: environment, eval, filesystem, network, shell, unsafe +268 19.7 MB simenb
npm/[email protected] Transitive: environment, filesystem, network, shell +19 9.97 MB aaron, rauchg, tjholowaychuk, ...1 more
npm/[email protected] network +3 168 kB jaredhanson
npm/[email protected] environment, filesystem, unsafe 0 7.7 MB prettier-bot
npm/[email protected] None 0 241 kB rbuckton
npm/[email protected] network Transitive: environment, eval, filesystem +35 1.83 MB titanism
npm/[email protected] environment, filesystem, unsafe Transitive: eval, network, shell +154 16.1 MB kul
npm/[email protected] filesystem Transitive: environment, eval, network, shell, unsafe +82 14.9 MB johnnyreilly
npm/[email protected] environment, filesystem, unsafe +16 2.11 MB blakeembrey
npm/[email protected] None 0 21.9 MB typescript-bot

🚮 Removed packages: npm/@nestjs/[email protected], npm/@nestjs/[email protected], npm/@nestjs/[email protected], npm/@nestjs/[email protected], npm/@nestjs/[email protected], npm/@nestjs/[email protected], npm/@nestjs/[email protected], npm/@nestjs/[email protected], npm/@nestjs/[email protected], npm/@nestjs/[email protected], npm/@sendgrid/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@typescript-eslint/[email protected], npm/@typescript-eslint/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected]

View full report↗︎

@Alzavio Alzavio requested a review from theGaryLarson August 13, 2024 02:42
Copy link
Contributor

@theGaryLarson theGaryLarson left a comment

Choose a reason for hiding this comment

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

hey @Alzavio I just saw this sorry busy with work and didn't realize I was being asked to review.

I think the main reason the CI workflow is failing is because it is set to use Node 18. The update to Node 22 requires changes to the following yml file .github/workflows/ci.yml starting on Line 18 The build and test job. You can review closed pull request #17 to see the changes there. The changed files highlights the action needed well.

Originally i was trying to use the matrix to provide more flexibility if there are different versions of Node by using a matrix example here but that was causing inconsistent issues so thought it best to just stick to one version.

My recommendation is just updating to Node 22 in the build and test job mentioned above then rerunning the workflow to see if it passes. Best of luck!

Thinking out loud...

Also @Alzavio when updating anywhere there is a Major version update. I would do a bit of research to see what has changed and review code where those are being used. If you recall from BC's review of semantic versioning Major changes in versioning usually indicates breaking changes. Here's a recap on semantic versioning below. I noticed when reviewing there are a few packages that had MAJOR Version (X.y.z) changes see the impact of updating those below. Here I would recommend rolling those back and reviewing the changes on each packages website to see how much of an impact it will have on the nest.js project. I'll leave some comments in the file changes for you to check out where i noticed these major version changes.

Semantic Versioning (SemVer) is a versioning system that conveys meaning about the underlying changes in a software release. It consists of three numbers separated by dots: MAJOR.MINOR.PATCH. Each number represents a different type of change in the software. Here's a breakdown of what each component generally typifies:

1. MAJOR Version (X.y.z)

  • Significance: Indicates breaking changes.
  • Examples:
    • Removing or renaming existing features or APIs.
    • Making changes that would break backward compatibility, requiring users to make changes to their code when upgrading.
  • When to Increment: You increment the MAJOR version when you make incompatible API changes. This typically happens when a significant change is introduced, such as re-architecting the system, removing deprecated functionality, or making substantial improvements that affect the way the software interacts with users or other systems.

Example:

  • If you change from 1.4.2 to 2.0.0, it means the new version is not backward-compatible with the previous one.

2. MINOR Version (x.Y.z)

  • Significance: Indicates the addition of new features that are backward-compatible.
  • Examples:
    • Adding new functionality in a backward-compatible manner.
    • Adding new APIs or methods.
    • Introducing minor enhancements that don’t break existing code or user expectations.
  • When to Increment: You increment the MINOR version when you add functionality in a manner that is backward-compatible. It signals to users that new features are available without requiring them to change existing code.

Example:

  • If you change from 1.4.2 to 1.5.0, it means new features have been added, but the upgrade should be seamless.

3. PATCH Version (x.y.Z)

  • Significance: Indicates backward-compatible bug fixes.
  • Examples:
    • Fixing bugs or issues that do not affect the API or existing functionality.
    • Applying minor patches or security fixes.
  • When to Increment: You increment the PATCH version when you make backward-compatible bug fixes. It’s the safest type of update, signaling that minor improvements have been made without affecting the software’s interface or behavior.

Example:

  • If you change from 1.4.2 to 1.4.3, it means that some bugs were fixed, but there are no new features or breaking changes.

Additional Labels:

  • Pre-release Versions:

    • Often used for versions that are not yet stable. They are denoted with a hyphen followed by identifiers like -alpha, -beta, -rc.1, etc.
    • Example: 1.0.0-alpha, 2.0.0-beta, 1.0.0-rc.1.
  • Build Metadata:

    • Information that does not impact version precedence, denoted by a + sign.
    • Example: 1.0.0+001, 1.0.0-beta+exp.sha.5114f85.

Summary:

  • MAJOR (X): Breaking changes; increment when backward compatibility is broken.
  • MINOR (Y): New features; increment when adding new, backward-compatible functionality.
  • PATCH (Z): Bug fixes; increment when making backward-compatible bug fixes.

Semantic versioning helps users and developers understand the impact of upgrading to a new version of the software, ensuring that version numbers convey meaningful information about the nature of the changes introduced.
@bcko Hope this helps :)

"date-fns": "^3.6.0",
"mongoose": "^7.4.2",
"passport": "^0.6.0",
"mongoose": "^8.5.3",
Copy link
Contributor

Choose a reason for hiding this comment

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

Major version update. May be best not to include this until you can identify the breaking changes being introduced. See Semantic Versioning breakdown in main comment.

"@types/passport-jwt": "^4.0.1",
"@types/passport-local": "^1.0.38",
"@types/supertest": "^6.0.2",
"@typescript-eslint/eslint-plugin": "^8.1.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

Major version update. May be best not to include this until you can identify the breaking changes being introduced. See Semantic Versioning breakdown in main comment.

"@typescript-eslint/eslint-plugin": "^8.1.0",
"@typescript-eslint/parser": "^8.1.0",
"eslint": "^9.9.0",
"eslint-config-prettier": "^9.1.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

Major version update. May be best not to include this until you can identify the breaking changes being introduced. See Semantic Versioning breakdown in main comment.

"@typescript-eslint/parser": "^8.1.0",
"eslint": "^9.9.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
Copy link
Contributor

Choose a reason for hiding this comment

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

Major version update. May be best not to include this until you can identify the breaking changes being introduced. See Semantic Versioning breakdown in main comment.

"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"jest": "^29.7.0",
"prettier": "3.3.3",
Copy link
Contributor

Choose a reason for hiding this comment

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

Major version update. May be best not to include this until you can identify the breaking changes being introduced. See Semantic Versioning breakdown in main comment.

"ts-jest": "^29.1.0",
"ts-loader": "^9.4.3",
"ts-node": "^10.9.1",
"supertest": "^7.0.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

Major version update. May be best not to include this until you can identify the breaking changes being introduced. See Semantic Versioning breakdown in main comment.

"@types/express": "^4.17.21",
"@types/jest": "^29.5.12",
"@types/node": "^22.3.0",
"@types/passport-jwt": "^4.0.1",
Copy link
Contributor

Choose a reason for hiding this comment

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

Major version update. May be best not to include this until you can identify the breaking changes being introduced. See Semantic Versioning breakdown in main comment. I believe this is for our auth. So may be required if there are vulnerabilities in the old package and may be a priority to look into first.

"@types/bcryptjs": "^2.4.6",
"@types/express": "^4.17.21",
"@types/jest": "^29.5.12",
"@types/node": "^22.3.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

Major version update. May be best not to include this until you can identify the breaking changes being introduced. See Semantic Versioning breakdown in main comment.

Copy link
Contributor

Choose a reason for hiding this comment

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

If this is being deleted. In the yml file mentioned in the main comment you may need to run npm i rather than npm ci.

@JesseCaddell
Copy link
Contributor

Closing PR for now, will request more developers to trouble shoot in next sprint. Package updates will become part of our sprint cycles.

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