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
16 changes: 11 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,26 @@ jobs:
- name: Check out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7

- name: Enable Corepack
run: corepack enable

- name: Set up Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7
with:
node-version: ${{ matrix.node-version }}
cache: npm
cache: pnpm

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

- 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: Run the 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
run: npm run release:pack -- -- --require-clean --require-main-ancestor --require-release-tag --expected-release-commit "${RELEASE_COMMIT}"
run: pnpm run release:pack -- --require-clean --require-main-ancestor --require-release-tag --expected-release-commit "${RELEASE_COMMIT}"

- name: Upload the prepared release
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
Expand Down Expand Up @@ -107,4 +110,4 @@ jobs:
path: .release

- name: Publish the verified prepared tarball
run: npm run release:publish -- -- --expected-release-commit "${RELEASE_COMMIT}"
run: node scripts/release-package.mjs publish --expected-release-commit "${RELEASE_COMMIT}"
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pnpm-lock.yaml
12 changes: 7 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ Read [AGENTS.md](AGENTS.md) before changing the package. Pull requests must
pass the complete gate on Node.js 22 and 24:

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

`npm test` starts Azurite. Durable behavior, especially contention and
`pnpm test` starts Azurite. Durable behavior, especially contention and
read-only refusal, must be verified against that real backend.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,12 @@ delivery work.
## Development

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

The test command starts real Azurite and verifies the durable boundary under
Expand Down
4 changes: 2 additions & 2 deletions docs/RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ The workflow intentionally rejects `0.0.0`; its first permitted release is
This separate reviewed pull request must:

1. change `packages/rate-limit/package.json` from `0.0.0` to `0.1.0`;
2. regenerate `package-lock.json` and verify its workspace entry is `0.1.0`;
2. regenerate `pnpm-lock.yaml` and verify its workspace importer pins `0.1.0`;
3. update README and plan status with the advertised release notes; and
4. pass the full gate and release pack smoke on Node 22 and 24.

Expand Down Expand Up @@ -189,7 +189,7 @@ gh run download "${run_id}" \
--name "rate-limit-release-${run_id}" \
--dir "${artifact_dir}"
test -f "${artifact_dir}/package-manifest.json"
npm run release:registry:check -- -- --manifest "${artifact_dir}/package-manifest.json"
pnpm run release:registry:check -- --manifest "${artifact_dir}/package-manifest.json"
Comment thread
cursor[bot] marked this conversation as resolved.
Resolved
npm dist-tag ls @pegma/rate-limit
```

Expand Down
Loading