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
18 changes: 12 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,23 +53,26 @@ 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: 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 release tarballs
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 @@ -110,6 +113,9 @@ 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

Expand All @@ -120,4 +126,4 @@ jobs:
path: .release

- name: Publish verified prepared tarballs
run: npm run release:publish -- -- --expected-release-commit "${RELEASE_COMMIT}" --manifest .release/package-manifest.json
run: pnpm run release:publish -- --expected-release-commit "${RELEASE_COMMIT}" --manifest .release/package-manifest.json
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 @@ -57,7 +57,7 @@ and a `tsconfig.json` that excludes `src/**/*.test.ts`.
## Workflow

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.

Publishing remains disabled until the runner, real D1/Azure verification, and
both consumer fixtures meet the exit criteria in `docs/PROJECT_PLAN.md`.
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
Scheduler requires Node.js 22 or newer.

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

Keep changes bounded and include tests for concurrency, crash recovery, stale
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@ The first consumers are:
## Development

```sh
npm ci
npm run format:check
npm run check
npm test
pnpm install --frozen-lockfile
pnpm run format:check
pnpm run check
pnpm test
# or separately:
npm run test:node
npm run test:d1
pnpm run test:node
pnpm run test:d1
```

Consumer fixtures (Ops Hub, Support Desk, Azure Functions shapes) live under
[fixtures/](fixtures/) and run as part of `npm test`.
[fixtures/](fixtures/) and run as part of `pnpm test`.

See [docs/PROJECT_PLAN.md](docs/PROJECT_PLAN.md) for the delivery sequence.
4 changes: 2 additions & 2 deletions docs/CLOUDFLARE.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ closed.
Run Wrangler with scheduled-event testing enabled:

```sh
npx wrangler dev --test-scheduled --persist-to .wrangler/state
pnpm dlx wrangler dev --test-scheduled --persist-to .wrangler/state
```

Wrangler exposes `/__scheduled`. A test or Docker-side timer can invoke it:
Expand Down Expand Up @@ -72,7 +72,7 @@ survive restarts. Do not treat Memory Store as durability evidence.
Run the D1 suite alone:

```sh
npm run test:d1
pnpm run test:d1
```

References:
Expand Down
10 changes: 5 additions & 5 deletions docs/RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ npm trusted publishers for both packages must identify:
- environment `npm-publish`
- allowed action `npm publish`

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
before tagging. Never unpublish and reuse a version.

## Normal OIDC releases (`0.1.0` and later)
Expand All @@ -54,14 +54,14 @@ before tagging. Never unpublish and reuse a version.
4. The workflow:
- verifies the signed tag against `RELEASE_ALLOWED_SIGNERS`;
- runs the full gate;
- packs both packages with `npm run release:pack`;
- publishes exact tarballs with provenance via OIDC (`npm run release:publish`).
- packs both packages with `pnpm run release:pack`;
- publishes exact tarballs with provenance via OIDC (`pnpm run release:publish`).

Local helpers (never substitute for the OIDC lane for advertised releases):

```sh
npm run release:check
npm run release:pack -- -- --output .release
pnpm run release:check
pnpm run release:pack -- --output .release
# release:publish is restricted to the GitHub release workflow
```

Expand Down
8 changes: 4 additions & 4 deletions docs/TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
Every change must pass:

```sh
npm run format:check
npm run check
npm test
pnpm run format:check
pnpm run check
pnpm test
```

CI runs the gate on Node 22 and 24.
Expand Down Expand Up @@ -60,7 +60,7 @@ Adapter unit tests cover:
- unmapped cron fail-closed behavior;
- overlap suppression and checkpoint cycles through the adapter.

Real local D1 tests (`npm run test:d1`) through
Real local D1 tests (`pnpm run test:d1`) through
`@pegma/storage-cloudflare-d1` and the Cloudflare Workers Vitest pool cover:

- a complete checkpoint cycle with occurrence suppression;
Expand Down
2 changes: 1 addition & 1 deletion fixtures/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ names and bounded-page shapes documented in those consumers.
| `support-desk` | Mail send/reconcile/sweep + queue repair/inactive-sweep loops |
| `azure-functions` | Timer-trigger composition for a RetireGolden-style Azure host |

Run with the repository gate (`npm test`). External consumers should pin
Run with the repository gate (`pnpm test`). External consumers should pin
`@pegma/scheduler@0.1.0` (and the Cloudflare adapter when needed) from npm.
Loading