-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
fix(ssr)!: don't access Object
variable in ssr transformed code
#19996
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
Conversation
/ecosystem-ci run |
commit: |
📝 Ran ecosystem CI on
✅ astro, rakkas, previewjs, qwik, marko, vite-plugin-pwa, vite-plugin-react-swc, vite-environment-examples, vite-plugin-cloudflare, vite-setup-catalogue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
📝 Ran ecosystem CI on
✅ quasar, ladle, storybook, marko, qwik, vite-environment-examples, rakkas, vitepress, unocss, vite-plugin-react, vuepress, vite-plugin-vue, vite-setup-catalogue, vite-plugin-pwa, vite-plugin-svelte, sveltekit, laravel |
I tried adding overrides (vitejs/vite-ecosystem-ci#387) but it seems it doesn't work for some and would make it difficult to understand the failures, so probably better to keep it as-is. |
/ecosystem-ci run |
📝 Ran ecosystem CI on
✅ marko, storybook, rakkas, qwik, nuxt, vite-plugin-pwa, vite-environment-examples, vite-plugin-vue, vite-setup-catalogue, vite-plugin-svelte, vitest |
Should I try to send PRs on ecosystem repos (at least the ones passing on the main)? Not sure how long renovate will get Vitest bumped. I sent a message on discord in case it helps. |
Thanks for sending the message 🙏 I hope some of the failures will be resolved next week, assuming the renovate will run once a week. |
Ah, maybe adding |
Aha, that sounds great. Some frameworks like I also noticed there's very old Vitest in the ecosystem |
I've tested it at vitejs/vite-ecosystem-ci#389 |
Just in case, I tested react router and overrides seems to be fine locally with: "overrides": {
"vite": "https://pkg.pr.new/vite@da582f8",
"vite-node": "3.2.2", |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
/ecosystem-ci run |
📝 Ran ecosystem CI on
✅ ladle, laravel, marko, nuxt, quasar, qwik, storybook, vite-plugin-vue, vite-environment-examples, unocss, vite-plugin-svelte, vitest, rakkas, vite-plugin-react, waku, vuepress, vite-setup-catalogue, vite-plugin-pwa, vitepress |
Let's now merge this PR as the ecosystem-ci is mostly passing. |
Description
Object
constructor is shadowed #19993I added
__vite_ssr_exportName__
to runtime context so we can move outObject.definedProperty
from ssr transformed code.Since this breaks vite-node, I added a patch to add the same runtime context.(EDIT: updated to vitest 3.2 beta)This is likely hard to test on ecosystem ci since anyone using Vitest / vite-node breaks 🤔
I made a Vitest side PR (and package) so they can be tested if both overrides are setup vitest-dev/vitest#7925.
As seen in ecosystem-ci below, this change didn't break
vite-plugin-cloudflare
norvite-environment-examples
because their custom module runner usesObject.keys(context)
andObject.values(context)
without referencing exact context keys https://github.com/cloudflare/workers-sdk/blob/1cd30a554f00dfd7bff43bbd3e601bc67f7acb2b/packages/vite-plugin-cloudflare/src/runner-worker/module-runner.ts#L55-L69