Skip to content

Commit ada6549

Browse files
pralkarzfabiospampinato
authored andcommitted
Ported test suite: patterns
- Single patterns not matching anything no longer cause an error to be printed if there are other pattenrs that match something, as we are executing these patterns kinda together for performance, implementing that back would mean searching for files less efficiently in general.
1 parent 23965f2 commit ada6549

17 files changed

Lines changed: 210 additions & 12 deletions

File tree

package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"specialist": "^1.4.5",
5353
"tiny-editorconfig": "^1.0.0",
5454
"tiny-jsonc": "^1.0.1",
55-
"tiny-readdir-glob": "^1.22.24",
55+
"tiny-readdir-glob": "^1.23.1",
5656
"tiny-spinner": "^2.0.4",
5757
"worktank": "^2.7.3",
5858
"zeptomatch": "^2.0.0",

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ async function runGlobs(options: Options, pluginsDefaultOptions: PluginsOptions,
200200

201201
if (!totalMatched && !totalIgnored) {
202202
if (options.errorOnUnmatchedPattern) {
203-
stderr.prefixed.error(`No files matching the given patterns were found`);
203+
stderr.prefixed.error(`No files matching the given patterns were found.`);
204204
}
205205
}
206206

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
foo(
2+
3+
4+
)
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
foo(
2+
3+
4+
)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
'use strict';
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
'use strict';

test/__fixtures__/patterns/file.will-never-support

Whitespace-only changes.

test/__fixtures__/patterns/node_modules/node-module.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
'use strict';

0 commit comments

Comments
 (0)