File tree 16 files changed +27
-92
lines changed
16 files changed +27
-92
lines changed Original file line number Diff line number Diff line change 4
4
// license that can be found in the LICENSE file or at
5
5
// https://opensource.org/licenses/MIT.
6
6
7
- import 'package:sass/sass .dart' ;
7
+ import 'package:sass_api/sass_api .dart' ;
8
8
import 'package:source_span/source_span.dart' ;
9
9
10
10
/// An exception thrown by a migrator.
Original file line number Diff line number Diff line change @@ -8,16 +8,9 @@ import 'dart:collection';
8
8
9
9
import 'package:meta/meta.dart' ;
10
10
import 'package:path/path.dart' as p;
11
+ import 'package:sass_api/sass_api.dart' ;
11
12
import 'package:source_span/source_span.dart' ;
12
13
13
- // The sass package's API is not necessarily stable. It is being imported with
14
- // the Sass team's explicit knowledge and approval. See
15
- // https://github.com/sass/dart-sass/issues/236.
16
- import 'package:sass/src/ast/sass.dart' ;
17
- import 'package:sass/src/importer.dart' ;
18
- import 'package:sass/src/import_cache.dart' ;
19
- import 'package:sass/src/visitor/recursive_ast.dart' ;
20
-
21
14
import 'exception.dart' ;
22
15
import 'patch.dart' ;
23
16
Original file line number Diff line number Diff line change 4
4
// license that can be found in the LICENSE file or at
5
5
// https://opensource.org/licenses/MIT.
6
6
7
- // The sass package's API is not necessarily stable. It is being imported with
8
- // the Sass team's explicit knowledge and approval. See
9
- // https://github.com/sass/dart-sass/issues/236.
10
- import 'package:sass/sass.dart' ;
11
- import 'package:sass/src/ast/sass.dart' ;
12
- import 'package:sass/src/importer.dart' ;
13
- import 'package:sass/src/import_cache.dart' ;
14
-
15
7
import 'package:args/command_runner.dart' ;
16
8
import 'package:glob/glob.dart' ;
17
9
import 'package:meta/meta.dart' ;
18
10
import 'package:path/path.dart' as p;
19
- import 'package:sass_migrator/src/util/node_modules_importer .dart' ;
11
+ import 'package:sass_api/sass_api .dart' ;
20
12
import 'package:source_span/source_span.dart' ;
21
13
22
14
import 'exception.dart' ;
23
15
import 'io.dart' ;
16
+ import 'util/node_modules_importer.dart' ;
24
17
import 'utils.dart' ;
25
18
26
19
/// A migrator is a command that migrates the entrypoints provided to it and
Original file line number Diff line number Diff line change 5
5
// https://opensource.org/licenses/MIT.
6
6
7
7
import 'package:args/args.dart' ;
8
- import 'package:sass/sass.dart' ;
9
-
10
- // The sass package's API is not necessarily stable. It is being imported with
11
- // the Sass team's explicit knowledge and approval. See
12
- // https://github.com/sass/dart-sass/issues/236.
13
- import 'package:sass/src/ast/sass.dart' ;
14
- import 'package:sass/src/import_cache.dart' ;
15
-
16
- import 'package:sass_migrator/src/migration_visitor.dart' ;
17
- import 'package:sass_migrator/src/migrator.dart' ;
18
- import 'package:sass_migrator/src/patch.dart' ;
19
- import 'package:sass_migrator/src/utils.dart' ;
8
+ import 'package:sass_api/sass_api.dart' ;
9
+
10
+ import '../migration_visitor.dart' ;
11
+ import '../migrator.dart' ;
12
+ import '../patch.dart' ;
13
+ import '../utils.dart' ;
20
14
21
15
/// Migrates stylesheets that use the `/` operator for division to use the
22
16
/// `divide` function instead.
Original file line number Diff line number Diff line change 4
4
// license that can be found in the LICENSE file or at
5
5
// https://opensource.org/licenses/MIT.
6
6
7
- // The sass package's API is not necessarily stable. It is being imported with
8
- // the Sass team's explicit knowledge and approval. See
9
- // https://github.com/sass/dart-sass/issues/236.
10
- import 'package:sass/src/ast/sass.dart' ;
11
- import 'package:sass/src/importer.dart' ;
12
- import 'package:sass/src/import_cache.dart' ;
13
- import 'package:sass/src/parse/parser.dart' ;
14
-
15
7
import 'package:args/args.dart' ;
16
8
import 'package:collection/collection.dart' ;
17
9
import 'package:path/path.dart' as p;
10
+ import 'package:sass_api/sass_api.dart' ;
18
11
import 'package:source_span/source_span.dart' ;
19
12
import 'package:tuple/tuple.dart' ;
20
13
@@ -1320,7 +1313,7 @@ class _ModuleMigrationVisitor extends MigrationVisitor {
1320
1313
prefixesToRemove.where ((prefix) =>
1321
1314
prefix.length < identifier.length &&
1322
1315
identifier.startsWith (prefix) &&
1323
- Parser . isIdentifier (identifier.substring (prefix.length))),
1316
+ isIdentifier (identifier.substring (prefix.length))),
1324
1317
(prefix) => prefix.length);
1325
1318
1326
1319
/// Disallows `@use` after `@at-root` rules.
Original file line number Diff line number Diff line change 4
4
// license that can be found in the LICENSE file or at
5
5
// https://opensource.org/licenses/MIT.
6
6
7
- // The sass package's API is not necessarily stable. It is being imported with
8
- // the Sass team's explicit knowledge and approval. See
9
- // https://github.com/sass/dart-sass/issues/236.
10
- import 'package:sass/src/ast/sass.dart' ;
11
-
12
7
import 'package:path/path.dart' as p;
8
+ import 'package:sass_api/sass_api.dart' ;
13
9
14
10
import '../../utils.dart' ;
15
11
Original file line number Diff line number Diff line change 4
4
// license that can be found in the LICENSE file or at
5
5
// https://opensource.org/licenses/MIT.
6
6
7
- // The sass package's API is not necessarily stable. It is being imported with
8
- // the Sass team's explicit knowledge and approval. See
9
- // https://github.com/sass/dart-sass/issues/236.
10
- import 'package:sass/src/ast/sass.dart' ;
11
- import 'package:sass_migrator/src/utils.dart' ;
12
-
13
7
import 'package:path/path.dart' as p;
8
+ import 'package:sass_api/sass_api.dart' ;
9
+
10
+ import '../../utils.dart' ;
14
11
15
12
/// A [ReferenceSource] is used to track where a referenced member came from.
16
13
abstract class ReferenceSource {
Original file line number Diff line number Diff line change 4
4
// license that can be found in the LICENSE file or at
5
5
// https://opensource.org/licenses/MIT.
6
6
7
- // The sass package's API is not necessarily stable. It is being imported with
8
- // the Sass team's explicit knowledge and approval. See
9
- // https://github.com/sass/dart-sass/issues/236.
10
- import 'package:sass/src/ast/node.dart' ;
11
- import 'package:sass/src/ast/sass.dart' ;
12
- import 'package:sass/src/importer.dart' ;
13
- import 'package:sass/src/import_cache.dart' ;
14
- import 'package:sass/src/visitor/recursive_ast.dart' ;
15
-
16
7
import 'package:collection/collection.dart' ;
17
8
import 'package:path/path.dart' as p;
9
+ import 'package:sass_api/sass_api.dart' ;
18
10
19
11
import '../../exception.dart' ;
20
12
import '../../util/bidirectional_map.dart' ;
Original file line number Diff line number Diff line change 4
4
// license that can be found in the LICENSE file or at
5
5
// https://opensource.org/licenses/MIT.
6
6
7
- // The sass package's API is not necessarily stable. It is being imported with
8
- // the Sass team's explicit knowledge and approval. See
9
- // https://github.com/sass/dart-sass/issues/236.
10
- import 'package:sass/src/ast/sass.dart' ;
7
+ import 'package:sass_api/sass_api.dart' ;
11
8
12
9
import 'member_declaration.dart' ;
13
10
Original file line number Diff line number Diff line change 4
4
// license that can be found in the LICENSE file or at
5
5
// https://opensource.org/licenses/MIT.
6
6
7
- // The sass package's API is not necessarily stable. It is being imported with
8
- // the Sass team's explicit knowledge and approval. See
9
- // https://github.com/sass/dart-sass/issues/236.
10
- import 'package:sass/src/ast/sass.dart' ;
7
+ import 'package:sass_api/sass_api.dart' ;
11
8
12
9
import 'member_declaration.dart' ;
13
10
import 'unreferencable_type.dart' ;
Original file line number Diff line number Diff line change 4
4
// license that can be found in the LICENSE file or at
5
5
// https://opensource.org/licenses/MIT.
6
6
7
- // The sass package's API is not necessarily stable. It is being imported with
8
- // the Sass team's explicit knowledge and approval. See
9
- // https://github.com/sass/dart-sass/issues/236.
10
- import 'package:sass/src/ast/sass.dart' ;
11
-
12
7
import 'package:meta/meta.dart' ;
13
8
import 'package:path/path.dart' as p;
9
+ import 'package:sass_api/sass_api.dart' ;
14
10
15
11
import '../../exception.dart' ;
16
12
Original file line number Diff line number Diff line change 5
5
// https://opensource.org/licenses/MIT.
6
6
7
7
import 'package:args/args.dart' ;
8
- import 'package:sass/sass .dart' ;
8
+ import 'package:sass_api/sass_api .dart' ;
9
9
import 'package:source_span/source_span.dart' ;
10
10
11
- // The sass package's API is not necessarily stable. It is being imported with
12
- // the Sass team's explicit knowledge and approval. See
13
- // https://github.com/sass/dart-sass/issues/236.
14
- import 'package:sass/src/ast/sass.dart' ;
15
- import 'package:sass/src/exception.dart' ;
16
- import 'package:sass/src/import_cache.dart' ;
17
-
18
11
import '../migration_visitor.dart' ;
19
12
import '../migrator.dart' ;
20
13
import '../patch.dart' ;
@@ -107,7 +100,7 @@ class _NamespaceMigrationVisitor extends MigrationVisitor {
107
100
108
101
// If there's still a conflict, fail unless --force is passed.
109
102
if (! forceRename) {
110
- throw MultiSpanSassException (
103
+ throw MultiSourceSpanException (
111
104
'Rename failed. ${rules .length } rules would use namespace '
112
105
'"$newNamespace ".\n '
113
106
'Run with --force to rename with numerical suffixes.' ,
Original file line number Diff line number Diff line change 5
5
// https://opensource.org/licenses/MIT.
6
6
7
7
import 'package:path/path.dart' as p;
8
- import 'package:sass/sass .dart' ;
8
+ import 'package:sass_api/sass_api .dart' ;
9
9
10
10
import '../io.dart' ;
11
11
Original file line number Diff line number Diff line change 5
5
// https://opensource.org/licenses/MIT.
6
6
7
7
import 'package:charcode/charcode.dart' ;
8
+ import 'package:sass_api/sass_api.dart' ;
8
9
import 'package:source_span/source_span.dart' ;
9
10
import 'package:tuple/tuple.dart' ;
10
11
11
- // The sass package's API is not necessarily stable. It is being imported with
12
- // the Sass team's explicit knowledge and approval. See
13
- // https://github.com/sass/dart-sass/issues/236.
14
- import 'package:sass/src/ast/sass.dart' ;
15
- import 'package:sass/src/ast/node.dart' ;
16
-
17
12
import 'io.dart' ;
18
13
import 'patch.dart' ;
19
14
Original file line number Diff line number Diff line change 1
1
name : sass_migrator
2
- version : 1.5.5-dev
2
+ version : 1.5.5
3
3
description : A tool for running migrations on Sass files
4
4
homepage : https://github.com/sass/migrator
5
5
@@ -17,7 +17,7 @@ dependencies:
17
17
node_interop : ^2.0.2
18
18
node_io : ^2.1.0
19
19
path : ^1.8.0
20
- sass : ^1.44.0
20
+ sass_api : ^1.0.0-beta.48
21
21
source_span : ^1.8.1
22
22
string_scanner : ^1.1.0
23
23
term_glyph : ^1.2.0
Original file line number Diff line number Diff line change 11
11
}
12
12
13
13
<==> error.txt
14
- Error: Rename failed. 2 rules would use namespace "library".
14
+ Error on line 1, column 1 of entrypoint.scss : Rename failed. 2 rules would use namespace "library".
15
15
Run with --force to rename with numerical suffixes.
16
16
,
17
17
1 | @use "library-a";
18
18
| ^^^^^^^^^^^^^^^^
19
19
2 | @use "library-b";
20
20
| ================
21
21
'
22
- entrypoint.scss 1:1 root stylesheet
23
22
Migration failed!
You can’t perform that action at this time.
0 commit comments