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

Upgrade: don't show error during upgrade when analyzing external URL import #15040

Merged
merged 5 commits into from
Nov 19, 2024

Conversation

RobinMalfait
Copy link
Member

@RobinMalfait RobinMalfait commented Nov 19, 2024

This PR improves the output of the upgrade tool when we are handling imports and the import happens to be an external URL.

External URLs shouldn't and can't be upgraded, so printing an error message doesn't help the user.

Additionally, if an @import is using the url(…) function, then we skip over it and continue with the rest of the imports.

Before After
image image

Running this on github.com/parcel-bundler/parcel

Before After
image image

@RobinMalfait RobinMalfait marked this pull request as ready for review November 19, 2024 13:51
@RobinMalfait RobinMalfait requested a review from a team as a code owner November 19, 2024 13:51
CHANGELOG.md Outdated Show resolved Hide resolved
This code wasn't used, so let's clean it up.
This guarantees that:
1. The `@import` is not modified in any way, shape or form
2. The `@import` doesn't crash the rest of the system
3. Imports later in the file are still migrated as expected
@RobinMalfait RobinMalfait force-pushed the feat/ignore-url-imports-during-migration branch from 402bc9d to 973b93b Compare November 19, 2024 14:07
@RobinMalfait RobinMalfait merged commit 38c9a88 into next Nov 19, 2024
1 check passed
@RobinMalfait RobinMalfait deleted the feat/ignore-url-imports-during-migration branch November 19, 2024 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants