Skip to content

Pin dependencies#621

Merged
legendecas merged 1 commit intomainfrom
npm_workspace
Apr 7, 2026
Merged

Pin dependencies#621
legendecas merged 1 commit intomainfrom
npm_workspace

Conversation

@legendecas
Copy link
Copy Markdown
Member

This pins all dependencies with a workspace package-lock.json (excluding the website/ folder)

@legendecas
Copy link
Copy Markdown
Member Author

Going to merge this addressing a security advisary.

"node-addon-api": "^8.1.0"
},
"scripts": {
"install": "node-gyp rebuild && node test"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

is this intentional to remove node test as well?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes, the test should not run on install script.

on:
push:
pull_request:
schedule:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this cron exists for a reason, means to test nodejs nightly build. should be keep this if there is a strong reason.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@gengjiawen,

The CI does not test Node.js nightly builds, as it uses the actions/setup-node GitHub Action:

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: ${{ matrix.node-version }}

with:

node-version: [20.x, 22.x, 24.x]

Now that we use a package-lock.json with npm ci, there should be no changes across runs when there are no source and/or dependency changes.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nope

- run: npm i -g n && n nightly

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ah I didn't see the other job. Thanks for pointing that out!

Well that's weird. I don't see why we would need to test with Node.js nightly, e.g. node-addon-api doesn't do it. The only thing that tests Node-API with nightly is the Node.js core repo itself...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I don't have strong opinon on this cron job as long as we pin dependencies.

Reverted this removal.

@legendecas
Copy link
Copy Markdown
Member Author

Hmm, strange. The CI failed for lock file's typescript@5.9.3 does not satisfy typescript@6.0.2. But there is no single reference to typescript@6.0.2

@legendecas
Copy link
Copy Markdown
Member Author

Ah, #620 merged.

@legendecas legendecas merged commit bfb184f into main Apr 7, 2026
29 checks passed
@github-project-automation github-project-automation bot moved this from Need Triage to Done in Node-API Team Project Apr 7, 2026
@legendecas legendecas deleted the npm_workspace branch April 7, 2026 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

4 participants