From bc98aaf705fa69a52ba650a28b9b74dde9631ce9 Mon Sep 17 00:00:00 2001 From: Benjie Gillam Date: Tue, 8 Sep 2026 14:38:18 +0100 Subject: [PATCH 1/4] Set up Changesets for publishing --- .changeset/README.md | 8 + .changeset/brave-ants-esm.md | 9 + .changeset/bright-cats-config.md | 7 + .changeset/calm-owls-tasks.md | 9 + .changeset/clever-bees-exports.md | 7 + .changeset/config.json | 19 ++ .changeset/fresh-wolves-node.md | 6 + .changeset/quick-moles-log-level.md | 6 + .changeset/silly-tigers-runner.md | 7 + .changeset/soft-eagles-local-queue.md | 8 + .changeset/tidy-pandas-maintenance.md | 6 + .github/workflows/release.yml | 84 ++++++ RELEASE_NOTES.md => CHANGELOG.md | 34 +-- package.json | 9 +- yarn.lock | 366 +++++++++++++++++++++++++- 15 files changed, 548 insertions(+), 37 deletions(-) create mode 100644 .changeset/README.md create mode 100644 .changeset/brave-ants-esm.md create mode 100644 .changeset/bright-cats-config.md create mode 100644 .changeset/calm-owls-tasks.md create mode 100644 .changeset/clever-bees-exports.md create mode 100644 .changeset/config.json create mode 100644 .changeset/fresh-wolves-node.md create mode 100644 .changeset/quick-moles-log-level.md create mode 100644 .changeset/silly-tigers-runner.md create mode 100644 .changeset/soft-eagles-local-queue.md create mode 100644 .changeset/tidy-pandas-maintenance.md create mode 100644 .github/workflows/release.yml rename RELEASE_NOTES.md => CHANGELOG.md (94%) diff --git a/.changeset/README.md b/.changeset/README.md new file mode 100644 index 00000000..b77cde2e --- /dev/null +++ b/.changeset/README.md @@ -0,0 +1,8 @@ +# Changesets notes + +Create a release note with `yarn changeset`. Versioning is performed by the +release workflow through `yarn changeset-version`; this regenerates +`src/version.ts`, updates `CHANGELOG.md`, and commits the release changes. This +is all handled automatically by the CI release process. + +Docs: https://github.com/changesets/changesets diff --git a/.changeset/brave-ants-esm.md b/.changeset/brave-ants-esm.md new file mode 100644 index 00000000..c70d95b9 --- /dev/null +++ b/.changeset/brave-ants-esm.md @@ -0,0 +1,9 @@ +--- +"graphile-worker": minor +--- + +Now published as pure ESM, but worry not as unflagged require(ESM) is now +enabled by default in +[Node 20.19.0+](https://nodejs.org/pt-br/blog/release/v20.19.0), +[Node 22.12.0+](https://nodejs.org/en/blog/release/v22.12.0) and Node 24+ so +everything should continue to work as before. diff --git a/.changeset/bright-cats-config.md b/.changeset/bright-cats-config.md new file mode 100644 index 00000000..85696697 --- /dev/null +++ b/.changeset/bright-cats-config.md @@ -0,0 +1,7 @@ +--- +"graphile-worker": minor +--- + +For consistency, `cosmiconfig` is no longer supported for configuration; use +`graphile.config.ts` instead. (This release will throw errors if you're using +cosmisconfig, in later releases cosmiconfigs will not be detected.) diff --git a/.changeset/calm-owls-tasks.md b/.changeset/calm-owls-tasks.md new file mode 100644 index 00000000..35d2b176 --- /dev/null +++ b/.changeset/calm-owls-tasks.md @@ -0,0 +1,9 @@ +--- +"graphile-worker": minor +--- + +TypeScript task files with `.ts` and `.mts` extensions are now recognized by +default and loaded through Node's native type stripping if possible. Only +erasable, verbatim TypeScript syntax is supported without a custom loader or +precompilation. `.js`, `.cjs` and `.mjs` files are prioritised ahead of `.ts` +and `.mts` files. diff --git a/.changeset/clever-bees-exports.md b/.changeset/clever-bees-exports.md new file mode 100644 index 00000000..a38e20b4 --- /dev/null +++ b/.changeset/clever-bees-exports.md @@ -0,0 +1,7 @@ +--- +"graphile-worker": minor +--- + +We now use the `exports` option, meaning sub-path imports +(`require("graphile-worker/...")`) are no longer supported. If you need +something not exported by default, raise an issue. diff --git a/.changeset/config.json b/.changeset/config.json new file mode 100644 index 00000000..dded1aec --- /dev/null +++ b/.changeset/config.json @@ -0,0 +1,19 @@ +{ + "$schema": "https://unpkg.com/@changesets/config@4.0.0/schema.json", + "changelog": [ + "@changesets/changelog-github", + { + "repo": "graphile/worker" + } + ], + "snapshot": { + "useCalculatedVersion": true, + "prereleaseTemplate": "aardvark.{tag}-{datetime}" + }, + "fixed": [], + "linked": [], + "access": "public", + "baseBranch": "main", + "updateInternalDependencies": "patch", + "ignore": [] +} diff --git a/.changeset/fresh-wolves-node.md b/.changeset/fresh-wolves-node.md new file mode 100644 index 00000000..f41fa434 --- /dev/null +++ b/.changeset/fresh-wolves-node.md @@ -0,0 +1,6 @@ +--- +"graphile-worker": minor +--- + +Since Node 20 is EOL, Node 22 is now the minimum supported version, per our +[requirements documentation](https://worker.graphile.org/docs/requirements). diff --git a/.changeset/quick-moles-log-level.md b/.changeset/quick-moles-log-level.md new file mode 100644 index 00000000..376a20b5 --- /dev/null +++ b/.changeset/quick-moles-log-level.md @@ -0,0 +1,6 @@ +--- +"graphile-worker": minor +--- + +`LogLevel` export is now type only - a string union rather than a TypeScript +const enum. diff --git a/.changeset/silly-tigers-runner.md b/.changeset/silly-tigers-runner.md new file mode 100644 index 00000000..f6724737 --- /dev/null +++ b/.changeset/silly-tigers-runner.md @@ -0,0 +1,7 @@ +--- +"graphile-worker": minor +--- + +`Runner` gains `[Symbol.asyncDispose]()` method, so you can +`await using runner = await run(...)` and the worker will be released when you +reach the end of the scope. (Primarily useful for tests.) diff --git a/.changeset/soft-eagles-local-queue.md b/.changeset/soft-eagles-local-queue.md new file mode 100644 index 00000000..4edf8751 --- /dev/null +++ b/.changeset/soft-eagles-local-queue.md @@ -0,0 +1,8 @@ +--- +"graphile-worker": patch +--- + +Fix issue where enabling `localQueue` could cause jobs from the same named queue +to run concurrently (violating the serial execution guarantee for named queues): +a single batch fetch could lock multiple jobs belonging to one named queue. +Batch fetches now return at most one job per named queue (#621). diff --git a/.changeset/tidy-pandas-maintenance.md b/.changeset/tidy-pandas-maintenance.md new file mode 100644 index 00000000..5b37b86a --- /dev/null +++ b/.changeset/tidy-pandas-maintenance.md @@ -0,0 +1,6 @@ +--- +"graphile-worker": patch +--- + +Maintenance work: upgrade to latest TypeScript, Jest, eliminate ts-node, fix +yargs, use erasable syntax only for type-stripping support. diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..ffbf6f19 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,84 @@ +name: Release + +on: + push: + branches: + - main + workflow_dispatch: + +concurrency: ${{ github.workflow }}-${{ github.ref }} + +jobs: + release: + if: github.event_name == 'push' && github.ref_name == 'main' + name: Release + runs-on: ubuntu-latest + + permissions: + contents: write + pull-requests: write + issues: read + # Required for npm trusted publishing via GitHub Actions OIDC. + id-token: write + + steps: + - name: Checkout repository + uses: actions/checkout@v7 + + - name: Setup Node.js 24 + uses: actions/setup-node@v7 + with: + node-version: 24 + cache: yarn + + - name: Install dependencies + run: yarn --immutable + + - name: Create release pull request or publish to npm + uses: changesets/action@v2 + with: + version-script: yarn changeset-version + publish-script: yarn changeset-publish + env: + # Supplies GitHub metadata to @changesets/changelog-github. + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + snapshot: + if: + github.event_name == 'workflow_dispatch' && ( github.ref_name == 'main' || + github.ref_name == 'next' ) + name: Publish snapshot + runs-on: ubuntu-latest + + permissions: + contents: read + pull-requests: read + issues: read + # Required for npm trusted publishing via GitHub Actions OIDC. + id-token: write + + steps: + - name: Checkout repository + uses: actions/checkout@v7 + + - name: Setup Node.js 24 + uses: actions/setup-node@v7 + with: + node-version: 24 + cache: yarn + + - name: Install dependencies + run: yarn --immutable + + - name: Calculate snapshot version + run: | + yarn changeset version --snapshot "${{ github.ref_name }}" + node scripts/postversion.mjs + env: + CHANGESETS_NO_COMMIT: "1" + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Publish snapshot + run: + yarn prepack && yarn changeset publish --tag "snapshot-${{ + github.ref_name }}" --no-git-tag diff --git a/RELEASE_NOTES.md b/CHANGELOG.md similarity index 94% rename from RELEASE_NOTES.md rename to CHANGELOG.md index cdabbaa9..33220507 100644 --- a/RELEASE_NOTES.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -# Release notes +# Changelog ## Worker Pro: easing migration @@ -19,38 +19,6 @@ to make sure the system as a whole remains consistent. Read more: [Worker Pro Migration](https://worker.graphile.org/docs/pro/migration). -## Pending (v0.18.0) - -- For consistency, `cosmiconfig` is no longer supported for configuration; use - `graphile.config.ts` instead. (This release will throw errors if you're using - cosmisconfig, in later releases cosmiconfigs will not be detected.) -- Now published as pure ESM, but worry not as unflagged require(ESM) is now - enabled by default in - [Node 20.19.0+](https://nodejs.org/pt-br/blog/release/v20.19.0), - [Node 22.12.0+](https://nodejs.org/en/blog/release/v22.12.0) and Node 24+ so - everything should continue to work as before. -- We now use the `exports` option, meaning sub-path imports - (`require("graphile-worker/...")`) are no longer supported. If you need - something not exported by default, raise an issue. -- TypeScript task files with `.ts` and `.mts` extensions are now recognized by - default and loaded through Node's native type stripping if possible. Only - erasable, verbatim TypeScript syntax is supported without a custom loader or - precompilation. `.js`, `.cjs` and `.mjs` files are prioritised ahead of `.ts` - and `.mts` files. -- Since Node 20 is EOL, Node 22 is now the minimum supported version, per our - [requirements documentation](https://worker.graphile.org/docs/requirements). -- `Runner` gains `[Symbol.asyncDispose]()` method, so you can - `await using runner = await run(...)` and the worker will be released when you - reach the end of the scope. (Primarily useful for tests.) -- Maintenance work: upgrade to latest TypeScript, Jest, eliminate ts-node, fix - yargs, use erasable syntax only for type-stripping support. -- `LogLevel` export is now type only - a string union rather than a TypeScript - const enum. -- Fix issue where enabling `localQueue` could cause jobs from the same named - queue to run concurrently (violating the serial execution guarantee for named - queues): a single batch fetch could lock multiple jobs belonging to one named - queue. Batch fetches now return at most one job per named queue (#621). - ## v0.17.3 Fixes a bad cast (`::int[]` instead of `::bigint[]`) in `failJobs` resulting in diff --git a/package.json b/package.json index 680b2c19..9e7e2d6f 100644 --- a/package.json +++ b/package.json @@ -20,8 +20,8 @@ "db:dump": "./scripts/dump_db", "perfTest": "cd perfTest && node ./run.js", "towerDefence": "cd towerDefence && node ./run.mjs", - "preversion": "grep '^### Pending' RELEASE_NOTES.md && echo \"⚠️ Cannot publish with 'Pending' in RELEASE_NOTES ⚠️\" && exit 1 || true", - "version": "node scripts/postversion.mjs && git add src/version.ts", + "changeset-version": "yarn changeset version && node scripts/postversion.mjs && yarn install --mode=update-lockfile --no-immutable && git add -u -- package.json src/version.ts yarn.lock .changeset && { test ! -f CHANGELOG.md || git add CHANGELOG.md; } && git commit -m 'RELEASING: Releasing graphile-worker'", + "changeset-publish": "yarn prepack && changeset publish", "website": "cd website && yarn run", "website:start": "yarn website start", "website:deploy": "yarn website deploy" @@ -60,6 +60,8 @@ "yargs": "^17.7.2" }, "devDependencies": { + "@changesets/changelog-github": "^1.0.1", + "@changesets/cli": "^3.0.2", "@docusaurus/core": "2.4.3", "@docusaurus/module-type-aliases": "2.4.3", "@docusaurus/preset-classic": "2.4.3", @@ -112,6 +114,9 @@ "dist", "sql" ], + "publishConfig": { + "access": "public" + }, "engines": { "node": ">=22.18.0" }, diff --git a/yarn.lock b/yarn.lock index 4b0e6845..fe35d6c9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1697,6 +1697,228 @@ __metadata: languageName: node linkType: hard +"@changesets/apply-release-plan@npm:^8.1.0": + version: 8.1.0 + resolution: "@changesets/apply-release-plan@npm:8.1.0" + dependencies: + "@changesets/config": "npm:^4.0.0" + "@changesets/format": "npm:^0.1.2" + "@changesets/git": "npm:^4.0.1" + "@changesets/should-skip-package": "npm:^1.0.0" + "@changesets/types": "npm:^7.0.0" + import-meta-resolve: "npm:^4.2.0" + jsonc-parser: "npm:^3.3.1" + semver: "npm:^7.8.1" + checksum: 10/051b9632ba05fb99191c6b8c6c2e986f987c73462bd7d7e00dbac9fa7d9a78182e5875ccea7052c9e5077d8d34c702c8f17a7d204d61c43a8e132eda2174a70a + languageName: node + linkType: hard + +"@changesets/assemble-release-plan@npm:^7.0.0": + version: 7.0.0 + resolution: "@changesets/assemble-release-plan@npm:7.0.0" + dependencies: + "@changesets/errors": "npm:^1.0.0" + "@changesets/get-dependents-graph": "npm:^3.0.0" + "@changesets/should-skip-package": "npm:^1.0.0" + "@changesets/types": "npm:^7.0.0" + semver: "npm:^7.8.1" + checksum: 10/1d2b22d57f4db2c33075b511f7185bea63e8b17f6083b0bf607c10ba2868df5942695e29774dce695876f03512da4264edd61101492312ffc716c356f750743d + languageName: node + linkType: hard + +"@changesets/changelog-git@npm:^1.0.0": + version: 1.0.0 + resolution: "@changesets/changelog-git@npm:1.0.0" + dependencies: + "@changesets/types": "npm:^7.0.0" + checksum: 10/64d4a9b44ee7fee23034f6d89cd80bb66419f59a1002424167a0282dfe252369eb7ecbad1f3eb9a02126d3bc5f9d2e5f8cdc0a51fed9158d71f9491735830d52 + languageName: node + linkType: hard + +"@changesets/changelog-github@npm:^1.0.1": + version: 1.0.1 + resolution: "@changesets/changelog-github@npm:1.0.1" + dependencies: + "@changesets/get-github-info": "npm:^1.0.1" + "@changesets/types": "npm:^7.0.0" + checksum: 10/7ae2533348abdb4d503486e7cc165ff6be332e86a2a2652853148c2e6e310c9d8c9fea49442b2222f99aaeaf16ede0556de22a825307b1177c5ac8be29b225d8 + languageName: node + linkType: hard + +"@changesets/cli@npm:^3.0.2": + version: 3.0.2 + resolution: "@changesets/cli@npm:3.0.2" + dependencies: + "@changesets/apply-release-plan": "npm:^8.1.0" + "@changesets/assemble-release-plan": "npm:^7.0.0" + "@changesets/changelog-git": "npm:^1.0.0" + "@changesets/config": "npm:^4.0.0" + "@changesets/errors": "npm:^1.0.0" + "@changesets/get-dependents-graph": "npm:^3.0.0" + "@changesets/git": "npm:^4.0.1" + "@changesets/pre": "npm:^3.0.0" + "@changesets/read": "npm:^1.0.1" + "@changesets/should-skip-package": "npm:^1.0.0" + "@changesets/types": "npm:^7.0.0" + "@changesets/write": "npm:^1.0.1" + "@clack/prompts": "npm:^1.7.0" + "@manypkg/get-packages": "npm:^3.1.0" + "@pnpm/deps.graph-sequencer": "npm:^1100.0.1" + cac: "npm:^7.0.0" + import-meta-resolve: "npm:^4.2.0" + launch-editor: "npm:^2.14.1" + package-manager-detector: "npm:^1.6.0" + semver: "npm:^7.8.1" + tinyexec: "npm:^1.3.0" + bin: + changeset: bin.js + checksum: 10/b50ed8c0fe1becc2a7856e97fb8a8a94247907b10c1ed659171a4fbb6e13a38dd0742ec61222cc7165b9e129ddfd86a228bd5189b573cda9912852e433760202 + languageName: node + linkType: hard + +"@changesets/config@npm:^4.0.0": + version: 4.0.0 + resolution: "@changesets/config@npm:4.0.0" + dependencies: + "@changesets/get-dependents-graph": "npm:^3.0.0" + "@changesets/should-skip-package": "npm:^1.0.0" + "@changesets/types": "npm:^7.0.0" + "@manypkg/get-packages": "npm:^3.1.0" + picomatch: "npm:^4.0.4" + checksum: 10/2e21cc47ed2f4f94a8d92baf5c6fd449ece769b1d19b326adcda4db954e6aed91d7e1ee291547766d45e1641d38514b8223e33603f7665316f00288969499997 + languageName: node + linkType: hard + +"@changesets/errors@npm:^1.0.0": + version: 1.0.0 + resolution: "@changesets/errors@npm:1.0.0" + checksum: 10/27f8ef6c539eccb5d3173bd5beb039e3ce44e8714cb2cc0749f0ccb98f1af4ef32b6aef25520cfd08e35d6876da634743b04a50ffcd4bde520cb302c5d1dfe04 + languageName: node + linkType: hard + +"@changesets/format@npm:^0.1.1, @changesets/format@npm:^0.1.2": + version: 0.1.2 + resolution: "@changesets/format@npm:0.1.2" + dependencies: + package-manager-detector: "npm:^1.8.0" + tinyexec: "npm:^1.3.0" + checksum: 10/06002736a0c30b1b6bfeb3da202b0714b25c0e2e9b9565761583904c9b59aa4c1a2688d4e4ada2a1c2e70d6223dca2b5394d2212e68c3c19be578b325d5601c8 + languageName: node + linkType: hard + +"@changesets/get-dependents-graph@npm:^3.0.0": + version: 3.0.0 + resolution: "@changesets/get-dependents-graph@npm:3.0.0" + dependencies: + "@changesets/types": "npm:^7.0.0" + semver: "npm:^7.8.1" + checksum: 10/3b53b29bc316acc08f76351711b2e90f79237a8d5c1369e845c05f940b69b580d438404b7f53fce997a97f926279135b88995ce819fe6bb211a577a80b381804 + languageName: node + linkType: hard + +"@changesets/get-github-info@npm:^1.0.1": + version: 1.0.1 + resolution: "@changesets/get-github-info@npm:1.0.1" + dependencies: + dataloader: "npm:^2.2.3" + checksum: 10/09f119ec9829bb4ef92b5f13f4a0b2c7cc9af10e8e54026fed13d1d77398d333b9f90612d8b6832f66ba6198310f9cd1bb3eb6fa4b7c1324185e1c0ca46bff2d + languageName: node + linkType: hard + +"@changesets/git@npm:^4.0.1": + version: 4.0.1 + resolution: "@changesets/git@npm:4.0.1" + dependencies: + "@changesets/errors": "npm:^1.0.0" + "@changesets/types": "npm:^7.0.0" + "@manypkg/get-packages": "npm:^3.1.0" + picomatch: "npm:^4.0.4" + tinyexec: "npm:^1.3.0" + checksum: 10/736600712aca85c01e8c0c7fe9956f283b01dbdd2957f8131903a1abec0736a038274522f9a5d79b09a7da07726f3abdb187b29e6f168804382a6b9fa03f8b98 + languageName: node + linkType: hard + +"@changesets/parse@npm:^1.0.0": + version: 1.0.0 + resolution: "@changesets/parse@npm:1.0.0" + dependencies: + "@changesets/types": "npm:^7.0.0" + yaml: "npm:^2.9.0" + checksum: 10/f3e7d0cb03d9218abebb1e7bd2244befcddab7cd9299f88714fc2ac3f5b16850efc158f67155ccfe46ccd6e6a8371b8db02121b9c0b2ac1ce947f3634f248b64 + languageName: node + linkType: hard + +"@changesets/pre@npm:^3.0.0": + version: 3.0.0 + resolution: "@changesets/pre@npm:3.0.0" + dependencies: + "@changesets/errors": "npm:^1.0.0" + "@changesets/types": "npm:^7.0.0" + "@manypkg/get-packages": "npm:^3.1.0" + checksum: 10/c9615ad03b7efc020bc4046ddc158ce62eaa7aee4e283e9b7c0da229ddad74e86707bf54c73681fe8822305486bfd1691d3118ba3e674018a1f07a46640faa10 + languageName: node + linkType: hard + +"@changesets/read@npm:^1.0.1": + version: 1.0.1 + resolution: "@changesets/read@npm:1.0.1" + dependencies: + "@changesets/git": "npm:^4.0.1" + "@changesets/parse": "npm:^1.0.0" + "@changesets/types": "npm:^7.0.0" + checksum: 10/c6f3169e3d71e5a387cf4e83f23a743d6b61c6290d1b5fd6583b78146cb3d5bc875e013d9e531549066898ad3556dd050b93cdfe16def049f8e55e2a42fd5276 + languageName: node + linkType: hard + +"@changesets/should-skip-package@npm:^1.0.0": + version: 1.0.0 + resolution: "@changesets/should-skip-package@npm:1.0.0" + dependencies: + "@changesets/types": "npm:^7.0.0" + checksum: 10/143f7757fa602e173ec6cd504c41c0d4a204c6b36f5bdc80fbf13e2eec22cdd371b97daaebbd8b772fde1329070fb1ac80f9925193ebc0782c178e7c5a37aaee + languageName: node + linkType: hard + +"@changesets/types@npm:^7.0.0": + version: 7.0.0 + resolution: "@changesets/types@npm:7.0.0" + checksum: 10/7de8bfc0614cf76c0d1d699b61e1f1ba11abb9dd0f5eb0525fbddcf4bcca519151078c27e3bfa1fcf63aba23e28b744c18048eec3d4fb3eec5c763915edbaae2 + languageName: node + linkType: hard + +"@changesets/write@npm:^1.0.1": + version: 1.0.1 + resolution: "@changesets/write@npm:1.0.1" + dependencies: + "@changesets/format": "npm:^0.1.1" + "@changesets/types": "npm:^7.0.0" + human-id: "npm:^4.2.0" + checksum: 10/4843f69344e816b43b2e2bc45fc0d665c10f30d1181fb382e6b7cddd16e5106351136e563c95cf7bb3dc7abad8381f6526453c9cb48ce8c584b4e1a3180d35c9 + languageName: node + linkType: hard + +"@clack/core@npm:1.5.0": + version: 1.5.0 + resolution: "@clack/core@npm:1.5.0" + dependencies: + fast-wrap-ansi: "npm:^0.2.0" + sisteransi: "npm:^1.0.5" + checksum: 10/637aa6044481c43a4ac5170bb889c5cfb48e6930e34ddbdd0990186ed30e096de6afbdcc66dde292d62844268c3da030a019527109c58a286ccfbcafabe35983 + languageName: node + linkType: hard + +"@clack/prompts@npm:^1.7.0": + version: 1.8.0 + resolution: "@clack/prompts@npm:1.8.0" + dependencies: + "@clack/core": "npm:1.5.0" + fast-string-width: "npm:^3.0.2" + fast-wrap-ansi: "npm:^0.2.0" + sisteransi: "npm:^1.0.5" + checksum: 10/78c56f5f736564d51ebf472950ceafad72d84654746c8f4ece0f05d560494fdaac0045e48cbdbbc7d18726074e1f114439206d980b188043ec7f843f38cf1ac4 + languageName: node + linkType: hard + "@colors/colors@npm:1.5.0": version: 1.5.0 resolution: "@colors/colors@npm:1.5.0" @@ -2906,6 +3128,36 @@ __metadata: languageName: node linkType: hard +"@manypkg/find-root@npm:^3.1.0": + version: 3.1.0 + resolution: "@manypkg/find-root@npm:3.1.0" + dependencies: + "@manypkg/tools": "npm:^2.1.0" + checksum: 10/49d625ce57a142066ac8bc135219fcb924715e7f54ece98d36208034beeba20133c49e4bb6b636a5e7d0c0633f157a9c3523e65397839f487d88490c42bfab62 + languageName: node + linkType: hard + +"@manypkg/get-packages@npm:^3.1.0": + version: 3.1.0 + resolution: "@manypkg/get-packages@npm:3.1.0" + dependencies: + "@manypkg/find-root": "npm:^3.1.0" + "@manypkg/tools": "npm:^2.1.0" + checksum: 10/f6c7e16fc99fc17138b0eeda2374ccd3279b9d520e87ddb25296738d83bb1345f67ff1bf6b759ec19d9df84fcb3dd20546eb2cdafb53c378fa4bcebeb693e6d3 + languageName: node + linkType: hard + +"@manypkg/tools@npm:^2.1.0": + version: 2.1.2 + resolution: "@manypkg/tools@npm:2.1.2" + dependencies: + jju: "npm:^1.4.0" + tinyglobby: "npm:^0.2.13" + yaml: "npm:^2.9.0" + checksum: 10/b5ccf5500c8103978a2d1adcfbea9c51e637e1f03efabe0f8bc3631ff43d066459f965c73bdd68e575abd9237edb73b1fc83dab6b3e91bd49d39810466ff0755 + languageName: node + linkType: hard + "@mdx-js/mdx@npm:^1.6.22": version: 1.6.22 resolution: "@mdx-js/mdx@npm:1.6.22" @@ -3009,6 +3261,13 @@ __metadata: languageName: node linkType: hard +"@pnpm/deps.graph-sequencer@npm:^1100.0.1": + version: 1100.0.1 + resolution: "@pnpm/deps.graph-sequencer@npm:1100.0.1" + checksum: 10/b1e4d2bf61458bddaa1ebfb5c50a5643b1fa8607773583676e537350293682f14af96932e0519837fc5d91a56d3332892b5199f3d95056817696c9394cf4c4ab + languageName: node + linkType: hard + "@polka/url@npm:^1.0.0-next.20": version: 1.0.0-next.23 resolution: "@polka/url@npm:1.0.0-next.23" @@ -5133,6 +5392,13 @@ __metadata: languageName: node linkType: hard +"cac@npm:^7.0.0": + version: 7.0.0 + resolution: "cac@npm:7.0.0" + checksum: 10/1ada3b090403d0051619b1519c21db1cb0b32c7772d6c8782cc55c5349caac9efbb1076ba513c5975331ff0bdb104e2be9421fd3ff6c0ef5db9d58a04a4aa6f5 + languageName: node + linkType: hard + "cacheable-request@npm:^6.0.0": version: 6.1.0 resolution: "cacheable-request@npm:6.1.0" @@ -6141,6 +6407,13 @@ __metadata: languageName: node linkType: hard +"dataloader@npm:^2.2.3": + version: 2.2.3 + resolution: "dataloader@npm:2.2.3" + checksum: 10/83fe6259abe00ae64c5f48252ef59d8e5fcabda9fd4d26685f14a76eeca596bf6f9500d9f22a0094c50c3ea782a0977728f9367e232dfa0fdb5c9d646de279b2 + languageName: node + linkType: hard + "datauri@npm:^2.0.0": version: 2.0.0 resolution: "datauri@npm:2.0.0" @@ -7300,6 +7573,22 @@ __metadata: languageName: node linkType: hard +"fast-string-truncated-width@npm:^3.0.2": + version: 3.0.3 + resolution: "fast-string-truncated-width@npm:3.0.3" + checksum: 10/3a1631e48927cb558b612a90ee78a61a660823c39b024bfc113935760b5b64805dbf03c4e696c33005294db578417687432e9d13567f1a582c2c75015e8a7648 + languageName: node + linkType: hard + +"fast-string-width@npm:^3.0.2": + version: 3.0.2 + resolution: "fast-string-width@npm:3.0.2" + dependencies: + fast-string-truncated-width: "npm:^3.0.2" + checksum: 10/5b9019769f2b00b96d43575c202f4e035a0e55eba7669a9a32351de9fa0805d0959a2afcaec6e4db5ee9b9a4c08d8e77f95abeb04b5bae2f76635cf04ddb4b80 + languageName: node + linkType: hard + "fast-url-parser@npm:1.1.3": version: 1.1.3 resolution: "fast-url-parser@npm:1.1.3" @@ -7309,6 +7598,15 @@ __metadata: languageName: node linkType: hard +"fast-wrap-ansi@npm:^0.2.0": + version: 0.2.2 + resolution: "fast-wrap-ansi@npm:0.2.2" + dependencies: + fast-string-width: "npm:^3.0.2" + checksum: 10/c72272e4ee9c047ec4609adea9beb779f058e0aaee37d9e99d2306c401b34ad2b158ba6969860e35f8be7a0b0ba7512b71315d403e58a45a9f0eba0dc5b4befd + languageName: node + linkType: hard + "fastq@npm:^1.6.0": version: 1.15.0 resolution: "fastq@npm:1.15.0" @@ -8002,6 +8300,8 @@ __metadata: version: 0.0.0-use.local resolution: "graphile-worker@workspace:." dependencies: + "@changesets/changelog-github": "npm:^1.0.1" + "@changesets/cli": "npm:^3.0.2" "@docusaurus/core": "npm:2.4.3" "@docusaurus/module-type-aliases": "npm:2.4.3" "@docusaurus/preset-classic": "npm:2.4.3" @@ -8520,6 +8820,15 @@ __metadata: languageName: node linkType: hard +"human-id@npm:^4.2.0": + version: 4.2.1 + resolution: "human-id@npm:4.2.1" + bin: + human-id: dist/cli.js + checksum: 10/76948278a1821a8e212816792cec45606c98f1299ce32dad04466a6ec942717c012d276bdde6ddf2f37fbe7e6f05dba1d3003e95a4bf4efed9638c74d0b4f093 + languageName: node + linkType: hard + "human-signals@npm:^2.1.0": version: 2.1.0 resolution: "human-signals@npm:2.1.0" @@ -8615,6 +8924,13 @@ __metadata: languageName: node linkType: hard +"import-meta-resolve@npm:^4.2.0": + version: 4.2.0 + resolution: "import-meta-resolve@npm:4.2.0" + checksum: 10/3499ee8b7eddb79be77067b368bcdf39e6f144306dea4686d08071ae7e65a2e3bdca3f98f2a0f4babdcd4ba9d9e7d379ae7e27c4b9bf8b08c1e812a28c674bf3 + languageName: node + linkType: hard + "imurmurhash@npm:^0.1.4": version: 0.1.4 resolution: "imurmurhash@npm:0.1.4" @@ -9594,6 +9910,13 @@ __metadata: languageName: node linkType: hard +"jju@npm:^1.4.0": + version: 1.4.0 + resolution: "jju@npm:1.4.0" + checksum: 10/1067ff8ce02221faac5a842116ed0ec79a53312a111d0bf8342a80bd02c0a3fdf0b8449694a65947db0a3e8420e8b326dffb489c7dd5866efc380c0d1708a707 + languageName: node + linkType: hard + "joi@npm:^17.6.0": version: 17.11.0 resolution: "joi@npm:17.11.0" @@ -9727,6 +10050,13 @@ __metadata: languageName: node linkType: hard +"jsonc-parser@npm:^3.3.1": + version: 3.3.1 + resolution: "jsonc-parser@npm:3.3.1" + checksum: 10/9b0dc391f20b47378f843ef1e877e73ec652a5bdc3c5fa1f36af0f119a55091d147a86c1ee86a232296f55c929bba174538c2bf0312610e0817a22de131cc3f4 + languageName: node + linkType: hard + "jsonfile@npm:^6.0.1": version: 6.1.0 resolution: "jsonfile@npm:6.1.0" @@ -9810,7 +10140,7 @@ __metadata: languageName: node linkType: hard -"launch-editor@npm:^2.6.0": +"launch-editor@npm:^2.14.1, launch-editor@npm:^2.6.0": version: 2.14.1 resolution: "launch-editor@npm:2.14.1" dependencies: @@ -10905,6 +11235,13 @@ __metadata: languageName: node linkType: hard +"package-manager-detector@npm:^1.6.0, package-manager-detector@npm:^1.8.0": + version: 1.8.0 + resolution: "package-manager-detector@npm:1.8.0" + checksum: 10/5d79b8bf3d0d3da312ec08749c74a3b7e4d4139c259fe3561538772c65ece8ff733e002c67a4324b5c505d2ac625c121b94cf3d5135e1b4e43fed5bced148763 + languageName: node + linkType: hard + "packet-reader@npm:1.0.0": version: 1.0.0 resolution: "packet-reader@npm:1.0.0" @@ -12878,6 +13215,15 @@ __metadata: languageName: node linkType: hard +"semver@npm:^7.8.1": + version: 7.8.5 + resolution: "semver@npm:7.8.5" + bin: + semver: bin/semver.js + checksum: 10/9b01d2ff11e6e4a4539b7ca3c5f280c8704cb397a28504469f2ed4f00ad2194748d756647362a9712fff30984d15772ab7f083108c2fb508e2096ae9e708f22c + languageName: node + linkType: hard + "send@npm:0.19.0": version: 0.19.0 resolution: "send@npm:0.19.0" @@ -13676,7 +14022,14 @@ __metadata: languageName: node linkType: hard -"tinyglobby@npm:^0.2.12, tinyglobby@npm:^0.2.14, tinyglobby@npm:^0.2.15": +"tinyexec@npm:^1.3.0": + version: 1.3.1 + resolution: "tinyexec@npm:1.3.1" + checksum: 10/9c7a8ce2633f76c776d9ff663531c7b34d605f41909c2f97a27397e8c12bcaf721dae7680b6683232ffe7a6d465090be9926d5ffd00b5d7be9336a43b45289b1 + languageName: node + linkType: hard + +"tinyglobby@npm:^0.2.12, tinyglobby@npm:^0.2.13, tinyglobby@npm:^0.2.14, tinyglobby@npm:^0.2.15": version: 0.2.17 resolution: "tinyglobby@npm:0.2.17" dependencies: @@ -14883,6 +15236,15 @@ __metadata: languageName: node linkType: hard +"yaml@npm:^2.9.0": + version: 2.9.0 + resolution: "yaml@npm:2.9.0" + bin: + yaml: bin.mjs + checksum: 10/9a95e8e08651c3d292ab6a5befeb5f57b76801caa097c75bb45c9a70ce19c1b11f57e87a6ef84a579ea070ed2c2c8ac541c88c0ae684d544d5f42c7e77d11b7b + languageName: node + linkType: hard + "yargs-parser@npm:^20.2.2": version: 20.2.9 resolution: "yargs-parser@npm:20.2.9" From a7d7cfcf90c57a6938478499f4026277c7d208c2 Mon Sep 17 00:00:00 2001 From: Benjie Gillam Date: Tue, 8 Sep 2026 14:55:11 +0100 Subject: [PATCH 2/4] Remove unnecessary --- .github/workflows/release.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ffbf6f19..97dec1ce 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -39,9 +39,6 @@ jobs: with: version-script: yarn changeset-version publish-script: yarn changeset-publish - env: - # Supplies GitHub metadata to @changesets/changelog-github. - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} snapshot: if: From ac1965fc33fd4d8faa74355cfe0f2a6f6332750f Mon Sep 17 00:00:00 2001 From: Benjie Gillam Date: Tue, 8 Sep 2026 14:55:19 +0100 Subject: [PATCH 3/4] Simplify --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9e7e2d6f..e3a2afcd 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "db:dump": "./scripts/dump_db", "perfTest": "cd perfTest && node ./run.js", "towerDefence": "cd towerDefence && node ./run.mjs", - "changeset-version": "yarn changeset version && node scripts/postversion.mjs && yarn install --mode=update-lockfile --no-immutable && git add -u -- package.json src/version.ts yarn.lock .changeset && { test ! -f CHANGELOG.md || git add CHANGELOG.md; } && git commit -m 'RELEASING: Releasing graphile-worker'", + "changeset-version": "yarn changeset version && node scripts/postversion.mjs && yarn install --mode=update-lockfile --no-immutable && git add -u -- CHANGELOG.md package.json src/version.ts yarn.lock .changeset && git commit -m 'RELEASING: Releasing graphile-worker'", "changeset-publish": "yarn prepack && changeset publish", "website": "cd website && yarn run", "website:start": "yarn website start", From 6dbd48f0031a8b0540154af9de7d27146c7559fb Mon Sep 17 00:00:00 2001 From: Benjie Gillam Date: Tue, 8 Sep 2026 15:07:26 +0100 Subject: [PATCH 4/4] Make headings consistent with what changesets will produce --- CHANGELOG.md | 96 ++++++++++++++++++++++++++-------------------------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 33220507..4d26868f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,23 +19,23 @@ to make sure the system as a whole remains consistent. Read more: [Worker Pro Migration](https://worker.graphile.org/docs/pro/migration). -## v0.17.3 +## 0.17.3 Fixes a bad cast (`::int[]` instead of `::bigint[]`) in `failJobs` resulting in an error being thrown on shutdown for people who have processed more than 2.147 billion jobs with Graphile Worker. -## v0.17.2 +## 0.17.2 Implement `npm pkg fix` hint; also: fix `version` export - was _still_ incorrectly reporting 0.17.0-rc.0, because `npm publish` doesn't call `prepack` when `ignore-scripts` is `true`. -## v0.17.1 +## 0.17.1 Fix `version` export - was incorrectly reporting 0.17.0-rc.0. -## v0.17.0 +## 0.17.0 Major performance enhancements in this release, but they're opt-in! @@ -98,7 +98,7 @@ Major performance enhancements in this release, but they're opt-in! - Worker event payloads now include `ctx`, making plugin/event integrations more consistent. -## v0.16.6 +## 0.16.6 - Fix bug in `workerUtils.cleanup()` where queues would not be cleaned up if there existed any job that was not in a queue @@ -110,19 +110,19 @@ Major performance enhancements in this release, but they're opt-in! - `graphile-worker --cleanup GC_TASK_IDENTIFIERS` will attempt to keep all locally defined task identifiers -## v0.16.5 +## 0.16.5 - Add "timeout" to list of retryable error codes - thanks @psteinroe -## v0.16.4 +## 0.16.4 - Hotfix: remove website dependencies from worker module dependencies -## v0.16.3 +## 0.16.3 - Add "cannot connect now" to list of retryable error codes - thanks @psteinroe -## v0.16.2 +## 0.16.2 - Fix loading tasks on Windows (use URLs rather than file paths) - thanks @hiepxanh @@ -135,12 +135,12 @@ Major performance enhancements in this release, but they're opt-in! deadlock detection (useful if you have changed your `default_transaction_isolation` to `serializable` or similar) -## v0.16.1 +## 0.16.1 - Fixes issue importing task files that were written in TypeScript ESM format but exported as CommonJS. -## v0.16.0 +## 0.16.0 _There's a breakdown of these release notes available on the new [Worker Website](https://worker.graphile.org/news/2023-12-11-016-release), where @@ -262,7 +262,7 @@ that; deploy it across your fleet, and then proceed to upgrade to v0.16.0.) single inactive worker - Now as many workers as necessary and available will be nudged -## v0.15.2-bridge.0 +## 0.15.2-bridge.0 **TL;DR: if you want to use [Worker Pro](https://worker.graphile.org/docs/pro) to ease migration to v0.16.0, upgrade to this version if you're on v0.14.0 or @@ -345,7 +345,7 @@ unlikely affect you at runtime.) jobs via `AbortSignal`; upgrade to v0.16.0+ if you want to actually use this - A huge number of internal changes -## v0.15.1 +## 0.15.1 Fixes issues with graceful worker shutdowns: @@ -363,14 +363,14 @@ Fixes issues with graceful worker shutdowns: - Further termination signals are handled by Node (i.e. will likely instantly exit the process) -## v0.15.0 +## 0.15.0 Migration files are no longer read from filesystem (via `fs` module); instead they are stored as strings in JS to enable Graphile Worker to be bundled. The files still exist and will continue to be distributed, so this should not be a breaking change. Thanks to @timelf123 for this feature! -## v0.14.0 +## 0.14.0 **THIS RELEASE INTRODUCES SIGNIFICANT CHANGES**, in preparation for moving towards the 1.0 release. Please read these notes carefully. @@ -433,7 +433,7 @@ or smaller than about `-100` anyway.) giving interim jobs a chance to be executed (and lessening the impact of queue stalling through hanging tasks). -## v0.13.1-bridge.0 +## 0.13.1-bridge.0 **TL;DR: if you want to use [Worker Pro](https://worker.graphile.org/docs/pro) to ease migration to v0.16.0, upgrade to this version for Worker Pro support.** @@ -515,7 +515,7 @@ unlikely affect you at runtime.) jobs via `AbortSignal`; upgrade to v0.16.0+ if you want to actually use this - A huge number of internal changes -## v0.13.0 +## 0.13.0 - Remove dependency on `pgcrypto` database extension (thanks @noinkling) - If you have a pre-existing installation and wish to uninstall `pgcrypto` you @@ -525,16 +525,16 @@ unlikely affect you at runtime.) relevant to people inserting into the table directly, which is not recommended - use the `add_job` helper) -## v0.12.2 +## 0.12.2 - Fix issue when a connect error occurs whilst releasing worker (thanks @countcain) -## v0.12.1 +## 0.12.1 - Jobs with no queue are now released during graceful shutdown (thanks @olexiyb) -## v0.12.0 +## 0.12.0 - Run shutdown actions in reverse order (rather than parallel) - more stable release @@ -545,36 +545,36 @@ unlikely affect you at runtime.) - Refactoring of some cron internals - Add `noPreparedStatements` to the docs -## v0.11.4 +## 0.11.4 - Fixes bug in crontab day-of-week check - Exposes `parseCronItem` helper -## v0.11.3 +## 0.11.3 - Restores `Logger` export accidentally removed in v0.11.0 -## v0.11.2 +## 0.11.2 - Added support for wider range of `@types/pg` dependency -## v0.11.1 +## 0.11.1 - Handles unexpected errors whilst PostgreSQL client is idle -## v0.11.0 +## 0.11.0 - Export `getCronItems` so library-mode users can watch the crontab file - Replace `Logger` with new [`@graphile/logger`](https://github.com/graphile/logger) module -## v0.10.0 +## 0.10.0 - No longer exit on SIGPIPE (Node will swallow this error code) - Fix issue with error handling on PostgreSQL restart or `pg_terminate_backend` - Fix a potential unhandled promise rejection -## v0.9.0 +## 0.9.0 - New (experimental) "cron" functionality for regularly scheduled jobs - Replace jobs ordering index for improved performance (thanks @ben-pr-p) @@ -590,11 +590,11 @@ unlikely affect you at runtime.) their key) - Dependency updates -## v0.8.1 +## 0.8.1 - Fix issue with cyclic requires in watch mode -## v0.8.0 +## 0.8.0 - Track revision count for jobs (thanks @lukeramsden) - ["Forbidden flags"](https://github.com/graphile/worker#forbidden-flags) @@ -604,7 +604,7 @@ unlikely affect you at runtime.) - Add support for `PG*` [PostgreSQL envvars](https://www.postgresql.org/docs/current/libpq-envars.html) -## v0.7.2 +## 0.7.2 - Add `--no-prepared-statements` flag to allow disabling of prepared statements for pgBouncer compatibility. @@ -614,11 +614,11 @@ unlikely affect you at runtime.) (v0.7.0 and v0.7.1 had issues with the experimental watch mode enhancements, so were never upgraded to `@latest`.) -## v0.6.1 +## 0.6.1 - Official Docker image (thanks @madflow) -## v0.6.0 +## 0.6.0 - Use target es2018 for TypeScript (Node v10 supports everything we need) (thanks @keepitsimple) @@ -628,12 +628,12 @@ were never upgraded to `@latest`.) - Fix mistake in README - General maintenance -## v0.5.0 +## 0.5.0 New "Administrative functions", ability to rename `graphile_worker` schema, and significant overhaul of the codebase in preparation for going to v1.0. -### v0.5.0 improvements: +### 0.5.0 improvements: - Added "Administrative functions" to complete, reschedule or fail jobs in bulk (good for UIs) @@ -645,7 +645,7 @@ significant overhaul of the codebase in preparation for going to v1.0. - Decrease already negligible chance of worker ID collision (use `crypto.randomBytes()` rather than `Math.random()`) -### v0.5.0 breaking changes: +### 0.5.0 breaking changes: **CLI users**: no breaking changes. @@ -680,7 +680,7 @@ relevant if you're using the `WorkerUtils` class. We've also tweaked what options are available on each of these, but this is unlikely to affect you negatively. -## v0.4.0 +## 0.4.0 Performance improvements and ability to efficiently queue jobs from JS. @@ -718,7 +718,7 @@ Other: - Overhauled the `perfTest` script - Upgraded dependencies -## v0.3.0-rc.0 +## 0.3.0-rc.0 v0.3.0-rc.0 was never released as v0.3.0 because we jumped to v0.4.0 too soon. @@ -731,7 +731,7 @@ Fixes: - Fixes `runner.stop()` (@MarkCBall, #66) -## v0.2.0 +## 0.2.0 BREAKING CHANGES: @@ -753,7 +753,7 @@ Fixes: - We never needed `uuid-ossp` so we've removed the requirement (you may want to remove the extension from your DB manually) -## v0.1.0 +## 0.1.0 - Add database 'error' handler to avoid crashes (@madflow #26) - `DATABASE_URL` can now be used in place of `connectionString` (@madflow, @@ -761,7 +761,7 @@ Fixes: - Improve documentation (@madflow, @archlemon, @benjie #11 #18 #31 #33) - Improve testing (@madflow #19 #30) -## v0.1.0-alpha.0 +## 0.1.0-alpha.0 Now usable as a library as well as a CLI. @@ -776,38 +776,38 @@ Changes: - Implemented linting - Exported more methods -## v0.0.1-alpha.7 +## 0.0.1-alpha.7 - Add missing `tslib` dependency -## v0.0.1-alpha.6 +## 0.0.1-alpha.6 - make poll interval configurable - overhaul TypeScript types/interfaces - more docs -## v0.0.1-alpha.5 +## 0.0.1-alpha.5 - Fix casting (REQUIRES DB RESET) -## v0.0.1-alpha.4 +## 0.0.1-alpha.4 - add `addJob` helper -## v0.0.1-alpha.3 +## 0.0.1-alpha.3 - Travis CI - Add `index.js` -## v0.0.1-alpha.2 +## 0.0.1-alpha.2 - Docs -## v0.0.1-alpha.1 +## 0.0.1-alpha.1 - More efficient job trigger - Reduce latency -## v0.0.1-alpha.0 +## 0.0.1-alpha.0 Initial release.