From 13ab8d315235e4c4f2ef7c88378d23b7354dd611 Mon Sep 17 00:00:00 2001 From: Michael Nahkies Date: Sun, 31 May 2026 11:48:38 +0100 Subject: [PATCH 1/4] fix: pnpm run --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a4276974..17dce547 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "url": "https://github.com/mnahkies/openapi-code-generator/issues" }, "scripts": { - "clean": "pnpm -r clean", + "clean": "pnpm run -r clean", "docs:generate": "node ./scripts/generate-toc.mjs", "refresh": "./scripts/refresh-data.sh", "lint": "biome check --fix .", From b73b1476e3d53412e1de65929609206a119d5376 Mon Sep 17 00:00:00 2001 From: Michael Nahkies Date: Sun, 31 May 2026 12:20:34 +0100 Subject: [PATCH 2/4] fix: pnpm scripts, update release notes --- .github/workflows/ci.yml | 16 +- AGENTS.md | 18 +- docs/architecture.md | 6 +- e2e/scripts/generate.sh | 8 +- e2e/src/vitest.d.ts | 2 +- .../src/generate-release-notes.ts | 2 +- package.json | 10 +- packages/documentation/README.md | 2 +- packages/documentation/package.json | 10 +- .../src/app/reference/release-notes/page.mdx | 218 ++++++++++++++++++ packages/documentation/src/globals.d.ts | 1 + packages/documentation/src/lib/track.ts | 2 +- scripts/publish.alpha.sh | 2 +- scripts/publish.release.sh | 2 +- 14 files changed, 259 insertions(+), 40 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 49d0df4d..135f1bef 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,7 +29,7 @@ jobs: - run: pnpm run build - - run: pnpm ci-lint + - run: pnpm run ci-lint - name: Check for uncommitted changes run: ./scripts/assert-clean-working-directory.sh @@ -143,9 +143,9 @@ jobs: - run: pnpm ci - - run: pnpm integration:clean - - run: pnpm integration:generate --schema-builder ${{ matrix.schema-builder }} - - run: pnpm integration:validate + - run: pnpm run integration:clean + - run: pnpm run integration:generate --schema-builder ${{ matrix.schema-builder }} + - run: pnpm run integration:validate - name: Check for uncommitted changes if: ${{ matrix.schema-builder == 'zod-v4' }} @@ -177,11 +177,11 @@ jobs: - run: pnpm ci - - run: SCHEMA_BUILDER=zod-v3 pnpm e2e:generate - - run: pnpm e2e:validate + - run: SCHEMA_BUILDER=zod-v3 pnpm run e2e:generate + - run: pnpm run e2e:validate - - run: SCHEMA_BUILDER=zod-v4 pnpm e2e:generate - - run: pnpm e2e:validate + - run: SCHEMA_BUILDER=zod-v4 pnpm run e2e:generate + - run: pnpm run e2e:validate - name: Check for uncommitted changes run: ./scripts/assert-clean-working-directory.sh diff --git a/AGENTS.md b/AGENTS.md index 814f23f5..e478ac7d 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -26,16 +26,16 @@ This is a monorepo managed with `pnpm`. It produces a CLI tool for generating hi ### Common Commands - **Install**: `pnpm install` -- **Build**: `pnpm build` (generates validators, bundles packages, and runs `tsc -b`). -- **Lint/Format**: `pnpm lint` (uses Biome). For CI-style checks, use `pnpm ci-lint`. -- **Unit Tests**: `pnpm test` (uses Vitest). For coverage, use `pnpm ci-test`. +- **Build**: `pnpm run build` (generates validators, bundles packages, and runs `tsc -b`). +- **Lint/Format**: `pnpm run lint` (uses Biome). For CI-style checks, use `pnpm run ci-lint`. +- **Unit Tests**: `pnpm run test` (uses Vitest). For coverage, use `pnpm run ci-test`. - **Integration Tests**: - - Generate: `pnpm integration:generate` - - Validate/Build: `pnpm integration:validate` + - Generate: `pnpm run integration:generate` + - Validate/Build: `pnpm run integration:validate` - **E2E Tests**: - - Generate: `pnpm e2e:generate` - - Validate: `pnpm e2e:validate` -- **Full Pipeline**: `pnpm ci-pipeline` (runs all checks locally). + - Generate: `pnpm run e2e:generate` + - Validate: `pnpm run e2e:validate` +- **Full Pipeline**: `pnpm run ci-pipeline` (runs all checks locally). ## Testing Standards @@ -44,7 +44,7 @@ This is a monorepo managed with `pnpm`. It produces a CLI tool for generating hi ```typescript import {describe, expect, it} from "vitest" ``` -- **Regression**: Always ensure `pnpm integration:validate` passes after changes to generation logic. +- **Regression**: Always ensure `pnpm run integration:validate` passes after changes to generation logic. ## Project Structure diff --git a/docs/architecture.md b/docs/architecture.md index 4a00613d..551d19b9 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -83,9 +83,9 @@ graph TD 4. **Add Unit Tests**: Add a `.spec.ts` next to the modified file. 5. **Add Integration Spec**: If the feature is a new OpenAPI concept, add a minimal reproduction spec to `integration-tests-definitions`. 6. **Run Pipeline**: - - `pnpm build` - - `pnpm integration:generate` - - `pnpm integration:validate` + - `pnpm run build` + - `pnpm run integration:generate` + - `pnpm run integration:validate` 7. **Documentation**: Update the external documentation in `packages/documentation` if user-facing. ## Common Gotchas diff --git a/e2e/scripts/generate.sh b/e2e/scripts/generate.sh index 98369584..f0e46358 100755 --- a/e2e/scripts/generate.sh +++ b/e2e/scripts/generate.sh @@ -4,7 +4,7 @@ set -e SCHEMA_BUILDER="${SCHEMA_BUILDER:-zod-v4}" -pnpm openapi-code-generator \ +pnpm exec openapi-code-generator \ --input ./openapi.yaml \ --output ./src/generated/server/koa \ --template typescript-koa \ @@ -12,7 +12,7 @@ pnpm openapi-code-generator \ --extract-inline-schemas \ --grouping-strategy first-tag -pnpm openapi-code-generator \ +pnpm exec openapi-code-generator \ --input ./openapi.yaml \ --output ./src/generated/server/express \ --template typescript-express \ @@ -20,7 +20,7 @@ pnpm openapi-code-generator \ --extract-inline-schemas \ --grouping-strategy first-tag -pnpm openapi-code-generator \ +pnpm exec openapi-code-generator \ --input ./openapi.yaml \ --output ./src/generated/client/fetch \ --template typescript-fetch \ @@ -29,7 +29,7 @@ pnpm openapi-code-generator \ --enable-runtime-response-validation \ --override-specification-title "E2E Test Client" -pnpm openapi-code-generator \ +pnpm exec openapi-code-generator \ --input ./openapi.yaml \ --output ./src/generated/client/axios \ --template typescript-axios \ diff --git a/e2e/src/vitest.d.ts b/e2e/src/vitest.d.ts index 2de9f53a..34ceb981 100644 --- a/e2e/src/vitest.d.ts +++ b/e2e/src/vitest.d.ts @@ -1,7 +1,7 @@ import type {CustomMatcherResult} from "expect" declare module "vitest" { - interface Assertion { + interface Assertion { toEqualBlob(expected: Blob): Promise } interface AsymmetricMatchersContaining { diff --git a/integration-tests/typescript-fetch/src/generate-release-notes.ts b/integration-tests/typescript-fetch/src/generate-release-notes.ts index 1a556cc3..fb63d1f7 100644 --- a/integration-tests/typescript-fetch/src/generate-release-notes.ts +++ b/integration-tests/typescript-fetch/src/generate-release-notes.ts @@ -68,7 +68,7 @@ ${notes.join("\n")} fs.writeFileSync( path.resolve( - __dirname, + import.meta.dirname, "../../../packages/documentation/src/app/reference/release-notes/page.mdx", ), result.replace(/\r\n/g, "\n"), diff --git a/package.json b/package.json index 17dce547..075a3e5c 100644 --- a/package.json +++ b/package.json @@ -21,13 +21,13 @@ "docs:generate": "node ./scripts/generate-toc.mjs", "refresh": "./scripts/refresh-data.sh", "lint": "biome check --fix .", - "build": "node ./scripts/generate-ajv-validator.js && pnpm -r --workspace-concurrency=4 run bundle && tsc -b tsconfig.json", + "build": "node ./scripts/generate-ajv-validator.js && pnpm run -r --workspace-concurrency=4 bundle && tsc -b tsconfig.json", "build:docs": "pnpm --filter @nahkies/openapi-code-generator-documentation run build", "build:watch": "tsc -b tsconfig.json -w", "test": "vitest run", "integration:clean": "pnpm --filter @integration/* run clean", "integration:generate": "node ./scripts/generate.mjs", - "integration:validate": "pnpm -r --filter @integration/* --workspace-concurrency=2 run validate", + "integration:validate": "pnpm run -r --filter @integration/* --workspace-concurrency=2 validate", "e2e:generate": "pnpm --filter e2e run clean && pnpm --filter e2e run generate", "e2e:validate": "pnpm --filter e2e run build && pnpm --filter e2e run test", "ci-test": "vitest run --coverage", @@ -70,11 +70,11 @@ ], "lint-staged": { "*.{ts,js,tsx,jsx,mts,mjs,cts,cjs}": [ - "pnpm biome lint --write --no-errors-on-unmatched", - "pnpm biome check --write --no-errors-on-unmatched" + "pnpm exec biome lint --write --no-errors-on-unmatched", + "pnpm exec biome check --write --no-errors-on-unmatched" ], "*.md": [ - "sh -c 'pnpm docs:generate'" + "sh -c 'pnpm run docs:generate'" ] }, "engines": { diff --git a/packages/documentation/README.md b/packages/documentation/README.md index 266579b5..f6743c36 100644 --- a/packages/documentation/README.md +++ b/packages/documentation/README.md @@ -16,7 +16,7 @@ It's hosted at https://openapi-code-generator.nahkies.co.nz/ using GitHub pages. Run the development server with the `dev` script: ```shell -pnpm dev +pnpm run dev ``` Open with your browser to see the result. diff --git a/packages/documentation/package.json b/packages/documentation/package.json index 2c48fe4f..c5a6578a 100644 --- a/packages/documentation/package.json +++ b/packages/documentation/package.json @@ -18,11 +18,11 @@ }, "scripts": { "clean": "rm -rf ./.next ./dist", - "dev": "pnpm copy-sample-data && next dev", - "build": "pnpm copy-sample-data && next build", - "lint": "pnpm -w lint", - "copy-sample-data": "tsx ./scripts/copy-sample-data.ts", - "publish:gh-pages": "pnpm gh-pages -d ./dist -b gh-pages --cname openapi-code-generator.nahkies.co.nz --nojekyll" + "dev": "pnpm run copy-sample-data && next dev", + "build": "pnpm run copy-sample-data && next build", + "lint": "pnpm run -w lint", + "copy-sample-data": "pnpm exec tsx ./scripts/copy-sample-data.ts", + "publish:gh-pages": "pnpm exec gh-pages -d ./dist -b gh-pages --cname openapi-code-generator.nahkies.co.nz --nojekyll" }, "dependencies": { "@hookform/resolvers": "^5.4.0", diff --git a/packages/documentation/src/app/reference/release-notes/page.mdx b/packages/documentation/src/app/reference/release-notes/page.mdx index dc6e1832..d1c42391 100644 --- a/packages/documentation/src/app/reference/release-notes/page.mdx +++ b/packages/documentation/src/app/reference/release-notes/page.mdx @@ -13,6 +13,224 @@ import { Callout, Steps } from 'nextra/components' +### 27 May 2026 (v0.24.0) +This is a relatively small release, mostly focused on a few notable bug fixes. Also contains some improvements to generated zod-v4 schemas. + +**Axios Client Default Timeout** +**(potentially breaking)** +- Previously this was **ignored** (since forever apparently :grimacing:) +- This meant that unless you passed an `axios` instance that itself had a default timeout configured, the `axios` default of **no timeout** was used +- Now the `defaultTimeout` value will be respected, overriding that of the passed `axios` instance +- https://github.com/mnahkies/openapi-code-generator/pull/463 + +This may cause some request timeouts, if you previously had too low of a timeout. It may prevent seeming "hung" requests under certain network conditions that you may have previously experienced. + +**Browser compatibility for fetch / axios runtimes** +- The previous v0.23.0 release inadvertently broke including the fetch / axios runtimes in eg: NextJS applications +- Now solved, with `tsdown` configuration updated to prevent re-occurrence +- https://github.com/mnahkies/openapi-code-generator/pull/471 + +- `zod-v4` schema generation now uses `z.object({...foo.shape, ...bar.shape})` or `s_Foo.extend(z.object({...}))` as appropriate, instead of the deprecated `merge` function. According to the documentation this may bring some boost to `tsc` / language server performance (https://github.com/mnahkies/openapi-code-generator/pull/468) +- **(potentially breaking)** `zod-v4` schema generation will now validate `format: date` and `format: time` using `z.iso.date()` / `z.iso.time()` (https://github.com/mnahkies/openapi-code-generator/pull/467) +- **(potentially breaking)** enums with a single possible value will now be treated as closed by default / as a literal. This better fits the typical usage in discriminated union type schemas. (https://github.com/mnahkies/openapi-code-generator/pull/466) + +* chore: bump deps by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/462 +* fix: axios client respects the defaultTimeout by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/463 +* docs: add AGENTS.md / docs/architecture.md by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/464 +* chore: reduce tsdown log verbosity and fail on warnings by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/465 +* feat!: enum of 1 is a literal by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/466 +* feat: support format: date / time by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/467 +* chore: refresh data / deps by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/469 +* test: add some more e2e query parameter assertions by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/470 +* feat: zod v4 uses spread / extend by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/468 +* fix: extranous runtime deps bundled by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/471 + + +**Full Changelog**: https://github.com/mnahkies/openapi-code-generator/compare/v0.23.0...v0.24.0 + +### 9 May 2026 (v0.23.0) +This is an unusually large release, containing major architectural improvements, enhanced query parameter handling, and support for binary data. + +It also contains several breaking changes to improve the internal domain model and consistency of the generated code, that will unblock further enhancements. + +- Migrated to tsdown for bundling, providing both ESM and CJS variants of runtime packages #452, #456 +- This _shouldn't_ be a breaking change, but its significant enough to be aware of it +- Runtime & Response Processing +- Renamed Response to Res in runtime packages to avoid conflicts with the global DOM Response object #405 +- Removed deprecated exports that are no longer used in regenerated code #406 +- **Migration:** Regenerate your code using the latest CLI and update any manual imports from runtime packages referencing Response +- Schema & Type Naming +- Refactored "virtual schema" generation. This improves support for OAS 3.1+ but results in changed names for some anonymous types #398 +- Some indirection has been removed e.g., types that just pointed to other types are now unwrapped +- **Migration:** You may need to update manual type references in your project if they were using generated anonymous names +- Query Parameter Serialization +- Dropped qs dependency in favor of internal logic that strictly respects OpenAPI style and explode modifiers #381 +- `koa` v3 and `@koa/router@v15` now the minimum requirement #442 +- Dropped broken `readOnly` modifier support #409 + +- Binary Data Support: Added support for `application/octet-stream` in both request and response bodies #359 +- Improved Records: Better handling of `additionalProperties`, emitting `Record` or `any` as appropriate #408, #402 +- Middleware: Added support for mounting middleware on individual routers via an optional parameter to `createRouter` #442 +- Improved handling of `allOf`, `anyOf`, and `oneOf` #410 + +- Fixed missing types when enum is defined without an explicit type #407 +- Fixed handling of boolean values for exclusiveMaximum and exclusiveMinimum #386 +- Fixed tsconfig loading when compilerOptions is missing #382 +- The logger now correctly respects NO_COLOR and similar environment variables #414 +- Client Fetch: Fixed type narrowing issues with default response types in the fetch runtime #443 +- Koa Server: Fixed overlapping route matching by no longer calling next() after a route handler is executed #442 + +- Dependencies: Extensive dependency refreshes, including migrations to Angular v21, Next.js v16.1, and TypeScript v6 +- Testing: Significant expansion of the test suite, including new unit tests for schema normalization and type building #387, #389, #412 +- CI/CD: Dropped Node v20 from CI, improved integration test performance using tsgo #451, and enabled publint and attw for better package compatibility #454 +- Refactors: Major internal reorganization of the Input class and schema providers to simplify the dependency graph and improve testability #388, #416, #420 +- Introduced code sharing between the runtime packages #401 + +* fix: tsconfig loading when no compilerOptions by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/382 +* chore(deps): update all dependencies by @renovate[bot] in https://github.com/mnahkies/openapi-code-generator/pull/380 +* chore(deps): update dependency js-yaml to v4.1.1 [security] by @renovate[bot] in https://github.com/mnahkies/openapi-code-generator/pull/383 +* chore: upgrade dependencies, integration tests use angular v21 by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/384 +* refactor: allow narrowing IRParameter into more specific types by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/385 +* test: add some missing unit tests by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/387 +* refactor: split input into more testable classes by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/388 +* test: backfill tests for schema normalization by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/389 +* fix: use schema types rather than ir by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/390 +* fix: remove an instance of double normalization by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/391 +* chore(deps): update dependency @angular/common to v21.0.1 [security] by @renovate[bot] in https://github.com/mnahkies/openapi-code-generator/pull/393 +* chore(deps): update dependency body-parser to v2.2.1 [security] by @renovate[bot] in https://github.com/mnahkies/openapi-code-generator/pull/392 +* chore(deps): update dependency next to v15.5.7 [security] by @renovate[bot] in https://github.com/mnahkies/openapi-code-generator/pull/394 +* chore(deps): update dependency @angular/compiler to v21.0.2 [security] by @renovate[bot] in https://github.com/mnahkies/openapi-code-generator/pull/395 +* chore: bump deps, separate build:docs by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/397 +* feat!: move virtual schemas by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/398 +* fix: remove request body indirection by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/399 +* fix: handle boolean exclusiveMaximum / exclusiveMinimum by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/386 +* feat!: introduce a new common runtime by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/401 +* fix: correctly output Record when irrelevant properties present by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/402 +* fix!: query param serialization/parsing by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/381 +* chore: update biome by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/403 +* chore: upgrade nextjs to 16.1.0 by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/404 +* refactor!: move more response processing into runtime package by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/405 +* chore!: drop deprecated export by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/406 +* feat: support application/octet-stream (Blob) req/res bodies by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/359 +* fix: handle missing type when enum is defined by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/407 +* feat: improve Record / additionalProperties handling by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/408 +* fix: drop broken readOnly modifier support by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/409 +* fix: make custom jest reporter more agent friendly by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/411 +* fix: improve handling of allOf / anyOf / oneOf by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/410 +* test: improve type builder unit tests by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/412 +* test: expand extractPlaceholders tests by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/413 +* fix: logger disables color based on NO_COLOR / etc by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/414 +* refactor: split input.ts into several files by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/416 +* refactor: simplify dependency graph by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/417 +* refactor: copy schema builder test suites into unit / integration files by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/418 +* refactor: de-duplicate the split tests by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/419 +* refactor: schema-builders use ISchemaProvider instead of Input by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/420 +* chore(deps): update dependency @angular/compiler to v21.0.7 [security] by @renovate[bot] in https://github.com/mnahkies/openapi-code-generator/pull/421 +* chore(deps): update dependency @angular/core to v21.0.7 [security] by @renovate[bot] in https://github.com/mnahkies/openapi-code-generator/pull/422 +* chore(deps): update dependency next to v16.1.5 [security] by @renovate[bot] in https://github.com/mnahkies/openapi-code-generator/pull/424 +* chore(deps): update dependency lodash to v4.17.23 [security] by @renovate[bot] in https://github.com/mnahkies/openapi-code-generator/pull/423 +* chore: refresh dependencies by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/425 +* fix: patch axios temporarily / bump version by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/427 +* chore: refresh dependencies by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/429 +* chore(deps): update dependency ajv to v8.18.0 [security] by @renovate[bot] in https://github.com/mnahkies/openapi-code-generator/pull/428 +* chore(deps): update dependency koa to v3.1.2 [security] by @renovate[bot] in https://github.com/mnahkies/openapi-code-generator/pull/430 +* chore(deps): update dependency @angular/core to v21.1.6 [security] by @renovate[bot] in https://github.com/mnahkies/openapi-code-generator/pull/431 +* chore: refresh deps by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/434 +* chore: add pnpm run ci-pipeline:fast by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/441 +* chore: refresh dependencies / typescript v6 by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/449 +* fix(fetch): type narrowing with default response types by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/443 +* chore: bump gh action deps, drop node v20 from ci by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/450 +* feat: use tsgo for most integration test builds by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/451 +* feat: bundle esm + cjs variants of runtime packages using tsdown by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/452 +* fix: only package dist/esm, dist/cjs by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/453 +* feat: enable publint and attw by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/454 +* feat!(koa): router v15, improve middleware support, fix overlapping route matching by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/442 +* fix: use global symbol for SkipResponse by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/455 +* feat: adopt tsdown for cli package, inline the typescript-common-runtime by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/456 +* fix: devDependency not dependency by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/457 +* fix: remove import 'joi' from bundle by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/458 +* fix: required peer dependencies by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/459 +* fix: clean works when already clean by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/460 + + +* @paztis made their first contribution in https://github.com/mnahkies/openapi-code-generator/pull/444 + +**Full Changelog**: https://github.com/mnahkies/openapi-code-generator/compare/v0.22.0...v0.23.0 + +### 2 Nov 2025 (v0.22.0) +This is a pretty significant release, with two larger features: +- Support for Zod V4, whilst retaining support for Zod V3 +- Support for projects using ESM, and use `import type` where possible + +Aside from this, we've made efforts to improve supply chain security :lock: +- Adopted trusted publishers / Github Actions to publish releases +- Added a minimum release age of 7 days for dependencies +- Removed unmaintained dependency + +As well as improving the CI setup to run integration and e2e tests across more variants to reduce risk of regressions :test_tube: + +- `--schema-builder` defaults to `zod-v4` +- `--schema-builder` no longer accepts `zod`, you must specify either `zod-v3` or `zod-v4` as required for your project + +* feat: set minimumReleaseAge of 7 days by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/363 +* chore: update biome by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/364 +* chore: upgrade documentation related dependencies by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/365 +* refactor: avoid dependency on concrete schema builders by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/367 +* fix: integration tests pass with joi schema builder by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/368 +* test: run integration for all schema builders by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/369 +* fix: use nodejs built-in sourcemap support by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/370 +* chore: update deps by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/371 +* refactor: rename zod.ts -> zod-v3.ts by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/372 +* feat!: support both zod v3 and zod v4 by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/366 +* docs: fix example commands by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/373 +* fix: use import type when possible by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/374 +* fix: consistently use json5 by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/376 +* fix: replace markdown-toc with remark-toc by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/377 +* feat: support esm projects by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/375 +* feat: adopt trusted publishers by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/378 +* fix: avoid lerna reformatting lockfile by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/379 + + +**Full Changelog**: https://github.com/mnahkies/openapi-code-generator/compare/v0.21.1...v0.22.0 + +### 26 Oct 2025 (v0.22.0-alpha.0) +This is a pretty significant release, with two larger features: +- Support for Zod V4, whilst retaining support for Zod V3 +- Support for projects using ESM, and use `import type` where possible + +As such it's being made available as an alpha release for further regression testing: https://www.npmjs.com/package/@nahkies/openapi-code-generator/v/0.22.0-alpha.0 + +Aside from this, we've made efforts to improve supply chain security :lock: +- Adopted trusted publishers / Github Actions to publish releases +- Added a minimum release age of 7 days for dependencies +- Removed unmaintained dependency + +As well as improving the CI setup to run integration and e2e tests across more variants to reduce risk of regressions. + +- `--schema-builder` defaults to `zod-v4` +- `--schema-builder` no longer accepts `zod`, you must specify either `zod-v3` or `zod-v4` as required for your project + +* feat: set minimumReleaseAge of 7 days by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/363 +* chore: update biome by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/364 +* chore: upgrade documentation related dependencies by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/365 +* refactor: avoid dependency on concrete schema builders by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/367 +* fix: integration tests pass with joi schema builder by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/368 +* test: run integration for all schema builders by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/369 +* fix: use nodejs built-in sourcemap support by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/370 +* chore: update deps by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/371 +* refactor: rename zod.ts -> zod-v3.ts by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/372 +* feat!: support both zod v3 and zod v4 by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/366 +* docs: fix example commands by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/373 +* fix: use import type when possible by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/374 +* fix: consistently use json5 by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/376 +* fix: replace markdown-toc with remark-toc by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/377 +* feat: support esm projects by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/375 +* feat: adopt trusted publishers by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/378 +* fix: avoid lerna reformatting lockfile by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/379 + + +**Full Changelog**: https://github.com/mnahkies/openapi-code-generator/compare/v0.21.1...v0.22.0-alpha.0 + ### 13 Aug 2025 (v0.21.1) Bug fix release for #360 / #361 - previously nullable string schemas with a default of `null` would instead default to the string `"null"` - thanks @geuben! diff --git a/packages/documentation/src/globals.d.ts b/packages/documentation/src/globals.d.ts index 359a6d54..af57ff64 100644 --- a/packages/documentation/src/globals.d.ts +++ b/packages/documentation/src/globals.d.ts @@ -2,6 +2,7 @@ export {} declare global { interface Window { + // biome-ignore lint/suspicious/noExplicitAny: analytics plausible: any } } diff --git a/packages/documentation/src/lib/track.ts b/packages/documentation/src/lib/track.ts index 89fc7f44..7b1a7b55 100644 --- a/packages/documentation/src/lib/track.ts +++ b/packages/documentation/src/lib/track.ts @@ -1,4 +1,4 @@ -export function track(event: string, props?: Record) { +export function track(event: string, props?: Record) { if (typeof window !== "undefined" && window.plausible) { window.plausible(event, {props}) } diff --git a/scripts/publish.alpha.sh b/scripts/publish.alpha.sh index 09bb53a5..227eb7ab 100755 --- a/scripts/publish.alpha.sh +++ b/scripts/publish.alpha.sh @@ -13,7 +13,7 @@ pnpm run clean pnpm ci -pnpm ci-pipeline +pnpm run ci-pipeline ./scripts/assert-clean-working-directory.sh diff --git a/scripts/publish.release.sh b/scripts/publish.release.sh index 8df7fcc0..555ddf84 100755 --- a/scripts/publish.release.sh +++ b/scripts/publish.release.sh @@ -13,7 +13,7 @@ pnpm run clean pnpm ci -pnpm ci-pipeline +pnpm run ci-pipeline ./scripts/assert-clean-working-directory.sh From 0011a8363d934532a234daf46bdb654b9f784f9c Mon Sep 17 00:00:00 2001 From: Michael Nahkies Date: Sun, 31 May 2026 13:16:51 +0100 Subject: [PATCH 3/4] fix: escape --- packages/documentation/src/app/reference/release-notes/page.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/documentation/src/app/reference/release-notes/page.mdx b/packages/documentation/src/app/reference/release-notes/page.mdx index d1c42391..eb994cec 100644 --- a/packages/documentation/src/app/reference/release-notes/page.mdx +++ b/packages/documentation/src/app/reference/release-notes/page.mdx @@ -105,7 +105,7 @@ It also contains several breaking changes to improve the internal domain model a * fix: remove request body indirection by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/399 * fix: handle boolean exclusiveMaximum / exclusiveMinimum by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/386 * feat!: introduce a new common runtime by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/401 -* fix: correctly output Record when irrelevant properties present by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/402 +* fix: correctly output `Record` when irrelevant properties present by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/402 * fix!: query param serialization/parsing by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/381 * chore: update biome by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/403 * chore: upgrade nextjs to 16.1.0 by @mnahkies in https://github.com/mnahkies/openapi-code-generator/pull/404 From 7d1569d5719cd23b659e19ce502d397345d809d4 Mon Sep 17 00:00:00 2001 From: Michael Nahkies Date: Sun, 31 May 2026 13:18:01 +0100 Subject: [PATCH 4/4] fix: build docs on 26.x --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 135f1bef..3496b2da 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,7 +55,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [24.x] + node-version: [26.x] steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: