File tree Expand file tree Collapse file tree 3 files changed +47
-6
lines changed
Expand file tree Collapse file tree 3 files changed +47
-6
lines changed Original file line number Diff line number Diff line change 3333 with : {sdk: "${{ matrix.dart_channel }}"}
3434 - uses : sass/clone-linked-repo@v1
3535 with : {repo: sass/dart-sass, path: dart-sass}
36- - run : " dart pub add \" override:sass:{path: dart-sass}\" "
36+ - run : " dart pub add \" override:sass:{path: dart-sass}\" \" override:sass_api:{path: dart-sass/pkg/sass_api} \" "
3737 - run : dart pub get
3838 - run : dart pub run grinder pkg-standalone-dev
3939 - name : Run tests
7474 with : {sdk: "${{ matrix.dart_channel }}"}
7575 - uses : sass/clone-linked-repo@v1
7676 with : {repo: sass/dart-sass, path: dart-sass}
77- - run : " dart pub add \" override:sass:{path: dart-sass}\" "
77+ - run : " dart pub add \" override:sass:{path: dart-sass}\" \" override:sass_api:{path: dart-sass/pkg/sass_api} \" "
7878 - run : dart pub get
7979 - uses : actions/setup-node@v2
8080 with : {node-version: "${{ matrix.node_version }}"}
9292 - uses : dart-lang/setup-dart@v1
9393 - uses : sass/clone-linked-repo@v1
9494 with : {repo: sass/dart-sass, path: dart-sass}
95- - run : " dart pub add \" override:sass:{path: dart-sass}\" "
95+ - run : " dart pub add \" override:sass:{path: dart-sass}\" \" override:sass_api:{path: dart-sass/pkg/sass_api} \" "
9696 - run : dart pub get
9797 - name : Analyze dart
9898 run : dart analyze --fatal-warnings --fatal-infos lib tool test
Original file line number Diff line number Diff line change 11name : sass_migrator
2- version : 2.5.0
2+ version : 2.5.1
33description : A tool for running migrations on Sass files
44homepage : https://github.com/sass/migrator
55
66environment :
7- sdk : ' >=3.0 .0 <4.0.0'
7+ sdk : ' >=3.2 .0 <4.0.0'
88
99dependencies :
1010 args : ^2.1.0
@@ -17,7 +17,7 @@ dependencies:
1717 node_interop : ^2.0.2
1818 node_io : ^2.3.0
1919 path : ^1.8.0
20- sass_api : ^15.4 .0
20+ sass_api : ^17.0 .0
2121 source_span : ^1.8.1
2222 stack_trace : ^1.10.0
2323 string_scanner : ^1.1.0
@@ -31,6 +31,7 @@ dev_dependencies:
3131 http : ^1.1.2
3232 node_preamble : ^2.0.0
3333 pub_semver : ^2.0.0
34+ pubspec_parse : ^1.5.0
3435 test : ^1.17.1
3536 test_descriptor : ^2.0.0
3637 test_process : ^2.0.0
Original file line number Diff line number Diff line change 1+ // Copyright 2025 Google LLC
2+ //
3+ // Use of this source code is governed by an MIT-style
4+ // license that can be found in the LICENSE file or at
5+ // https://opensource.org/licenses/MIT.
6+
7+ import 'dart:io' ;
8+ import 'dart:isolate' ;
9+
10+ import 'package:test/test.dart' ;
11+ import 'package:pubspec_parse/pubspec_parse.dart' ;
12+ import 'package:path/path.dart' as p;
13+
14+ void main () {
15+ test ("declares a compatible dependency for sass_api" , () {
16+ var migratorPubspec = Pubspec .parse (File ("pubspec.yaml" ).readAsStringSync (),
17+ sourceUrl: p.toUri ("pubspec.yaml" ));
18+ var sassApiPubspecPath = p.normalize (p.join (
19+ p.fromUri (
20+ Isolate .resolvePackageUriSync (Uri .parse ("package:sass_api/." ))),
21+ "../pubspec.yaml" ));
22+ var sassApiPubspec = Pubspec .parse (
23+ File (sassApiPubspecPath).readAsStringSync (),
24+ sourceUrl: p.toUri (sassApiPubspecPath));
25+
26+ switch (migratorPubspec.dependencies["sass_api" ]) {
27+ case HostedDependency dep:
28+ if (! dep.version.allows (sassApiPubspec.version! )) {
29+ fail ("sass_api dependency $dep doesn't include actual sass_api "
30+ "version ${sassApiPubspec .version !}" );
31+ }
32+
33+ case var dep?:
34+ fail ("Expected a hosted dependency on sass_api, was $dep " );
35+
36+ case null :
37+ fail ("This package doesn't seem to have a dependency on sass_api" );
38+ }
39+ });
40+ }
You can’t perform that action at this time.
0 commit comments