Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,18 @@ jobs:
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7
with:
node-version: ${{ matrix.node-version }}
cache: npm

- name: Enable Corepack
run: corepack enable

- name: Install dependencies
run: npm ci
run: pnpm install --frozen-lockfile

- name: Check formatting
run: npm run format:check
run: pnpm run format:check

- name: Check types
run: npm run check
run: pnpm run check

- name: Run tests
run: npm test
run: pnpm test
15 changes: 9 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ jobs:
registry-url: https://registry.npmjs.org
package-manager-cache: false

- name: Enable Corepack
run: corepack enable

# The CLI that packs and publishes the release is fetched from the
# registry, so its bytes are verified against the reviewed integrity in
# scripts/release-packages.mjs before it is installed and trusted.
Expand All @@ -69,19 +72,19 @@ jobs:
npm install --global "${tarball}"

- name: Install dependencies
run: npm ci
run: pnpm install --frozen-lockfile

- name: Check formatting
run: npm run format:check
run: pnpm run format:check

- name: Check types
run: npm run check
run: pnpm run check

- name: Run tests
run: npm test
run: pnpm test

- name: Prepare and verify the release tarball
run: npm run release:pack -- -- --require-clean --require-main-ancestor --require-release-tag --expected-release-commit "${RELEASE_COMMIT}" --output .release
run: pnpm run release:pack -- --require-clean --require-main-ancestor --require-release-tag --expected-release-commit "${RELEASE_COMMIT}" --output .release

- name: Upload the prepared release
id: upload
Expand Down Expand Up @@ -129,4 +132,4 @@ jobs:
path: .release

- name: Publish the verified prepared tarball
run: npm run release:publish -- -- --expected-release-commit "${RELEASE_COMMIT}" --manifest .release/package-manifest.json
run: node scripts/release-packages.mjs publish --expected-release-commit "${RELEASE_COMMIT}" --manifest .release/package-manifest.json
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
node_modules/
.pnpm-store/
dist/
coverage/
*.tsbuildinfo
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pnpm-lock.yaml
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ CI resolve a version nobody tested against.
## Workflow

Work on a `claude/*` branch and open a pull request. The gate is
`npm run format:check`, `npm run check`, `npm test` — all three, on Node 22 and 24. Tests run against `createMemoryStore()` from `@pegma/storage-core`, which
`pnpm run format:check`, `pnpm run check`, `pnpm test` — all three, on Node 22 and 24. Tests run against `createMemoryStore()` from `@pegma/storage-core`, which
enforces the same transaction and concurrency rules a real backend does, so a
behaviour proved there holds in production.

Expand Down
13 changes: 8 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,16 @@ Thank you for helping improve Audit.

## Local development

Audit requires Node.js 22 or newer.
Audit requires Node.js 22 or 24. Node 25 and newer do not bundle Corepack,
so install it before enabling the pinned pnpm.

```sh
npm ci
npm run check
npm test
npm run format:check
npm install -g corepack
corepack enable
pnpm install --frozen-lockfile
pnpm run check
pnpm test
pnpm run format:check
```

## Pull requests
Expand Down
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,13 +169,16 @@ cannot be part of your transaction.

## Development

Audit requires Node.js 22 or newer.
Audit requires Node.js 22 or 24. Node 25 and newer do not bundle Corepack,
so install it before enabling the pinned pnpm.

```sh
npm ci
npm run format:check
npm run check
npm test
npm install -g corepack
corepack enable
pnpm install --frozen-lockfile
pnpm run format:check
pnpm run check
pnpm test
```

Maintainer releases use npm trusted publishing and the signed-tag procedure in
Expand Down
8 changes: 5 additions & 3 deletions docs/RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,15 @@ The release workflow verifies that the tag:
- points to the checkout and the GitHub release-event commit; and
- is contained in `origin/main`.

Its preparation job has no OIDC permission. It installs the reviewed npm
version without dependency caching, runs the full gate, builds and packs once,
Its preparation job has no OIDC permission. It installs dependencies with
the pinned pnpm, installs the reviewed npm version without dependency
caching, runs the full gate, builds and packs once,
smoke-tests the tarball from a clean consumer, records its SHA-1 and SHA-512
integrity, and uploads the exact prepared artifact.

Only the `npm-publish` job receives `id-token: write`. It installs no
dependencies, verifies the prepared manifest and tarball hashes against the
dependencies and does not download pnpm. It invokes the publish helper with
`node`, verifies the prepared manifest and tarball hashes against the
release commit, and publishes that tarball with npm provenance.

## Safe retry
Expand Down
Loading