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
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,9 @@ jobs:
with:
node-version: 'lts/*'
- if: contains(matrix.generator, 'typescript-fetch')
run: npm install -g typescript vite-plus
run: |
npm install -g typescript@7.0.2 vite-plus@1.5.0
tsc --version
- uses: actions/setup-go@v6
if: matrix.generator == 'go-http'
with:
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed

- Upgrade generated TypeScript clients to Vite+ `^1.5.0`, including Vite `8.3.5`,
Vitest `5.1.0`, Rolldown `1.2.16`, Oxfmt `0.76.0`, Oxlint `1.91.0`,
oxlint-tsgolint `7.0.2005`, and tsdown `0.23.4`. Pin CI validation and
documented setup to Vite+ `1.5.0` and TypeScript `7.0.2`, and report the resolved
tool versions during client builds. Vite+ projects require Node.js
`^22.18.0 || ^24.11.0 || >=26.0.0`.

## [0.3.0]

### Breaking Changes
Expand Down
10 changes: 5 additions & 5 deletions docs/src/golden_testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,9 @@ temporary directories so Vite+ does not skip gitignored generated sources; no
generated manifests or source files are patched. The consumer type check uses
the generated package's installed compiler rather than the global `tsc` selection.
The current global Vite+ CLI also needs TypeScript installed alongside the CLI
for declaration packing (`npm install -g typescript vite-plus`). CI reuses that
bootstrap and its generator cache in the existing TypeScript/Vite+ golden-build
job; no separate consumer job is added. `just ci` includes these checks too. See
for declaration packing (`npm install -g typescript@7.0.2 vite-plus@1.5.0`). CI
reuses that bootstrap and its generator cache in the existing TypeScript/Vite+
golden-build job; no separate consumer job is added. `just ci` includes these checks too. See
`tests/generated-clients/typescript/README.md` for details.

## Rust Client Runtime Tests
Expand Down Expand Up @@ -194,8 +194,8 @@ suite. The independent JVM Client Tests CI matrix and `just ci` run these checks
validated with Rust 1.99.0). MSRV checks explicitly select Rust 1.90.0; they do
not substitute for stable validation.
- Local TypeScript validation uses TypeScript 7.0.2 and Vite+ 1.5.0 on Node
26.13.0. The native validators use the active `tsc` and `vp` on `PATH`; when
`tsc` is not globally installed, `npm exec --package typescript -- just
26.13.0. The native validators use the active `tsc` and `vp` on `PATH`. To select
that compiler explicitly, `npm exec --package=typescript@7.0.2 -- just
golden-typescript::build-tsc` supplies it without changing generated packages.
- Current local JVM validation uses Homebrew JDK 27.0.1 with Gradle 9.8.2, respecting
`JAVA_HOME` or the active JVM. CI validates on JDK 27. Generated libraries may
Expand Down
9 changes: 8 additions & 1 deletion docs/src/ts_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,14 @@ Selects the type checking and build toolchain. One of `"tsc"` (default) or `"vp"
- `"tsc"` — bare TypeScript compiler. Generates `tsconfig.json` only. Build script: `tsc`.
- `"vp"` — vite-plus. Generates `vite.config.ts` with `pack` config for library output (ESM + .d.ts). Build script: `vp pack`. Check script: `vp check --no-fmt`.

When `toolchain = "vp"`, the generated `package.json` includes `vite-plus` and `typescript` as dev dependencies, and scripts use `vp pack` (library mode) rather than `vp build` (app mode).
When `toolchain = "vp"`, the generated `package.json` includes `vite-plus` (`^1.5.0`) and `typescript` (`^7.0.2`) as dev dependencies, and scripts use `vp pack` (library mode) rather than `vp build` (app mode).

Vite+ manages Vite, Vitest, Rolldown, Oxfmt, Oxlint, oxlint-tsgolint, and tsdown as
one toolchain. Upgrading `vite-plus` upgrades these bundled components together.
Run `vp --version` after `vp install` in a generated project to inspect the resolved
component versions.

Vite+ 1.5.0 requires Node.js `^22.18.0 || ^24.11.0 || >=26.0.0`.

