Skip to content
Open
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
1,614 changes: 646 additions & 968 deletions Cargo.lock

Large diffs are not rendered by default.

34 changes: 17 additions & 17 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ indexmap = "2.9.0"
indoc = "2.0.5"
infer = "0.19.0"
insta = "1.43.1"
itertools = "0.14.0"
itertools = "0.15.0"
itoa = "1.0.15"
json-escape-simd = "3"
json-strip-comments = "3"
Expand Down Expand Up @@ -247,7 +247,7 @@ pnp = "0.12.9"
percent-encoding = "2.3.1"
petgraph = "0.8.2"
pretty_assertions = "1.4.1"
phf = "0.13.0"
phf = "0.14.0"
prettyplease = "0.2.32"
proc-macro2 = "1"
pty_terminal_test = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "4003f65a3e5e3d957ff81b157e85e6ee41cc59fc" }
Expand Down Expand Up @@ -276,7 +276,7 @@ simdutf8 = "0.1.5"
smallvec = { version = "1.15.1", features = ["union"] }
snapshot_test = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "4003f65a3e5e3d957ff81b157e85e6ee41cc59fc" }
string_cache = "0.9.0"
sugar_path = { version = "2.0.1", features = ["cached_current_dir"] }
sugar_path = { version = "3", features = ["cached_current_dir"] }
supports-color = "3"
syn = { version = "2", default-features = false }
tar = "0.4.43"
Expand Down Expand Up @@ -317,7 +317,7 @@ xxhash-rust = "0.8.15"
zip = { version = "7.2", default-features = false, features = ["deflate-flate2-zlib-rs"] }

