Skip to content

Commit 79a305f

Browse files
authored
[FIX] Glob no longer expose minimatch in proto (#2822)
* [FIX] Glob no longer expose minimatch in proto
1 parent ced6179 commit 79a305f

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

packages/mjml-cli/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"html-minifier": "^4.0.0",
3232
"js-beautify": "^1.6.14",
3333
"lodash": "^4.17.21",
34+
"minimatch": "^9.0.3",
3435
"mjml-core": "4.15.2",
3536
"mjml-migrate": "4.15.2",
3637
"mjml-parser-xml": "4.15.2",

packages/mjml-cli/src/commands/watchFiles.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/* eslint-disable no-console */
22
import chokidar from 'chokidar'
3-
import { glob } from 'glob'
3+
import { sync } from 'glob'
4+
import { match } from 'minimatch'
45
import path from 'path'
56
import mjml2html from 'mjml-core'
67
import { flow, pickBy, flatMap, uniq, difference, remove } from 'lodash/fp'
@@ -98,8 +99,7 @@ export default (input, options) => {
9899
console.log(`Now watching file: ${filePath}`)
99100

100101
const matchInputOption = input.reduce(
101-
(found, file) =>
102-
found || glob(path.resolve(file)).minimatch.match(filePath),
102+
(found, file) => found || match(sync(path.resolve(file)), filePath),
103103
false,
104104
)
105105

yarn.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6332,7 +6332,7 @@ minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2:
63326332
dependencies:
63336333
brace-expansion "^1.1.7"
63346334

6335-
minimatch@^9.0.1:
6335+
minimatch@^9.0.1, minimatch@^9.0.3:
63366336
version "9.0.3"
63376337
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.3.tgz#a6e00c3de44c3a542bfaae70abfc22420a6da825"
63386338
integrity sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==

0 commit comments

Comments
 (0)