Skip to content

Commit

Permalink
Fix glob resolution on Node (#191)
Browse files Browse the repository at this point in the history
Fixes #189.
  • Loading branch information
jathak authored May 24, 2021
1 parent 1dd2fbd commit f39df79
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.4.1

* Globs containing `**` should now be properly resolved when running on Node.

## 1.4.0

### Division Migrator
Expand Down
6 changes: 3 additions & 3 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: sass_migrator
version: 1.4.0
version: 1.4.1
description: A tool for running migrations on Sass files
author: Jennifer Thakar <[email protected]>
homepage: https://github.com/sass/migrator
Expand All @@ -15,8 +15,8 @@ dependencies:
glob: ^2.0.1
js: ^0.6.3
meta: ^1.3.0
node_interop: ^2.0.1
node_io: ^2.0.0
node_interop: ^2.0.2
node_io: ^2.1.0
path: ^1.8.0
sass: ^1.32.11
source_span: ^1.8.1
Expand Down
16 changes: 16 additions & 0 deletions test/cli_dart_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,22 @@ void main() {
.validate();
});

test("allows recursive glob arguments", () async {
await d.dir('dir', [
d.file("test-1.scss", "a {b: (1 / 2)}"),
d.file("test-2.scss", "c {d: (1 / 2)}"),
d.file("test-3.scss", "e {f: (1 / 2)}")
]).create();

await (await runMigrator(["division", "**.scss"])).shouldExit(0);

await d.dir('dir', [
d.file("test-1.scss", '@use "sass:math";\n\na {b: math.div(1, 2)}'),
d.file("test-2.scss", '@use "sass:math";\n\nc {d: math.div(1, 2)}'),
d.file("test-3.scss", '@use "sass:math";\n\ne {f: math.div(1, 2)}')
]).validate();
});

group("with --dry-run", () {
test("prints the name of a file that would be migrated", () async {
await d.file("test.scss", "a {b: abs(-1)}").create();
Expand Down

0 comments on commit f39df79

Please sign in to comment.