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
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.10"
"vitest": "4.1.11"
}
```

Expand All @@ -216,15 +216,15 @@ 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.10
vitest: 4.1.11
```

Or, if you are using Yarn:

```json
"resolutions": {
"vite": "npm:@voidzero-dev/vite-plus-core@latest",
"vitest": "4.1.10"
"vitest": "4.1.11"
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Help requests with additional arguments delegate to the underlying tool.
## `vp test --help --coverage`

```
vitest/4.1.10
vitest/4.1.11

Usage:
$ vitest [...filters]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@ VITE+ - The Unified Toolchain for the Web
◇ Updated . to Vite+ <version>
• Node <version> pnpm <version>
• Dependencies:
vite-plus latest → <version>
vite → <version>
vite-plus latest → <version>
vite → <version>
vitest 4.1.10 → <version>
@vitest/browser-playwright 4.1.10 → <version>
@vitest/coverage-v8 4.1.10 → <version>
• Package manager settings configured
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,18 @@ export default defineConfig({
"typescript/triple-slash-reference": "error",
"react/rules-of-hooks": "error",
"react/exhaustive-deps": "warn",
"react/static-components": "error",
"react/use-memo": "error",
"react/preserve-manual-memoization": "error",
"react/incompatible-library": "warn",
"react/immutability": "error",
"react/globals": "error",
"react/refs": "error",
"react/set-state-in-effect": "error",
"react/error-boundaries": "error",
"react/purity": "error",
"react/set-state-in-render": "error",
"react/unsupported-syntax": "warn",
"react/only-export-components": [
"error",
{
Expand Down
10 changes: 10 additions & 0 deletions crates/vp_cli_snapshots/tests/cli_snapshots/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -744,6 +744,16 @@ fn baseline_env(case_home: &CaseHome, install: &CaseInstall) -> BTreeMap<String,
// this via `unset-env`.
env.insert("VP_SKIP_INSTALL".into(), "1".into());
env.insert("NPM_CONFIG_PREFIX".into(), case_home.npm_prefix().into_os_string());
// pnpm >= 11 defaults `minimumReleaseAge` to 24 hours. Real-install fixtures
// pull the just-published Vite+ toolchain (oxlint, oxfmt, vitest, the oxc
// family), so on the day of an upstream bump pnpm quarantines them and
// records exact-version `minimumReleaseAgeExclude` entries in the generated
// `pnpm-workspace.yaml` — output that churns with the publish calendar
// rather than with vp behaviour. Opt out so snapshots stay deterministic
// whatever the age of the bundled versions. pnpm >= 10.6 only reads the
// PNPM_CONFIG_* spelling; older pnpm reads the lowercase form.
env.insert("PNPM_CONFIG_MINIMUM_RELEASE_AGE".into(), "0".into());
env.insert("pnpm_config_minimum_release_age".into(), "0".into());
for (key, value) in [
("GIT_AUTHOR_NAME", "vite-plus-test"),
("GIT_AUTHOR_EMAIL", "test@vite-plus.invalid"),
Expand Down
6 changes: 3 additions & 3 deletions docs/guide/migrate.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ You need to add overrides to your package manager so that other packages resolve
```json
"overrides": {
"vite": "npm:@voidzero-dev/vite-plus-core@latest",
"vitest": "4.1.10"
"vitest": "4.1.11"
}
```

Expand All @@ -94,15 +94,15 @@ 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.10
vitest: 4.1.11
```

Or, if you are using Yarn:

```json
"resolutions": {
"vite": "npm:@voidzero-dev/vite-plus-core@latest",
"vitest": "4.1.10"
"vitest": "4.1.11"
}
```

Expand Down
65 changes: 63 additions & 2 deletions ecosystem-ci/patch-project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,73 @@ if (project === 'vinext') {
// headroom so the ecosystem run isn't flaky.
const viteConfigPath = join(repoRoot, 'vite.config.ts');
const viteConfig = await readFile(viteConfigPath, 'utf-8');
const patchedConfig = viteConfig.replace('testTimeout: 30000', 'testTimeout: 60000');
if (patchedConfig === viteConfig) {
const testTimeout = 'testTimeout: 30000';
const reactRulesAnchor = '"react/rules-of-hooks": "error",';
if (!viteConfig.includes(testTimeout)) {
throw new Error(`vinext patch: \`testTimeout: 30000\` not found in ${viteConfigPath}`);
}
if (!viteConfig.includes(reactRulesAnchor)) {
throw new Error(`vinext patch: React lint rules not found in ${viteConfigPath}`);
}
// Oxlint 1.79 enables split React Compiler rules by default. Keep the new
// diagnostics opt-in for this pinned ecosystem fixture.
const patchedConfig = viteConfig
.replace(testTimeout, 'testTimeout: 60000')
.replace(
reactRulesAnchor,
[
reactRulesAnchor,
' "react/globals": "off",',
' "react/refs": "off",',
' "react/set-state-in-effect": "off",',
].join('\n'),
);
await writeFile(viteConfigPath, patchedConfig, 'utf-8');

// Oxlint 1.79 runs no-redeclare in ES modules. The declarations intentionally
// use TypeScript interface/class merging, so extend their existing disables.
const documentPath = join(repoRoot, 'packages/vinext/src/shims/document.tsx');
const document = await readFile(documentPath, 'utf-8');
const declarationMergeDisable =
'// oxlint-disable-next-line typescript/consistent-type-definitions, typescript/no-unsafe-declaration-merging';
if (document.split(declarationMergeDisable).length !== 3) {
throw new Error(`vinext patch: declaration merge directives not found in ${documentPath}`);
}
const patchedDocument = document.replaceAll(
declarationMergeDisable,
'// oxlint-disable-next-line eslint/no-redeclare, typescript/consistent-type-definitions, typescript/no-unsafe-declaration-merging',
);
await writeFile(documentPath, patchedDocument, 'utf-8');

// Oxlint 1.79 reports bare underscore parameters. Give this intentionally
// unused parameter a descriptive underscore-prefixed name.
const appRscHandlerTestPath = join(repoRoot, 'tests/app-rsc-handler.test.ts');
const appRscHandlerTest = await readFile(appRscHandlerTestPath, 'utf-8');
const unusedMiddlewareParameter = '(_: { nextUrl: URL })';
const patchedAppRscHandlerTest = appRscHandlerTest.replace(
unusedMiddlewareParameter,
'(_request: { nextUrl: URL })',
);
if (patchedAppRscHandlerTest === appRscHandlerTest) {
throw new Error(
`vinext patch: unused middleware parameter not found in ${appRscHandlerTestPath}`,
);
}
await writeFile(appRscHandlerTestPath, patchedAppRscHandlerTest, 'utf-8');

// Oxlint 1.79 checks comments for irregular whitespace. Escape the glob
// separator instead of retaining its invisible zero-width character.
const trailingSlashTestPath = join(repoRoot, 'tests/app-route-handler-trailing-slash.test.ts');
const trailingSlashTest = await readFile(trailingSlashTestPath, 'utf-8');
const patchedTrailingSlashTest = trailingSlashTest.replace(
'app/**\u200b/route.ts',
'app/**\\/route.ts',
);
if (patchedTrailingSlashTest === trailingSlashTest) {
throw new Error(`vinext patch: zero-width separator not found in ${trailingSlashTestPath}`);
}
await writeFile(trailingSlashTestPath, patchedTrailingSlashTest, 'utf-8');

// oxlint 1.77 applies `.gitignore` to explicitly passed paths too
// (oxc-project/oxc#25133). vinext's prefer-shared-utils rule test symlinks a
// temp fixture directory into the repo and lints those files by path, and
Expand Down
6 changes: 3 additions & 3 deletions packages/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,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.10"
"vitest": "4.1.11"
}
```

Expand All @@ -210,15 +210,15 @@ 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.10
vitest: 4.1.11
```

Or, if you are using Yarn:

```json
"resolutions": {
"vite": "npm:@voidzero-dev/vite-plus-core@latest",
"vitest": "4.1.10"
"vitest": "4.1.11"
}
```

Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/migration/migrator/catalog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -990,7 +990,7 @@ function rewriteYamlCatalogAtPath(
removeYamlMapVitestEntry(catalog);
}
for (const [key, value] of Object.entries(managed)) {
// ERR_PNPM_CATALOG_IN_OVERRIDES Could not resolve a catalog in the overrides: The entry for 'vite' in catalog 'default' declares a dependency using the 'file' protocol
// ERR_PNPM_CATALOG_IN_OVERRIDES Could not resolve a catalog in the overrides: The entry for 'vite' in catalog 'default' declares a dependency using the 'file' protocol
// ignore setting catalog if value starts with 'file:'
if (value.startsWith('file:') || (!addMissing && !catalog.has(key))) {
continue;
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/migration/migrator/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ const NODE_VERSION_FILE_NVMRC_RE = /(node-version-file:[ \t]*)(['"]?)(\.\/)?\.nv
* Collect GitHub Actions YAML files that may carry a `node-version-file:`
* reference: top-level workflows (`.github/workflows/*.{yml,yaml}`, which GitHub
* runs only when flat in that directory) and composite action definitions
* (`.github/actions/**/action.{yml,yaml}`, which may nest at any depth). Returns
* (`.github/actions/**\/action.{yml,yaml}`, which may nest at any depth). Returns
* absolute paths; a missing `.github` tree just yields an empty list. `nocase`
* keeps the match case-insensitive on case-sensitive filesystems.
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const VITE_CONFIG_FILES = [
'vite.config.cts',
] as const;

export const VITEST_VERSION = '4.1.10';
export const VITEST_VERSION = '4.1.11';

export const VITE_PLUS_OVERRIDE_PACKAGES: Record<string, string> = process.env.VP_OVERRIDE_PACKAGES
? JSON.parse(process.env.VP_OVERRIDE_PACKAGES)
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
"@oxc-node/cli": "catalog:",
"@tsdown/css": "catalog:",
"@tsdown/exe": "catalog:",
"@vitejs/devtools": "^0.4.12",
"@vitejs/devtools": "^0.5.0",
"es-module-lexer": "^1.7.0",
"hookable": "^6.0.1",
"magic-string": "^0.30.21",
Expand Down
Loading
Loading