Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: catch error in full reload handler #18713

Merged

Conversation

sapphi-red
Copy link
Member

Description

deps reload test in environment-react-ssr playground was flaky on my machine. This PR fixes that.

7020160

I improved the stacktrace for invoke error (this was the error happening).

The stacktrace before was:

Error: There is a new version of the pre-bundle for "C:/dummy/vite/playground-temp/environment-react-ssr/node_modules/.vite/deps_ssr/react-fake-server.js?v=d75a9ccb", a page reload is going to ask for it.
    at throwOutdatedRequest (file:///C:/dummy/vite/packages/vite/dist/node/chunks/dep-BOBR3ooh.js:16951:15)
    at LoadPluginContext.load (file:///C:/dummy/vite/packages/vite/dist/node/chunks/dep-BOBR3ooh.js:16925:15)
    at EnvironmentPluginContainer.load (file:///C:/dummy/vite/packages/vite/dist/node/chunks/dep-BOBR3ooh.js:44606:22)
    at loadAndTransform (file:///C:/dummy/vite/packages/vite/dist/node/chunks/dep-BOBR3ooh.js:38314:22)
    at fetchModule (file:///C:/dummy/vite/packages/vite/dist/node/chunks/dep-BOBR3ooh.js:48813:16)
    at handleInvoke (file:///C:/dummy/vite/packages/vite/dist/node/chunks/dep-BOBR3ooh.js:41489:22)
    at EventEmitter.listenerForInvokeHandler (file:///C:/dummy/vite/packages/vite/dist/node/chunks/dep-BOBR3ooh.js:41562:19) {
  code: 'ERR_OUTDATED_OPTIMIZED_DEP'
}

This only includes the stacktrace on the Vite server side.

I changed the reviveInvokeError function to include the stacktrace on the module runner side first.

Error: There is a new version of the pre-bundle for "C:/dummy/vite/playground-temp/environment-react-ssr/node_modules/.vite/deps_ssr/react-fake-server.js?v=46c7e018", a page reload is going to ask for it.
    at reviveInvokeError (file:///C:/dummy/vite/packages/vite/dist/node/module-runner.js:543:24)
    at EventEmitter.onMessage (file:///C:/dummy/vite/packages/vite/dist/node/module-runner.js:585:34)
    at EventEmitter.emit (node:events:518:28)
    at Object.send (file:///C:/dummy/vite/packages/vite/dist/node/chunks/dep-BOBR3ooh.js:42140:22)
    at Object.send (file:///C:/dummy/vite/packages/vite/dist/node/chunks/dep-BOBR3ooh.js:41585:23)
    at Object.send (file:///C:/dummy/vite/packages/vite/dist/node/chunks/dep-BOBR3ooh.js:28057:23)
    at EventEmitter.listenerForInvokeHandler (file:///C:/dummy/vite/packages/vite/dist/node/chunks/dep-BOBR3ooh.js:41556:16) {
  code: 'ERR_OUTDATED_OPTIMIZED_DEP',
  [cause]: Error: There is a new version of the pre-bundle for "C:/dummy/vite/playground-temp/environment-react-ssr/node_modules/.vite/deps_ssr/react-fake-server.js?v=46c7e018", a page reload is going to ask for it.
      at throwOutdatedRequest (file:///C:/dummy/vite/packages/vite/dist/node/chunks/dep-BOBR3ooh.js:16951:15)
      at LoadPluginContext.load (file:///C:/dummy/vite/packages/vite/dist/node/chunks/dep-BOBR3ooh.js:16925:15)
      at EnvironmentPluginContainer.load (file:///C:/dummy/vite/packages/vite/dist/node/chunks/dep-BOBR3ooh.js:44606:22)
      at loadAndTransform (file:///C:/dummy/vite/packages/vite/dist/node/chunks/dep-BOBR3ooh.js:38314:22)
      at fetchModule (file:///C:/dummy/vite/packages/vite/dist/node/chunks/dep-BOBR3ooh.js:48813:16)
      at handleInvoke (file:///C:/dummy/vite/packages/vite/dist/node/chunks/dep-BOBR3ooh.js:41489:22)
      at EventEmitter.listenerForInvokeHandler (file:///C:/dummy/vite/packages/vite/dist/node/chunks/dep-BOBR3ooh.js:41562:19)
}

Now the stacktrace on the module runner side is included. But the stacktrace does not point where the invoke call happened. I put the propeties on the root error so that the consumer can do things like if (e.code === 'something').

So I moved the reviveInvokeError(e) call to await promise from promise.reject.

Error: There is a new version of the pre-bundle for "C:/dummy/vite/playground-temp/environment-react-ssr/node_modules/.vite/deps_ssr/react-fake-server.js?v=de90e1b1", a page reload is going to ask for it.
    at reviveInvokeError (file:///C:/dummy/vite/packages/vite/dist/node/module-runner.js:543:24)
    at Object.invoke (file:///C:/dummy/vite/packages/vite/dist/node/module-runner.js:627:15)
    at ModuleRunner.getModuleInformation (file:///C:/dummy/vite/packages/vite/dist/node/module-runner.js:1170:73)
    at request (file:///C:/dummy/vite/packages/vite/dist/node/module-runner.js:1192:88)
    at eval (C:/dummy/vite/playground-temp/environment-react-ssr/src/entry-server.tsx:4:31)
    at ESModulesEvaluator.runInlinedModule (file:///C:/dummy/vite/packages/vite/dist/node/module-runner.js:1269:5)
    at ModuleRunner.directRequest (file:///C:/dummy/vite/packages/vite/dist/node/module-runner.js:1249:61) {
  code: 'ERR_OUTDATED_OPTIMIZED_DEP',
  [cause]: Error: There is a new version of the pre-bundle for "C:/dummy/vite/playground-temp/environment-react-ssr/node_modules/.vite/deps_ssr/react-fake-server.js?v=de90e1b1", a page reload is going to ask for it.
      at throwOutdatedRequest (file:///C:/dummy/vite/packages/vite/dist/node/chunks/dep-BOBR3ooh.js:16951:15)
      at LoadPluginContext.load (file:///C:/dummy/vite/packages/vite/dist/node/chunks/dep-BOBR3ooh.js:16925:15)
      at EnvironmentPluginContainer.load (file:///C:/dummy/vite/packages/vite/dist/node/chunks/dep-BOBR3ooh.js:44606:22)
      at loadAndTransform (file:///C:/dummy/vite/packages/vite/dist/node/chunks/dep-BOBR3ooh.js:38314:22)
      at fetchModule (file:///C:/dummy/vite/packages/vite/dist/node/chunks/dep-BOBR3ooh.js:48813:16)
      at handleInvoke (file:///C:/dummy/vite/packages/vite/dist/node/chunks/dep-BOBR3ooh.js:41489:22)
      at EventEmitter.listenerForInvokeHandler (file:///C:/dummy/vite/packages/vite/dist/node/chunks/dep-BOBR3ooh.js:41562:19)
}

Now the stacktrace shows where the invoke was called.

7be26b7

Unhandled rejection error was happening because the rejection of this await import was not handled. Maybe this error should be sent to the Vite server side so that frameworks can handle it? For now, I think we can go with this as this at least shows the error and avoids the unhandled rejection.
This handler is called by

environment.hot.send({
type: 'full-reload',
path: '*',
})

2878943

This commit and the previous commit fixes the flaky fail in the environment-react-ssr playground. ERR_OUTDATED_OPTIMIZED_DEP error was thrown sometimes and the test failed in that case. I made it to retry in that case.
Currently, it seems the framework needs to call runner.clearCache() but maybe that should be called automatically.

e434900

Simply replaced .replace(/\x1B\[\d+m/g, '') with util.stripVTControlCharacters.

@sapphi-red sapphi-red added feat: hmr p3-minor-bug An edge case that only affects very specific usage (priority) feat: ssr feat: deps optimizer Esbuild Dependencies Optimization feat: environment API Vite Environment API labels Nov 20, 2024
sapphi-red added a commit to rolldown/vite that referenced this pull request Nov 20, 2024
Copy link
Collaborator

@hi-ogawa hi-ogawa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@patak-dev patak-dev merged commit a10e741 into vitejs:main Nov 21, 2024
15 checks passed
@sapphi-red sapphi-red deleted the fix/catch-error-in-full-reload-handler branch November 21, 2024 07:45
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Nov 27, 2024
| datasource | package | from   | to    |
| ---------- | ------- | ------ | ----- |
| npm        | vite    | 5.4.11 | 6.0.1 |


## [v6.0.1](https://github.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#small601-2024-11-27-small)

-   fix: default empty server `proxy` prevents starting http2 server ([#18788](vitejs/vite#18788)) ([bbaf514](vitejs/vite@bbaf514)), closes [#18788](vitejs/vite#18788)
-   fix(manifest): do not override existing js manifest entry  ([#18776](vitejs/vite#18776)) ([3b0837e](vitejs/vite@3b0837e)), closes [#18776](vitejs/vite#18776)
-   fix(server): close \_ssrCompatModuleRunner on server close ([#18784](vitejs/vite#18784)) ([9b4c410](vitejs/vite@9b4c410)), closes [#18784](vitejs/vite#18784)
-   fix(server): skip hot channel client normalization for wsServer  ([#18782](vitejs/vite#18782)) ([cc7670a](vitejs/vite@cc7670a)), closes [#18782](vitejs/vite#18782)
-   fix(worker): fix `applyToEnvironment` hooks on worker build ([#18793](vitejs/vite#18793)) ([0c6cdb0](vitejs/vite@0c6cdb0)), closes [#18793](vitejs/vite#18793)
-   chore: flat v6 config file ([#18777](vitejs/vite#18777)) ([c7b3308](vitejs/vite@c7b3308)), closes [#18777](vitejs/vite#18777)
-   chore: split changelog ([#18787](vitejs/vite#18787)) ([8542632](vitejs/vite@8542632)), closes [#18787](vitejs/vite#18787)
-   chore: update changelog for v6 ([#18773](vitejs/vite#18773)) ([b254fac](vitejs/vite@b254fac)), closes [#18773](vitejs/vite#18773)
-   revert: update moduleResolution value casing ([#18409](vitejs/vite#18409)) ([#18774](vitejs/vite#18774)) ([b0fc6e3](vitejs/vite@b0fc6e3)), closes [#18409](vitejs/vite#18409) [#18774](vitejs/vite#18774)


## [v6.0.0](https://github.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#600-2024-11-26)

-   fix: `createRunnableDevEnvironment` returns `RunnableDevEnvironment`, not `DevEnvironment` ([#18673](vitejs/vite#18673)) ([74221c3](vitejs/vite@74221c3)), closes [#18673](vitejs/vite#18673)
-   fix: `getModulesByFile` should return a `serverModule` ([#18715](vitejs/vite#18715)) ([b80d5ec](vitejs/vite@b80d5ec)), closes [#18715](vitejs/vite#18715)
-   fix: catch error in full reload handler ([#18713](vitejs/vite#18713)) ([a10e741](vitejs/vite@a10e741)), closes [#18713](vitejs/vite#18713)
-   fix: display pre-transform error details ([#18764](vitejs/vite#18764)) ([554f45f](vitejs/vite@554f45f)), closes [#18764](vitejs/vite#18764)
-   fix: exit code on `SIGTERM` ([#18741](vitejs/vite#18741)) ([cc55e36](vitejs/vite@cc55e36)), closes [#18741](vitejs/vite#18741)
-   fix: expose missing `InterceptorOptions` type ([#18766](vitejs/vite#18766)) ([6252c60](vitejs/vite@6252c60)), closes [#18766](vitejs/vite#18766)
-   fix: log error when send in module runner failed ([#18753](vitejs/vite#18753)) ([ba821bb](vitejs/vite@ba821bb)), closes [#18753](vitejs/vite#18753)
-   fix(client): overlay not appearing when multiple vite clients were loaded ([#18647](vitejs/vite#18647)) ([27d70b5](vitejs/vite@27d70b5)), closes [#18647](vitejs/vite#18647)
-   fix(deps): update all non-major dependencies ([#18691](vitejs/vite#18691)) ([f005461](vitejs/vite@f005461)), closes [#18691](vitejs/vite#18691)
-   fix(html): fix inline proxy modules invalidation ([#18696](vitejs/vite#18696)) ([8ab04b7](vitejs/vite@8ab04b7)), closes [#18696](vitejs/vite#18696)
-   fix(module-runner): make evaluator optional ([#18672](vitejs/vite#18672)) ([fd1283f](vitejs/vite@fd1283f)), closes [#18672](vitejs/vite#18672)
-   fix(optimizer): detect npm / yarn / pnpm dependency changes correctly ([#17336](vitejs/vite#17336)) ([#18560](vitejs/vite#18560)) ([818cf3e](vitejs/vite@818cf3e)), closes [#17336](vitejs/vite#17336) [#18560](vitejs/vite#18560)
-   fix(optimizer): trigger onCrawlEnd after manual included deps are registered ([#18733](vitejs/vite#18733)) ([dc60410](vitejs/vite@dc60410)), closes [#18733](vitejs/vite#18733)
-   fix(optimizer): workaround firefox's false warning for no sources source map ([#18665](vitejs/vite#18665)) ([473424e](vitejs/vite@473424e)), closes [#18665](vitejs/vite#18665)
-   fix(ssr): replace `__vite_ssr_identity__` with `(0, ...)` and inject `;` between statements ([#18748](vitejs/vite#18748)) ([94546be](vitejs/vite@94546be)), closes [#18748](vitejs/vite#18748)
-   chore: add 5.4.x changelogs ([#18768](vitejs/vite#18768)) ([26b58c8](vitejs/vite@26b58c8)), closes [#18768](vitejs/vite#18768)
-   chore: add some comments about mimes ([#18705](vitejs/vite#18705)) ([f07e9b9](vitejs/vite@f07e9b9)), closes [#18705](vitejs/vite#18705)
-   chore(deps): update all non-major dependencies ([#18746](vitejs/vite#18746)) ([0ad16e9](vitejs/vite@0ad16e9)), closes [#18746](vitejs/vite#18746)
-   perf: reduce bundle size for `Object.keys(import.meta.glob(...))` / \`Object.values(import.meta.glob( ([ed99a2c](vitejs/vite@ed99a2c)), closes [#18666](vitejs/vite#18666)
-   perf(worker): inline worker without base64 ([#18752](vitejs/vite#18752)) ([90c66c9](vitejs/vite@90c66c9)), closes [#18752](vitejs/vite#18752)
-   feat: add support for .cur type ([#18680](vitejs/vite#18680)) ([5ec9eed](vitejs/vite@5ec9eed)), closes [#18680](vitejs/vite#18680)
-   feat: enable HMR by default on ModuleRunner side ([#18749](vitejs/vite#18749)) ([4d2abc7](vitejs/vite@4d2abc7)), closes [#18749](vitejs/vite#18749)
-   feat: support `module-sync` condition when loading config if enabled ([#18650](vitejs/vite#18650)) ([cf5028d](vitejs/vite@cf5028d)), closes [#18650](vitejs/vite#18650)
-   feat!: drop node 21 support in version ranges ([#18729](vitejs/vite#18729)) ([a384d8f](vitejs/vite@a384d8f)), closes [#18729](vitejs/vite#18729)
-   fix(deps)!: update dependency dotenv-expand to v12 ([#18697](vitejs/vite#18697)) ([0c658de](vitejs/vite@0c658de)), closes [#18697](vitejs/vite#18697)
-   docs: rename `HotUpdateContext` to `HotUpdateOptions` ([#18718](vitejs/vite#18718)) ([824c347](vitejs/vite@824c347)), closes [#18718](vitejs/vite#18718)
-   test: simplify `playground/json/__tests__/ssr` ([#18701](vitejs/vite#18701)) ([f731ca2](vitejs/vite@f731ca2)), closes [#18701](vitejs/vite#18701)
-   refactor: first character judgment replacement regexp ([#18658](vitejs/vite#18658)) ([58f1df3](vitejs/vite@58f1df3)), closes [#18658](vitejs/vite#18658)
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Nov 28, 2024
| datasource | package | from   | to    |
| ---------- | ------- | ------ | ----- |
| npm        | vite    | 5.4.11 | 6.0.1 |


## [v6.0.1](https://github.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#small601-2024-11-27-small)

-   fix: default empty server `proxy` prevents starting http2 server ([#18788](vitejs/vite#18788)) ([bbaf514](vitejs/vite@bbaf514)), closes [#18788](vitejs/vite#18788)
-   fix(manifest): do not override existing js manifest entry  ([#18776](vitejs/vite#18776)) ([3b0837e](vitejs/vite@3b0837e)), closes [#18776](vitejs/vite#18776)
-   fix(server): close \_ssrCompatModuleRunner on server close ([#18784](vitejs/vite#18784)) ([9b4c410](vitejs/vite@9b4c410)), closes [#18784](vitejs/vite#18784)
-   fix(server): skip hot channel client normalization for wsServer  ([#18782](vitejs/vite#18782)) ([cc7670a](vitejs/vite@cc7670a)), closes [#18782](vitejs/vite#18782)
-   fix(worker): fix `applyToEnvironment` hooks on worker build ([#18793](vitejs/vite#18793)) ([0c6cdb0](vitejs/vite@0c6cdb0)), closes [#18793](vitejs/vite#18793)
-   chore: flat v6 config file ([#18777](vitejs/vite#18777)) ([c7b3308](vitejs/vite@c7b3308)), closes [#18777](vitejs/vite#18777)
-   chore: split changelog ([#18787](vitejs/vite#18787)) ([8542632](vitejs/vite@8542632)), closes [#18787](vitejs/vite#18787)
-   chore: update changelog for v6 ([#18773](vitejs/vite#18773)) ([b254fac](vitejs/vite@b254fac)), closes [#18773](vitejs/vite#18773)
-   revert: update moduleResolution value casing ([#18409](vitejs/vite#18409)) ([#18774](vitejs/vite#18774)) ([b0fc6e3](vitejs/vite@b0fc6e3)), closes [#18409](vitejs/vite#18409) [#18774](vitejs/vite#18774)


## [v6.0.0](https://github.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#600-2024-11-26)

-   fix: `createRunnableDevEnvironment` returns `RunnableDevEnvironment`, not `DevEnvironment` ([#18673](vitejs/vite#18673)) ([74221c3](vitejs/vite@74221c3)), closes [#18673](vitejs/vite#18673)
-   fix: `getModulesByFile` should return a `serverModule` ([#18715](vitejs/vite#18715)) ([b80d5ec](vitejs/vite@b80d5ec)), closes [#18715](vitejs/vite#18715)
-   fix: catch error in full reload handler ([#18713](vitejs/vite#18713)) ([a10e741](vitejs/vite@a10e741)), closes [#18713](vitejs/vite#18713)
-   fix: display pre-transform error details ([#18764](vitejs/vite#18764)) ([554f45f](vitejs/vite@554f45f)), closes [#18764](vitejs/vite#18764)
-   fix: exit code on `SIGTERM` ([#18741](vitejs/vite#18741)) ([cc55e36](vitejs/vite@cc55e36)), closes [#18741](vitejs/vite#18741)
-   fix: expose missing `InterceptorOptions` type ([#18766](vitejs/vite#18766)) ([6252c60](vitejs/vite@6252c60)), closes [#18766](vitejs/vite#18766)
-   fix: log error when send in module runner failed ([#18753](vitejs/vite#18753)) ([ba821bb](vitejs/vite@ba821bb)), closes [#18753](vitejs/vite#18753)
-   fix(client): overlay not appearing when multiple vite clients were loaded ([#18647](vitejs/vite#18647)) ([27d70b5](vitejs/vite@27d70b5)), closes [#18647](vitejs/vite#18647)
-   fix(deps): update all non-major dependencies ([#18691](vitejs/vite#18691)) ([f005461](vitejs/vite@f005461)), closes [#18691](vitejs/vite#18691)
-   fix(html): fix inline proxy modules invalidation ([#18696](vitejs/vite#18696)) ([8ab04b7](vitejs/vite@8ab04b7)), closes [#18696](vitejs/vite#18696)
-   fix(module-runner): make evaluator optional ([#18672](vitejs/vite#18672)) ([fd1283f](vitejs/vite@fd1283f)), closes [#18672](vitejs/vite#18672)
-   fix(optimizer): detect npm / yarn / pnpm dependency changes correctly ([#17336](vitejs/vite#17336)) ([#18560](vitejs/vite#18560)) ([818cf3e](vitejs/vite@818cf3e)), closes [#17336](vitejs/vite#17336) [#18560](vitejs/vite#18560)
-   fix(optimizer): trigger onCrawlEnd after manual included deps are registered ([#18733](vitejs/vite#18733)) ([dc60410](vitejs/vite@dc60410)), closes [#18733](vitejs/vite#18733)
-   fix(optimizer): workaround firefox's false warning for no sources source map ([#18665](vitejs/vite#18665)) ([473424e](vitejs/vite@473424e)), closes [#18665](vitejs/vite#18665)
-   fix(ssr): replace `__vite_ssr_identity__` with `(0, ...)` and inject `;` between statements ([#18748](vitejs/vite#18748)) ([94546be](vitejs/vite@94546be)), closes [#18748](vitejs/vite#18748)
-   chore: add 5.4.x changelogs ([#18768](vitejs/vite#18768)) ([26b58c8](vitejs/vite@26b58c8)), closes [#18768](vitejs/vite#18768)
-   chore: add some comments about mimes ([#18705](vitejs/vite#18705)) ([f07e9b9](vitejs/vite@f07e9b9)), closes [#18705](vitejs/vite#18705)
-   chore(deps): update all non-major dependencies ([#18746](vitejs/vite#18746)) ([0ad16e9](vitejs/vite@0ad16e9)), closes [#18746](vitejs/vite#18746)
-   perf: reduce bundle size for `Object.keys(import.meta.glob(...))` / \`Object.values(import.meta.glob( ([ed99a2c](vitejs/vite@ed99a2c)), closes [#18666](vitejs/vite#18666)
-   perf(worker): inline worker without base64 ([#18752](vitejs/vite#18752)) ([90c66c9](vitejs/vite@90c66c9)), closes [#18752](vitejs/vite#18752)
-   feat: add support for .cur type ([#18680](vitejs/vite#18680)) ([5ec9eed](vitejs/vite@5ec9eed)), closes [#18680](vitejs/vite#18680)
-   feat: enable HMR by default on ModuleRunner side ([#18749](vitejs/vite#18749)) ([4d2abc7](vitejs/vite@4d2abc7)), closes [#18749](vitejs/vite#18749)
-   feat: support `module-sync` condition when loading config if enabled ([#18650](vitejs/vite#18650)) ([cf5028d](vitejs/vite@cf5028d)), closes [#18650](vitejs/vite#18650)
-   feat!: drop node 21 support in version ranges ([#18729](vitejs/vite#18729)) ([a384d8f](vitejs/vite@a384d8f)), closes [#18729](vitejs/vite#18729)
-   fix(deps)!: update dependency dotenv-expand to v12 ([#18697](vitejs/vite#18697)) ([0c658de](vitejs/vite@0c658de)), closes [#18697](vitejs/vite#18697)
-   docs: rename `HotUpdateContext` to `HotUpdateOptions` ([#18718](vitejs/vite#18718)) ([824c347](vitejs/vite@824c347)), closes [#18718](vitejs/vite#18718)
-   test: simplify `playground/json/__tests__/ssr` ([#18701](vitejs/vite#18701)) ([f731ca2](vitejs/vite@f731ca2)), closes [#18701](vitejs/vite#18701)
-   refactor: first character judgment replacement regexp ([#18658](vitejs/vite#18658)) ([58f1df3](vitejs/vite@58f1df3)), closes [#18658](vitejs/vite#18658)
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Nov 29, 2024
| datasource | package | from   | to    |
| ---------- | ------- | ------ | ----- |
| npm        | vite    | 5.4.11 | 6.0.1 |


## [v6.0.1](https://github.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#small601-2024-11-27-small)

-   fix: default empty server `proxy` prevents starting http2 server ([#18788](vitejs/vite#18788)) ([bbaf514](vitejs/vite@bbaf514)), closes [#18788](vitejs/vite#18788)
-   fix(manifest): do not override existing js manifest entry  ([#18776](vitejs/vite#18776)) ([3b0837e](vitejs/vite@3b0837e)), closes [#18776](vitejs/vite#18776)
-   fix(server): close \_ssrCompatModuleRunner on server close ([#18784](vitejs/vite#18784)) ([9b4c410](vitejs/vite@9b4c410)), closes [#18784](vitejs/vite#18784)
-   fix(server): skip hot channel client normalization for wsServer  ([#18782](vitejs/vite#18782)) ([cc7670a](vitejs/vite@cc7670a)), closes [#18782](vitejs/vite#18782)
-   fix(worker): fix `applyToEnvironment` hooks on worker build ([#18793](vitejs/vite#18793)) ([0c6cdb0](vitejs/vite@0c6cdb0)), closes [#18793](vitejs/vite#18793)
-   chore: flat v6 config file ([#18777](vitejs/vite#18777)) ([c7b3308](vitejs/vite@c7b3308)), closes [#18777](vitejs/vite#18777)
-   chore: split changelog ([#18787](vitejs/vite#18787)) ([8542632](vitejs/vite@8542632)), closes [#18787](vitejs/vite#18787)
-   chore: update changelog for v6 ([#18773](vitejs/vite#18773)) ([b254fac](vitejs/vite@b254fac)), closes [#18773](vitejs/vite#18773)
-   revert: update moduleResolution value casing ([#18409](vitejs/vite#18409)) ([#18774](vitejs/vite#18774)) ([b0fc6e3](vitejs/vite@b0fc6e3)), closes [#18409](vitejs/vite#18409) [#18774](vitejs/vite#18774)


## [v6.0.0](https://github.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#600-2024-11-26)

-   fix: `createRunnableDevEnvironment` returns `RunnableDevEnvironment`, not `DevEnvironment` ([#18673](vitejs/vite#18673)) ([74221c3](vitejs/vite@74221c3)), closes [#18673](vitejs/vite#18673)
-   fix: `getModulesByFile` should return a `serverModule` ([#18715](vitejs/vite#18715)) ([b80d5ec](vitejs/vite@b80d5ec)), closes [#18715](vitejs/vite#18715)
-   fix: catch error in full reload handler ([#18713](vitejs/vite#18713)) ([a10e741](vitejs/vite@a10e741)), closes [#18713](vitejs/vite#18713)
-   fix: display pre-transform error details ([#18764](vitejs/vite#18764)) ([554f45f](vitejs/vite@554f45f)), closes [#18764](vitejs/vite#18764)
-   fix: exit code on `SIGTERM` ([#18741](vitejs/vite#18741)) ([cc55e36](vitejs/vite@cc55e36)), closes [#18741](vitejs/vite#18741)
-   fix: expose missing `InterceptorOptions` type ([#18766](vitejs/vite#18766)) ([6252c60](vitejs/vite@6252c60)), closes [#18766](vitejs/vite#18766)
-   fix: log error when send in module runner failed ([#18753](vitejs/vite#18753)) ([ba821bb](vitejs/vite@ba821bb)), closes [#18753](vitejs/vite#18753)
-   fix(client): overlay not appearing when multiple vite clients were loaded ([#18647](vitejs/vite#18647)) ([27d70b5](vitejs/vite@27d70b5)), closes [#18647](vitejs/vite#18647)
-   fix(deps): update all non-major dependencies ([#18691](vitejs/vite#18691)) ([f005461](vitejs/vite@f005461)), closes [#18691](vitejs/vite#18691)
-   fix(html): fix inline proxy modules invalidation ([#18696](vitejs/vite#18696)) ([8ab04b7](vitejs/vite@8ab04b7)), closes [#18696](vitejs/vite#18696)
-   fix(module-runner): make evaluator optional ([#18672](vitejs/vite#18672)) ([fd1283f](vitejs/vite@fd1283f)), closes [#18672](vitejs/vite#18672)
-   fix(optimizer): detect npm / yarn / pnpm dependency changes correctly ([#17336](vitejs/vite#17336)) ([#18560](vitejs/vite#18560)) ([818cf3e](vitejs/vite@818cf3e)), closes [#17336](vitejs/vite#17336) [#18560](vitejs/vite#18560)
-   fix(optimizer): trigger onCrawlEnd after manual included deps are registered ([#18733](vitejs/vite#18733)) ([dc60410](vitejs/vite@dc60410)), closes [#18733](vitejs/vite#18733)
-   fix(optimizer): workaround firefox's false warning for no sources source map ([#18665](vitejs/vite#18665)) ([473424e](vitejs/vite@473424e)), closes [#18665](vitejs/vite#18665)
-   fix(ssr): replace `__vite_ssr_identity__` with `(0, ...)` and inject `;` between statements ([#18748](vitejs/vite#18748)) ([94546be](vitejs/vite@94546be)), closes [#18748](vitejs/vite#18748)
-   chore: add 5.4.x changelogs ([#18768](vitejs/vite#18768)) ([26b58c8](vitejs/vite@26b58c8)), closes [#18768](vitejs/vite#18768)
-   chore: add some comments about mimes ([#18705](vitejs/vite#18705)) ([f07e9b9](vitejs/vite@f07e9b9)), closes [#18705](vitejs/vite#18705)
-   chore(deps): update all non-major dependencies ([#18746](vitejs/vite#18746)) ([0ad16e9](vitejs/vite@0ad16e9)), closes [#18746](vitejs/vite#18746)
-   perf: reduce bundle size for `Object.keys(import.meta.glob(...))` / \`Object.values(import.meta.glob( ([ed99a2c](vitejs/vite@ed99a2c)), closes [#18666](vitejs/vite#18666)
-   perf(worker): inline worker without base64 ([#18752](vitejs/vite#18752)) ([90c66c9](vitejs/vite@90c66c9)), closes [#18752](vitejs/vite#18752)
-   feat: add support for .cur type ([#18680](vitejs/vite#18680)) ([5ec9eed](vitejs/vite@5ec9eed)), closes [#18680](vitejs/vite#18680)
-   feat: enable HMR by default on ModuleRunner side ([#18749](vitejs/vite#18749)) ([4d2abc7](vitejs/vite@4d2abc7)), closes [#18749](vitejs/vite#18749)
-   feat: support `module-sync` condition when loading config if enabled ([#18650](vitejs/vite#18650)) ([cf5028d](vitejs/vite@cf5028d)), closes [#18650](vitejs/vite#18650)
-   feat!: drop node 21 support in version ranges ([#18729](vitejs/vite#18729)) ([a384d8f](vitejs/vite@a384d8f)), closes [#18729](vitejs/vite#18729)
-   fix(deps)!: update dependency dotenv-expand to v12 ([#18697](vitejs/vite#18697)) ([0c658de](vitejs/vite@0c658de)), closes [#18697](vitejs/vite#18697)
-   docs: rename `HotUpdateContext` to `HotUpdateOptions` ([#18718](vitejs/vite#18718)) ([824c347](vitejs/vite@824c347)), closes [#18718](vitejs/vite#18718)
-   test: simplify `playground/json/__tests__/ssr` ([#18701](vitejs/vite#18701)) ([f731ca2](vitejs/vite@f731ca2)), closes [#18701](vitejs/vite#18701)
-   refactor: first character judgment replacement regexp ([#18658](vitejs/vite#18658)) ([58f1df3](vitejs/vite@58f1df3)), closes [#18658](vitejs/vite#18658)
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Nov 30, 2024
| datasource | package | from   | to    |
| ---------- | ------- | ------ | ----- |
| npm        | vite    | 5.4.11 | 6.0.1 |


## [v6.0.1](https://github.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#small601-2024-11-27-small)

-   fix: default empty server `proxy` prevents starting http2 server ([#18788](vitejs/vite#18788)) ([bbaf514](vitejs/vite@bbaf514)), closes [#18788](vitejs/vite#18788)
-   fix(manifest): do not override existing js manifest entry  ([#18776](vitejs/vite#18776)) ([3b0837e](vitejs/vite@3b0837e)), closes [#18776](vitejs/vite#18776)
-   fix(server): close \_ssrCompatModuleRunner on server close ([#18784](vitejs/vite#18784)) ([9b4c410](vitejs/vite@9b4c410)), closes [#18784](vitejs/vite#18784)
-   fix(server): skip hot channel client normalization for wsServer  ([#18782](vitejs/vite#18782)) ([cc7670a](vitejs/vite@cc7670a)), closes [#18782](vitejs/vite#18782)
-   fix(worker): fix `applyToEnvironment` hooks on worker build ([#18793](vitejs/vite#18793)) ([0c6cdb0](vitejs/vite@0c6cdb0)), closes [#18793](vitejs/vite#18793)
-   chore: flat v6 config file ([#18777](vitejs/vite#18777)) ([c7b3308](vitejs/vite@c7b3308)), closes [#18777](vitejs/vite#18777)
-   chore: split changelog ([#18787](vitejs/vite#18787)) ([8542632](vitejs/vite@8542632)), closes [#18787](vitejs/vite#18787)
-   chore: update changelog for v6 ([#18773](vitejs/vite#18773)) ([b254fac](vitejs/vite@b254fac)), closes [#18773](vitejs/vite#18773)
-   revert: update moduleResolution value casing ([#18409](vitejs/vite#18409)) ([#18774](vitejs/vite#18774)) ([b0fc6e3](vitejs/vite@b0fc6e3)), closes [#18409](vitejs/vite#18409) [#18774](vitejs/vite#18774)


## [v6.0.0](https://github.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#600-2024-11-26)

-   fix: `createRunnableDevEnvironment` returns `RunnableDevEnvironment`, not `DevEnvironment` ([#18673](vitejs/vite#18673)) ([74221c3](vitejs/vite@74221c3)), closes [#18673](vitejs/vite#18673)
-   fix: `getModulesByFile` should return a `serverModule` ([#18715](vitejs/vite#18715)) ([b80d5ec](vitejs/vite@b80d5ec)), closes [#18715](vitejs/vite#18715)
-   fix: catch error in full reload handler ([#18713](vitejs/vite#18713)) ([a10e741](vitejs/vite@a10e741)), closes [#18713](vitejs/vite#18713)
-   fix: display pre-transform error details ([#18764](vitejs/vite#18764)) ([554f45f](vitejs/vite@554f45f)), closes [#18764](vitejs/vite#18764)
-   fix: exit code on `SIGTERM` ([#18741](vitejs/vite#18741)) ([cc55e36](vitejs/vite@cc55e36)), closes [#18741](vitejs/vite#18741)
-   fix: expose missing `InterceptorOptions` type ([#18766](vitejs/vite#18766)) ([6252c60](vitejs/vite@6252c60)), closes [#18766](vitejs/vite#18766)
-   fix: log error when send in module runner failed ([#18753](vitejs/vite#18753)) ([ba821bb](vitejs/vite@ba821bb)), closes [#18753](vitejs/vite#18753)
-   fix(client): overlay not appearing when multiple vite clients were loaded ([#18647](vitejs/vite#18647)) ([27d70b5](vitejs/vite@27d70b5)), closes [#18647](vitejs/vite#18647)
-   fix(deps): update all non-major dependencies ([#18691](vitejs/vite#18691)) ([f005461](vitejs/vite@f005461)), closes [#18691](vitejs/vite#18691)
-   fix(html): fix inline proxy modules invalidation ([#18696](vitejs/vite#18696)) ([8ab04b7](vitejs/vite@8ab04b7)), closes [#18696](vitejs/vite#18696)
-   fix(module-runner): make evaluator optional ([#18672](vitejs/vite#18672)) ([fd1283f](vitejs/vite@fd1283f)), closes [#18672](vitejs/vite#18672)
-   fix(optimizer): detect npm / yarn / pnpm dependency changes correctly ([#17336](vitejs/vite#17336)) ([#18560](vitejs/vite#18560)) ([818cf3e](vitejs/vite@818cf3e)), closes [#17336](vitejs/vite#17336) [#18560](vitejs/vite#18560)
-   fix(optimizer): trigger onCrawlEnd after manual included deps are registered ([#18733](vitejs/vite#18733)) ([dc60410](vitejs/vite@dc60410)), closes [#18733](vitejs/vite#18733)
-   fix(optimizer): workaround firefox's false warning for no sources source map ([#18665](vitejs/vite#18665)) ([473424e](vitejs/vite@473424e)), closes [#18665](vitejs/vite#18665)
-   fix(ssr): replace `__vite_ssr_identity__` with `(0, ...)` and inject `;` between statements ([#18748](vitejs/vite#18748)) ([94546be](vitejs/vite@94546be)), closes [#18748](vitejs/vite#18748)
-   chore: add 5.4.x changelogs ([#18768](vitejs/vite#18768)) ([26b58c8](vitejs/vite@26b58c8)), closes [#18768](vitejs/vite#18768)
-   chore: add some comments about mimes ([#18705](vitejs/vite#18705)) ([f07e9b9](vitejs/vite@f07e9b9)), closes [#18705](vitejs/vite#18705)
-   chore(deps): update all non-major dependencies ([#18746](vitejs/vite#18746)) ([0ad16e9](vitejs/vite@0ad16e9)), closes [#18746](vitejs/vite#18746)
-   perf: reduce bundle size for `Object.keys(import.meta.glob(...))` / \`Object.values(import.meta.glob( ([ed99a2c](vitejs/vite@ed99a2c)), closes [#18666](vitejs/vite#18666)
-   perf(worker): inline worker without base64 ([#18752](vitejs/vite#18752)) ([90c66c9](vitejs/vite@90c66c9)), closes [#18752](vitejs/vite#18752)
-   feat: add support for .cur type ([#18680](vitejs/vite#18680)) ([5ec9eed](vitejs/vite@5ec9eed)), closes [#18680](vitejs/vite#18680)
-   feat: enable HMR by default on ModuleRunner side ([#18749](vitejs/vite#18749)) ([4d2abc7](vitejs/vite@4d2abc7)), closes [#18749](vitejs/vite#18749)
-   feat: support `module-sync` condition when loading config if enabled ([#18650](vitejs/vite#18650)) ([cf5028d](vitejs/vite@cf5028d)), closes [#18650](vitejs/vite#18650)
-   feat!: drop node 21 support in version ranges ([#18729](vitejs/vite#18729)) ([a384d8f](vitejs/vite@a384d8f)), closes [#18729](vitejs/vite#18729)
-   fix(deps)!: update dependency dotenv-expand to v12 ([#18697](vitejs/vite#18697)) ([0c658de](vitejs/vite@0c658de)), closes [#18697](vitejs/vite#18697)
-   docs: rename `HotUpdateContext` to `HotUpdateOptions` ([#18718](vitejs/vite#18718)) ([824c347](vitejs/vite@824c347)), closes [#18718](vitejs/vite#18718)
-   test: simplify `playground/json/__tests__/ssr` ([#18701](vitejs/vite#18701)) ([f731ca2](vitejs/vite@f731ca2)), closes [#18701](vitejs/vite#18701)
-   refactor: first character judgment replacement regexp ([#18658](vitejs/vite#18658)) ([58f1df3](vitejs/vite@58f1df3)), closes [#18658](vitejs/vite#18658)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat: deps optimizer Esbuild Dependencies Optimization feat: environment API Vite Environment API feat: hmr feat: ssr p3-minor-bug An edge case that only affects very specific usage (priority)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants