File tree Expand file tree Collapse file tree 4 files changed +33
-2
lines changed Expand file tree Collapse file tree 4 files changed +33
-2
lines changed Original file line number Diff line number Diff line change 33* Fix a bug where ` @extend ` rules loaded through a mixture of ` @import ` and
44 ` @use ` rules could fail to apply correctly.
55
6+ ### Command-Line Interface
7+
8+ * In ` --watch ` mode, delete the source map when the associated source file is
9+ deleted.
10+
611## 1.91.0
712
813* ** Potentially breaking change:** ` meta.inspect() ` (as well as other systems
Original file line number Diff line number Diff line change @@ -166,7 +166,10 @@ final class _Watcher {
166166 var url = _canonicalize (path);
167167
168168 if (_graph.nodes.containsKey (url)) {
169- if (_destinationFor (path) case var destination? ) _delete (destination);
169+ if (_destinationFor (path) case var destination? ) {
170+ _delete (destination);
171+ _delete ("$destination .map" );
172+ }
170173 }
171174
172175 var downstream = _graph.remove (FilesystemImporter .cwd, url);
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ environment:
1010 sdk : " >=3.6.0 <4.0.0"
1111
1212dependencies :
13- sass : 1.91.1
13+ sass : 1.91.1-dev
1414
1515dev_dependencies :
1616 dartdoc : ^8.0.14
Original file line number Diff line number Diff line change @@ -976,6 +976,29 @@ void sharedTests(Future<TestProcess> runSass(Iterable<String> arguments)) {
976976
977977 await d.dir ("dir" , [d.nothing ("out.css" )]).validate ();
978978 });
979+
980+ test ("and deletes the source map" , () async {
981+ await d.file ("test.scss" , "a {b: c}" ).create ();
982+
983+ var sass = await watch (["--source-map" , "test.scss:out.css" ]);
984+ await expectLater (
985+ sass.stdout,
986+ emits (endsWith ('Compiled test.scss to out.css.' )),
987+ );
988+ await expectLater (sass.stdout, _watchingForChanges);
989+ await tickIfPoll ();
990+
991+ d.file ("test.scss" ).io.deleteSync ();
992+ await expectLater (
993+ sass.stdout,
994+ emitsInOrder ([
995+ 'Deleted out.css.' ,
996+ 'Deleted out.css.map.' ,
997+ ]));
998+ await sass.kill ();
999+
1000+ await d.nothing ("out.css" ).validate ();
1001+ });
9791002 });
9801003
9811004 test ("creates a new CSS file when a Sass file is added" , () async {
You can’t perform that action at this time.
0 commit comments