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

chore(NODE-5830): Update js-bson dependencies #648

Merged
merged 5 commits into from
Feb 21, 2024

Conversation

aditi-khare-mongoDB
Copy link
Contributor

@aditi-khare-mongoDB aditi-khare-mongoDB commented Feb 14, 2024

Description

Description

Update dev and prod dependencies in the js-bson library to latest safe and compatible versions + ones with minimal code changes.

What is changing?

 @octokit/core                       ^4.2.4  →   ^5.1.0
 magic-string                       ^0.30.5  →  ^0.30.7
 mocha                               10.2.0  →   10.3.0
 sinon                              ^15.2.0  →  ^17.0.1 
 @rollup/plugin-typescript          ^11.1.5  →    ^11.1.6
 @types/node                       ^18.19.2  →   ^20.11.18
 @types/sinon                      ^10.0.20  →     ^17.0.3
 @typescript-eslint/eslint-plugin   ^5.62.0  →     ^7.0.2
 @typescript-eslint/parser          ^5.62.0  →     ^7.0.2
 eslint                             ^8.55.0  →    ^8.56.0
 eslint-config-prettier             ^8.10.0  →     ^9.1.0
 eslint-plugin-prettier              ^4.2.1  →     ^5.1.3
 prettier                            ^2.8.8  →     ^3.2.5
 rollup                             ^4.10.0  →    ^4.12.0
 @microsoft/api-extractor           ^7.38.4  →    ^7.40.1 // Note: depends on a higher ts version than ours, team consensus is continue with update regardless

Upgrades not included:

 chai                               ^4.3.10  →     ^5.1.0 // causes unit tests to fail
 ts-node                            ^10.9.1  →    ^10.9.2 // related to TS only
 tsd                                ^0.28.1  →    ^0.30.4 // related to TS only 
 typescript                          ^5.0.4  →     ^5.3.3 // related to TS only
Is there new documentation needed for these changes?

No.

What is the motivation for this change?

Keep dependencies up to date.

Release Highlight

Fill in title or leave empty for no highlight

Double check the following

  • Ran npm run check:lint script
  • Self-review completed using the steps outlined here
  • PR title follows the correct format: type(NODE-xxxx)[!]: description
    • Example: feat(NODE-1234)!: rewriting everything in coffeescript
  • Changes are covered by tests
  • New TODOs have a related JIRA ticket

@nbbeeken
Copy link
Contributor

What's the breakdown of what we decided not to upgrade here?

I believe all of these are safe updates, I think eslint/rollup may have dropped certain major Node.js versions but we don't need to compile or lint on anything less than the current LTS.

 @microsoft/api-extractor           ^7.38.4  →    ^7.40.1
 @rollup/plugin-typescript          ^11.1.5  →    ^11.1.6
 @types/node                       ^18.19.2  →  ^20.11.18
 @types/sinon                      ^10.0.20  →    ^17.0.3
 @typescript-eslint/eslint-plugin   ^5.62.0  →     ^7.0.1
 @typescript-eslint/parser          ^5.62.0  →     ^7.0.1
 chai                               ^4.3.10  →     ^5.1.0
 eslint                             ^8.55.0  →    ^8.56.0
 eslint-config-prettier             ^8.10.0  →     ^9.1.0
 eslint-plugin-prettier              ^4.2.1  →     ^5.1.3
 prettier                            ^2.8.8  →     ^3.2.5
 rollup                             ^4.10.0  →    ^4.11.0
 ts-node                            ^10.9.1  →    ^10.9.2
 tsd                                ^0.28.1  →    ^0.30.4
 typescript                          ^5.0.4  →     ^5.3.3

Could you remove standard-version from the devDependencies? We don't use it anymore, it is deprecated, and it is bringing in stringify which warns on installation :)

@aditi-khare-mongoDB aditi-khare-mongoDB marked this pull request as ready for review February 15, 2024 15:47
@nbbeeken nbbeeken self-assigned this Feb 15, 2024
@nbbeeken nbbeeken added the Primary Review In Review with primary reviewer, not yet ready for team's eyes label Feb 15, 2024
@nbbeeken nbbeeken self-requested a review February 15, 2024 16:34
@aditi-khare-mongoDB
Copy link
Contributor Author

aditi-khare-mongoDB commented Feb 15, 2024

@nbbeeken to respond to your previous comment:

The following updates cause errors

 @microsoft/api-extractor           ^7.38.4  →    ^7.40.1 // only a warn error every time we run lint check, depends on a higher ts version that we use
 chai                               ^4.3.10  →     ^5.1.0 // causes unit tests to fail

In the ticket guidelines is says that "updating TS is NOT a part of this ticket" , which is why I didn't update any of the following:

 @rollup/plugin-typescript          ^11.1.5  →    ^11.1.6
 @types/node                       ^18.19.2  →  ^20.11.18
 @types/sinon                      ^10.0.20  →    ^17.0.3
 @typescript-eslint/eslint-plugin   ^5.62.0  →     ^7.0.1
 @typescript-eslint/parser          ^5.62.0  →     ^7.0.1
 ts-node                            ^10.9.1  →    ^10.9.2
 tsd                                ^0.28.1  →    ^0.30.4
 typescript                          ^5.0.4  →     ^5.3.3

As for the remaining upgrades, I didn't upgrade eslint or prettier due to a misreading of the ticket, I'll try to update them and update you as I go

 eslint                             ^8.55.0  →    ^8.56.0
 eslint-config-prettier             ^8.10.0  →     ^9.1.0
 eslint-plugin-prettier              ^4.2.1  →     ^5.1.3
 prettier                            ^2.8.8  →     ^3.2.5
 rollup                             ^4.10.0  →    ^4.11.0

@nbbeeken
Copy link
Contributor

For the typescript bit, we can still upgrade the TS related tooling and leave typescript on the version it is at now, so the @types/ packages are all fine and the eslint related packages might need to be bumped with eslint

@aditi-khare-mongoDB
Copy link
Contributor Author

aditi-khare-mongoDB commented Feb 15, 2024

With the latest commit, all possible upgrades are applied besides ones that error and the typescript only changes.

Updates not included:

 @microsoft/api-extractor           ^7.38.4  →    ^7.40.1 // only a warn error every time we run lint check, depends on a higher ts version that we use
 chai                               ^4.3.10  →     ^5.1.0 // causes unit tests to fail
 ts-node                            ^10.9.1  →    ^10.9.2
 tsd                                ^0.28.1  →    ^0.30.4
 typescript                          ^5.0.4  →     ^5.3.3

@baileympearson
Copy link
Contributor

Here's the status when I check locally:

Package                           Current  Wanted  Latest  Location                                       Depended by
@microsoft/api-extractor           7.38.5  7.40.4  7.40.4  node_modules/@microsoft/api-extractor          js-bson
@typescript-eslint/eslint-plugin    7.0.1   7.0.2   7.0.2  node_modules/@typescript-eslint/eslint-plugin  js-bson
@typescript-eslint/parser           7.0.1   7.0.2   7.0.2  node_modules/@typescript-eslint/parser         js-bson
chai                               4.3.10   4.4.1   5.1.0  node_modules/chai                              js-bson
rollup                             4.11.0  4.12.0  4.12.0  node_modules/rollup                            js-bson
ts-node                            10.9.1  10.9.2  10.9.2  node_modules/ts-node                           js-bson
tsd                                0.28.1  0.28.1  0.30.5  node_modules/tsd                               js-bson
typescript                          5.0.4   5.3.3   5.3.3  node_modules/typescript                        js-bson
  • chai dropped support for commonjs modules, we'll need to pin to this version for a while
  • ts-node, tsd and typescript are fine deferring to the TS update ticket

these packages can probably be updated too:

  • rollup released another minor since last week, we can pull this one in
  • api-extractor, eslint-plugin and parser can be updated. We typically don't update typescript as a part of this ticket, because typescript makes breaking changes in minor version bumps, which means we often have make adjustments so our code compiles when we upgrade typescript. These packages are unrelated to our typescript compilation and can be upgraded separately.

package.json Outdated Show resolved Hide resolved
@nbbeeken nbbeeken merged commit f53db84 into main Feb 21, 2024
4 checks passed
@nbbeeken nbbeeken deleted the NODE-5830/update-js-bson-dependencies branch February 21, 2024 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Primary Review In Review with primary reviewer, not yet ready for team's eyes
Projects
None yet
3 participants