diff --git a/.github/scripts/upgrade-deps.ts b/.github/scripts/upgrade-deps.ts index 1645cb5844..31a5161e5a 100644 --- a/.github/scripts/upgrade-deps.ts +++ b/.github/scripts/upgrade-deps.ts @@ -146,6 +146,50 @@ async function getLatestNpmVersion(packageName: string): Promise { return data.version; } +// Every published version of a package, in publish order (which is chronological, +// so the last entry of a major is that major's newest release — including +// prereleases, unlike the `latest` dist-tag). +async function fetchNpmVersions(packageName: string): Promise { + const res = await fetch(`https://registry.npmjs.org/${packageName}`, { + headers: { accept: 'application/vnd.npm.install-v1+json' }, + }); + if (!res.ok) { + throw new Error( + `Failed to fetch npm versions for ${packageName}: ${res.status} ${res.statusText}`, + ); + } + const data = (await res.json()) as { versions?: Record }; + return Object.keys(data.versions ?? {}); +} + +// Resolve the catalog pin for a `@vitest/*` package that tracks `vitest`. Siblings +// normally publish the exact same version, but one can lag during a vitest major +// release: when vitest 5.0.0 shipped, `@vitest/browser-webdriverio` was still only +// at 5.0.0-rc.1, and pinning it to an unpublished 5.0.0 fails the install outright. +// Fall back to the newest published release sharing vitest's major, which still +// satisfies vitest's peer range. A sibling with no release at all on that major was +// dropped upstream (as `@vitest/runner` was in vitest 5) and must leave the list. +async function resolveVitestSiblingVersion(pkg: string, vitestVersion: string): Promise { + const versions = await fetchNpmVersions(pkg); + if (versions.includes(vitestVersion)) { + return vitestVersion; + } + + const major = vitestVersion.split('.')[0]; + const sameMajor = versions.filter((version) => version.split('.')[0] === major); + // Publish order is chronological, so the last same-major entry is its newest. + const fallback = sameMajor[sameMajor.length - 1]; + if (!fallback) { + throw new Error( + `${pkg} has no published ${major}.x release to match vitest ${vitestVersion}. ` + + `If it was dropped upstream, remove it from vitestExactVersionPackages in ` + + `.github/scripts/upgrade-deps.ts (and from the catalog and packages/cli).`, + ); + } + console.log(`${pkg} lags vitest ${vitestVersion} -> pinning ${fallback}`); + return fallback; +} + // Read a dependency range from the latest published version of `packageName`, // e.g. the `lightningcss` range that the bundled `@tsdown/css` depends on. async function getNpmDependencyRange(packageName: string, dependencyName: string): Promise { @@ -185,9 +229,10 @@ async function updatePnpmWorkspace(versions: PnpmWorkspaceVersions): Promise ({ - name: pkg, - pattern: new RegExp(`'${pkg.replaceAll('/', '\\/')}': ([\\d.]+(?:-[\\w.]+)?)`), - replacement: `'${pkg}': ${versions.vitest}`, - newVersion: versions.vitest, - })); + const vitestExactVersionEntries: PnpmWorkspaceEntry[] = await Promise.all( + vitestExactVersionPackages.map(async (pkg) => { + const version = await resolveVitestSiblingVersion(pkg, versions.vitest); + return { + name: pkg, + pattern: new RegExp(`'${pkg.replaceAll('/', '\\/')}': ([\\d.]+(?:-[\\w.]+)?)`), + replacement: `'${pkg}': ${version}`, + newVersion: version, + }; + }), + ); const entries: PnpmWorkspaceEntry[] = [ { name: 'vitest', diff --git a/Cargo.lock b/Cargo.lock index fcffeb91cb..61652de7ff 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4276,9 +4276,9 @@ dependencies = [ [[package]] name = "oxc" -version = "0.147.0" +version = "0.148.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db297a5e119706ad508114ec9065a8a13d154efc14d830d3a1effb0b69cbd5eb" +checksum = "c09c8735a25d3d1bf46bdcd8e0871a66d5b28ebf7f62c26032d5b9df323e5f6b" dependencies = [ "oxc_allocator", "oxc_ast", @@ -4316,9 +4316,9 @@ dependencies = [ [[package]] name = "oxc_allocator" -version = "0.147.0" +version = "0.148.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4e69b2400ab3c2f96eb3ae474ed80fa3a2959ba05e26afc5df45e634fc9a071" +checksum = "4721a6dea1ed51a31597a8865aac718c89ac6d6c91e1d67d1f632078a0518d97" dependencies = [ "allocator-api2", "hashbrown 0.17.1", @@ -4330,9 +4330,9 @@ dependencies = [ [[package]] name = "oxc_ast" -version = "0.147.0" +version = "0.148.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dcf0e905263cc649c07e3494489de620462390de12cb2b5933247f91785a421" +checksum = "6b5c392641cfc4bd1a93881ee681f144d0213b1456288b2b6612f7eb8d2e02aa" dependencies = [ "bitflags 2.13.1", "oxc_allocator", @@ -4348,9 +4348,9 @@ dependencies = [ [[package]] name = "oxc_ast_macros" -version = "0.147.0" +version = "0.148.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa520723c19e83bcc683a988ac77d56bbca4b88178d5fc6c0c89fb73a45893cf" +checksum = "1c233646788d3ae40492affb98185d167bdcc86c8b88ca661d784157404f4f62" dependencies = [ "phf 0.14.0", "proc-macro2", @@ -4360,9 +4360,9 @@ dependencies = [ [[package]] name = "oxc_ast_visit" -version = "0.147.0" +version = "0.148.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bcdfe65eec7cc091e52f73ea7f6546375a2dd5b88c43900afc94dafffebfb8c" +checksum = "34ec60272a8dead7c6fb21dd9709f66e4033194399296603a2c9f85dc63b5540" dependencies = [ "oxc_allocator", "oxc_ast", @@ -4372,9 +4372,9 @@ dependencies = [ [[package]] name = "oxc_cfg" -version = "0.147.0" +version = "0.148.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfdc88089ffbd2c260999ea44ca1c946f2baae45e90189f85e757f76c2464ae5" +checksum = "38bc69c638609ff9631ed4d565289cf7b1aafbe9a0a280b70f1c5805147f1e3e" dependencies = [ "bitflags 2.13.1", "itertools 0.15.0", @@ -4386,9 +4386,9 @@ dependencies = [ [[package]] name = "oxc_codegen" -version = "0.147.0" +version = "0.148.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd265be822054de498537a8df29f0afef75f9e804f9c499c81c0ec8c9b9212bd" +checksum = "7fff57cbadb9802b778b9941e6e5268df8f54305f75c55399c8e835ee8b366f3" dependencies = [ "bitflags 2.13.1", "cow-utils", @@ -4408,9 +4408,9 @@ dependencies = [ [[package]] name = "oxc_compat" -version = "0.147.0" +version = "0.148.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "970fe81a0a43846ebe37c9250f3a1948e984ba79cbdf866681fd117dffe27e3d" +checksum = "caef0301ad6c51d21b805600c0b2e30175c4637e41444dff8e8ea9d21d8c4c1c" dependencies = [ "cow-utils", "oxc-browserslist", @@ -4421,24 +4421,23 @@ dependencies = [ [[package]] name = "oxc_data_structures" -version = "0.147.0" +version = "0.148.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7903e8f1f76f148c943b5a2e192bf908d600b5fe0df1efc77ebeb75591ace56" +checksum = "bbe5adfd511d39d3619ce02317368553c79aa290abf1acaf0b4525cec9594e94" dependencies = [ "ropey", ] [[package]] name = "oxc_diagnostics" -version = "0.147.0" +version = "0.148.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acb70f89da6524e6a2d097f0d747f14731156996ee5400474ef19ad3f318646b" +checksum = "606cda8ae718447dc41af63ec4fc53e99b104bde2fd7a3b9e3b9a4976020aa86" dependencies = [ "bytecount", "cow-utils", "itoa", "memchr", - "owo-colors", "oxc_span", "percent-encoding", "smallvec 1.15.2", @@ -4449,9 +4448,9 @@ dependencies = [ [[package]] name = "oxc_ecmascript" -version = "0.147.0" +version = "0.148.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f1fdd494072a511d7df691282dbd4fe656ad6fd0bea24d4366c019ed1172a4f" +checksum = "7c6e7b1ffc464822d838a33858ae95cc672481089c545a883771b8df9ac1d223" dependencies = [ "cow-utils", "dragonbox_ecma", @@ -4470,9 +4469,9 @@ dependencies = [ [[package]] name = "oxc_estree" -version = "0.147.0" +version = "0.148.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2ef8cdc8d02a7e0b91ee51a2572963c914d3bb38261e11a54d068a092c4dc42" +checksum = "4ac33adcec9582af677f3007e282530f7c8c507df7a3cb335383b79c0c57f574" dependencies = [ "dragonbox_ecma", "itoa", @@ -4492,9 +4491,9 @@ dependencies = [ [[package]] name = "oxc_isolated_declarations" -version = "0.147.0" +version = "0.148.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88fe41a07cb943168e10efb18a3f5f56ffbb70c7eb6ef42d89de203cca5a73a3" +checksum = "3043cb862897df8dfa10fea292feef5d226b41f0f8b27417a2a9b8be413f247f" dependencies = [ "bitflags 2.13.1", "oxc_allocator", @@ -4510,9 +4509,9 @@ dependencies = [ [[package]] name = "oxc_mangler" -version = "0.147.0" +version = "0.148.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efa851c466fb09783764de87e93fa44c27c2d0b918dbaa8b0a0364aca15b2f44" +checksum = "435c9d8fd34e9764d25a61c39c57a060f1132dba7410be22646e4a58c9ccfe28" dependencies = [ "itertools 0.15.0", "oxc_allocator", @@ -4529,9 +4528,9 @@ dependencies = [ [[package]] name = "oxc_minifier" -version = "0.147.0" +version = "0.148.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bba5313adecd3682455f4a830e26cfcd751ac8f9423ca95f93d7b8dcdee807c" +checksum = "43a778f7d247c7d5e1c6b6a393424fc1f03e9a93ba44d3ed98ba5660927e376f" dependencies = [ "cow-utils", "itoa", @@ -4555,9 +4554,9 @@ dependencies = [ [[package]] name = "oxc_minify_napi" -version = "0.147.0" +version = "0.148.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb90a40b18a6f645f7ee6ba38a86fb34ff1b9b7f7f70d0f4a19ea7962c433c59" +checksum = "b713f142c8f53d2580e4ffd1a43b9a32c1d96b9dca952ae5f62ecd5c2f502918" dependencies = [ "lazy-regex", "napi", @@ -4578,9 +4577,9 @@ dependencies = [ [[package]] name = "oxc_napi" -version = "0.147.0" +version = "0.148.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "424dcdd627a118e202a27c6adfd42ffa69adf12ae22c60246dd6fa85c9fb1eb0" +checksum = "a2b9f729ae3acf46915b90802fee0f02501ee329caf62f1e6cf708a79751220f" dependencies = [ "napi", "napi-build", @@ -4594,9 +4593,9 @@ dependencies = [ [[package]] name = "oxc_parser" -version = "0.147.0" +version = "0.148.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12a55bfce994289467c88ed9732dbc4c8f03f3186af2b77e48dc4a71c502cb2c" +checksum = "9e7efce258a7587eac02e028db4121ac5c6935e4e2d46ea9cba7f54aa1919459" dependencies = [ "bitflags 2.13.1", "cow-utils", @@ -4618,9 +4617,9 @@ dependencies = [ [[package]] name = "oxc_parser_napi" -version = "0.147.0" +version = "0.148.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c7468ed0971e74890a73dbb9a7c44d002fa6b07133d8b46330f2d2a582b4691" +checksum = "eb81ed0e6e95d693ed2eaf004567c0d1b1d2405cd6e97249f8e374c6c35cc8df" dependencies = [ "napi", "napi-build", @@ -4635,9 +4634,9 @@ dependencies = [ [[package]] name = "oxc_regular_expression" -version = "0.147.0" +version = "0.148.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8455a292e58e24a0c51cfa2ec1d44e219e22d59a04b9af1ae050d4944a19d51" +checksum = "3d4d2d6468b4c6c02595c735e337386d77b093ba91f71dd64242c12560b0f586" dependencies = [ "bitflags 2.13.1", "oxc_allocator", @@ -4693,9 +4692,9 @@ dependencies = [ [[package]] name = "oxc_semantic" -version = "0.147.0" +version = "0.148.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9c35fc29f969e7f93ee41dc37c9d82816e9c2597495f6cc302477831c8fd2ed" +checksum = "183e66113ce154ec259a4843eee1ba465306d12ff08374f5a72eae6e773c3a49" dependencies = [ "itertools 0.15.0", "memchr", @@ -4733,9 +4732,9 @@ dependencies = [ [[package]] name = "oxc_span" -version = "0.147.0" +version = "0.148.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "378737bf42338e31badcdae2e6e2afc7a63cb7ffe82c418ac12d506c554adda4" +checksum = "d0d038b28e7037ab6dfded105eb35d12cdc58f6b9959dee9ae3244142fd45852" dependencies = [ "compact_str 0.10.0", "oxc_allocator", @@ -4747,9 +4746,9 @@ dependencies = [ [[package]] name = "oxc_str" -version = "0.147.0" +version = "0.148.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8564a0269f93153f856100db908af25434efdd1ec9d403ffa099cdab57385c8c" +checksum = "463caa681dcd52935465805af52f4fc8661c723b6ba36c6822222efb6078e655" dependencies = [ "compact_str 0.10.0", "hashbrown 0.17.1", @@ -4760,9 +4759,9 @@ dependencies = [ [[package]] name = "oxc_syntax" -version = "0.147.0" +version = "0.148.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59f05978138676c9d54f021391409fcf1314a46adcdbbaabc670c2990f8387dd" +checksum = "460be58ae9013ebe0604cdfc0f558e71109e2ee948da5f9b40bc493056631e2d" dependencies = [ "bitflags 2.13.1", "cow-utils", @@ -4781,9 +4780,9 @@ dependencies = [ [[package]] name = "oxc_transform_napi" -version = "0.147.0" +version = "0.148.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a041d09c7bdbe3807279d8779087f21383b7d99815cf85fc68b4ce97e55b9a3" +checksum = "5de7442c06373719d1125aeaeb001d90f008ef81d2677dbda5141801b83760d3" dependencies = [ "napi", "napi-build", @@ -4796,9 +4795,9 @@ dependencies = [ [[package]] name = "oxc_transformer" -version = "0.147.0" +version = "0.148.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e4443b3e36410882b44ed13e415ef8ddc3d31e6786d03f5a0e486e4c1d18090" +checksum = "e1fbbb040e74db7b98e74cd2e2098fc6bdcb47c10d9b55428f5194926a62ce14" dependencies = [ "base64 0.23.0", "compact_str 0.10.0", @@ -4826,9 +4825,9 @@ dependencies = [ [[package]] name = "oxc_transformer_plugins" -version = "0.147.0" +version = "0.148.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9db3729caa06dcea2f4a2a50a045c4e6148be0b579b3108ac181145f212fb0d" +checksum = "2cf786ca7093850f881abd378e23325ae3791aa97f1880595e75e26359cecc3a" dependencies = [ "cow-utils", "itoa", @@ -4849,9 +4848,9 @@ dependencies = [ [[package]] name = "oxc_traverse" -version = "0.147.0" +version = "0.148.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02a3cc8f1a31a1b08104ede1a6631dfc984282234249f4503f51f4d2b22036e4" +checksum = "e3fed7411606d1abcd794eed551320c387a744a5ca5c3a489a5a5e8a95d1e724" dependencies = [ "itoa", "oxc_allocator", @@ -5864,7 +5863,7 @@ dependencies = [ [[package]] name = "rolldown" -version = "1.2.6" +version = "1.2.7" dependencies = [ "anyhow", "append-only-vec", @@ -6052,7 +6051,7 @@ dependencies = [ [[package]] name = "rolldown_common" -version = "1.2.6" +version = "1.2.7" dependencies = [ "anyhow", "arcstr", @@ -6088,7 +6087,7 @@ dependencies = [ [[package]] name = "rolldown_dev" -version = "1.2.6" +version = "1.2.7" dependencies = [ "anyhow", "arcstr", @@ -6109,7 +6108,7 @@ dependencies = [ [[package]] name = "rolldown_dev_common" -version = "1.2.6" +version = "1.2.7" dependencies = [ "derive_more", "rolldown_common", @@ -6121,7 +6120,7 @@ dependencies = [ [[package]] name = "rolldown_devtools" -version = "1.2.6" +version = "1.2.7" dependencies = [ "blake3", "rolldown_devtools_action", @@ -6134,7 +6133,7 @@ dependencies = [ [[package]] name = "rolldown_devtools_action" -version = "1.2.6" +version = "1.2.7" dependencies = [ "serde", "ts-rs", @@ -6142,7 +6141,7 @@ dependencies = [ [[package]] name = "rolldown_ecmascript" -version = "1.2.6" +version = "1.2.7" dependencies = [ "arcstr", "oxc", @@ -6154,7 +6153,7 @@ dependencies = [ [[package]] name = "rolldown_ecmascript_utils" -version = "1.2.6" +version = "1.2.7" dependencies = [ "memchr", "oxc", @@ -6164,7 +6163,7 @@ dependencies = [ [[package]] name = "rolldown_error" -version = "1.2.6" +version = "1.2.7" dependencies = [ "anyhow", "arcstr", @@ -6181,7 +6180,7 @@ dependencies = [ [[package]] name = "rolldown_fs" -version = "1.2.6" +version = "1.2.7" dependencies = [ "oxc_resolver", "vfs", @@ -6189,7 +6188,7 @@ dependencies = [ [[package]] name = "rolldown_fs_watcher" -version = "1.2.6" +version = "1.2.7" dependencies = [ "rolldown-notify", "rolldown-notify-debouncer-full", @@ -6198,7 +6197,7 @@ dependencies = [ [[package]] name = "rolldown_plugin" -version = "1.2.6" +version = "1.2.7" dependencies = [ "anyhow", "arcstr", @@ -6227,7 +6226,7 @@ dependencies = [ [[package]] name = "rolldown_plugin_asset_module" -version = "1.2.6" +version = "1.2.7" dependencies = [ "anyhow", "rolldown_common", @@ -6239,7 +6238,7 @@ dependencies = [ [[package]] name = "rolldown_plugin_bundle_analyzer" -version = "1.2.6" +version = "1.2.7" dependencies = [ "arcstr", "rolldown_common", @@ -6253,7 +6252,7 @@ dependencies = [ [[package]] name = "rolldown_plugin_chunk_import_map" -version = "1.2.6" +version = "1.2.7" dependencies = [ "arcstr", "rolldown_common", @@ -6266,7 +6265,7 @@ dependencies = [ [[package]] name = "rolldown_plugin_copy_module" -version = "1.2.6" +version = "1.2.7" dependencies = [ "anyhow", "arcstr", @@ -6279,7 +6278,7 @@ dependencies = [ [[package]] name = "rolldown_plugin_data_url" -version = "1.2.6" +version = "1.2.7" dependencies = [ "arcstr", "base64-simd", @@ -6292,7 +6291,7 @@ dependencies = [ [[package]] name = "rolldown_plugin_esm_external_require" -version = "1.2.6" +version = "1.2.7" dependencies = [ "nodejs-built-in-modules", "rolldown_common", @@ -6303,7 +6302,7 @@ dependencies = [ [[package]] name = "rolldown_plugin_hmr" -version = "1.2.6" +version = "1.2.7" dependencies = [ "rolldown_common", "rolldown_plugin", @@ -6311,7 +6310,7 @@ dependencies = [ [[package]] name = "rolldown_plugin_isolated_declaration" -version = "1.2.6" +version = "1.2.7" dependencies = [ "arcstr", "oxc", @@ -6325,7 +6324,7 @@ dependencies = [ [[package]] name = "rolldown_plugin_lazy_compilation" -version = "1.2.6" +version = "1.2.7" dependencies = [ "anyhow", "arcstr", @@ -6338,7 +6337,7 @@ dependencies = [ [[package]] name = "rolldown_plugin_oxc_runtime" -version = "1.2.6" +version = "1.2.7" dependencies = [ "arcstr", "phf 0.14.0", @@ -6349,7 +6348,7 @@ dependencies = [ [[package]] name = "rolldown_plugin_replace" -version = "1.2.6" +version = "1.2.7" dependencies = [ "anyhow", "oxc", @@ -6365,7 +6364,7 @@ dependencies = [ [[package]] name = "rolldown_plugin_utils" -version = "1.2.6" +version = "1.2.7" dependencies = [ "anyhow", "arcstr", @@ -6518,7 +6517,7 @@ dependencies = [ [[package]] name = "rolldown_plugin_vite_resolve" -version = "1.2.6" +version = "1.2.7" dependencies = [ "anyhow", "arcstr", @@ -6572,7 +6571,7 @@ dependencies = [ [[package]] name = "rolldown_resolver" -version = "1.2.6" +version = "1.2.7" dependencies = [ "anyhow", "arcstr", @@ -6587,7 +6586,7 @@ dependencies = [ [[package]] name = "rolldown_sourcemap" -version = "1.2.6" +version = "1.2.7" dependencies = [ "criterion2", "memchr", @@ -6597,7 +6596,7 @@ dependencies = [ [[package]] name = "rolldown_std_utils" -version = "1.2.6" +version = "1.2.7" dependencies = [ "regex", "sugar_path", @@ -6643,7 +6642,7 @@ dependencies = [ [[package]] name = "rolldown_tracing" -version = "1.2.6" +version = "1.2.7" dependencies = [ "tracing", "tracing-chrome", @@ -6659,7 +6658,7 @@ dependencies = [ [[package]] name = "rolldown_utils" -version = "1.2.6" +version = "1.2.7" dependencies = [ "anyhow", "arcstr", @@ -6697,7 +6696,7 @@ dependencies = [ [[package]] name = "rolldown_watcher" -version = "1.2.6" +version = "1.2.7" dependencies = [ "anyhow", "arcstr", @@ -6716,7 +6715,7 @@ dependencies = [ [[package]] name = "rolldown_workspace" -version = "1.2.6" +version = "1.2.7" [[package]] name = "ropey" @@ -7549,7 +7548,7 @@ dependencies = [ [[package]] name = "string_wizard" -version = "1.2.6" +version = "1.2.7" dependencies = [ "insta", "memchr", diff --git a/Cargo.toml b/Cargo.toml index 23be9b2140..31a1c65787 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -319,7 +319,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.147.0", features = [ +oxc = { version = "0.148.0", features = [ "ast_visit", "transformer", "minifier", @@ -331,17 +331,17 @@ oxc = { version = "0.147.0", features = [ "regular_expression", "cfg", ] } -oxc_allocator = { version = "0.147.0", features = ["pool"] } -oxc_ast = "0.147.0" -oxc_ecmascript = "0.147.0" -oxc_parser = "0.147.0" -oxc_span = "0.147.0" -oxc_napi = "0.147.0" -oxc_str = "0.147.0" -oxc_minify_napi = "0.147.0" -oxc_parser_napi = "0.147.0" -oxc_transform_napi = "0.147.0" -oxc_traverse = "0.147.0" +oxc_allocator = { version = "0.148.0", features = ["pool"] } +oxc_ast = "0.148.0" +oxc_ecmascript = "0.148.0" +oxc_parser = "0.148.0" +oxc_span = "0.148.0" +oxc_napi = "0.148.0" +oxc_str = "0.148.0" +oxc_minify_napi = "0.148.0" +oxc_parser_napi = "0.148.0" +oxc_transform_napi = "0.148.0" +oxc_traverse = "0.148.0" # oxc crates in their own repos oxc_index = { version = "5", features = ["rayon", "serde"] } diff --git a/README.md b/README.md index c6ed460310..5c25cbff6e 100644 --- a/README.md +++ b/README.md @@ -207,7 +207,7 @@ Add package-manager overrides so that other packages use the Vite+ versions. Ali ```json "overrides": { "vite": "npm:@voidzero-dev/vite-plus-core@latest", - "vitest": "4.1.11" + "vitest": "5.0.0" } ``` @@ -216,7 +216,7 @@ If you are using `pnpm`, add this to your `pnpm-workspace.yaml`: ```yaml overrides: vite: npm:@voidzero-dev/vite-plus-core@latest - vitest: 4.1.11 + vitest: 5.0.0 ``` Or, if you are using Yarn: @@ -224,7 +224,7 @@ Or, if you are using Yarn: ```json "resolutions": { "vite": "npm:@voidzero-dev/vite-plus-core@latest", - "vitest": "4.1.11" + "vitest": "5.0.0" } ``` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_helper/snapshots/command_helper.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_helper/snapshots/command_helper.md index e0a605250e..8e68562477 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_helper/snapshots/command_helper.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_helper/snapshots/command_helper.md @@ -81,7 +81,6 @@ Options: --env-prefix Prefix for env variables to inject into the bundle (default: TSDOWN_) --on-success Command to run on success --copy Copy files to output dir - --public-dir Alias for --copy, deprecated --tsconfig Set tsconfig path --unbundle Unbundle mode --root Root directory of input files @@ -299,6 +298,7 @@ Commands: dev Run tests in development mode related Run tests related to changed files bench Run benchmarks + doctor Compare configurations to find a faster setup list List matching tests Arguments: @@ -312,15 +312,16 @@ Options: --dir Base directory to scan for the test files --ui Enable UI --open Open UI automatically (default: !process.env.CI) - --api [port] Specify server port. Note if the port is already being used, Vite will automatically try the next available port so this may not be the actual port the server ends up listening on. If true will be set to 51204. Use '--help --api' for more info. + --api [port] Specify server port. Note if the port is already being used, Vite will automatically try the next available port so this may not be the actual port the server ends up listening on. If true will be set to 51204 or 63315 in browser mode. Use '--help --api' for more info. --silent [value] Silent console output from tests. Use 'passed-only' to see logs from failing tests only. --hideSkippedTests Hide logs for skipped tests --reporter Specify reporters (default, agent, minimal, blob, verbose, dot, json, tap, tap-flat, junit, tree, hanging-process, github-actions) --outputFile Write test results to a file when supporter reporter is also specified, use cac's dot notation for individual outputs of multiple reporters (example: --outputFile.tap=./tap.txt) --coverage Enable coverage report. Use '--help --coverage' for more info. - --mode Override Vite mode (default: test or benchmark) + --mode Override Vite mode (default: test) --isolate Run every test file in isolation. To disable isolation, use --no-isolate (default: true) --globals Inject apis globally + --injectCjsGlobals Inject CommonJS variables (module, exports, require, __filename, __dirname) into every test module. To disable, use --no-inject-cjs-globals (default: true) --dom Mock browser API with happy-dom --browser Run tests in the browser. Equivalent to --browser.enabled (default: false). Use '--help --browser' for more info. --pool Specify pool, if not running in the browser (default: forks) @@ -343,29 +344,33 @@ Options: --hookTimeout Default hook timeout in milliseconds (default: 10000). Use 0 to disable timeout completely. --bail Stop test execution when given number of tests have failed (default: 0) --retry Retry the test specific number of times if it fails (default: 0). Use '--help --retry' for more info. + --repeats Repeat every test a specific number of times regardless of the result (default: 0) --diff DiffOptions object or a path to a module which exports DiffOptions object. Use '--help --diff' for more info. --exclude Additional file globs to be excluded from test --expandSnapshotDiff Show full diff when snapshot fails --disableConsoleIntercept Disable automatic interception of console logging (default: false) --typecheck Enable typechecking alongside tests (default: false). Use '--help --typecheck' for more info. - --project The name of the project to run if you are using Vitest workspace feature. This can be repeated for multiple projects: --project=1 --project=2. You can also filter projects using wildcards like --project=packages*, and exclude projects with --project=!pattern. + -p, --project The name of the project to run if you are using Vitest workspace feature. This can be repeated for multiple projects: --project=1 --project=2. You can also filter projects using wildcards like --project=packages*, and exclude projects with --project=!pattern. A project runs if it matches no negated pattern and, when regular patterns are also given, matches at least one of them. --slowTestThreshold Threshold in milliseconds for a test or suite to be considered slow (default: 300) --teardownTimeout Default timeout of a teardown function in milliseconds (default: 10000) --cache Enable cache. Use '--help --cache' for more info. --maxConcurrency Maximum number of concurrent tests and suites during test file execution (default: 5) + --fsModuleCache Cache transformed modules on the file system and reuse them between reruns (default: false) + --fsModuleCachePath Directory where the fsModuleCache is stored (default: node_modules/.vitest-cache) --expect Configuration options for expect() matches. Use '--help --expect' for more info. --printConsoleTrace Always print console stack traces --includeTaskLocation Collect test and suite locations in the location property - --attachmentsDir The directory where attachments from context.annotate are stored in (default: .vitest-attachments) + --attachmentsDir The directory where attachments from context.annotate are stored in (default: .vitest/attachments) --run Disable watch mode --no-color Removes colors from the console output (default: true) --clearScreen Clear terminal screen when re-running tests during watch mode (default: true) --standalone Start Vitest without running tests. Tests will be running only on change. If browser mode is enabled, the UI will be opened automatically. This option is ignored when CLI file filters are passed. (default: false) --mergeReports [path] Path to a blob reports directory. If this options is used, Vitest won't run any tests, it will only report previously recorded tests --listTags [type] List all available tags instead of running tests. --list-tags=json will output tags in JSON format, unless there are no tags. - --clearCache Delete all Vitest caches, including experimental.fsModuleCache, without running any tests. This will reduce the performance in the subsequent test run. + --clearCache Delete all Vitest caches, including the fsModuleCache, without running any tests. This will reduce the performance in the subsequent test run. --tagsFilter Run only tests with the specified tags. You can use logical operators && (and), || (or) and ! (not) to create complex expressions, see https://vitest.dev/guide/test-tags#syntax for more information. --strictTags Should Vitest throw an error if test has a tag that is not defined in the config. (default: true) + --sharedViteServer Let inline projects that don't modify the Vite config reuse the Vite server of the config that declares them. (default: true) --experimental Experimental features.. Use '--help --experimental' for more info. -h, --help Display this message diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_pack/snapshots/command_pack.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_pack/snapshots/command_pack.md index 07a056d5ea..ca48a5dca6 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_pack/snapshots/command_pack.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_pack/snapshots/command_pack.md @@ -45,7 +45,6 @@ Options: --env-prefix Prefix for env variables to inject into the bundle (default: TSDOWN_) --on-success Command to run on success --copy Copy files to output dir - --public-dir Alias for --copy, deprecated --tsconfig Set tsconfig path --unbundle Unbundle mode --root Root directory of input files diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_tool_help/snapshots/command_tool_deep_help_delegation.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_tool_help/snapshots/command_tool_deep_help_delegation.md index 327af269cb..6f3bf09aaa 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_tool_help/snapshots/command_tool_deep_help_delegation.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_tool_help/snapshots/command_tool_deep_help_delegation.md @@ -5,7 +5,7 @@ Help requests with additional arguments delegate to the underlying tool. ## `vp test --help --coverage` ``` -vitest/4.1.11 +vitest/5.0.0 Usage: $ vitest [...filters] @@ -17,6 +17,7 @@ Commands: dev [...filters] bench [...filters] init + doctor [...filters] list [...filters] [...filters] complete [shell] @@ -28,6 +29,7 @@ For more info, run any command with the `--help` flag: $ vitest dev --help $ vitest bench --help $ vitest init --help + $ vitest doctor --help $ vitest list --help $ vitest --help $ vitest complete --help @@ -47,7 +49,7 @@ Options: --coverage.allowExternal Collect coverage of files outside the project root (default: false) --coverage.skipFull Do not show files with 100% statement, branch, and function coverage (default: false) --coverage.thresholds.100 Shortcut to set all coverage thresholds to 100 (default: false) - --coverage.thresholds.perFile Check thresholds per file. See --coverage.thresholds.lines, --coverage.thresholds.functions, --coverage.thresholds.branches and --coverage.thresholds.statements for the actual thresholds (default: false) + --coverage.thresholds.perFile Check thresholds per file. See --coverage.thresholds.lines, --coverage.thresholds.functions, --coverage.thresholds.branches and --coverage.thresholds.statements for the actual thresholds (default: false). Object form is available in config files only. --coverage.thresholds.autoUpdate Update threshold values: "lines", "functions", "branches" and "statements" to configuration file when current coverage is above the configured thresholds (default: false) --coverage.thresholds.lines Threshold for lines. Visit https://github.com/istanbuljs/nyc#coverage-thresholds for more information. This option is not available for custom providers --coverage.thresholds.functions Threshold for functions. Visit https://github.com/istanbuljs/nyc#coverage-thresholds for more information. This option is not available for custom providers @@ -63,4 +65,5 @@ Options: --coverage.changed Collect coverage only for files changed since a specified commit or branch (e.g., origin/main or HEAD~1). Inherits value from --changed by default. --coverage.excludeAfterRemap Apply exclusions again after coverage has been remapped to original sources. (default: false) --coverage.htmlDir Directory of HTML coverage output to be served in UI mode and HTML reporter. + --coverage.autoAttachSubprocess Track coverage of the node:child_process and node:worker_threads spawned during test run. Supported only by v8 provider. (default: false) ``` diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_tool_help/snapshots/command_tool_help.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_tool_help/snapshots/command_tool_help.md index 61d2d9cf43..67e963b5b3 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_tool_help/snapshots/command_tool_help.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/command_tool_help/snapshots/command_tool_help.md @@ -131,6 +131,7 @@ Commands: dev Run tests in development mode related Run tests related to changed files bench Run benchmarks + doctor Compare configurations to find a faster setup list List matching tests Arguments: @@ -144,15 +145,16 @@ Options: --dir Base directory to scan for the test files --ui Enable UI --open Open UI automatically (default: !process.env.CI) - --api [port] Specify server port. Note if the port is already being used, Vite will automatically try the next available port so this may not be the actual port the server ends up listening on. If true will be set to 51204. Use '--help --api' for more info. + --api [port] Specify server port. Note if the port is already being used, Vite will automatically try the next available port so this may not be the actual port the server ends up listening on. If true will be set to 51204 or 63315 in browser mode. Use '--help --api' for more info. --silent [value] Silent console output from tests. Use 'passed-only' to see logs from failing tests only. --hideSkippedTests Hide logs for skipped tests --reporter Specify reporters (default, agent, minimal, blob, verbose, dot, json, tap, tap-flat, junit, tree, hanging-process, github-actions) --outputFile Write test results to a file when supporter reporter is also specified, use cac's dot notation for individual outputs of multiple reporters (example: --outputFile.tap=./tap.txt) --coverage Enable coverage report. Use '--help --coverage' for more info. - --mode Override Vite mode (default: test or benchmark) + --mode Override Vite mode (default: test) --isolate Run every test file in isolation. To disable isolation, use --no-isolate (default: true) --globals Inject apis globally + --injectCjsGlobals Inject CommonJS variables (module, exports, require, __filename, __dirname) into every test module. To disable, use --no-inject-cjs-globals (default: true) --dom Mock browser API with happy-dom --browser Run tests in the browser. Equivalent to --browser.enabled (default: false). Use '--help --browser' for more info. --pool Specify pool, if not running in the browser (default: forks) @@ -175,29 +177,33 @@ Options: --hookTimeout Default hook timeout in milliseconds (default: 10000). Use 0 to disable timeout completely. --bail Stop test execution when given number of tests have failed (default: 0) --retry Retry the test specific number of times if it fails (default: 0). Use '--help --retry' for more info. + --repeats Repeat every test a specific number of times regardless of the result (default: 0) --diff DiffOptions object or a path to a module which exports DiffOptions object. Use '--help --diff' for more info. --exclude Additional file globs to be excluded from test --expandSnapshotDiff Show full diff when snapshot fails --disableConsoleIntercept Disable automatic interception of console logging (default: false) --typecheck Enable typechecking alongside tests (default: false). Use '--help --typecheck' for more info. - --project The name of the project to run if you are using Vitest workspace feature. This can be repeated for multiple projects: --project=1 --project=2. You can also filter projects using wildcards like --project=packages*, and exclude projects with --project=!pattern. + -p, --project The name of the project to run if you are using Vitest workspace feature. This can be repeated for multiple projects: --project=1 --project=2. You can also filter projects using wildcards like --project=packages*, and exclude projects with --project=!pattern. A project runs if it matches no negated pattern and, when regular patterns are also given, matches at least one of them. --slowTestThreshold Threshold in milliseconds for a test or suite to be considered slow (default: 300) --teardownTimeout Default timeout of a teardown function in milliseconds (default: 10000) --cache Enable cache. Use '--help --cache' for more info. --maxConcurrency Maximum number of concurrent tests and suites during test file execution (default: 5) + --fsModuleCache Cache transformed modules on the file system and reuse them between reruns (default: false) + --fsModuleCachePath Directory where the fsModuleCache is stored (default: node_modules/.vitest-cache) --expect Configuration options for expect() matches. Use '--help --expect' for more info. --printConsoleTrace Always print console stack traces --includeTaskLocation Collect test and suite locations in the location property - --attachmentsDir The directory where attachments from context.annotate are stored in (default: .vitest-attachments) + --attachmentsDir The directory where attachments from context.annotate are stored in (default: .vitest/attachments) --run Disable watch mode --no-color Removes colors from the console output (default: true) --clearScreen Clear terminal screen when re-running tests during watch mode (default: true) --standalone Start Vitest without running tests. Tests will be running only on change. If browser mode is enabled, the UI will be opened automatically. This option is ignored when CLI file filters are passed. (default: false) --mergeReports [path] Path to a blob reports directory. If this options is used, Vitest won't run any tests, it will only report previously recorded tests --listTags [type] List all available tags instead of running tests. --list-tags=json will output tags in JSON format, unless there are no tags. - --clearCache Delete all Vitest caches, including experimental.fsModuleCache, without running any tests. This will reduce the performance in the subsequent test run. + --clearCache Delete all Vitest caches, including the fsModuleCache, without running any tests. This will reduce the performance in the subsequent test run. --tagsFilter Run only tests with the specified tags. You can use logical operators && (and), || (or) and ! (not) to create complex expressions, see https://vitest.dev/guide/test-tags#syntax for more information. --strictTags Should Vitest throw an error if test has a tag that is not defined in the config. (default: true) + --sharedViteServer Let inline projects that don't modify the Vite config reuse the Vite server of the config that declares them. (default: true) --experimental Experimental features.. Use '--help --experimental' for more info. -h, --help Display this message @@ -262,7 +268,6 @@ Options: --env-prefix Prefix for env variables to inject into the bundle (default: TSDOWN_) --on-success Command to run on success --copy Copy files to output dir - --public-dir Alias for --copy, deprecated --tsconfig Set tsconfig path --unbundle Unbundle mode --root Root directory of input files diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/global_cli_fallback/snapshots/global_cli_fallback.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/global_cli_fallback/snapshots/global_cli_fallback.md index 2568aa1dcd..e349010458 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/global_cli_fallback/snapshots/global_cli_fallback.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/global_cli_fallback/snapshots/global_cli_fallback.md @@ -101,6 +101,7 @@ Commands: dev Run tests in development mode related Run tests related to changed files bench Run benchmarks + doctor Compare configurations to find a faster setup list List matching tests Arguments: @@ -114,15 +115,16 @@ Options: --dir Base directory to scan for the test files --ui Enable UI --open Open UI automatically (default: !process.env.CI) - --api [port] Specify server port. Note if the port is already being used, Vite will automatically try the next available port so this may not be the actual port the server ends up listening on. If true will be set to 51204. Use '--help --api' for more info. + --api [port] Specify server port. Note if the port is already being used, Vite will automatically try the next available port so this may not be the actual port the server ends up listening on. If true will be set to 51204 or 63315 in browser mode. Use '--help --api' for more info. --silent [value] Silent console output from tests. Use 'passed-only' to see logs from failing tests only. --hideSkippedTests Hide logs for skipped tests --reporter Specify reporters (default, agent, minimal, blob, verbose, dot, json, tap, tap-flat, junit, tree, hanging-process, github-actions) --outputFile Write test results to a file when supporter reporter is also specified, use cac's dot notation for individual outputs of multiple reporters (example: --outputFile.tap=./tap.txt) --coverage Enable coverage report. Use '--help --coverage' for more info. - --mode Override Vite mode (default: test or benchmark) + --mode Override Vite mode (default: test) --isolate Run every test file in isolation. To disable isolation, use --no-isolate (default: true) --globals Inject apis globally + --injectCjsGlobals Inject CommonJS variables (module, exports, require, __filename, __dirname) into every test module. To disable, use --no-inject-cjs-globals (default: true) --dom Mock browser API with happy-dom --browser Run tests in the browser. Equivalent to --browser.enabled (default: false). Use '--help --browser' for more info. --pool Specify pool, if not running in the browser (default: forks) @@ -145,29 +147,33 @@ Options: --hookTimeout Default hook timeout in milliseconds (default: 10000). Use 0 to disable timeout completely. --bail Stop test execution when given number of tests have failed (default: 0) --retry Retry the test specific number of times if it fails (default: 0). Use '--help --retry' for more info. + --repeats Repeat every test a specific number of times regardless of the result (default: 0) --diff DiffOptions object or a path to a module which exports DiffOptions object. Use '--help --diff' for more info. --exclude Additional file globs to be excluded from test --expandSnapshotDiff Show full diff when snapshot fails --disableConsoleIntercept Disable automatic interception of console logging (default: false) --typecheck Enable typechecking alongside tests (default: false). Use '--help --typecheck' for more info. - --project The name of the project to run if you are using Vitest workspace feature. This can be repeated for multiple projects: --project=1 --project=2. You can also filter projects using wildcards like --project=packages*, and exclude projects with --project=!pattern. + -p, --project The name of the project to run if you are using Vitest workspace feature. This can be repeated for multiple projects: --project=1 --project=2. You can also filter projects using wildcards like --project=packages*, and exclude projects with --project=!pattern. A project runs if it matches no negated pattern and, when regular patterns are also given, matches at least one of them. --slowTestThreshold Threshold in milliseconds for a test or suite to be considered slow (default: 300) --teardownTimeout Default timeout of a teardown function in milliseconds (default: 10000) --cache Enable cache. Use '--help --cache' for more info. --maxConcurrency Maximum number of concurrent tests and suites during test file execution (default: 5) + --fsModuleCache Cache transformed modules on the file system and reuse them between reruns (default: false) + --fsModuleCachePath Directory where the fsModuleCache is stored (default: node_modules/.vitest-cache) --expect Configuration options for expect() matches. Use '--help --expect' for more info. --printConsoleTrace Always print console stack traces --includeTaskLocation Collect test and suite locations in the location property - --attachmentsDir The directory where attachments from context.annotate are stored in (default: .vitest-attachments) + --attachmentsDir The directory where attachments from context.annotate are stored in (default: .vitest/attachments) --run Disable watch mode --no-color Removes colors from the console output (default: true) --clearScreen Clear terminal screen when re-running tests during watch mode (default: true) --standalone Start Vitest without running tests. Tests will be running only on change. If browser mode is enabled, the UI will be opened automatically. This option is ignored when CLI file filters are passed. (default: false) --mergeReports [path] Path to a blob reports directory. If this options is used, Vitest won't run any tests, it will only report previously recorded tests --listTags [type] List all available tags instead of running tests. --list-tags=json will output tags in JSON format, unless there are no tags. - --clearCache Delete all Vitest caches, including experimental.fsModuleCache, without running any tests. This will reduce the performance in the subsequent test run. + --clearCache Delete all Vitest caches, including the fsModuleCache, without running any tests. This will reduce the performance in the subsequent test run. --tagsFilter Run only tests with the specified tags. You can use logical operators && (and), || (or) and ! (not) to create complex expressions, see https://vitest.dev/guide/test-tags#syntax for more information. --strictTags Should Vitest throw an error if test has a tag that is not defined in the config. (default: true) + --sharedViteServer Let inline projects that don't modify the Vite config reuse the Vite server of the config that declares them. (default: true) --experimental Experimental features.. Use '--help --experimental' for more info. -h, --help Display this message diff --git a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/test_inline_snapshot_indent/snapshots/test_inline_snapshot_indent.md b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/test_inline_snapshot_indent/snapshots/test_inline_snapshot_indent.md index 871bcffef7..848f6cdfba 100644 --- a/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/test_inline_snapshot_indent/snapshots/test_inline_snapshot_indent.md +++ b/crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/test_inline_snapshot_indent/snapshots/test_inline_snapshot_indent.md @@ -16,7 +16,7 @@ write inline snapshot via --update (regression test for #1553) Test Files 1 passed (1) Tests 1 passed (1) Start at