Skip to content

Commit 8803576

Browse files
authored
Eliminate invalid warnings for built-in modules (#231)
Fixes #230.
1 parent 292c587 commit 8803576

File tree

4 files changed

+19
-1
lines changed

4 files changed

+19
-1
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 1.7.1
2+
3+
* Eliminates invalid warnings when running `--migrate-deps` on a file that
4+
uses a built-in module.
5+
16
## 1.7.0
27

38
### Media Logic Migrator

lib/src/migration_visitor.dart

+1
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ abstract class MigrationVisitor
120120
@protected
121121
void visitDependency(Uri dependency, FileSpan context,
122122
{bool forImport = false}) {
123+
if (dependency.scheme == 'sass') return;
123124
var result = importCache.import(dependency,
124125
baseImporter: _importer, baseUrl: _currentUrl, forImport: forImport);
125126
if (result != null) {

pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: sass_migrator
2-
version: 1.7.0
2+
version: 1.7.1
33
description: A tool for running migrations on Sass files
44
homepage: https://github.com/sass/migrator
55

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<==> arguments
2+
--migrate-deps
3+
4+
<==> input/entrypoint.scss
5+
@use "sass:math";
6+
7+
$variable: 4 / 3;
8+
9+
<==> output/entrypoint.scss
10+
@use "sass:math";
11+
12+
$variable: math.div(4, 3);

0 commit comments

Comments
 (0)