Skip to content

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
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.

4 participants