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,19 +32,21 @@ jobs:
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7
with:
node-version: ${{ matrix.node-version }}
cache: npm

- name: Enable Corepack
run: corepack enable

- name: Use the reviewed npm release
run: npm install --global npm@11.18.0

- 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
11 changes: 7 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,24 +50,27 @@ jobs:
registry-url: https://registry.npmjs.org
package-manager-cache: false

- name: Enable Corepack
run: corepack enable

- name: Require an advertised release version
run: npm run release:check
run: pnpm run release:check

- name: Use the reviewed npm release
run: npm install --global npm@11.18.0

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

- name: Run the complete gate
run: npm run format:check && npm run check && npm test
run: pnpm run format:check && pnpm run check && pnpm test

- name: Prepare and verify the release tarball
env:
RELEASE_TAG: ${{ github.event.release.tag_name }}
RELEASE_PRERELEASE: ${{ github.event.release.prerelease }}
RELEASE_COMMIT: ${{ github.sha }}
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
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
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 @@ -65,7 +65,7 @@ The package needs its own README and LICENSE. `prepack` must build, package
TypeScript must exclude tests, and sibling dependencies are pinned exactly.

Work on a `claude/*` branch and open a pull request. The gate is
`npm run format:check`, `npm run check`, and `npm test` on Node 22 and 24.
`pnpm run format:check`, `pnpm run check`, and `pnpm test` on Node 22 and 24.

Stable publishing is trusted-publisher OIDC only. The sole exception is the
first package-name bootstrap: `0.0.0` may be packed and verified only through
Expand Down
13 changes: 8 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
# Contributing to Mail

Mail requires Node.js 22 or newer.
Mail requires Node.js 22 or newer. Official Node 25+ distributions do not
bundle Corepack, so install it before enabling the reviewed package manager.

```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
```

Changes must preserve caller-owned atomicity, mandatory provider idempotency,
Expand Down
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,14 @@ belong to hosts or other components.
See [Architecture](docs/ARCHITECTURE.md), [Project Plan](docs/PROJECT_PLAN.md),
[Release Notes](docs/RELEASE_NOTES.md), and
[Releasing](docs/RELEASING.md).

## Development

```sh
npm install -g corepack
corepack enable
pnpm install --frozen-lockfile
pnpm run format:check
pnpm run check
pnpm test
```
17 changes: 10 additions & 7 deletions docs/RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ tag whose commit is already contained in `origin/main`. Configure:
- `RELEASE_ALLOWED_SIGNERS` with reviewed SSH allowed-signers entries; and
- tag protection against moving or deleting `v*`.

Run `npm run format:check`, `npm run check`, and `npm test` on Node 22 and 24.
Run `pnpm run format:check`, `pnpm run check`, and `pnpm test` on Node 22 and 24.
The packer also checks the exact two runtime dependencies, runs
`npm audit --omit=dev`, requires the exact seven-file package inventory,
`pnpm audit --prod`, requires the exact seven-file package inventory,
verifies npm's SHA-1 and SHA-512 values, and imports the tarball from a clean
consumer.

Expand All @@ -44,8 +44,11 @@ GitHub release for this tag: a release event would invoke the OIDC workflow,
which intentionally rejects every `0.0.x` version.

Check out the exact tag, fetch protected main, install the reviewed npm, and
prepare an empty output directory. Export the same reviewed allowed-signers
content used by the workflow as `RELEASE_ALLOWED_SIGNERS`:
prepare an empty output directory. The immutable `v0.0.0` source tag predates
the pnpm conversion: it still has `package-lock.json` and
`packageManager: npm@11.18.0`, so this tag-specific procedure keeps
npm-compatible commands. Export the same reviewed allowed-signers content used
by the workflow as `RELEASE_ALLOWED_SIGNERS`:

```sh
git checkout --detach refs/tags/v0.0.0
Expand Down Expand Up @@ -146,7 +149,7 @@ Do not announce an unqualified install until that correction is visible in

## Normal OIDC releases (`0.1.0` and later)

Update `packages/mail/package.json`, the lockfile, and public release notes
Update `packages/mail/package.json`, `pnpm-lock.yaml`, and public release notes
through a reviewed pull request. After merge, create and push a protected
signed annotated `vX.Y.Z` tag at the exact `origin/main` commit, then run:

Expand All @@ -172,8 +175,8 @@ no dependencies and publishes the exact prepared tarball with provenance.

## Registry safety

`npm run release:registry` requires the current stable version to be absent.
`npm run release:registry -- -- --manifest .release/package-manifest.json`
`pnpm run release:registry` requires the current stable version to be absent.
`pnpm run release:registry -- -- --manifest .release/package-manifest.json`
allows only two retry-safe outcomes: absent means publish, and an existing
byte-identical `dist.integrity` means skip. Different bytes or any registry
error other than `E404` stops the release. When a prepared manifest is supplied,
Expand Down
Loading