Skip to content

Commit dceae8c

Browse files
voidzero-guard[bot]fengmk2wan9chi
authored
feat(deps): upgrade upstream dependencies (#2104)
## Summary - Automated daily upgrade of upstream dependencies. - Bumps rolldown to `v1.1.5` and tsdown to `0.22.4`, plus the oxc toolchain (oxlint `1.73.0`, oxfmt `0.58.0`, `@oxc-project/*` / `oxc-*` `0.139.0`, and the Rust `oxc*` crates `0.139.0`). - Keeps `yuku-codegen`/`yuku-parser` (rolldown-plugin-dts napi packages) external in the core bundle and adds them as core dependencies so their native bindings resolve at runtime. - Regenerates the NAPI binding types and applies oxfmt formatter output; `build-upstream` failed for this run. ## Dependency updates | Package | From | To | | --- | --- | --- | | `rolldown` | `6cbd233` | `v1.1.5 (f09947a)` | | `tsdown` | `0.22.3` | `0.22.4` | | `@tsdown/css` | `0.22.3` | `0.22.4` | | `@tsdown/exe` | `0.22.3` | `0.22.4` | | `oxfmt` | `0.57.0` | `0.58.0` | | `oxlint` | `1.72.0` | `1.73.0` | | `@oxc-project/runtime` | `0.138.0` | `0.139.0` | | `@oxc-project/types` | `0.138.0` | `0.139.0` | | `oxc-minify` | `0.138.0` | `0.139.0` | | `oxc-parser` | `0.138.0` | `0.139.0` | | `oxc-transform` | `0.138.0` | `0.139.0` | | `oxc` (Rust crates) | `0.138.0` | `0.139.0` | | `oxc_resolver` | `11.22.0` | `11.23.0` | | `oxc_sourcemap` | `8.0.1` | `8.1.0` | | `num-bigint` | `0.4.6` | `0.5.1` | <details><summary>Unchanged dependencies</summary> - `vite`: `v8.1.3 (578ffb8)` - `vitest`: `4.1.10` - `@vitest/browser`: `4.1.10` - `@vitest/browser-playwright`: `4.1.10` - `@vitest/browser-preview`: `4.1.10` - `@vitest/browser-webdriverio`: `4.1.10` - `@vitest/expect`: `4.1.10` - `@vitest/mocker`: `4.1.10` - `@vitest/pretty-format`: `4.1.10` - `@vitest/runner`: `4.1.10` - `@vitest/snapshot`: `4.1.10` - `@vitest/spy`: `4.1.10` - `@vitest/utils`: `4.1.10` - `lightningcss`: `^1.32.0` - `@oxc-node/cli`: `0.1.0` - `@oxc-node/core`: `0.1.0` - `oxlint-tsgolint`: `0.24.0` - `VITEST_VERSION constant`: `4.1.10` - `README vitest pins`: `4.1.10` - `@vitejs/devtools`: `0.3.4` </details> ## Code changes - `packages/core/build.ts`: keep `yuku-codegen`/`yuku-parser` external (their loaders `require` a per-platform `.node` binding relative to their own `__dirname`, which bundling would break). - `packages/core/package.json`: add `yuku-codegen`/`yuku-parser` as core `dependencies`; bump `bundledVersions` (rolldown `1.1.4` -> `1.1.5`, tsdown `0.22.3` -> `0.22.4`). - `packages/cli/binding/index.d.cts`: regenerated NAPI binding types for the rolldown bump — adds `sourcemapFilenames`/`sourcemapFileNames`, `preliminarySourcemapFilename`, and the `reserved` mangle option; removes the module-preload and render-built-url binding interfaces. - `pnpm-workspace.yaml`: catalog version bumps plus `fresh-import` / `void` entries and `valibot` `1.4.1` -> `1.4.2`. - `docs/config/run.md`, `rfcs/pack-command.md`, `packages/tools/src/local-npm-registry.ts`: oxfmt `0.58.0` reformatting of empty braces (no behavior change). ## Build status - `sync-remote-and-build`: success - `build-upstream`: failure Co-authored-by: voidzero-guard[bot] <278573678+voidzero-guard[bot]@users.noreply.github.com> Co-authored-by: MK (fengmk2) <fengmk2@gmail.com> Co-authored-by: Charles Wang <3612422+wan9chi@users.noreply.github.com>
1 parent 317974d commit dceae8c

11 files changed

Lines changed: 991 additions & 701 deletions

File tree

Cargo.lock

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

Cargo.toml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ napi-derive = { version = "3.0.0", default-features = false, features = [
234234
nix = { version = "0.30.1", features = ["dir"] }
235235
nodejs-built-in-modules = "1.0.0"
236236
nom = "8.0.0"
237-
num-bigint = "0.4.6"
237+
num-bigint = "0.5.1"
238238
num_cpus = "1.17"
239239
owo-colors = "4.2.2"
240240
parking_lot = "0.12.5"
@@ -317,7 +317,7 @@ xxhash-rust = "0.8.15"
317317
zip = { version = "7.2", default-features = false, features = ["deflate-flate2-zlib-rs"] }
318318

319319
# oxc crates with the same version
320-
oxc = { version = "0.138.0", features = [
320+
oxc = { version = "0.139.0", features = [
321321
"ast_visit",
322322
"transformer",
323323
"minifier",
@@ -329,23 +329,23 @@ oxc = { version = "0.138.0", features = [
329329
"regular_expression",
330330
"cfg",
331331
] }
332-
oxc_allocator = { version = "0.138.0", features = ["pool"] }
333-
oxc_ast = "0.138.0"
334-
oxc_ecmascript = "0.138.0"
335-
oxc_parser = "0.138.0"
336-
oxc_span = "0.138.0"
337-
oxc_napi = "0.138.0"
338-
oxc_str = "0.138.0"
339-
oxc_minify_napi = "0.138.0"
340-
oxc_parser_napi = "0.138.0"
341-
oxc_transform_napi = "0.138.0"
342-
oxc_traverse = "0.138.0"
332+
oxc_allocator = { version = "0.139.0", features = ["pool"] }
333+
oxc_ast = "0.139.0"
334+
oxc_ecmascript = "0.139.0"
335+
oxc_parser = "0.139.0"
336+
oxc_span = "0.139.0"
337+
oxc_napi = "0.139.0"
338+
oxc_str = "0.139.0"
339+
oxc_minify_napi = "0.139.0"
340+
oxc_parser_napi = "0.139.0"
341+
oxc_transform_napi = "0.139.0"
342+
oxc_traverse = "0.139.0"
343343

344344
# oxc crates in their own repos
345345
oxc_index = { version = "5", features = ["rayon", "serde"] }
346-
oxc_resolver = { version = "11.22.0", features = ["yarn_pnp"] }
347-
oxc_resolver_napi = { version = "11.22.0", default-features = false, features = ["yarn_pnp"] }
348-
oxc_sourcemap = "8.0.1"
346+
oxc_resolver = { version = "11.23.0", features = ["yarn_pnp"] }
347+
oxc_resolver_napi = { version = "11.23.0", default-features = false, features = ["yarn_pnp"] }
348+
oxc_sourcemap = "8.1.0"
349349

350350
# rolldown crates
351351
rolldown = { path = "./rolldown/crates/rolldown" }

docs/config/run.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,8 @@ import { defineConfig } from 'vite-plus';
88
export default defineConfig({
99
run: {
1010
enablePrePostScripts: true,
11-
cache: {
12-
/* ... */
13-
},
14-
tasks: {
15-
/* ... */
16-
},
11+
cache: {/* ... */},
12+
tasks: {/* ... */},
1713
},
1814
});
1915
```

packages/cli/binding/index.d.cts

Lines changed: 14 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,17 @@ export interface MangleOptions {
144144
* @default false
145145
*/
146146
keepNames?: boolean | MangleOptionsKeepNames;
147+
/**
148+
* Names that bindings must not be renamed to, and that bindings already
149+
* carrying them keep. Equivalent to terser's `mangle.reserved`.
150+
*
151+
* Pass `['exports', 'module']` when minifying prebuilt CommonJS / UMD files
152+
* that Node consumers `import` directly, so Node's cjs-module-lexer can still
153+
* detect the mangled module's named exports.
154+
*
155+
* @default []
156+
*/
157+
reserved?: Array<string>;
147158
/** Debug mangled names. */
148159
debug?: boolean;
149160
}
@@ -1762,6 +1773,7 @@ export declare class BindingNormalizedOptions {
17621773
get name(): string | null;
17631774
get entryFilenames(): string | undefined;
17641775
get chunkFilenames(): string | undefined;
1776+
get sourcemapFilenames(): string | undefined;
17651777
get assetFilenames(): string | undefined;
17661778
get dir(): string | null;
17671779
get file(): string | null;
@@ -2591,15 +2603,6 @@ export interface BindingMatchGroup {
25912603
includeDependenciesRecursively?: boolean;
25922604
}
25932605

2594-
export interface BindingModulePreloadOptions {
2595-
polyfill: boolean;
2596-
resolveDependencies?: (
2597-
filename: string,
2598-
deps: string[],
2599-
context: { hostId: string; hostType: 'html' | 'js' },
2600-
) => string[];
2601-
}
2602-
26032606
export interface BindingModules {
26042607
values: Array<BindingRenderedModule>;
26052608
keys: Array<string>;
@@ -2643,6 +2646,7 @@ export interface BindingOutputOptions {
26432646
paths?: Record<string, string> | ((id: string) => string);
26442647
plugins: (BindingBuiltinPlugin | BindingPluginOptions | undefined)[];
26452648
sourcemap?: 'file' | 'inline' | 'hidden';
2649+
sourcemapFileNames?: string | ((chunk: PreRenderedChunk) => string);
26462650
sourcemapBaseUrl?: string;
26472651
sourcemapIgnoreList?:
26482652
| boolean
@@ -2843,18 +2847,6 @@ export declare const enum BindingRebuildStrategy {
28432847
Never = 2,
28442848
}
28452849

2846-
export interface BindingRenderBuiltUrlConfig {
2847-
ssr: boolean;
2848-
type: 'asset' | 'public';
2849-
hostId: string;
2850-
hostType: 'js' | 'css' | 'html';
2851-
}
2852-
2853-
export interface BindingRenderBuiltUrlRet {
2854-
relative?: boolean;
2855-
runtime?: string;
2856-
}
2857-
28582850
export interface BindingReplacePluginConfig {
28592851
values: Record<string, string>;
28602852
delimiters?: [string, string];
@@ -2863,11 +2855,6 @@ export interface BindingReplacePluginConfig {
28632855
sourcemap?: boolean;
28642856
}
28652857

2866-
export interface BindingResolveDependenciesContext {
2867-
hostId: string;
2868-
hostType: string;
2869-
}
2870-
28712858
export type BindingResolvedExternal = boolean | string;
28722859

28732860
export interface BindingResolveOptions {
@@ -3202,6 +3189,7 @@ export interface JsOutputChunk {
32023189
map?: BindingSourcemap;
32033190
sourcemapFilename?: string;
32043191
preliminaryFilename: string;
3192+
preliminarySourcemapFilename?: string;
32053193
}
32063194

32073195
/** Error emitted from native side, it only contains kind and message, no stack trace. */

packages/core/build.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,10 +414,20 @@ async function bundleTsdown() {
414414
// (a native module) and `postcss` also stay external: `@tsdown/css` pulls them
415415
// in and they cannot be bundled. Both are core `dependencies`, so they resolve
416416
// at runtime and CSS bundling works without users installing anything.
417+
//
418+
// `yuku-codegen` and `yuku-parser` (pulled in by `rolldown-plugin-dts` for dts
419+
// generation) are napi packages: their loaders `require` a per-platform
420+
// `@yuku-*/binding-<platform>/*.node` relative to their own `__dirname`.
421+
// Bundling their JS into a core chunk rebinds `__dirname` to `dist/tsdown/`,
422+
// so the native binding no longer resolves. Keep them external and list them
423+
// as core `dependencies` so each package's loader resolves its own binding
424+
// (declared as optionalDependencies) at runtime.
417425
const tsdownExternal = [
418426
...Object.keys(pkgJson.peerDependencies).filter((name) => !bundledTsdownPackages.has(name)),
419427
'lightningcss',
420428
'postcss',
429+
'yuku-codegen',
430+
'yuku-parser',
421431
];
422432
const isExternal = (id: string) => tsdownExternal.some((e) => id === e || id.startsWith(`${e}/`));
423433

packages/core/package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,9 @@
103103
"@oxc-project/runtime": "catalog:",
104104
"@oxc-project/types": "catalog:",
105105
"lightningcss": "catalog:",
106-
"postcss": "^8.5.6"
106+
"postcss": "^8.5.6",
107+
"yuku-codegen": "^0.5.44",
108+
"yuku-parser": "^0.5.44"
107109
},
108110
"devDependencies": {
109111
"@ast-grep/napi": "^0.43.0",
@@ -213,7 +215,7 @@
213215
},
214216
"bundledVersions": {
215217
"vite": "8.1.3",
216-
"rolldown": "1.1.4",
217-
"tsdown": "0.22.3"
218+
"rolldown": "1.1.5",
219+
"tsdown": "0.22.4"
218220
}
219221
}

packages/tools/.upstream-versions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"rolldown": {
33
"repo": "https://github.com/rolldown/rolldown.git",
44
"branch": "main",
5-
"hash": "6cbd2330dc5ca973b90444973ee04c2dc7ee2f2d"
5+
"hash": "f09947ab017d6df74299f691853dcfc4f4f0f86e"
66
},
77
"vite": {
88
"repo": "https://github.com/vitejs/vite.git",

packages/tools/src/local-npm-registry.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ const upstreamAgent = new HttpsAgent({ keepAlive: true, maxSockets: 64 });
228228
// in a pnpm-packed tarball, so long-name (pax header) handling is unnecessary.
229229
function readPackageJsonFromTarball(tgzBytes: Buffer, sourcePath: string): PackageManifest {
230230
const tar = gunzipSync(tgzBytes);
231-
for (let offset = 0; offset + 512 <= tar.length; ) {
231+
for (let offset = 0; offset + 512 <= tar.length;) {
232232
const rawName = tar.subarray(offset, offset + 100).toString();
233233
const nulIndex = rawName.indexOf('\0');
234234
const name = nulIndex === -1 ? rawName : rawName.slice(0, nulIndex);

0 commit comments

Comments
 (0)