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

Correctly escape paths in file names #4584

Merged
merged 10 commits into from
Sep 4, 2022
Merged

Correctly escape paths in file names #4584

merged 10 commits into from
Sep 4, 2022

Conversation

bluwy
Copy link
Member

@bluwy bluwy commented Sep 1, 2022

Changes

Fix #3639

Exotic file names that includes , ^, 🚀, (, { are now handled and encoded properly.

% is not supported for now as I found Vite had trouble processing it too.

Note: Use emojis in file names, the HTML must have charset="utf-8" to work.

Testing

Enable tests added from #4263

Docs

N/A

@changeset-bot
Copy link

changeset-bot bot commented Sep 1, 2022

🦋 Changeset detected

Latest commit: 4c0b581

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

This PR includes changesets to release 14 packages
Name Type
astro Patch
@e2e/astro-component Patch
@e2e/error-react-spectrum Patch
@e2e/error-sass Patch
@e2e/errors Patch
@e2e/hydration-race Patch
@e2e/lit-component Patch
@e2e/preact-component Patch
@e2e/react-component Patch
@e2e/solid-component Patch
@e2e/solid-recurse Patch
@e2e/svelte-component Patch
@e2e/e2e-tailwindcss Patch
@e2e/ts-resolution Patch

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 the pkg: astro Related to the core `astro` package (scope) label Sep 1, 2022
packages/astro/src/jsx/babel.ts Outdated Show resolved Hide resolved
packages/astro/src/core/build/vite-plugin-analyzer.ts Outdated Show resolved Hide resolved
Copy link
Member

@natemoo-re natemoo-re left a comment

Choose a reason for hiding this comment

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

This looks great! E2E tests are failing though, any insights?

@Princesseuh
Copy link
Member

It took three Astro core members, but we finally got this fixed 💪 Awesome work

@bluwy
Copy link
Member Author

bluwy commented Sep 1, 2022

Wow looks like that e2e test alone is quite a rabbithole (again 🥲 ), I can reproduce it locally too. I'll try to look into it tomorrow, marking as draft for now.

@bluwy bluwy marked this pull request as draft September 1, 2022 15:38
@hippotastic
Copy link
Contributor

Sorry for building a set of rabbit holes! 😆 But I'm really happy that we're making progress here in getting the tests green! Great work!

@bluwy bluwy marked this pull request as ready for review September 2, 2022 12:30
@bluwy
Copy link
Member Author

bluwy commented Sep 2, 2022

This should be good now. Luckily the CI errors were actually real problems. I toned down some refactors earlier so it should fix specifically the escaping issues.

@hippotastic
Copy link
Contributor

Yay, I'm so excited! Finally a working solution to this unexpectedly hard problem. Glad we have a Vite wizard on board now. Thank you so much, @bluwy!

Copy link
Contributor

@hippotastic hippotastic left a comment

Choose a reason for hiding this comment

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

I'm only the test author and not a core member, but that LGTM!

Copy link
Member

@natemoo-re natemoo-re left a comment

Choose a reason for hiding this comment

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

Incredible work!

@bluwy bluwy merged commit 29a5fdc into main Sep 4, 2022
@bluwy bluwy deleted the fix-url-decode branch September 4, 2022 08:43
@astrobot-houston astrobot-houston mentioned this pull request Sep 4, 2022
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)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 BUG: Building a site using React components with escaped spaces in path fails
4 participants