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-6272): update dev dependencies and add dependabot config #24

Merged
merged 1 commit into from
Aug 15, 2024

Conversation

baileympearson
Copy link
Contributor

@baileympearson baileympearson commented Aug 8, 2024

Description

What is changing?

Updates development dependencies and adds a Rust/npm dependabot config.

Is there new documentation needed for these changes?

What is the motivation for this change?

Double check the following

  • Ran npm run format:js && npm run format:rs 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

@baileympearson baileympearson changed the title update dependencies chore(NODE-6272): update dev dependencies and add dependabot config Aug 8, 2024
@baileympearson baileympearson marked this pull request as ready for review August 8, 2024 13:54
@aditi-khare-mongoDB aditi-khare-mongoDB self-requested a review August 8, 2024 21:40
@aditi-khare-mongoDB aditi-khare-mongoDB self-assigned this Aug 8, 2024
@aditi-khare-mongoDB aditi-khare-mongoDB added the Primary Review In Review with primary reviewer, not yet ready for team's eyes label Aug 8, 2024
index.js Outdated
}
}

switch (platform) {
case 'android':
Copy link
Contributor

Choose a reason for hiding this comment

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

What does adding 'android' and 'ia32' cases do and what inspired you to make this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This whole file is auto-generated by our tooling (see the comment at the top of the file). It seems like this file changed a bit when I upgraded the CLI, so I decided to regenerate it and check it in.

Copy link
Contributor

Choose a reason for hiding this comment

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

It should be okay then, thanks for clarifying!

From my quick google search, seems like no semicolons aren't that unstandard in JS, but I'll leave this thread open for team review in case anyone else wants to chime in.

Copy link
Contributor

Choose a reason for hiding this comment

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

Despite being auto generated I recall we did remove the unsupported platforms intentionally. I think we probably should've removed that comment, I think this file could be considered manually maintained now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, so for now I have:

  1. added the napi-cli to the exclude list in the dependabot so we don't try to update automatically in the future
  2. I manually removed the two unsupported platforms and left this dependency upgrade

Let me know if that sounds good to everyone.

Copy link
Contributor

Choose a reason for hiding this comment

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

I manually removed the two unsupported platforms

Which two? I'm seeing more that I don't recognize, freebsd, arm64 windows, riscv64 linux, etc. Shouldn't we be able to revert this 🤔 I am not sure what we're bringing in

While the changes seem generally correct and good I worry about changes like:

- return readFileSync('/usr/bin/ldd', 'utf8').includes('musl');
+ const lddPath = require('child_process').execSync('which ldd').toString().trim()
+ return readFileSync(lddPath, 'utf8').includes('musl');

Turning a file read into a process launch and file read not being surfaced appropriately so folks aren't surprised by a compression library launching a subprocess.

Copy link
Contributor

Choose a reason for hiding this comment

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

To clarify we should revert any changes to index.js, and we can update this in a follow-up (we can decide on priority in triage).

index.js Outdated
Comment on lines 69 to 45
if (localFileExisted) {
nativeBinding = require('./zstd.win32-x64-msvc.node');
nativeBinding = require('./zstd.win32-x64-msvc.node')
} else {
nativeBinding = require('@mongodb-js/zstd-win32-x64-msvc');
nativeBinding = require('@mongodb-js/zstd-win32-x64-msvc')
}
} catch (e) {
loadError = e;
loadError = e
Copy link
Contributor

Choose a reason for hiding this comment

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

How come we are removing semicolons at the ends of a lot of these lines?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

(see the other thread)

index.js Outdated
}
}

switch (platform) {
case 'android':
Copy link
Contributor

Choose a reason for hiding this comment

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

It should be okay then, thanks for clarifying!

From my quick google search, seems like no semicolons aren't that unstandard in JS, but I'll leave this thread open for team review in case anyone else wants to chime in.

@aditi-khare-mongoDB aditi-khare-mongoDB added Team Review Needs review from team and removed Primary Review In Review with primary reviewer, not yet ready for team's eyes labels Aug 9, 2024
@aditi-khare-mongoDB aditi-khare-mongoDB merged commit 3c18460 into main Aug 15, 2024
29 checks passed
@aditi-khare-mongoDB aditi-khare-mongoDB deleted the deps branch August 15, 2024 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team Review Needs review from team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants