This refactors the migration of imports so that the entire rule is migrated in one patch, as opposed to patching each import within a rule separately. Migration for nested imports is also now factored out into its own helper (_migrateImportToLoadCss).
As part of this refactor, I also made three behavior changes:
For import-only files without corresponding regular files, the regular file they actually forward will now be treated as a replacement, allowing path-changes from import-only files to be migrated in place (and avoiding the issue of adjacent imports being removed that caused #170)
Midstream files that both forward upstream variables for downstream files to configure and configure upstream variables themselves would previously be migrated to a broken result. These cases should now be migrated to a @forward ... with rule, which didn't exist the last time I updated the configurable variable code.
@import rules that are migrated to both a @use and @forward rule would previously only migrate one in-place (adding the extra at after all existing rules). Now, both should be migrated in place.
Fixes #170.
This refactors the migration of imports so that the entire rule is migrated in one patch, as opposed to patching each import within a rule separately. Migration for nested imports is also now factored out into its own helper (
_migrateImportToLoadCss
).As part of this refactor, I also made three behavior changes:
For import-only files without corresponding regular files, the regular file they actually forward will now be treated as a replacement, allowing path-changes from import-only files to be migrated in place (and avoiding the issue of adjacent imports being removed that caused #170)
Midstream files that both forward upstream variables for downstream files to configure and configure upstream variables themselves would previously be migrated to a broken result. These cases should now be migrated to a
@forward ... with
rule, which didn't exist the last time I updated the configurable variable code.@import
rules that are migrated to both a@use
and@forward
rule would previously only migrate one in-place (adding the extra at after all existing rules). Now, both should be migrated in place.