-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
chore!: update vite@5 and rollup@4 #4368
Conversation
|
✅ Deploy Preview for fastidious-cascaron-4ded94 canceled.
|
I want to merge this, but PR has merge conflicts. @Dunqing can you resolve them? |
Sure! |
e7cdf7a
to
3523a6a
Compare
I roughly compared the ci test time between this branch and the main branch, and the testing time seems to have decreased 😀 |
We should wait for vitejs/vite#14833 to be released, so we can import |
Should we specify version 5 for vite, otherwise we don't have parseAst |
Yep |
FYI Vite released the changes. Thank you for this PR @Dunqing |
Interesting errors in your tests 🤔 |
Looking good now. Recent tests seem to have some unusual errors, and not just in this branch. |
@sheremet-va Is there anything else that needs to be done here? |
Vite is now at Thanks for the great work 🎉 |
vite-node will not be in Vite 5, yes. not sure what update this PR needs tho, can you elaborate? |
just an update from Vite Beta.15 to Beta.17, nothing else |
e40b952
to
9d59478
Compare
This took a bit of figuring out. The process was: - Add `.npmrc` to this repo per: - https://pnpm.io/npmrc#auto-install-peers - https://pnpm.io/npmrc#prefer-frozen-lockfile - https://pnpm.io/npmrc#prefer-workspace-packages - `git clone https://github.com/vitest-dev/vitest.git` in the parent directory of this repository. - Add 'file:' dependencies to vitest and @vitest/browser, both residing within '../vitest/packages'. https://pnpm.io/cli/link#whats-the-difference-between-pnpm-link-and-using-the-file-protocol - Add pnpm-workspace.yaml with an '../vitest/packages/*' entry so the local vitest modules can find their peer modules in the same workspace. https://pnpm.io/pnpm-workspace_yaml - Set vite to 4.5.1, since I eventually learned the problem always occurs with vite 5.0.5. (I suspect this may have something to do with the upgrade from Rollup 4 to Rollup 5.) Then in the `../vitest` directory: ```sh git reset --hard v1.0.0-beta.4 pnpm i --ignore-scripts --frozen-lockfile pnpm build ``` And back in this repository: ```sh pnpm i pnpm test ``` I can now get the demo test running successfully against the local vitest v1.0.0-beta.4. Repeating the process for v1.0.0-beta.5, I can reproduce the vitest/utils import problem/reload loop. Now let's see what a `git bisect` will produce... ...one thing I already noticed: - The vitest packages from v1.0.0-beta.4 depend on vite < 5.0.0 - The vitest packages from v1.0.0-beta.5 depend on vite >= 5.0.0-beta* So...could be the issue resides within Vite somehow. The vitest repo is OK up through this commit, which is the last working commit before the Vite ^5.0.0 bump: - commit f6a445dbc86e0e5b7de29ae650ecebf8ac6e4ffa The next commit breaks the pnpm-lock.yaml file, and remains broken until the following commit and the PR containing it gets merged: - commit 5b738663197b78cf103b269c6e7489286957c1a7 - vitest-dev/vitest#4368 ```sh git diff f6a445dbc86e0e5b7de29ae650ecebf8ac6e4ffa 5b738663197b78cf103b269c6e7489286957c1a7 ``` Yep. None of the changes there seem to have anything directly to do with packages/browser/src/client/main.ts or the `config.base` value. It seems to be the Vite 5 upgrade, which is consistent with the fact that v1.0.0-beta.4 works with Vite 4.5.1, but not Vite 5.0.5. Now that I've got my methodology down, next I'll start bisecting commits in Vite.
Description
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
pnpm-lock.yaml
unless you introduce a new test example.Tests
pnpm test:ci
.Documentation
pnpm run docs
command.Changesets
feat:
,fix:
,perf:
,docs:
, orchore:
.