# oxc crates with the same version
oxc = { version = "0.139.0", features = [
oxc = { version = "0.140.0", features = [
"ast_visit",
"transformer",
"minifier",
Expand All @@ -329,22 +329,22 @@ oxc = { version = "0.139.0", features = [
"regular_expression",
"cfg",
] }
oxc_allocator = { version = "0.139.0", features = ["pool"] }
oxc_ast = "0.139.0"
oxc_ecmascript = "0.139.0"
oxc_parser = "0.139.0"
oxc_span = "0.139.0"
oxc_napi = "0.139.0"
oxc_str = "0.139.0"
oxc_minify_napi = "0.139.0"
oxc_parser_napi = "0.139.0"
oxc_transform_napi = "0.139.0"
oxc_traverse = "0.139.0"
oxc_allocator = { version = "0.140.0", features = ["pool"] }
oxc_ast = "0.140.0"
oxc_ecmascript = "0.140.0"
oxc_parser = "0.140.0"
oxc_span = "0.140.0"
oxc_napi = "0.140.0"
oxc_str = "0.140.0"
oxc_minify_napi = "0.140.0"
oxc_parser_napi = "0.140.0"
oxc_transform_napi = "0.140.0"
oxc_traverse = "0.140.0"

# oxc crates in their own repos
oxc_index = { version = "5", features = ["rayon", "serde"] }
oxc_resolver = { version = "11.23.0", features = ["yarn_pnp"] }
oxc_resolver_napi = { version = "11.23.0", default-features = false, features = ["yarn_pnp"] }
oxc_resolver = { version = "11.24.2", features = ["yarn_pnp"] }
oxc_resolver_napi = { version = "11.24.2", default-features = false, features = ["yarn_pnp"] }
oxc_sourcemap = "8.1.0"

# rolldown crates
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -399,23 +399,23 @@ Commands:
approve-builds Approve dependency lifecycle scripts (install/postinstall) to run
prune Remove unnecessary packages
pack Create a tarball of the package
list, ls List installed packages
list List installed packages [alias: ls]
view, info, show View package information from the registry
version Forward the native package version command
publish Publish package to registry
stage Stage a package for publishing (npm staged publishing workflow)
owner, author Manage package owners
owner Manage package owners [alias: author]
cache Manage package cache
config, c Manage package manager configuration
login, adduser Log in to a registry
config Manage package manager configuration [alias: c]
login Log in to a registry [alias: adduser]
logout Log out from a registry
whoami Show the current logged-in user
token Manage authentication tokens
audit Run a security audit
dist-tag Manage distribution tags
deprecate Deprecate a package version
search Search for packages in the registry
rebuild, rb Rebuild native modules
rebuild Rebuild native modules [alias: rb]
fund Show funding information for installed packages
ping Ping the registry

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ Usage: vp pm owner <COMMAND>
Manage package owners

Commands:
list, ls List package owners
add Add package owner
rm Remove package owner
list List package owners [alias: ls]
add Add package owner
rm Remove package owner

Options:
-h, --help Print help
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ Usage: vp pm owner <COMMAND>
Manage package owners

Commands:
list, ls List package owners
add Add package owner
rm Remove package owner
list List package owners [alias: ls]
add Add package owner
rm Remove package owner

Options:
-h, --help Print help
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Stage a package for publishing (npm staged publishing workflow)

Commands:
publish Stage a package for publishing (no 2FA required)
list, ls List staged versions
list List staged versions [alias: ls]
view Show details about a staged version
download Download the staged tarball for inspection
approve Promote a staged version to the live registry (2FA required)
Expand Down
43 changes: 27 additions & 16 deletions packages/cli/binding/index.d.cts
Original file line number Diff line number Diff line change
Expand Up @@ -1631,11 +1631,16 @@ export declare class BindingDevEngine {
getBundleState(): Promise<BindingBundleState>;
ensureLatestBuildOutput(): Promise<BindingResult<undefined>>;
triggerFullBuild(): void;
invalidate(
caller: string,
firstInvalidatedBy?: string | undefined | null,
): Promise<BindingResult<Array<BindingClientHmrUpdate>>>;
registerModules(clientId: string, modules: Array<string>): Promise<void>;
/**
* Client-connect signal (the clientId hello): creates the per-client session
* with an empty ship map. Reconnects arrive as fresh clientIds.
*/
registerClient(clientId: string): Promise<void>;
/**
* Delivery notification from the serving middleware: the response for
* `filename` completed, so record its modules as shipped to that client.
*/
notifyPayloadDelivered(filename: string): Promise<void>;
removeClient(clientId: string): Promise<void>;
close(): Promise<void>;
/**
Expand All @@ -1645,7 +1650,7 @@ export declare class BindingDevEngine {
* The module was previously stubbed with a proxy, and now we need to compile the
* actual module and its dependencies.
*/
compileEntry(moduleId: string, clientId: string): Promise<string>;
compileEntry(moduleId: string, clientId: string): Promise<BindingLazyChunkOutput>;
}

export declare class BindingLoadPluginContext {
Expand Down Expand Up @@ -2355,19 +2360,18 @@ export interface BindingGeneratedCodeOptions {
preset?: string;
}

export interface BindingHmrBoundaryOutput {
boundary: string;
acceptedVia: string;
}

export type BindingHmrUpdate =
| {
type: 'Patch';
code: string;
filename: string;
sourcemap?: string;
sourcemapFilename?: string;
hmrBoundaries: Array<BindingHmrBoundaryOutput>;
sourcemapFilename?: string /**
* Stable ids of the changed modules — the `changedIds` of the push envelope.
* The client walks from these on its own graph.
*/;
changedIds: Array<string> /** Per-client envelope sequence number. */;
seq: number;
}
| { type: 'FullReload'; reason?: string }
| { type: 'Noop' };
Expand Down Expand Up @@ -2538,6 +2542,15 @@ export interface BindingJsWatchChangeEvent {
event: string;
}

/**
* The client-facing slice of a lazy-compile result. The carried modules and
* stamps stay server-side as the engine's pending-payload entry.
*/
export interface BindingLazyChunkOutput {
code: string;
filename: string;
}

export interface BindingLog {
message: string;
id?: string;
Expand Down Expand Up @@ -2843,8 +2856,7 @@ export declare const enum BindingPropertyWriteSideEffects {

export declare const enum BindingRebuildStrategy {
Always = 0,
Auto = 1,
Never = 2,
Never = 1,
}

export interface BindingReplacePluginConfig {
Expand Down Expand Up @@ -3189,7 +3201,6 @@ export interface JsOutputChunk {
map?: BindingSourcemap;
sourcemapFilename?: string;
preliminaryFilename: string;
preliminarySourcemapFilename?: string;
}

/** Error emitted from native side, it only contains kind and message, no stack trace. */
Expand Down
17 changes: 12 additions & 5 deletions packages/core/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -632,10 +632,15 @@ async function wireBundledTsdownExtensions() {
// bundled), which resolves to core's own `lightningcss` dependency.
let exeWired = false;
let cssWired = false;
// The `import("@tsdown/css")` call site may already be deduped to the bundled
// entry by rolldown; track whether the bundled load ends up referenced either
// way so a silent miss (no rewrite and no dedup) fails the build.
// The `import("@tsdown/css")` call site may already be resolved by rolldown to a
// bundled local chunk; track whether the css plugin load ends up referenced from a
// local chunk (either way) so a silent miss (external resolution) fails the build.
// Newer tsdown emits `const { CssPlugin } = await import("@tsdown/css")`, which
// rolldown bundles and dedups into a hashed chunk (e.g. `await import("./dist-XXX.js")`)
// rather than leaving a bare specifier for us to rewrite to `./tsdown-css.js`.
let cssLoadWired = false;
// Matches the css plugin being loaded from a relative local chunk, whatever its name.
const cssPluginLocalImport = /CssPlugin[\s\S]{0,40}?await import\("\.\/[^"]+"\)/;
for (const chunkFile of chunkFiles) {
let content = await readFile(chunkFile, 'utf-8');
let changed = false;
Expand All @@ -653,7 +658,7 @@ async function wireBundledTsdownExtensions() {
content = content.replaceAll('import("@tsdown/css")', 'import("./tsdown-css.js")');
changed = true;
}
if (content.includes('import("./tsdown-css.js")')) {
if (content.includes('import("./tsdown-css.js")') || cssPluginLocalImport.test(content)) {
cssLoadWired = true;
}
if (changed) {
Expand All @@ -667,7 +672,9 @@ async function wireBundledTsdownExtensions() {
throw new Error('wireBundledTsdownExtensions: `pkgExists("@tsdown/css")` not found');
}
if (!cssLoadWired) {
throw new Error('wireBundledTsdownExtensions: bundled `./tsdown-css.js` is never imported');
throw new Error(
'wireBundledTsdownExtensions: bundled `@tsdown/css` is never imported from a local chunk',
);
}
}

Expand Down
8 changes: 4 additions & 4 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
"@oxc-node/core": "catalog:",
"@tsdown/css": "catalog:",
"@tsdown/exe": "catalog:",
"@vitejs/devtools": "^0.4.0",
"@vitejs/devtools": "^0.4.1",
"es-module-lexer": "^1.7.0",
"hookable": "^6.0.1",
"magic-string": "^0.30.21",
Expand Down Expand Up @@ -214,8 +214,8 @@
"node": "^20.19.0 || ^22.18.0 || >=24.11.0"
},
"bundledVersions": {
"vite": "8.1.4",
"rolldown": "1.1.5",
"tsdown": "0.22.7"
"vite": "8.1.5",
"rolldown": "1.2.0",
"tsdown": "0.22.9"
}
}
4 changes: 2 additions & 2 deletions packages/tools/.upstream-versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"rolldown": {
"repo": "https://github.com/rolldown/rolldown.git",
"branch": "main",
"hash": "f09947ab017d6df74299f691853dcfc4f4f0f86e"
"hash": "03e1e3422cd85495c9863ff3bc3b24212d9f4be2"
},
"vite": {
"repo": "https://github.com/vitejs/vite.git",
"branch": "main",
"hash": "a477454442eff649b430f9e3c6caf2500fcb7183"
"hash": "5e7fe129a4dde4f41934083b25e490059985f4e6"
}
}
Loading
Loading