Skip to content

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

Merged
RobinMalfait merged 5 commits into
nextfrom
feat/ignore-url-imports-during-migration
Nov 19, 2024
Merged

Upgrade: don't show error during upgrade when analyzing external URL import#15040
RobinMalfait merged 5 commits into
nextfrom
feat/ignore-url-imports-during-migration

Conversation

@RobinMalfait

@RobinMalfait RobinMalfait commented Nov 19, 2024

Copy link
Copy Markdown
Member

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
Comment thread CHANGELOG.md Outdated
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
@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