Add Importer.invert_non_canonical_scheme
option to embedded protocol
#3905
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is part of sass/embedded-host-node#309. In order for the legacy importer to properly load schemed url as path and get the containing url when doing so, we need to set
legacy-importer-file
as the only canonical scheme, and everything else as non-canonical.This PR attempts to achieve that with minimum change, that is to add an
invert_non_canonical_scheme
flag, which would invert the meaning ofnon_canonical_scheme
set, and treat the set as explicitcanonical_scheme
. Because this option would be confusing to the end-users, there is no plan to add this to the JS-API that it will be used exclusively for the embedded host to emulate legacy API.