diff --git a/CHANGELOG.md b/CHANGELOG.md index 6317ecb..e8fdee6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 1.7.1 + +* Eliminates invalid warnings when running `--migrate-deps` on a file that + uses a built-in module. + ## 1.7.0 ### Media Logic Migrator diff --git a/lib/src/migration_visitor.dart b/lib/src/migration_visitor.dart index 7c5c874..c90f6e2 100644 --- a/lib/src/migration_visitor.dart +++ b/lib/src/migration_visitor.dart @@ -120,6 +120,7 @@ abstract class MigrationVisitor @protected void visitDependency(Uri dependency, FileSpan context, {bool forImport = false}) { + if (dependency.scheme == 'sass') return; var result = importCache.import(dependency, baseImporter: _importer, baseUrl: _currentUrl, forImport: forImport); if (result != null) { diff --git a/pubspec.yaml b/pubspec.yaml index cd22de0..2818c4a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: sass_migrator -version: 1.7.0 +version: 1.7.1 description: A tool for running migrations on Sass files homepage: https://github.com/sass/migrator diff --git a/test/migrators/division/existing_sass_math.hrx b/test/migrators/division/existing_sass_math.hrx new file mode 100644 index 0000000..3ad45f1 --- /dev/null +++ b/test/migrators/division/existing_sass_math.hrx @@ -0,0 +1,12 @@ +<==> arguments +--migrate-deps + +<==> input/entrypoint.scss +@use "sass:math"; + +$variable: 4 / 3; + +<==> output/entrypoint.scss +@use "sass:math"; + +$variable: math.div(4, 3);