Skip to content

Commit a728675

Browse files
chore: update globby
BRAKING CHANGE: globby was update to latest version, some pattern can't work on windows, please read documentation
1 parent 64b2e1a commit a728675

File tree

10 files changed

+217
-228
lines changed

10 files changed

+217
-228
lines changed

README.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ Type: `String`
9595
Default: `undefined`
9696

9797
Glob or path from where we сopy files.
98-
Globs accept [minimatch options](https://github.com/isaacs/minimatch).
98+
Globs accept [micromatch options](https://github.com/micromatch/micromatch).
9999

100100
> ⚠️ Don't use directly `\\` in `from` (i.e `path\to\file.ext`) option because on UNIX the backslash is a valid character inside a path component, i.e., it's not a separator.
101101
> On Windows, the forward slash and the backward slash are both separators.
@@ -122,6 +122,27 @@ module.exports = {
122122
};
123123
```
124124

125+
##### `For windows`
126+
127+
If you define `from` as file path or folder path on `Windows`, you can use windows path segment (`\\`)
128+
129+
```
130+
...
131+
from: path.resolve('__dirname', 'file.txt'),
132+
...
133+
```
134+
135+
But you should always use forward-slashes in `glob` expressions
136+
See [fast-glob manual](https://github.com/mrmlnc/fast-glob#how-to-write-patterns-on-windows).
137+
138+
```
139+
...
140+
const FIXTURES_DIR_NORMALIZED = path.resolve(__dirname, 'fixtures').replace(/\\/g, '/');
141+
142+
from: path.posix.join(FIXTURES_DIR_NORMALIZED, 'file.txt'),
143+
...
144+
```
145+
125146
#### `to`
126147

127148
Type: `String`

package-lock.json

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

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,8 @@
4343
"dependencies": {
4444
"cacache": "^15.0.0",
4545
"find-cache-dir": "^3.3.1",
46-
"glob-parent": "^3.1.0",
47-
"globby": "^7.1.1",
48-
"is-glob": "^4.0.1",
46+
"glob-parent": "^5.1.1",
47+
"globby": "^11.0.0",
4948
"loader-utils": "^2.0.0",
5049
"minimatch": "^3.0.4",
5150
"normalize-path": "^3.0.0",

0 commit comments

Comments
 (0)