```toml
[generators.typescript-fetch]
Expand Down
2 changes: 1 addition & 1 deletion just/golden-typescript-clients.just
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ set working-directory := '..'
# Like golden builds, validate outside the ignored generated directory:
# Vite+ otherwise skips every source file because of the repository ignore.
tar --exclude=node_modules --exclude=dist -C "$output" -cf - . | tar -C "$build" -xf -
(cd "$build" && vp install && vp check --no-fmt && vp pack)
(cd "$build" && vp install && vp --version && vp check --no-fmt && vp pack)
mkdir -p "$output/dist"
cp "$build"/dist/* "$output/dist/"
done
Expand Down
2 changes: 1 addition & 1 deletion src/generators/typescript/fetch/codegen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ impl TypeScriptFetchCodeGenerator {
});
package_json["devDependencies"] = serde_json::json!({
"typescript": "^7.0.2",
"vite-plus": "^0.2.5",
"vite-plus": "^1.5.0",
});
}
}
Expand Down
8 changes: 5 additions & 3 deletions tests/generated-clients/typescript/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
just golden-typescript-clients::test
```

Requires Rust, Node, and a current Vite+ CLI installed alongside TypeScript:
Requires Rust, Node.js `^22.18.0 || ^24.11.0 || >=26.0.0`, and Vite+ 1.5.0
installed alongside TypeScript 7.0.2:

```sh
npm install -g typescript vite-plus
npm install -g typescript@7.0.2 vite-plus@1.5.0
```

The current global Vite+ CLI resolves the TypeScript API beside the CLI when
Expand All @@ -17,7 +18,8 @@ The strict consumer check itself uses that package's installed compiler.
- `prepare` runs the public generator CLI with an explicit empty configuration,
producing fresh, unmodified preserve and camelCase clients.
- `build` copies each client to a temporary build directory, runs `vp install`,
`vp check --no-fmt`, and `vp pack`, then copies its bundle/declarations back.
reports the resolved Vite+ component versions with `vp --version`, runs
`vp check --no-fmt` and `vp pack`, then copies its bundle/declarations back.
Building outside the repository avoids Vite+ skipping gitignored generated
sources. Generated source, manifests, and configuration are never patched.
- `typecheck.ts` checks the actual packed declarations with strict typing and
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"description": "TypeScript client for TypeScript additional property preservation",
"devDependencies": {
"typescript": "^7.0.2",
"vite-plus": "^0.2.5"
"vite-plus": "^1.5.0"
},
"exports": {
".": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"description": "Masked fixture for TypeScript Fetch camelCase regression coverage.",
"devDependencies": {
"typescript": "^7.0.2",
"vite-plus": "^0.2.5"
"vite-plus": "^1.5.0"
},
"exports": {
".": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"description": "Comprehensive test for all OpenAPI v3.1.2 schema types",
"devDependencies": {
"typescript": "^7.0.2",
"vite-plus": "^0.2.5"
"vite-plus": "^1.5.0"
},
"exports": {
".": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"description": "Test fixture for DELETE operations with JSON response schemas and type alias request bodies",
"devDependencies": {
"typescript": "^7.0.2",
"vite-plus": "^0.2.5"
"vite-plus": "^1.5.0"
},
"exports": {
".": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"description": "This API demonstrates all 4 kinds of enum representation types: Externally Tagged, Internally Tagged, Adjacently Tagged, and Untagged",
"devDependencies": {
"typescript": "^7.0.2",
"vite-plus": "^0.2.5"
"vite-plus": "^1.5.0"
},
"exports": {
".": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"description": "This is a sample Pet Store Server based on the OpenAPI 3.1 specification",
"devDependencies": {
"typescript": "^7.0.2",
"vite-plus": "^0.2.5"
"vite-plus": "^1.5.0"
},
"exports": {
".": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"description": "TypeScript client for Self-Referential Object Test",
"devDependencies": {
"typescript": "^7.0.2",
"vite-plus": "^0.2.5"
"vite-plus": "^1.5.0"
},
"exports": {
".": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"description": "Test fixture for discriminated union where variants are references to component schemas.\nThis is similar to the ContainerImage pattern in the infiron API.\n",
"devDependencies": {
"typescript": "^7.0.2",
"vite-plus": "^0.2.5"
"vite-plus": "^1.5.0"
},
"exports": {
".": {
Expand Down
Loading