diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 866ebbae33c0a2..fa23a3598ff9ce 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -67,9 +67,9 @@ jobs: include: # Active LTS + other OS - os: macos-latest - node_version: 22 + node_version: 24 - os: windows-latest - node_version: 22 + node_version: 24 fail-fast: false name: "Build&Test: node-${{ matrix.node_version }}, ${{ matrix.os }}" @@ -146,17 +146,17 @@ jobs: lint: timeout-minutes: 10 runs-on: ubuntu-latest - name: "Lint: node-22, ubuntu-latest" + name: "Lint: node-24, ubuntu-latest" steps: - uses: actions/checkout@v5 - name: Install pnpm uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 - - name: Set node version to 22 + - name: Set node version to 24 uses: actions/setup-node@v6 with: - node-version: 22 + node-version: 24 cache: "pnpm" - name: Install deps diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml index e0b6b1a9aa4047..d9f166fdf33744 100644 --- a/.github/workflows/copilot-setup-steps.yml +++ b/.github/workflows/copilot-setup-steps.yml @@ -19,10 +19,10 @@ jobs: - name: Install pnpm uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 - - name: Set node version to 22 + - name: Set node version to 24 uses: actions/setup-node@v6 with: - node-version: 22 + node-version: 24 cache: "pnpm" - name: Install deps diff --git a/.github/workflows/ecosystem-ci-trigger.yml b/.github/workflows/ecosystem-ci-trigger.yml index c2121a5e6b8f60..55039d640cceba 100644 --- a/.github/workflows/ecosystem-ci-trigger.yml +++ b/.github/workflows/ecosystem-ci-trigger.yml @@ -12,7 +12,6 @@ jobs: issues: write # to add / delete reactions, post comments pull-requests: write # to read PR data, and to add labels actions: read # to check workflow status - contents: read # to clone the repo steps: - name: Check User Permissions uses: actions/github-script@v8 @@ -230,12 +229,6 @@ jobs: console.log('Removed "rocket" reaction.') } - - name: Checkout - uses: actions/checkout@v5 - with: - ref: refs/pull/${{ fromJSON(steps.get-pr-data.outputs.result).num }}/head - fetch-depth: 0 - - name: Trigger Downstream Workflow uses: actions/github-script@v8 id: trigger diff --git a/.github/workflows/preview-release.yml b/.github/workflows/preview-release.yml index 73d98bdd07e9c9..6e233d4930e9f7 100644 --- a/.github/workflows/preview-release.yml +++ b/.github/workflows/preview-release.yml @@ -28,10 +28,10 @@ jobs: - name: Install pnpm uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 - - name: Set node version to 22 + - name: Set node version to 24 uses: actions/setup-node@v6 with: - node-version: 22 + node-version: 24 registry-url: https://registry.npmjs.org/ # disable cache, to avoid cache poisoning (https://docs.zizmor.sh/audits/#cache-poisoning) package-manager-cache: false diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 8f38eb88b1f17d..a7b091bfac0a5f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -23,10 +23,10 @@ jobs: - name: Install pnpm uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 - - name: Set node version to 22 + - name: Set node version to 24 uses: actions/setup-node@v6 with: - node-version: 22 + node-version: 24 registry-url: https://registry.npmjs.org/ # disable cache, to avoid cache poisoning (https://docs.zizmor.sh/audits/#cache-poisoning) package-manager-cache: false diff --git a/netlify.toml b/netlify.toml index d441c303dfb26d..5245ce766e8f31 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,5 +1,5 @@ [build.environment] - NODE_VERSION = "22" + NODE_VERSION = "24" # don't need playwright for docs build PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD = "1" [build] diff --git a/packages/vite/CHANGELOG.md b/packages/vite/CHANGELOG.md index 6d86a7cdacfc9e..c9c120fc977fb5 100644 --- a/packages/vite/CHANGELOG.md +++ b/packages/vite/CHANGELOG.md @@ -1,3 +1,17 @@ +## [7.2.0-beta.1](https://github.com/vitejs/vite/compare/v7.2.0-beta.0...v7.2.0-beta.1) (2025-10-29) +### Bug Fixes + +* increase stream reset rate limit for HTTP2 ([#21024](https://github.com/vitejs/vite/issues/21024)) ([4f44f22](https://github.com/vitejs/vite/commit/4f44f22f7f4595d74c76778bd522387138775055)) +* **optimizer:** externalize virtual modules for html like files ([#21001](https://github.com/vitejs/vite/issues/21001)) ([e5af352](https://github.com/vitejs/vite/commit/e5af352d8e1a9f187159137f836db5bedbd68a66)) + +### Documentation + +* clarify the values are escaped automatically ([#21017](https://github.com/vitejs/vite/issues/21017)) ([246df13](https://github.com/vitejs/vite/commit/246df134dd58441e1e40dd361cf42419d05ea7a5)) + +### Code Refactoring + +* use `fs.cpSync` ([#21019](https://github.com/vitejs/vite/issues/21019)) ([a2df778](https://github.com/vitejs/vite/commit/a2df77812814b927880bc4d68aafa8c8fa47daf0)) + ## [7.2.0-beta.0](https://github.com/vitejs/vite/compare/v7.1.11...v7.2.0-beta.0) (2025-10-28) ### Features diff --git a/packages/vite/package.json b/packages/vite/package.json index fc9686c5292774..91de5288ac2c90 100644 --- a/packages/vite/package.json +++ b/packages/vite/package.json @@ -1,6 +1,6 @@ { "name": "vite", - "version": "7.2.0-beta.0", + "version": "7.2.0-beta.1", "type": "module", "license": "MIT", "author": "Evan You", diff --git a/packages/vite/src/node/http.ts b/packages/vite/src/node/http.ts index 30e5d73b12e247..d5d45447fa54ea 100644 --- a/packages/vite/src/node/http.ts +++ b/packages/vite/src/node/http.ts @@ -129,6 +129,10 @@ export async function resolveHttpServer( // Manually increase the session memory to prevent 502 ENHANCE_YOUR_CALM // errors on large numbers of requests maxSessionMemory: 1000, + // Increase the stream reset rate limit to prevent net::ERR_HTTP2_PROTOCOL_ERROR + // errors on large numbers of requests + streamResetBurst: 100000, + streamResetRate: 33, ...httpsOptions, allowHTTP1: true, }, diff --git a/packages/vite/src/node/optimizer/scan.ts b/packages/vite/src/node/optimizer/scan.ts index 28ccd55ca34feb..02d7e94b4a228e 100644 --- a/packages/vite/src/node/optimizer/scan.ts +++ b/packages/vite/src/node/optimizer/scan.ts @@ -502,6 +502,9 @@ function esbuildScanPlugin( isOptimizable(resolved, optimizeDepsOptions) ) return + if (shouldExternalizeDep(resolved, path)) { + return externalUnlessEntry({ path }) + } return { path: resolved, namespace: 'html', diff --git a/playground/optimize-deps/__tests__/optimize-deps.spec.ts b/playground/optimize-deps/__tests__/optimize-deps.spec.ts index ccbd6883d33586..96b5790f9fa2c7 100644 --- a/playground/optimize-deps/__tests__/optimize-deps.spec.ts +++ b/playground/optimize-deps/__tests__/optimize-deps.spec.ts @@ -354,3 +354,20 @@ test('dependency with external sub-dependencies', async () => { .poll(() => page.textContent('.dep-cjs-with-external-deps-node-builtin')) .toBe('foo bar') }) + +test('virtual module with .vue extension does not error during scan', async () => { + await expect.poll(() => page.textContent('.virtual-module-vue')).toBe('ok') +}) + +test.runIf(isServe)( + 'no dep scan error for virtual modules with html-like extensions', + () => { + // Check that there are no errors related to virtual modules during dep scan + const scanErrors = serverLogs.filter( + (log) => + log.includes('Failed to scan for dependencies') && + log.includes('virtual:'), + ) + expect(scanErrors).toHaveLength(0) + }, +) diff --git a/playground/optimize-deps/index.html b/playground/optimize-deps/index.html index b8797b218497bf..d74be1489bf5d5 100644 --- a/playground/optimize-deps/index.html +++ b/playground/optimize-deps/index.html @@ -373,3 +373,16 @@