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

Bump vite to 4.4.6 #7746

Merged
merged 6 commits into from
Jul 24, 2023
Merged

Bump vite to 4.4.6 #7746

merged 6 commits into from
Jul 24, 2023

Conversation

birkskyum
Copy link
Contributor

@birkskyum birkskyum commented Jul 21, 2023

Changes

This bumps Vite to 4.4.6 (Astro is currently at 4.3.9). It includes patch bumps to all the adapters.

This brings experimental support for Lightning CSS (vite 4.4.0) and improved support for Bun (vite 4.4.6).

Two ts-expect-error flags are obsolete and removed, because Vite now use esbuild 0.18

Testing

Existing unit tests and e2e tests should still pass.

Docs

/cc @withastro/maintainers-docs for feedback!

There is currently no section on Lightning CSS.

@changeset-bot
Copy link

changeset-bot bot commented Jul 21, 2023

🦋 Changeset detected

Latest commit: aa24751

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added pkg: svelte Related to Svelte (scope) pkg: vue Related to Vue (scope) pkg: integration Related to any renderer integration (scope) pkg: astro Related to the core `astro` package (scope) labels Jul 21, 2023
@birkskyum birkskyum changed the title Bump vite to 4.4 Bump vite to 4.4.6 Jul 21, 2023
.changeset/sweet-lamps-cover.md Outdated Show resolved Hide resolved
@birkskyum birkskyum requested a review from ematipico July 21, 2023 11:21
@Princesseuh
Copy link
Member

@bluwy was there any reasons we weren't already on 4.4?

@ematipico ematipico requested a review from bluwy July 21, 2023 12:15
@bluwy
Copy link
Member

bluwy commented Jul 21, 2023

@bluwy was there any reasons we weren't already on 4.4?

Mostly that we're not using any 4.4 specific features, and users can bump to 4.4 if they want to themselves. But also, 4.4 started with quite some regressions that I initially hold off, but it's safer now.

The e2e failing seems to be legit though. Might need to address that before merging, could be a Vite regression.

@birkskyum
Copy link
Contributor Author

birkskyum commented Jul 21, 2023

I tried updating solid-js 1.7.6 -> 1.7.8 (latest), but it doesn't resolve "Circular imports with Solid › Context" test breaks in E2E. This issue appeared first in vite "4.4.0-beta.0"

@birkskyum
Copy link
Contributor Author

@bluwy , to debug this further, how can I as an Astro user use a custom version of Vite like you suggest?

@bluwy
Copy link
Member

bluwy commented Jul 21, 2023

You can run npm update vite in your project to use a different Vite version for Astro.

I can try to take a look at the issue over the weekend. A bit swamped at the moment 😅

@birkskyum
Copy link
Contributor Author

birkskyum commented Jul 22, 2023

I found that replacing client:only with client:load can makes test pass. It's odd the test has a client:only without a framework hint, because the docs mention it's mandatory, but it doesn't appear to always throw https://docs.astro.build/en/reference/errors/no-client-only-hint/.

This appear a bit off-topic, so I made a separate issue for it here #7771

@birkskyum
Copy link
Contributor Author

birkskyum commented Jul 23, 2023

Turns out simply using import type when importing solid-js "Component" type was sufficient for the test to pass.

@birkskyum birkskyum requested a review from bluwy July 23, 2023 10:23
Copy link
Member

@bluwy bluwy left a comment

Choose a reason for hiding this comment

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

Thanks for fixing the tests! This make sense to me as Vite's esbuild now understand our tsconfig.json's verbatimModuleSyntax: true config which causes the type elision to no work correctly. Not really sure if this is a Vite regression, but I'll keep watch of this.

@birkskyum
Copy link
Contributor Author

Rebased. Tests will pass if rerun (they were just cancelled).

@bluwy bluwy dismissed ematipico’s stale review July 24, 2023 08:21

Requested changes addressed

@bluwy bluwy merged commit 0c99597 into withastro:main Jul 24, 2023
@astrobot-houston astrobot-houston mentioned this pull request Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope) pkg: integration Related to any renderer integration (scope) pkg: svelte Related to Svelte (scope) pkg: vue Related to Vue (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants