File tree Expand file tree Collapse file tree 4 files changed +35
-2
lines changed Expand file tree Collapse file tree 4 files changed +35
-2
lines changed Original file line number Diff line number Diff line change
1
+ ## 1.26.3
2
+
3
+ * Fix a bug where ` --watch ` mode could go into an infinite loop compiling CSS
4
+ files to themselves.
5
+
1
6
## 1.26.2
2
7
3
8
* More aggressively eliminate redundant selectors in the ` selector.extend() ` and
Original file line number Diff line number Diff line change @@ -267,7 +267,7 @@ class _Watcher {
267
267
p.setExtension (p.relative (source, from: sourceDir), '.css' ));
268
268
269
269
// Don't compile ".css" files to their own locations.
270
- if (destination != source) return destination;
270
+ if (! p. equals ( destination, source) ) return destination;
271
271
}
272
272
273
273
return null ;
Original file line number Diff line number Diff line change 1
1
name : sass
2
- version : 1.26.2
2
+ version : 1.26.3
3
3
description : A Sass implementation in Dart.
4
4
author : Sass Team
5
5
homepage : https://github.com/sass/dart-sass
Original file line number Diff line number Diff line change @@ -173,6 +173,34 @@ void sharedTests(Future<TestProcess> runSass(Iterable<String> arguments)) {
173
173
]).validate ();
174
174
});
175
175
176
+ test (
177
+ "when it's modified twice when watched from a directory that is "
178
+ "also a destination" , () async {
179
+ await d.file ("test.scss" , "a {b: c}" ).create ();
180
+
181
+ var sass = await watch (["." ]);
182
+ await expectLater (
183
+ sass.stdout, emits ('Compiled test.scss to test.css.' ));
184
+ await expectLater (sass.stdout, _watchingForChanges);
185
+ await tickIfPoll ();
186
+
187
+ await d.file ("test.scss" , "r {o: g}" ).create ();
188
+ await expectLater (
189
+ sass.stdout, emits ('Compiled test.scss to test.css.' ));
190
+
191
+ await tickIfPoll ();
192
+
193
+ await d.file ("test.scss" , "x {y: z}" ).create ();
194
+ await expectLater (
195
+ sass.stdout, emits ('Compiled test.scss to test.css.' ));
196
+
197
+ await sass.kill ();
198
+
199
+ await d
200
+ .file ("test.css" , equalsIgnoringWhitespace ("x { y: z; }" ))
201
+ .validate ();
202
+ });
203
+
176
204
group ("when its dependency is modified" , () {
177
205
test ("through @import" , () async {
178
206
await d.file ("_other.scss" , "a {b: c}" ).create ();
You can’t perform that action at this time.
0 commit comments