From 3bf1e836c9e82605cb5727871dc845a7fd874f0b Mon Sep 17 00:00:00 2001 From: dphonys Date: Tue, 8 Sep 2026 21:53:03 +0200 Subject: [PATCH 1/2] chore(release): version packages for boundary error parsing Apply every pending release intent: nuxt-handler-errors 0.6.0, nuxt-handler-validation 0.3.0, and nuxt-typed-handler 0.2.0 as a dependency-carried minor. Consumed intents are recorded in the ledger. Co-Authored-By: Claude Opus 5 --- .changeset/errors-boundary-parsing.md | 6 ------ .changeset/ledger.yaml | 13 +++++++++++++ .changeset/validation-boundary-parsing.md | 6 ------ packages/nuxt-handler-errors/CHANGELOG.md | 6 ++++++ packages/nuxt-handler-errors/package.json | 2 +- packages/nuxt-handler-validation/CHANGELOG.md | 6 ++++++ packages/nuxt-handler-validation/package.json | 2 +- packages/nuxt-typed-handler/CHANGELOG.md | 14 ++++++++++++++ packages/nuxt-typed-handler/package.json | 2 +- 9 files changed, 42 insertions(+), 15 deletions(-) delete mode 100644 .changeset/errors-boundary-parsing.md delete mode 100644 .changeset/validation-boundary-parsing.md diff --git a/.changeset/errors-boundary-parsing.md b/.changeset/errors-boundary-parsing.md deleted file mode 100644 index e239869..0000000 --- a/.changeset/errors-boundary-parsing.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@dphonys/nuxt-handler-errors': minor -'@dphonys/nuxt-typed-handler': minor ---- - -Error recognition takes an `Error`. `recognizeKnownError` and the degraded `matchError` overload accept a value already narrowed with `instanceof Error` or Nuxt's `isNuxtError`, instead of `unknown`; a bare `catch` value is narrowed at the call site first. `KnownErrorCarrier` is now `NuxtError>`. The known-error wire marker is parsed with a schema, so `zod` becomes a runtime dependency of the errors module. The umbrella module re-exports the narrowed surface. diff --git a/.changeset/ledger.yaml b/.changeset/ledger.yaml index 72b03c2..348c150 100644 --- a/.changeset/ledger.yaml +++ b/.changeset/ledger.yaml @@ -23,6 +23,10 @@ intents: - local-error-factories - nuxt-declared-as-peer +'@dphonys/nuxt-handler-errors@0.6.0': + dir: packages/nuxt-handler-errors + intents: + - errors-boundary-parsing '@dphonys/nuxt-handler-validation@0.1.0': dir: packages/nuxt-handler-validation intents: @@ -39,8 +43,17 @@ dir: packages/nuxt-handler-validation intents: - nuxt-declared-as-peer +'@dphonys/nuxt-handler-validation@0.3.0': + dir: packages/nuxt-handler-validation + intents: + - validation-boundary-parsing '@dphonys/nuxt-typed-handler@0.1.0': dir: packages/nuxt-typed-handler intents: - dull-pens-love - local-error-factories +'@dphonys/nuxt-typed-handler@0.2.0': + dir: packages/nuxt-typed-handler + intents: + - errors-boundary-parsing + - validation-boundary-parsing diff --git a/.changeset/validation-boundary-parsing.md b/.changeset/validation-boundary-parsing.md deleted file mode 100644 index 26ef980..0000000 --- a/.changeset/validation-boundary-parsing.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@dphonys/nuxt-handler-validation': minor -'@dphonys/nuxt-typed-handler': minor ---- - -`recognizeValidationError` takes an `Error` instead of `unknown`; narrow a bare `catch` value with `instanceof Error` or Nuxt's `isNuxtError` first. Request sources, issue paths and the validation marker are parsed with a schema, so `zod` becomes a runtime dependency of the validation module. The umbrella module re-exports the narrowed surface. diff --git a/packages/nuxt-handler-errors/CHANGELOG.md b/packages/nuxt-handler-errors/CHANGELOG.md index 88d0539..4e0a091 100644 --- a/packages/nuxt-handler-errors/CHANGELOG.md +++ b/packages/nuxt-handler-errors/CHANGELOG.md @@ -1,5 +1,11 @@ # @dphonys/nuxt-handler-errors +## 0.6.0 + +### Minor Changes + +- Error recognition takes an `Error`. `recognizeKnownError` and the degraded `matchError` overload accept a value already narrowed with `instanceof Error` or Nuxt's `isNuxtError`, instead of `unknown`; a bare `catch` value is narrowed at the call site first. `KnownErrorCarrier` is now `NuxtError>`. The known-error wire marker is parsed with a schema, so `zod` becomes a runtime dependency of the errors module. The umbrella module re-exports the narrowed surface. + ## 0.5.0 ### Minor Changes diff --git a/packages/nuxt-handler-errors/package.json b/packages/nuxt-handler-errors/package.json index f03177d..85a9f68 100644 --- a/packages/nuxt-handler-errors/package.json +++ b/packages/nuxt-handler-errors/package.json @@ -1,6 +1,6 @@ { "name": "@dphonys/nuxt-handler-errors", - "version": "0.5.0", + "version": "0.6.0", "description": "Declare a Nitro handler’s expected failures once and infer them at every call site from the route path.", "keywords": [ "nuxt", diff --git a/packages/nuxt-handler-validation/CHANGELOG.md b/packages/nuxt-handler-validation/CHANGELOG.md index e1700e8..1186223 100644 --- a/packages/nuxt-handler-validation/CHANGELOG.md +++ b/packages/nuxt-handler-validation/CHANGELOG.md @@ -1,5 +1,11 @@ # @dphonys/nuxt-handler-validation +## 0.3.0 + +### Minor Changes + +- `recognizeValidationError` takes an `Error` instead of `unknown`; narrow a bare `catch` value with `instanceof Error` or Nuxt's `isNuxtError` first. Request sources, issue paths and the validation marker are parsed with a schema, so `zod` becomes a runtime dependency of the validation module. The umbrella module re-exports the narrowed surface. + ## 0.2.1 ### Patch Changes diff --git a/packages/nuxt-handler-validation/package.json b/packages/nuxt-handler-validation/package.json index e10fddf..f4210b3 100644 --- a/packages/nuxt-handler-validation/package.json +++ b/packages/nuxt-handler-validation/package.json @@ -1,6 +1,6 @@ { "name": "@dphonys/nuxt-handler-validation", - "version": "0.2.1", + "version": "0.3.0", "description": "Declare a Nitro handler's request schemas once and receive the validated, fully-typed values in the handler's second parameter.", "keywords": [ "nuxt", diff --git a/packages/nuxt-typed-handler/CHANGELOG.md b/packages/nuxt-typed-handler/CHANGELOG.md index f7dfead..ca8e1a5 100644 --- a/packages/nuxt-typed-handler/CHANGELOG.md +++ b/packages/nuxt-typed-handler/CHANGELOG.md @@ -1,5 +1,19 @@ # @dphonys/nuxt-typed-handler +## 0.2.0 + +### Minor Changes + +- Error recognition takes an `Error`. `recognizeKnownError` and the degraded `matchError` overload accept a value already narrowed with `instanceof Error` or Nuxt's `isNuxtError`, instead of `unknown`; a bare `catch` value is narrowed at the call site first. `KnownErrorCarrier` is now `NuxtError>`. The known-error wire marker is parsed with a schema, so `zod` becomes a runtime dependency of the errors module. The umbrella module re-exports the narrowed surface. + +- `recognizeValidationError` takes an `Error` instead of `unknown`; narrow a bare `catch` value with `instanceof Error` or Nuxt's `isNuxtError` first. Request sources, issue paths and the validation marker are parsed with a schema, so `zod` becomes a runtime dependency of the validation module. The umbrella module re-exports the narrowed surface. + +### Patch Changes + +- Updated dependencies: + - @dphonys/nuxt-handler-errors@0.6.0 + - @dphonys/nuxt-handler-validation@0.3.0 + ## 0.1.0 ### Minor Changes diff --git a/packages/nuxt-typed-handler/package.json b/packages/nuxt-typed-handler/package.json index 5b7c0ca..5928e3b 100644 --- a/packages/nuxt-typed-handler/package.json +++ b/packages/nuxt-typed-handler/package.json @@ -1,6 +1,6 @@ { "name": "@dphonys/nuxt-typed-handler", - "version": "0.1.0", + "version": "0.2.0", "description": "Declare a Nitro handler's request schemas and expected failures once, and get both typed at every call site.", "keywords": [ "nuxt", From 52e3e2e4f9ed05b9b9cf370d5258b945a9c86e82 Mon Sep 17 00:00:00 2001 From: dphonys Date: Tue, 8 Sep 2026 22:03:06 +0200 Subject: [PATCH 2/2] fix(tooling): keep the generated release ledger out of the formatter `pnpm version -r` rewrites .changeset/ledger.yaml on every release with double-quoted keys, which oxfmt then rewrote to single quotes. The documented `pnpm version -r` followed by `pnpm check` therefore failed at the format step on generated output every time. Ignore the ledger and restore the generator's own quoting so release diffs stay append-only. Co-Authored-By: Claude Opus 5 --- .changeset/ledger.yaml | 28 ++++++++++++++-------------- oxfmt.config.ts | 10 ++++++++-- 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/.changeset/ledger.yaml b/.changeset/ledger.yaml index 348c150..bef5343 100644 --- a/.changeset/ledger.yaml +++ b/.changeset/ledger.yaml @@ -1,58 +1,58 @@ -'@dphonys/nuxt-handler-errors@0.1.0': +"@dphonys/nuxt-handler-errors@0.1.0": dir: packages/nuxt-handler-errors intents: - four-adults-trade -'@dphonys/nuxt-handler-errors@0.2.0': +"@dphonys/nuxt-handler-errors@0.2.0": dir: packages/nuxt-handler-errors intents: - shaggy-steaks-stand -'@dphonys/nuxt-handler-errors@0.3.0': +"@dphonys/nuxt-handler-errors@0.3.0": dir: packages/nuxt-handler-errors intents: - server-helpers-auto-import -'@dphonys/nuxt-handler-errors@0.3.1': +"@dphonys/nuxt-handler-errors@0.3.1": dir: packages/nuxt-handler-errors intents: - errors-declares-side-effect-free -'@dphonys/nuxt-handler-errors@0.4.0': +"@dphonys/nuxt-handler-errors@0.4.0": dir: packages/nuxt-handler-errors intents: - every-peaches-dream -'@dphonys/nuxt-handler-errors@0.5.0': +"@dphonys/nuxt-handler-errors@0.5.0": dir: packages/nuxt-handler-errors intents: - local-error-factories - nuxt-declared-as-peer -'@dphonys/nuxt-handler-errors@0.6.0': +"@dphonys/nuxt-handler-errors@0.6.0": dir: packages/nuxt-handler-errors intents: - errors-boundary-parsing -'@dphonys/nuxt-handler-validation@0.1.0': +"@dphonys/nuxt-handler-validation@0.1.0": dir: packages/nuxt-handler-validation intents: - gold-doors-fly -'@dphonys/nuxt-handler-validation@0.1.1': +"@dphonys/nuxt-handler-validation@0.1.1": dir: packages/nuxt-handler-validation intents: - validation-declares-side-effect-free -'@dphonys/nuxt-handler-validation@0.2.0': +"@dphonys/nuxt-handler-validation@0.2.0": dir: packages/nuxt-handler-validation intents: - validation-internals-entries -'@dphonys/nuxt-handler-validation@0.2.1': +"@dphonys/nuxt-handler-validation@0.2.1": dir: packages/nuxt-handler-validation intents: - nuxt-declared-as-peer -'@dphonys/nuxt-handler-validation@0.3.0': +"@dphonys/nuxt-handler-validation@0.3.0": dir: packages/nuxt-handler-validation intents: - validation-boundary-parsing -'@dphonys/nuxt-typed-handler@0.1.0': +"@dphonys/nuxt-typed-handler@0.1.0": dir: packages/nuxt-typed-handler intents: - dull-pens-love - local-error-factories -'@dphonys/nuxt-typed-handler@0.2.0': +"@dphonys/nuxt-typed-handler@0.2.0": dir: packages/nuxt-typed-handler intents: - errors-boundary-parsing diff --git a/oxfmt.config.ts b/oxfmt.config.ts index 671e261..37ab529 100644 --- a/oxfmt.config.ts +++ b/oxfmt.config.ts @@ -1,8 +1,14 @@ import { defineConfig } from 'oxfmt' export default defineConfig({ - // Vendored plugin keeps upstream formatting so it stays diffable. - ignorePatterns: ['tools/oxlint/anti-slop/**'], + ignorePatterns: [ + // Vendored plugin keeps upstream formatting so it stays diffable. + 'tools/oxlint/anti-slop/**', + // `pnpm version -r` rewrites the ledger on every release and quotes its + // keys its own way. Formatting it here only makes the release gate fail + // on generated output, so the generator keeps ownership of the file. + '.changeset/ledger.yaml', + ], semi: false, singleQuote: true, tabWidth: 2,