Skip to content

Commit

Permalink
Eliminate invalid warnings for built-in modules (#231)
Browse files Browse the repository at this point in the history
Fixes #230.
  • Loading branch information
jathak authored Sep 13, 2022
1 parent 292c587 commit 8803576
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions lib/src/migration_visitor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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

Expand Down
12 changes: 12 additions & 0 deletions test/migrators/division/existing_sass_math.hrx
Original file line number Diff line number Diff line change
@@ -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);

0 comments on commit 8803576

Please sign in to comment.