Skip to content

chore: support latest oss publishing guidelines - #312

Open
kridai wants to merge 14 commits into
mainfrom
chore/oss-publishing-node22-ci-updates
Open

chore: support latest oss publishing guidelines#312
kridai wants to merge 14 commits into
mainfrom
chore/oss-publishing-node22-ci-updates

Conversation

@kridai

@kridai kridai commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Drop Node 20 from all CI test matrices; minimum is now Node 22
  • Update hardcoded node-version: '20''22' in release jobs
  • Switch test job runners to ubuntu-x64
  • SHA-pin actions/checkout (v4) and actions/setup-node (v6) across all workflows
  • Add Artifactory OIDC Auth step (twilio/sdk-actions/artifactory-oidc) to all test jobs
  • Add ARTIFACTORY_URL env var and id-token: write permissions to test jobs
  • Add lockfile-hygiene job (twilio/sdk-actions/npm-lockfile-hygiene) to cli-core-test.yml
  • Guard test jobs with if: github.repository_owner == 'twilio'
  • Fix dead SonarCloud condition (16.xlts/*)

Test plan

  • All 192 unit tests pass locally
  • Verify CI runs on ubuntu-x64 runner
  • Verify Artifactory OIDC Auth step succeeds in CI
  • Verify lockfile-hygiene job passes

🤖 Generated with Claude Code

kridai and others added 14 commits August 13, 2026 13:09
- Drop Node 20 from all CI test matrices; minimum is now Node 22
- Update hardcoded node-version '20' → '22' in release jobs
- Switch test job runners to ubuntu-x64
- SHA-pin actions/checkout (v4) and actions/setup-node (v6)
- Add Artifactory OIDC Auth step to all test jobs
- Add ARTIFACTORY_URL env var and id-token: write permissions
- Add lockfile-hygiene job (twilio/sdk-actions/npm-lockfile-hygiene) to cli-core-test.yml
- Guard test jobs with if: github.repository_owner == 'twilio'
- Fix dead SonarCloud condition (16.x → lts/*)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The npm-lockfile-hygiene gate failed: all 878 resolved URLs in
package-lock.json pointed at npmjs.artifacts.twilio.com, which an external
consumer cannot reach. The action allows only registry.npmjs.org,
registry.yarnpkg.com, github.com and codeload.github.com.

- rewrote all 878 resolved URLs to registry.npmjs.org. Package set is unchanged:
  1136 entries, identical versions and integrity hashes, so the same tarballs
  still verify
- `make install` no longer does `rm -f package-lock.json`. Deleting it forced a
  full re-resolution on every run, which is why CI began failing without any
  code change: GitHub moved the runners to Node 24 (Node 20 deprecation),
  changing the bundled npm and therefore the resolved tree. It also regenerated
  the lockfile through whatever registry the developer had configured, which is
  how the Artifactory URLs got committed
- `npm install --no-optional` -> `npm ci --omit=optional`. --no-optional is a
  deprecated alias npm warns about on every run, and npm ci installs the
  committed tree instead of re-resolving. Verified package.json and the lockfile
  are in sync (lockfileVersion 3), so npm ci will not fail on drift

This does not unblock CI on its own. Two packages in the tree are still refused
by jfrog curation:

  npm@7.24.2  via @semantic-release/npm (^7.0.0), CVE-2021-43616 CVSS 9.8.
              Fix exists at >= 8.4.1, but ^7.0.0 cannot reach it, and
              @semantic-release/npm@7.1.3 is transitive, so it needs a
              semantic-release upgrade
  ejs@3.1.10  via @oclif/core@1.26.2 and a nested copy under
              @oclif/plugin-help. CVE-2023-29827 CVSS 9.8, and curation reports
              no version resolves it, so it needs either an exception or
              dropping @oclif/core v1
Adds an informational step that tries `npm pack` for ejs 3.1.10 and 6.0.1 through
the registry CI is authenticated against, and reports allowed/blocked in the job
summary. 3.1.10 is what @oclif/core <= 4.13.3 pulls; 6.0.1 is what >= 4.13.4
pulls, so this answers whether upgrading past that boundary clears the block --
without committing to the upgrade first.

It has to run in CI. A local probe cannot answer it: developer npm points at
npmjs.artifacts.twilio.com/virtual-npm-twilio, which allows ejs 3.1.10, while the
403 in CI came from twilio.jfrog.io/virtual-npm-thirdparty. Different Artifactory
repositories carry different curation policies, and local credentials get E401
against the CI one, so only a CI run is authoritative.

continue-on-error, since it is a question rather than a gate.

Also trims the trailing internal catalog URL out of the failure reporting added
earlier, for both the curation notice and the 403 line -- the tarball filename is
enough to identify the package.
Removes the failure-only step that grepped the install log for curation blocks,
and restores `- run: make install` to its original form -- the tee to
/tmp/install.log and the step id existed only to feed it.

The curation probe still reports which ejs versions are allowed, which is the
question that actually needed answering.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants