Skip to content

Publish the Node.js package and engine packages to npm, with provenance (#75) - #122

Merged
jmmana merged 1 commit into
mainfrom
feat/npm-engine-release
Nov 27, 2026
Merged

jmmana merged 1 commit into
mainfrom
feat/npm-engine-release

Conversation

@jmmana

@jmmana jmmana commented Nov 27, 2026

Copy link
Copy Markdown
Owner

Closes #75

What

  • release.yml npm job: now needs attest; downloads the engine-release artifact of the same run, runs gh attestation verify on every file, then scripts/fetch-engine.py --base-url engine-release --no-attestation (SHA256SUMS check, safe unpack, hello version check). Verification is not weakened. Then npm/build.mjs, a dry run (npm pack, file lists uploaded as artifact), then npm/publish.mjs.
  • clients/node/npm/publish.mjs: platform packages first, sqlguardllm last; npm publish --provenance --tag <tag>; a version already on npm is skipped (safe re-run); optionalDependencies merged into package.json only for the publish and restored after, npm run build runs after build.mjs so engine-digests.json is in dist. --dry-run only does npm pack.
  • npm-pack.yml: on PRs runs build + dry run with placeholder engines (npm/fake-engines.mjs), asserts 6 tarballs and no src/test files, uploads the file lists. No secrets, read-only. id-token: write stays only in the npm job.
  • Docs: README, guide-node.md (en/es) describe local mode; CHANGELOG; CONTRIBUTING Releasing.

Owner steps before the first tag

npm Trusted Publishing is per package and, as far as I know, the package must already exist (no PyPI-style "pending publisher"; I could not verify this against current npm docs, please check). So: (1) publish a 0.0.0 placeholder with --tag bootstrap for each of the 5 sqlguardllm-engine-* names by hand; (2) on npmjs.com, each of the 6 packages, Settings, Trusted Publisher: jmmana / sqlguardllm / release.yml / environment npm; (3) confirm the GitHub environment npm exists. Details in CONTRIBUTING.md.

Not verified

The real release path (attestation verify on the artifact, real publish) can only run on a tag; the PR dry run uses placeholder engines. Local: npm ci && npm run build && npm test pass (91 tests); dry run exercised locally.

🤖 Generated with Claude Code

…#75)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 27, 2026 03:53

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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@jmmana
jmmana merged commit fb2778f into main Nov 27, 2026
15 checks passed
@jmmana
jmmana deleted the feat/npm-engine-release branch November 27, 2026 03:55
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.

Publish the Node.js package to npm, with provenance and docs

2 participants