Skip to content

Commit 342bebf

Browse files
authored
feat(deps): upgrade upstream dependencies (#2670)
Upgrade Rolldown to `1.2.8`, Vite to `8.3.0`, Oxlint to `1.82.0`, and Oxfmt to `0.67.0`. Update the Rust parser for the Oxc `fatal_error` field. Add a test for invalid configuration files and keep the generated NAPI updates. Isolate the missing-dependency test from pnpm’s `NODE_PATH` and the Bun fixture from old `bun x` caches. ## Dependency updates | Package | From | To | | --- | --- | --- | | `rolldown` | `1.2.7` ([`26b4c6e`](rolldown/rolldown@26b4c6e)) | [`1.2.8`](https://github.com/rolldown/rolldown/releases/tag/v1.2.8) ([`9704b56`](rolldown/rolldown@9704b56)) | | `vite` | `8.2.2` ([`de1111a`](vitejs/vite@de1111a)) | [`8.3.0`](https://github.com/vitejs/vite/releases/tag/v8.3.0) ([`434e8e9`](vitejs/vite@434e8e9)) | | `oxfmt` | `0.66.0` | [`0.67.0`](https://github.com/oxc-project/oxc/releases/tag/apps_v1.82.0) | | `oxlint` | `1.81.0` | [`1.82.0`](https://github.com/oxc-project/oxc/releases/tag/apps_v1.82.0) | | `@oxc-project/runtime` | `0.148.0` | [`0.149.0`](https://github.com/oxc-project/oxc/releases/tag/crates_v0.149.0) | | `@oxc-project/types` | `0.148.0` | [`0.149.0`](https://github.com/oxc-project/oxc/releases/tag/crates_v0.149.0) | | `oxc-minify` | `0.148.0` | [`0.149.0`](https://github.com/oxc-project/oxc/releases/tag/crates_v0.149.0) | | `oxc-parser` | `0.148.0` | [`0.149.0`](https://github.com/oxc-project/oxc/releases/tag/crates_v0.149.0) | | `oxc-transform` | `0.148.0` | [`0.149.0`](https://github.com/oxc-project/oxc/releases/tag/crates_v0.149.0) | | `@vitejs/devtools` development range | `^0.4.12` | `^0.7.1` | | `@vitejs/devtools` peer range | `^0.4.0 \|\| ^0.5.0` | `^0.7.1` | | `@napi-rs/cli` catalog | `^3.8.2` | `^3.9.0` | | `web-tree-sitter` catalog | `^0.26.0` | `^0.27.0` | | Rust Oxc crates | `0.148.0` | [`0.149.0`](https://github.com/oxc-project/oxc/releases/tag/crates_v0.149.0) | | `jsonschema` workspace range | `0.46.5` | `0.55.0` | | `smallvec` workspace range | `1.15.1` | `1.16.0` | <details><summary>Unchanged dependencies</summary> - `vitest`: `4.1.11` - `@vitest/browser`: `4.1.11` - `@vitest/browser-playwright`: `4.1.11` - `@vitest/browser-preview`: `4.1.11` - `@vitest/browser-webdriverio`: `4.1.11` - `@vitest/expect`: `4.1.11` - `@vitest/mocker`: `4.1.11` - `@vitest/pretty-format`: `4.1.11` - `@vitest/runner`: `4.1.11` - `@vitest/snapshot`: `4.1.11` - `@vitest/spy`: `4.1.11` - `@vitest/utils`: `4.1.11` - `tsdown`: `0.23.0` - `@tsdown/css`: `0.23.0` - `@tsdown/exe`: `0.23.0` - `lightningcss`: `^1.33.0` - `@oxc-node/cli`: `0.1.0` - `@oxc-node/core`: `0.1.0` - `oxlint-tsgolint`: `7.0.2001` - `VITEST_VERSION constant`: `4.1.11` - `README vitest pins`: `4.1.11` </details> ## Code changes - `crates/vp_static_config/src/lib.rs`: use `ParserReturn.fatal_error` and test runtime fallback for invalid syntax. - `packages/cli/src/__tests__/resolve-core.spec.ts`: run the missing-dependency test without global Node search paths. - `crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_dlx_bun/`: isolate `TMPDIR` and update the recorded command headings. - `Cargo.toml`: match the changed Rolldown workspace dependencies. - `packages/core/package.json`: sync the Vite DevTools ranges and bundled versions. - `pnpm-workspace.yaml`: exempt Vite DevTools packages from the minimum release age, as with other bundled upstream packages. - `packages/cli/binding/index.cjs` and `packages/cli/binding/index.d.cts`: keep the regenerated loader and declarations. ## Build status - `sync-remote-and-build`: passed. - `build-upstream`: passed on `aarch64-apple-darwin`. - `just build`, Rust checks, lint, and unit tests: passed. - Full CLI snapshots: passed, with 819 cases and one ignored case.
1 parent e992de3 commit 342bebf

12 files changed

Lines changed: 1847 additions & 1766 deletions

File tree

Cargo.lock

Lines changed: 764 additions & 480 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ itertools = "0.15.0"
208208
itoa = "1.0.15"
209209
json-escape-simd = "3"
210210
json-strip-comments = "3"
211-
jsonschema = { version = "0.46.5", default-features = false }
211+
jsonschema = { version = "0.55.0", default-features = false }
212212
junction = "1.4.1"
213213
libtest-mimic = "0.8.2"
214214
memchr = "2.7.4"
@@ -270,7 +270,7 @@ sha1 = "0.10.6"
270270
sha2 = "0.10.9"
271271
shell-escape = "0.1.5"
272272
simdutf8 = "0.1.5"
273-
smallvec = { version = "1.15.1", features = ["union"] }
273+
smallvec = { version = "1.16.0", features = ["union"] }
274274
snapshot_test = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "d05b1dcdbaabaa69643ee0b89cebe3cd390957e9" }
275275
string_cache = "0.9.0"
276276
sugar_path = { version = "3", features = ["cached_current_dir"] }
@@ -319,7 +319,7 @@ xxhash-rust = "0.8.15"
319319
zip = { version = "7.2", default-features = false, features = ["deflate-flate2-zlib-rs"] }
320320

321321
# oxc crates with the same version
322-
oxc = { version = "0.148.0", features = [
322+
oxc = { version = "0.149.0", features = [
323323
"ast_visit",
324324
"transformer",
325325
"minifier",
@@ -331,17 +331,17 @@ oxc = { version = "0.148.0", features = [
331331
"regular_expression",
332332
"cfg",
333333
] }
334-
oxc_allocator = { version = "0.148.0", features = ["pool"] }
335-
oxc_ast = "0.148.0"
336-
oxc_ecmascript = "0.148.0"
337-
oxc_parser = "0.148.0"
338-
oxc_span = "0.148.0"
339-
oxc_napi = "0.148.0"
340-
oxc_str = "0.148.0"
341-
oxc_minify_napi = "0.148.0"
342-
oxc_parser_napi = "0.148.0"
343-
oxc_transform_napi = "0.148.0"
344-
oxc_traverse = "0.148.0"
334+
oxc_allocator = { version = "0.149.0", features = ["pool"] }
335+
oxc_ast = "0.149.0"
336+
oxc_ecmascript = "0.149.0"
337+
oxc_parser = "0.149.0"
338+
oxc_span = "0.149.0"
339+
oxc_napi = "0.149.0"
340+
oxc_str = "0.149.0"
341+
oxc_minify_napi = "0.149.0"
342+
oxc_parser_napi = "0.149.0"
343+
oxc_transform_napi = "0.149.0"
344+
oxc_traverse = "0.149.0"
345345

346346
# oxc crates in their own repos
347347
oxc_index = { version = "5", features = ["rayon", "serde"] }

crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_dlx_bun/snapshots.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ name = "command_dlx_bun"
33
vp = "global"
44
local-registry = true
55
skip-platforms = ["windows"]
6+
# bun x caches lockfiles under TMPDIR, separately from BUN_INSTALL_CACHE_DIR.
7+
# Isolate them so tarball URLs cannot refer to a previous test registry.
68
steps = [
79
{ argv = ["vp", "dlx", "--help"], comment = "should show help message", continue-on-failure = true },
8-
{ argv = ["vp", "dlx", "-s", "cowsay", "hello"], comment = "should run cowsay with bun x", continue-on-failure = true },
9-
{ argv = ["vp", "dlx", "-s", "cowsay@1.6.0", "hello"], comment = "should run specific version", continue-on-failure = true },
10+
{ argv = ["vp", "dlx", "-s", "cowsay", "hello"], envs = [["TMPDIR", "${workspace}"]], comment = "should run cowsay with bun x", continue-on-failure = true },
11+
{ argv = ["vp", "dlx", "-s", "cowsay@1.6.0", "hello"], envs = [["TMPDIR", "${workspace}"]], comment = "should run specific version", continue-on-failure = true },
1012
]

crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_dlx_bun/snapshots/command_dlx_bun.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Options:
2323
Documentation: https://viteplus.dev/guide/vpx
2424
```
2525

26-
## `vp dlx -s cowsay hello`
26+
## `TMPDIR=${workspace} vp dlx -s cowsay hello`
2727

2828
should run cowsay with bun x
2929

@@ -38,7 +38,7 @@ should run cowsay with bun x
3838
|| ||
3939
```
4040

41-
## `vp dlx -s cowsay@1.6.0 hello`
41+
## `TMPDIR=${workspace} vp dlx -s cowsay@1.6.0 hello`
4242

4343
should run specific version
4444

crates/vp_static_config/src/lib.rs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ fn parse_js_ts_config(source: &str, extension: &str) -> FieldMap {
148148
let parser = Parser::new(&allocator, source, source_type);
149149
let result = parser.parse();
150150

151-
if result.panicked || !result.diagnostics.is_empty() {
151+
if result.fatal_error || !result.diagnostics.is_empty() {
152152
return FieldMap::unanalyzable();
153153
}
154154

@@ -1320,6 +1320,19 @@ mod tests {
13201320

13211321
// ── Not analyzable cases ─────────────────────────────────────────────
13221322

1323+
#[test]
1324+
fn syntax_errors_require_runtime_evaluation() {
1325+
for source in [
1326+
"export default { run: { cache: true }",
1327+
"export default { run: { cache: true } }; const missing;",
1328+
] {
1329+
let result = parse(source);
1330+
assert_non_static(&result, "run");
1331+
assert_non_static(&result, "defaultPackage");
1332+
assert_eq!(result.get_declared("run"), None);
1333+
}
1334+
}
1335+
13231336
#[test]
13241337
fn returns_none_for_no_default_export() {
13251338
assert_non_static(&parse_js_ts_config("export const config = { a: 1 };", "ts"), "run");

packages/cli/binding/index.cjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// prettier-ignore
21
/* eslint-disable */
32
// @ts-nocheck
43
/* auto-generated by NAPI-RS */

packages/cli/binding/index.d.cts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,7 @@ export interface TreeShakeOptions {
306306
*/
307307
invalidImportSideEffects?: boolean;
308308
}
309+
309310
export interface Comment {
310311
type: 'Line' | 'Block';
311312
value: string;
@@ -332,6 +333,7 @@ export declare const enum Severity {
332333
Warning = 'Warning',
333334
Advice = 'Advice',
334335
}
336+
335337
export declare class ParseResult {
336338
get program(): import('@oxc-project/types').Program;
337339
get module(): EcmaScriptModule;
@@ -610,6 +612,7 @@ export interface ValueSpan {
610612
start: number;
611613
end: number;
612614
}
615+
613616
export declare class ResolverFactory {
614617
constructor(options?: NapiResolveOptions | undefined | null);
615618
static default(): ResolverFactory;
@@ -919,6 +922,7 @@ export interface TsconfigOptions {
919922
*/
920923
references?: 'auto';
921924
}
925+
922926
export interface SourceMap {
923927
file?: string;
924928
mappings: string;
@@ -929,6 +933,7 @@ export interface SourceMap {
929933
version: number;
930934
x_google_ignoreList?: Array<number>;
931935
}
936+
932937
export interface ArrowFunctionsOptions {
933938
/**
934939
* This option enables the following:
@@ -1604,6 +1609,7 @@ export interface TypeScriptOptions {
16041609
*/
16051610
rewriteImportExtensions?: 'rewrite' | 'remove' | boolean;
16061611
}
1612+
16071613
export declare class BindingBundleEndEventData {
16081614
output: string;
16091615
duration: number;
@@ -2180,6 +2186,7 @@ export interface BindingDevOptions {
21802186
onAdditionalAssets?: undefined | ((output: BindingOutputs) => void | Promise<void>);
21812187
rebuildStrategy?: BindingRebuildStrategy;
21822188
watch?: BindingDevWatchOptions;
2189+
hotUpdate?: boolean;
21832190
}
21842191

21852192
export interface BindingDevtoolsOptions {
@@ -2705,6 +2712,7 @@ export interface BindingManualCodeSplittingOptions {
27052712
maxSize?: number;
27062713
minModuleSize?: number;
27072714
maxModuleSize?: number;
2715+
internalInvalidateModuleInfoCache?: () => void;
27082716
}
27092717

27102718
export interface BindingMatchGroup {
@@ -3434,6 +3442,7 @@ export declare function startAsyncRuntime(): void;
34343442
export interface ViteImportGlobMeta {
34353443
isSubImportsPattern?: boolean;
34363444
}
3445+
34373446
/** Error from batch import rewriting */
34383447
export interface BatchRewriteError {
34393448
/** The file path that had an error */

packages/cli/src/__tests__/resolve-core.spec.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { execFileSync } from 'node:child_process';
12
import { mkdirSync, mkdtempSync, realpathSync, rmSync, writeFileSync } from 'node:fs';
23
import { tmpdir } from 'node:os';
34
import { join } from 'node:path';
@@ -113,7 +114,19 @@ describe('resolveCore', () => {
113114
it('does not fall back to the project when the CLI dependency is missing', () => {
114115
writeCore(projectCore);
115116
rmSync(bundled, { recursive: true });
116-
expect(() => resolveCore('', project, cliModule)).toThrow('Could not resolve the bundled Vite');
117+
// pnpm injects NODE_PATH, which can supply an unrelated Vite package.
118+
// Check the missing dependency in a process without global search paths.
119+
execFileSync(process.execPath, [
120+
'--no-global-search-paths',
121+
'--input-type=module',
122+
'--eval',
123+
`import { strict as assert } from 'node:assert';
124+
import { resolveCore } from ${JSON.stringify(new URL('../resolve-core.ts', import.meta.url).href)};
125+
assert.throws(
126+
() => resolveCore('', ${JSON.stringify(project)}, ${JSON.stringify(cliModule)}),
127+
/Could not resolve the bundled Vite/,
128+
);`,
129+
]);
117130
});
118131

119132
it.each(['project', 'bundled'])('rejects upstream Vite in the %s dependency', (location) => {

packages/core/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@
125125
"@oxc-node/cli": "catalog:",
126126
"@tsdown/css": "catalog:",
127127
"@tsdown/exe": "catalog:",
128-
"@vitejs/devtools": "^0.4.12",
128+
"@vitejs/devtools": "^0.7.1",
129129
"es-module-lexer": "^1.7.0",
130130
"hookable": "^6.0.1",
131131
"magic-string": "^0.30.21",
@@ -147,7 +147,7 @@
147147
"peerDependencies": {
148148
"@arethetypeswrong/core": "^0.18.1",
149149
"@types/node": "^20.19.0 || >=22.12.0",
150-
"@vitejs/devtools": "^0.4.0 || ^0.5.0",
150+
"@vitejs/devtools": "^0.7.1",
151151
"esbuild": "^0.27.0 || ^0.28.0",
152152
"jiti": ">=1.21.0",
153153
"less": "^4.0.0",
@@ -223,8 +223,8 @@
223223
"node": "^20.19.0 || ^22.18.0 || >=24.11.0"
224224
},
225225
"bundledVersions": {
226-
"vite": "8.2.2",
227-
"rolldown": "1.2.7",
226+
"vite": "8.3.0",
227+
"rolldown": "1.2.8",
228228
"tsdown": "0.23.0"
229229
}
230230
}

packages/tools/.upstream-versions.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
"rolldown": {
33
"repo": "https://github.com/rolldown/rolldown.git",
44
"branch": "main",
5-
"hash": "26b4c6e56c5553d72a910d0f73d60fa331c0ed88"
5+
"hash": "9704b565076baf57b3703c98ebde973855506a68"
66
},
77
"vite": {
88
"repo": "https://github.com/vitejs/vite.git",
99
"branch": "main",
10-
"hash": "de1111ab0be00879b404e7ed3b2a80e264edddc1"
10+
"hash": "434e8e9495436a60789f2b588a04a6a24a3d1661"
1111
}
1212
}

0 commit comments

Comments
 (0)