Skip to content

Commit f39df79

Browse files
authored
Fix glob resolution on Node (#191)
Fixes #189.
1 parent 1dd2fbd commit f39df79

File tree

3 files changed

+23
-3
lines changed

3 files changed

+23
-3
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.4.1
2+
3+
* Globs containing `**` should now be properly resolved when running on Node.
4+
15
## 1.4.0
26

37
### Division Migrator

pubspec.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: sass_migrator
2-
version: 1.4.0
2+
version: 1.4.1
33
description: A tool for running migrations on Sass files
44
author: Jennifer Thakar <[email protected]>
55
homepage: https://github.com/sass/migrator
@@ -15,8 +15,8 @@ dependencies:
1515
glob: ^2.0.1
1616
js: ^0.6.3
1717
meta: ^1.3.0
18-
node_interop: ^2.0.1
19-
node_io: ^2.0.0
18+
node_interop: ^2.0.2
19+
node_io: ^2.1.0
2020
path: ^1.8.0
2121
sass: ^1.32.11
2222
source_span: ^1.8.1

test/cli_dart_test.dart

+16
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,22 @@ void main() {
4848
.validate();
4949
});
5050

51+
test("allows recursive glob arguments", () async {
52+
await d.dir('dir', [
53+
d.file("test-1.scss", "a {b: (1 / 2)}"),
54+
d.file("test-2.scss", "c {d: (1 / 2)}"),
55+
d.file("test-3.scss", "e {f: (1 / 2)}")
56+
]).create();
57+
58+
await (await runMigrator(["division", "**.scss"])).shouldExit(0);
59+
60+
await d.dir('dir', [
61+
d.file("test-1.scss", '@use "sass:math";\n\na {b: math.div(1, 2)}'),
62+
d.file("test-2.scss", '@use "sass:math";\n\nc {d: math.div(1, 2)}'),
63+
d.file("test-3.scss", '@use "sass:math";\n\ne {f: math.div(1, 2)}')
64+
]).validate();
65+
});
66+
5167
group("with --dry-run", () {
5268
test("prints the name of a file that would be migrated", () async {
5369
await d.file("test.scss", "a {b: abs(-1)}").create();

0 commit comments

Comments
 (0)