diff --git a/packages/pluginutils/package.json b/packages/pluginutils/package.json index b55deeef0..dda8db727 100644 --- a/packages/pluginutils/package.json +++ b/packages/pluginutils/package.json @@ -49,15 +49,15 @@ "dependencies": { "@types/estree": "0.0.39", "estree-walker": "^1.0.1", - "micromatch": "^4.0.2" + "picomatch": "^2.2.2" }, "devDependencies": { "@rollup/plugin-commonjs": "^11.0.2", "@rollup/plugin-node-resolve": "^7.1.1", "@rollup/plugin-typescript": "^3.0.0", "@types/jest": "^24.9.0", - "@types/micromatch": "^3.1.1", "@types/node": "^12.12.25", + "@types/picomatch": "^2.2.1", "typescript": "^3.7.5" }, "ava": { diff --git a/packages/pluginutils/src/createFilter.ts b/packages/pluginutils/src/createFilter.ts index fbe1a5eed..16882d0e9 100755 --- a/packages/pluginutils/src/createFilter.ts +++ b/packages/pluginutils/src/createFilter.ts @@ -1,6 +1,6 @@ import { resolve, sep, posix } from 'path'; -import mm from 'micromatch'; +import pm from 'picomatch'; import { CreateFilter } from '../types'; @@ -34,7 +34,7 @@ const createFilter: CreateFilter = function createFilter(include?, exclude?, opt test: (what: string) => { // this refactor is a tad overly verbose but makes for easy debugging const pattern = getMatcherString(id, resolutionBase); - const fn = mm.matcher(pattern, { dot: true }); + const fn = pm(pattern, { dot: true }); const result = fn(what); return result; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d61b9451d..c3f0d97d4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -320,14 +320,14 @@ importers: dependencies: '@types/estree': 0.0.39 estree-walker: 1.0.1 - micromatch: 4.0.2 + picomatch: 2.2.2 devDependencies: '@rollup/plugin-commonjs': 11.0.2 '@rollup/plugin-node-resolve': 7.1.1 '@rollup/plugin-typescript': 3.0.0_typescript@3.7.5 '@types/jest': 24.9.0 - '@types/micromatch': 3.1.1 '@types/node': 12.12.28 + '@types/picomatch': 2.2.1 typescript: 3.7.5 specifiers: '@rollup/plugin-commonjs': ^11.0.2 @@ -335,10 +335,10 @@ importers: '@rollup/plugin-typescript': ^3.0.0 '@types/estree': 0.0.39 '@types/jest': ^24.9.0 - '@types/micromatch': ^3.1.1 '@types/node': ^12.12.25 + '@types/picomatch': ^2.2.1 estree-walker: ^1.0.1 - micromatch: ^4.0.2 + picomatch: ^2.2.2 typescript: ^3.7.5 packages/replace: dependencies: @@ -2312,10 +2312,6 @@ packages: node: '>=6' resolution: integrity: sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA== - /@types/braces/3.0.0: - dev: true - resolution: - integrity: sha512-TbH79tcyi9FHwbyboOKeRachRq63mSuWYXOflsNO9ZyE5ClQ/JaozNKl+aWUq87qPNsXasXxi2AbgfwIJ+8GQw== /@types/buble/0.19.2: dependencies: magic-string: 0.25.7 @@ -2375,12 +2371,6 @@ packages: dev: true resolution: integrity: sha1-7ihweulOEdK4J7y+UnC86n8+ce4= - /@types/micromatch/3.1.1: - dependencies: - '@types/braces': 3.0.0 - dev: true - resolution: - integrity: sha512-Wr5y4uv3r7JP4jEUqv7rZeYiMBGRHcbojDVsl11wq6gw1v/ZZQvJexd9rtvVx3EIVqw8dwtcRjSs8m2DV9qHjQ== /@types/minimatch/3.0.3: dev: true resolution: @@ -2404,6 +2394,10 @@ packages: dev: true resolution: integrity: sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA== + /@types/picomatch/2.2.1: + dev: true + resolution: + integrity: sha512-26/tQcDmJXYHiaWAAIjnTVL5nwrT+IVaqFZIbBImAuKk/r/j1r/1hmZ7uaOzG6IknqP3QHcNNQ6QO8Vp28lUoA== /@types/q/1.5.2: dev: true resolution: @@ -2938,6 +2932,7 @@ packages: /braces/3.0.2: dependencies: fill-range: 7.0.1 + dev: true engines: node: '>=8' resolution: @@ -4391,6 +4386,7 @@ packages: /fill-range/7.0.1: dependencies: to-regex-range: 5.0.1 + dev: true engines: node: '>=8' resolution: @@ -5051,6 +5047,7 @@ packages: resolution: integrity: sha512-wsigDr1Kkschp2opC4G3yA6r9EgVA6NjRpWzIi9axXqeIaAATPRJc4uLujXe3Nd9uO8KoDyA4MD6aZSeXTADhA== /is-number/7.0.0: + dev: true engines: node: '>=0.12.0' resolution: @@ -5826,6 +5823,7 @@ packages: dependencies: braces: 3.0.2 picomatch: 2.2.1 + dev: true engines: node: '>=8' resolution: @@ -6406,12 +6404,12 @@ packages: resolution: integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== /picomatch/2.2.1: + dev: true engines: node: '>=8.6' resolution: integrity: sha512-ISBaA8xQNmwELC7eOjqFKMESB2VIqt4PPDD0nsS95b/9dZXvVKOlz9keMSnoGGKcOHXfTvDD6WMaRoSc9UuhRA== /picomatch/2.2.2: - dev: true engines: node: '>=8.6' resolution: @@ -8156,6 +8154,7 @@ packages: /to-regex-range/5.0.1: dependencies: is-number: 7.0.0 + dev: true engines: node: '>=8.0' resolution: