File tree Expand file tree Collapse file tree 4 files changed +43
-4
lines changed
test/migrators/module/partial_migration Expand file tree Collapse file tree 4 files changed +43
-4
lines changed Original file line number Diff line number Diff line change 1+ ## 2.4.1
2+
3+ ### Module Migrator
4+
5+ * Fix a bug where a duplicate namespace would be added to a reassignment of a
6+ variable from another module when running on a partially migrated file.
7+
18## 2.4.0
29
3- ### Module System Migration
10+ ### Module Migrator
411
512* Better handling of late ` @import ` rules. Previously, these were treated
613 identically to nested imports, but now they can be hoisted to the top of the
2431
2532## 2.3.3
2633
27- ### Module System Migration
34+ ### Module Migrator
2835
2936* Fix some bugs in the conversion of private names that are referenced across
3037 files to public names, especially when ` --remove-prefix ` and/or multiple
Original file line number Diff line number Diff line change @@ -1236,7 +1236,7 @@ class _ModuleMigrationVisitor extends MigrationVisitor {
12361236 /// renaming or namespacing if necessary.
12371237 @override
12381238 void visitVariableDeclaration (VariableDeclaration node) {
1239- if (builtInOnly) {
1239+ if (builtInOnly || node.namespace != null ) {
12401240 super .visitVariableDeclaration (node);
12411241 return ;
12421242 }
Original file line number Diff line number Diff line change 11name : sass_migrator
2- version : 2.4.0
2+ version : 2.4.1
33description : A tool for running migrations on Sass files
44homepage : https://github.com/sass/migrator
55
Original file line number Diff line number Diff line change 1+ <==> arguments
2+ --migrate-deps
3+
4+ <==> input/entrypoint.scss
5+ @use "library";
6+ @import "imported";
7+
8+ library.$var1: blue;
9+ $var2: gold;
10+
11+ a {
12+ color: library.$var1;
13+ background: $var2;
14+ }
15+
16+ <==> input/_library.scss
17+ $var1: red;
18+
19+ <==> input/_imported.scss
20+ $var2: white;
21+
22+ <==> output/entrypoint.scss
23+ @use "library";
24+ @use "imported";
25+
26+ library.$var1: blue;
27+ imported.$var2: gold;
28+
29+ a {
30+ color: library.$var1;
31+ background: imported.$var2;
32+ }
You can’t perform that action at this time.
0 commit comments