chore: Use node 24 and npm trusted publishing, and update cspell#3411
chore: Use node 24 and npm trusted publishing, and update cspell#3411sachindshinde merged 9 commits intomainfrom
Conversation
… breaking change in npm 11.5.0 in how it handles optional peer dependencies. See the discussion in npm/cli#8431 for more details.
|
✅ Docs preview has no changesThe preview was not built because there were no changes. Build ID: 733ab6543764c99b096dc87d ✅ AI Style Review — No Changes DetectedNo MDX files were changed in this pull request. Review Log: View detailed log
|
…kport of #3411 for 2.12) (#3414) This PR is a backport of #3411 for the `version-2.12` branch. Specifically, this PR: - Adds an ignore rule to cspell for GHSA IDs. - Bumps `actions/checkout` to v4 and adds OIDC/changesets permissions in the release GitHub action. - Bumps node to v24 for the repo (which is bundled with npm v11), updating the lint CircleCI jobs and release GitHub action as well. - This is because npm trusted publishing requires at least npm v11.5.1. - Bumps the npm constraint in `engines` in `package.json` to `<12` (to allow running npm v11). - Runs the test CircleCI jobs for node v24 and latest. - The job was previously installing npm v9 because node v14's bundled npm version was too low to support the `package-lock.json`, but it was doing this for all node versions. We've now changed this to only happen for node v14. - Stops passing `NPM_TOKEN` to `changesets/action` in the release GitHub action. - Note that npm versions that support trusted publishing will [ignore locally configured tokens when OIDC environment variables are present](https://github.com/npm/cli/blob/8afa3bd21461c0984caf1bcc2e486c4881bda516/lib/utils/oidc.js#L141) (which they are for GH actions, since we've set that up), so `NPM_TOKEN` would be ignored anyway. But the main reason for this change is to stop `changesets/action` from printing a misleading log message saying `NPM_TOKEN` has been placed into `.npmrc` (which, while true, will be ignored by `npm publish`). - Note that we still need to keep the `NPM_TOKEN` GitHub secret around to run any tag-changing scripts, as `npm dist-tag` sadly doesn't support OIDC yet (see npm/cli#8547 for discussion). This means we'll need to manually rotate the token every 90 days. - Uses `npm ci` instead of `npm i` in the release GitHub action. - As a requirement for releasing (or filing a release PR), the `package-lock.json` should be aligned with the `package.json`. - Stops setting `FEDERATION_VERSION` in the release GitHub action since it's no longer used. - Sets the tag for npm publishes to the branch name for `version-*` branches. - Previously, it was the default of `latest`, which was causing backport releases to mistakenly change the `latest` tag (used when someone `npm i`s without a version number). - We also tightened the `version-*` branch pattern down to `version-[0-9]+.[0-9]+` (since it's getting passed around in bash now).
…kport of #3411 for 2.11) (#3415) This PR is a backport of #3411 for the `version-2.11` branch. Specifically, this PR: - Adds an ignore rule to cspell for GHSA IDs. - Backports the node orb version bump and lint CircleCI jobs from `main` (previously using `node/run`). - Bumps `actions/checkout` to v4 and adds OIDC/changesets permissions in the release GitHub action. - Bumps node to v24 for the repo (which is bundled with npm v11), updating the lint CircleCI jobs and release GitHub action as well. - This is because npm trusted publishing requires at least npm v11.5.1. - Bumps the npm constraint in `engines` in `package.json` to `<12` (to allow running npm v11). - Runs the test CircleCI jobs for node v22, v24, and latest. - The job was previously installing npm v9 because node v14's bundled npm version was too low to support the `package-lock.json`, but it was doing this for all node versions. We've now changed this to only happen for node v14. - Stops passing `NPM_TOKEN` to `changesets/action` in the release GitHub action. - Note that npm versions that support trusted publishing will [ignore locally configured tokens when OIDC environment variables are present](https://github.com/npm/cli/blob/8afa3bd21461c0984caf1bcc2e486c4881bda516/lib/utils/oidc.js#L141) (which they are for GH actions, since we've set that up), so `NPM_TOKEN` would be ignored anyway. But the main reason for this change is to stop `changesets/action` from printing a misleading log message saying `NPM_TOKEN` has been placed into `.npmrc` (which, while true, will be ignored by `npm publish`). - Note that we still need to keep the `NPM_TOKEN` GitHub secret around to run any tag-changing scripts, as `npm dist-tag` sadly doesn't support OIDC yet (see npm/cli#8547 for discussion). This means we'll need to manually rotate the token every 90 days. - Uses `npm ci` instead of `npm i` in the release GitHub action. - As a requirement for releasing (or filing a release PR), the `package-lock.json` should be aligned with the `package.json`. - Stops setting `FEDERATION_VERSION` in the release GitHub action since it's no longer used. - Sets the tag for npm publishes to the branch name for `version-*` branches. - Previously, it was the default of `latest`, which was causing backport releases to mistakenly change the `latest` tag (used when someone `npm i`s without a version number). - We also tightened the `version-*` branch pattern down to `version-[0-9]+.[0-9]+` (since it's getting passed around in bash now).
…kport of #3411 for 2.10) (#3416) This PR is a backport of #3411 for the `version-2.10` branch. Specifically, this PR: - Adds an ignore rule to cspell for GHSA IDs. - Backports the node orb version bump and lint CircleCI jobs from `main` (previously using `node/run`). - Bumps `actions/checkout` to v4 and adds OIDC/changesets permissions in the release GitHub action. - Bumps node to v24 for the repo (which is bundled with npm v11), updating the lint CircleCI jobs and release GitHub action as well. - This is because npm trusted publishing requires at least npm v11.5.1. - Bumps the npm constraint in `engines` in `package.json` to `<12` (to allow running npm v11). - Runs the test CircleCI jobs for node v22, v24, and latest. - The job was previously installing npm v9 because node v14's bundled npm version was too low to support the `package-lock.json`, but it was doing this for all node versions. We've now changed this to only happen for node v14. - Stops passing `NPM_TOKEN` to `changesets/action` in the release GitHub action. - Note that npm versions that support trusted publishing will [ignore locally configured tokens when OIDC environment variables are present](https://github.com/npm/cli/blob/8afa3bd21461c0984caf1bcc2e486c4881bda516/lib/utils/oidc.js#L141) (which they are for GH actions, since we've set that up), so `NPM_TOKEN` would be ignored anyway. But the main reason for this change is to stop `changesets/action` from printing a misleading log message saying `NPM_TOKEN` has been placed into `.npmrc` (which, while true, will be ignored by `npm publish`). - Note that we still need to keep the `NPM_TOKEN` GitHub secret around to run any tag-changing scripts, as `npm dist-tag` sadly doesn't support OIDC yet (see npm/cli#8547 for discussion). This means we'll need to manually rotate the token every 90 days. - Uses `npm ci` instead of `npm i` in the release GitHub action. - As a requirement for releasing (or filing a release PR), the `package-lock.json` should be aligned with the `package.json`. - Remove the `federation-rs` step in the release GitHub action, as this is no longer necessary in the release process. - We also stop setting `FEDERATION_VERSION`, since it's no longer used. - Sets the tag for npm publishes to the branch name for `version-*` branches. - Previously, it was the default of `latest`, which was causing backport releases to mistakenly change the `latest` tag (used when someone `npm i`s without a version number). - We also tightened the `version-*` branch pattern down to `version-[0-9]+.[0-9]+` (since it's getting passed around in bash now).
…kport of #3411 for 2.9) (#3417) This PR is a backport of #3411 for the `version-2.10` branch. Specifically, this PR: - Adds an ignore rule to cspell for GHSA IDs. - Backports the node orb version bump and lint CircleCI jobs from `main` (previously using `node/run`). - Bumps `actions/checkout` to v4 and adds OIDC/changesets permissions in the release GitHub action. - Bumps node to v24 for the repo (which is bundled with npm v11), updating the lint CircleCI jobs and release GitHub action as well. - This is because npm trusted publishing requires at least npm v11.5.1. - Bumps the npm constraint in `engines` in `package.json` to `<12` (to allow running npm v11). - Runs the test CircleCI jobs for node v22, v24, and latest. - The job was previously installing npm v9 because node v14's bundled npm version was too low to support the `package-lock.json`, but it was doing this for all node versions. We've now changed this to only happen for node v14. - Stops passing `NPM_TOKEN` to `changesets/action` in the release GitHub action. - Note that npm versions that support trusted publishing will [ignore locally configured tokens when OIDC environment variables are present](https://github.com/npm/cli/blob/8afa3bd21461c0984caf1bcc2e486c4881bda516/lib/utils/oidc.js#L141) (which they are for GH actions, since we've set that up), so `NPM_TOKEN` would be ignored anyway. But the main reason for this change is to stop `changesets/action` from printing a misleading log message saying `NPM_TOKEN` has been placed into `.npmrc` (which, while true, will be ignored by `npm publish`). - Note that we still need to keep the `NPM_TOKEN` GitHub secret around to run any tag-changing scripts, as `npm dist-tag` sadly doesn't support OIDC yet (see npm/cli#8547 for discussion). This means we'll need to manually rotate the token every 90 days. - Uses `npm ci` instead of `npm i` in the release GitHub action. - As a requirement for releasing (or filing a release PR), the `package-lock.json` should be aligned with the `package.json`. - Remove the `federation-rs` step in the release GitHub action, as this is no longer necessary in the release process. - We also stop setting `FEDERATION_VERSION`, since it's no longer used. - Sets the tag for npm publishes to the branch name for `version-*` branches. - Previously, it was the default of `latest`, which was causing backport releases to mistakenly change the `latest` tag (used when someone `npm i`s without a version number). - We also tightened the `version-*` branch pattern down to `version-[0-9]+.[0-9]+` (since it's getting passed around in bash now). - Backports #3195, which removes security CircleCI jobs (they've been replaced with a GitHub app).
This PR:
NPM_TOKENtochangesets/actionin the release GitHub action.NPM_TOKENwould be ignored anyway. But the main reason for this change is to stopchangesets/actionfrom printing a misleading log message sayingNPM_TOKENhas been placed into.npmrc(which, while true, will be ignored bynpm publish).NPM_TOKENGitHub secret around to run any tag-changing scripts, asnpm dist-tagsadly doesn't support OIDC yet (see Allow Trusted Publishers to run "npm dist-tag add" npm/cli#8547 for discussion). This means we'll need to manually rotate the token every 90 days.@inquirer/external-editorto1.0.0.package-lock.json, and this will causenpm ciin earlier versions of npm to error, complaining aboutpackage-lock.jsonbeing out of sync withpackage.json.@inquirer/external-editorintroduced such an optional peer dependency in1.0.1, and the simplest fix here is to just fallback to1.0.0.npm ciinstead ofnpm iin the release GitHub action.package-lock.jsonshould be aligned with thepackage.json.FEDERATION_VERSIONin the release GitHub action since it's no longer used.version-*branches.latest, which was causing backport releases to mistakenly change thelatesttag (used when someonenpm is without a version number).version-*branch pattern down toversion-[0-9]+.[0-9]+(since it's getting passed around in bash now).