Skip to content

Commit 3b26f98

Browse files
committed
feat: move from anymatch to picomatch as it is better glob compliant
1 parent 077cd5f commit 3b26f98

File tree

9 files changed

+187
-745
lines changed

9 files changed

+187
-745
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ fs.utils.iconv.encodingExists("us-ascii")
351351
## `fs.utils`
352352
`fs.utils` houses several file related utilities.
353353
1. [`fs.utils.iconv`](https://www.npmjs.com/package/iconv-lite) - iconv-lite: Pure JS character encoding conversion library. See API docs here: https://www.npmjs.com/package/iconv-lite
354-
2. [`fs.utils.anymatch`](https://github.com/micromatch/anymatch) - Javascript module to match a string against a regular expression, glob, string, or function that takes the string as an argument and returns a truthy or falsy value. The matcher can also be an array of any or all of these. Useful for allowing a very flexible user-defined config to define things like file paths. Docs: https://github.com/micromatch/anymatch
354+
2. [`fs.utils.picomatch`](https://www.npmjs.com/package/picomatch) - Javascript module to match a string against a regular expression, glob, string, or function that takes the string as an argument and returns a truthy or falsy value. https://www.npmjs.com/package/picomatch
355355
3. [`fs.utils.ignore`](https://www.npmjs.com/package/ignore) - To filter filenames according to a .gitignore file. https://www.npmjs.com/package/ignore
356356

357357
### Usage of encoding in `fs.readFile` API

dist/virtualfs-debug.js

Lines changed: 23 additions & 572 deletions
Large diffs are not rendered by default.

dist/virtualfs-debug.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/virtualfs.js

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

dist/virtualfs.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 66 additions & 9 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
@@ -46,7 +46,7 @@
4646
],
4747
"devDependencies": {
4848
"@tauri-apps/cli": "1.5.7",
49-
"anymatch": "^3.1.3",
49+
"picomatch": "^4.0.1",
5050
"browser-mime": "1.0.1",
5151
"buffer": "^6.0.3",
5252
"eslint": "8.19.0",

src/fslib.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const {Constants} = require('./constants');
3030
const {Mounts} = require('./fslib_mounts');
3131
const {FsWatch} = require('./fslib_watch');
3232
const {globalCopy} = require('./filerlib_copy.js');
33-
const anymatch = require('anymatch');
33+
const picomatch = require('picomatch/posix');
3434
const ignore = require('ignore');
3535
import * as iconv from 'iconv-lite';
3636

@@ -394,7 +394,7 @@ const fileSystemLib = {
394394
},
395395
utils: {
396396
iconv,
397-
anymatch,
397+
picomatch,
398398
ignore
399399
}
400400
};

test/test-dir.browser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ function _setupTests(testType) {
9292
expect(fs.Buffer).to.exist;
9393
expect(fs.utils.iconv).to.exist;
9494
expect(fs.utils.ignore).to.exist;
95-
expect(fs.utils.anymatch).to.exist;
95+
expect(fs.utils.picomatch).to.exist;
9696
expect(fs.path).to.exist;
9797
expect(fs.name).to.equal(`phoenixFS`);
9898
expect(fs.MOUNT_POINT_ROOT).to.equal(`/mnt`);

0 commit comments

Comments
 (0)