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

Align npm packages to npm 10's node engine range #7754

Closed
Tracked by #898
hashtagchris opened this issue Aug 26, 2024 · 1 comment
Closed
Tracked by #898

Align npm packages to npm 10's node engine range #7754

hashtagchris opened this issue Aug 26, 2024 · 1 comment
Assignees
Labels
Epic a larger scope of work that will be tracked in a Project Board

Comments

@hashtagchris
Copy link
Contributor

The Node 14 and 16 releases are no longer supported (docs). Packages npm is dependent on have started releasing versions that don't work with Node <=14.17.0. Packages still supporting an older engine range aren't consuming the latest bug fixes and improvements made to dependencies.

Let's update npm-owned packages to have the same engines.node version range as the cli:

cli/package.json

Lines 260 to 262 in e674987

"engines": {
"node": "^18.17.0 || >=20.5.0"
}

References

isaacs/minipass#56
npm/map-workspaces#158

@hashtagchris hashtagchris added the Epic a larger scope of work that will be tracked in a Project Board label Aug 26, 2024
@hashtagchris hashtagchris self-assigned this Aug 26, 2024
hashtagchris added a commit to npm/statusboard that referenced this issue Aug 26, 2024
Update the node engine range to match npm cli 10.

npm/cli#7754
hashtagchris added a commit to npm/stafftools that referenced this issue Aug 27, 2024
<!-- What / Why -->
<!-- Describe the request in detail. What it does and why it's being
changed. -->

`template-oss-fix` previously returned open template-oss PRs regardless
of status. If you continued it would force push to green PRs, leading to
unnecessary churn and possibly resetting approvals.

I opted to make the new option an exclusion list because commits can
have a status of `null`, in the case of merge conflicts or the "Post
Dependabot" commit not triggering a new CI run. `"null"` is used to
indicate the option should be empty.

### Before

```
% npx -p @npmcli/stafftools@latest gh template-oss-fix --author null
Running worker "template-oss-fix" which will "Fix failing template-oss pull requests" on the following items:
✅  npm/abbrev-js                 chore: bump @npmcli/template-oss from 4.22.0 to 4.23.3
✅  npm/eslint-config             chore: bump @npmcli/template-oss from 4.23.2 to 4.23.3
✅  npm/hosted-git-info           chore: bump @npmcli/template-oss from 4.23.1 to 4.23.3
?   npm/hosted-git-info           chore: bump @npmcli/template-oss from 4.23.1 to 4.23.3
✅  npm/ignore-walk               chore: bump @npmcli/template-oss from 4.23.1 to 4.23.3
✅  npm/ini                       chore: bump @npmcli/template-oss from 4.23.1 to 4.23.3
❌  npm/map-workspaces            chore: bump @npmcli/template-oss from 4.22.0 to 4.23.3
✅  npm/minify-registry-metadata  chore: bump @npmcli/template-oss from 4.22.0 to 4.23.3
❌  npm/minipass-fetch            chore: bump @npmcli/template-oss from 4.22.0 to 4.23.3
✅  npm/npm-package-arg           chore: bump @npmcli/template-oss from 4.23.1 to 4.23.3
❌  npm/npm-packlist              chore: bump @npmcli/template-oss from 4.22.0 to 4.23.3
❌  npm/npm-pick-manifest         chore: bump @npmcli/template-oss from 4.22.0 to 4.23.3
❌  npm/query                     chore: bump @npmcli/template-oss from 4.22.0 to 4.23.3
✅  npm/ssri                      chore: bump @npmcli/template-oss from 4.22.0 to 4.23.3
✅  npm/stafftools                chore: bump @npmcli/template-oss from 4.23.1 to 4.23.3
?   npm/types                     chore: bump @npmcli/template-oss from 4.22.0 to 4.23.3
🔄  npm/unique-slug               chore: bump @npmcli/template-oss from 4.23.1 to 4.23.3

Press any key to continue or CTRL+C to exit
```

### After

```
% ./bin/gh.mjs template-oss-fix --author null
Running worker "template-oss-fix" which will "Fix failing template-oss pull requests" on the following items:
?   npm/cmd-shim           chore: bump @npmcli/template-oss from 4.23.1 to 4.23.3
?   npm/hosted-git-info    chore: bump @npmcli/template-oss from 4.23.1 to 4.23.3
❌  npm/map-workspaces     chore: bump @npmcli/template-oss from 4.22.0 to 4.23.3
❌  npm/minipass-fetch     chore: bump @npmcli/template-oss from 4.22.0 to 4.23.3
❌  npm/npm-packlist       chore: bump @npmcli/template-oss from 4.22.0 to 4.23.3
❌  npm/npm-pick-manifest  chore: bump @npmcli/template-oss from 4.22.0 to 4.23.3
❌  npm/query              chore: bump @npmcli/template-oss from 4.22.0 to 4.23.3
?   npm/types              chore: bump @npmcli/template-oss from 4.22.0 to 4.23.3

Press any key to continue or CTRL+C to exit
```

## References
<!-- Examples:
  Related to #0
  Depends on #0
  Blocked by #0
  Fixes #0
  Closes #0
-->

Spotted while working on merging PRs ahead of
npm/cli#7754

---------

Co-authored-by: Gar <wraithgar@github.com>
@wraithgar
Copy link
Member

PHEW, This all shipped with npm 10.9.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Epic a larger scope of work that will be tracked in a Project Board
Projects
None yet
Development

No branches or pull requests

4 participants
@wraithgar @reggi @hashtagchris and others