Skip to content

Supply chain improvements#72

Merged
dgreif merged 2 commits into
mainfrom
copilot/supply-chain-improvements
Jun 3, 2026
Merged

Supply chain improvements#72
dgreif merged 2 commits into
mainfrom
copilot/supply-chain-improvements

Conversation

@dgreif

@dgreif dgreif commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Files changed

  • .npmrc
  • .node-version
  • .github/workflows/nodejs.yml
  • .github/workflows/publish.yml
  • package.json
  • package-lock.json
  • vitest.config.ts

Ecosystems detected

  • npm package with GitHub Actions CI and npm publish workflow.

Recommendations applied

  • Added min-release-age=3 to project .npmrc.
  • Updated the existing Node version file to Node 26 and kept workflows on node-version-file.
  • Switched CI install from npm install to npm ci.
  • Updated actions/checkout to v6.0.3 and actions/setup-node to v6.4.0, pinned to full commit SHAs.
  • Removed NODE_AUTH_TOKEN based npm publishing and kept contents: read plus id-token: write for trusted publishing.
  • Preserved the existing npm --ignore-scripts publish --provenance publishing style.
  • Updated Vitest to 4.1.7, the latest stable version outside the 3-day release-age window, and added the Vitest Playwright browser provider package/config required by Vitest 4.
  • Updated Playwright to 1.60.0.
  • Ran npm audit fix and resolved reported vulnerabilities.

Could not apply automatically

  • Vitest 4.1.8 is current, but it is inside the 3-day release-age window, so this uses 4.1.7.

Human review notes

  • npm trusted publishing may still need to be configured on the npm package before the release workflow can publish without NODE_AUTH_TOKEN.
  • No pull_request_target workflows were found.
  • Workflow permissions remain narrow: contents: read, plus id-token: write only for publishing.
  • The package still has a postpublish script for GitHub Packages, but the release workflow keeps --ignore-scripts for the npmjs publish step.

Validation

  • npm install passed.
  • npm ci passed.
  • npx playwright install chromium --only-shell passed.
  • npm run build --if-present passed.
  • npm run check --if-present passed; no check script is defined.
  • npm run lint --if-present passed with existing TypeScript support and Browserslist warnings.
  • CI=1 npm test passed: 14 tests.
  • npm audit passed: 0 vulnerabilities.

dgreif and others added 2 commits June 3, 2026 11:34
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dgreif dgreif marked this pull request as ready for review June 3, 2026 17:22
@dgreif dgreif requested a review from a team as a code owner June 3, 2026 17:22
Copilot AI review requested due to automatic review settings June 3, 2026 17:22

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR tightens the project’s JavaScript supply-chain posture by hardening npm and GitHub Actions usage, updating the Node toolchain baseline, and upgrading the Vitest/Playwright browser testing stack to newer major versions.

Changes:

  • Enforced dependency “release age” gating via .npmrc and bumped the project’s Node version to 26.
  • Hardened GitHub Actions by pinning actions/checkout and actions/setup-node to full commit SHAs and switching CI installs to npm ci.
  • Upgraded Vitest to v4, added the Vitest Playwright browser provider, and updated Playwright accordingly.
Show a summary per file
File Description
.npmrc Adds a supply-chain control to avoid installing very recently published packages.
.node-version Updates the repo’s Node baseline used by CI/release workflows.
.github/workflows/nodejs.yml Pins core actions by SHA and uses npm ci for deterministic installs.
.github/workflows/publish.yml Pins actions by SHA and shifts publishing auth model toward trusted publishing.
package.json Bumps Vitest/Playwright dependencies and adds the Vitest Playwright browser provider.
package-lock.json Locks updated dependency graph consistent with the upgraded tooling and audit fixes.
vitest.config.ts Updates Vitest browser configuration to use the Playwright provider API.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 6/7 changed files
  • Comments generated: 1

Comment thread .github/workflows/publish.yml
@dgreif dgreif merged commit de53b80 into main Jun 3, 2026
5 checks passed
@dgreif dgreif deleted the copilot/supply-chain-improvements branch June 3, 2026 17:39
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.

3 participants