File tree Expand file tree Collapse file tree
test/migrators/if_function/migrate_deps Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ## 2.5.7
2+
3+ * Fix a bug where the ` --migrate-deps ` flag would not apply to dependencies
4+ via ` @forward ` rules.
5+
16## 2.5.6
27
38* No user-visible changes.
Original file line number Diff line number Diff line change @@ -190,6 +190,16 @@ abstract class MigrationVisitor extends ScopedAstVisitor {
190190 }
191191 }
192192
193+ /// If [migrateDependencies] is enabled, this dependency will be
194+ /// migrated before continuing.
195+ @override
196+ visitForwardRule (ForwardRule node) {
197+ super .visitForwardRule (node);
198+ if (migrateDependencies) {
199+ visitDependency (node.url, node.span);
200+ }
201+ }
202+
193203 /// Asserts that [value] is not `null` and returns it.
194204 ///
195205 /// This is used for fields that are set whenever the migrator is visiting
Original file line number Diff line number Diff line change 11name : sass_migrator
2- version : 2.5.6
2+ version : 2.5.7
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+ These tests are not specific to the ` if-function ` migrator, and instead designed
2+ to test the ` --migrate-deps ` flag.
3+
4+ When the ` if-function ` migrator is obsoleted and removed, these tests should
5+ be duplicated for a different migrator.
Original file line number Diff line number Diff line change 1+ <==> arguments
2+ --migrate-deps
3+
4+ <==> input/entrypoint.scss
5+ @forward "library";
6+
7+ <==> input/_library.scss
8+ a {
9+ b: if(true, c, d);
10+ }
11+
12+ <==> output/_library.scss
13+ a {
14+ b: if(sass(true): c; else: d);
15+ }
Original file line number Diff line number Diff line change 1+ <==> arguments
2+ --migrate-deps
3+
4+ <==> input/entrypoint.scss
5+ @import "library";
6+
7+ <==> input/_library.scss
8+ a {
9+ b: if(true, c, d);
10+ }
11+
12+ <==> output/_library.scss
13+ a {
14+ b: if(sass(true): c; else: d);
15+ }
Original file line number Diff line number Diff line change 1+ <==> arguments
2+ --migrate-deps
3+
4+ <==> input/entrypoint.scss
5+ @use "library";
6+
7+ <==> input/_library.scss
8+ a {
9+ b: if(true, c, d);
10+ }
11+
12+ <==> output/_library.scss
13+ a {
14+ b: if(sass(true): c; else: d);
15+ }
You can’t perform that action at this time.
0 commit comments