Skip to content

Commit

Permalink
[FIX] Glob no longer expose minimatch in proto (#2822)
Browse files Browse the repository at this point in the history
* [FIX] Glob no longer expose minimatch in proto
  • Loading branch information
iRyusa authored Feb 5, 2024
1 parent ced6179 commit 79a305f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions packages/mjml-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"html-minifier": "^4.0.0",
"js-beautify": "^1.6.14",
"lodash": "^4.17.21",
"minimatch": "^9.0.3",
"mjml-core": "4.15.2",
"mjml-migrate": "4.15.2",
"mjml-parser-xml": "4.15.2",
Expand Down
6 changes: 3 additions & 3 deletions packages/mjml-cli/src/commands/watchFiles.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* eslint-disable no-console */
import chokidar from 'chokidar'
import { glob } from 'glob'
import { sync } from 'glob'
import { match } from 'minimatch'
import path from 'path'
import mjml2html from 'mjml-core'
import { flow, pickBy, flatMap, uniq, difference, remove } from 'lodash/fp'
Expand Down Expand Up @@ -98,8 +99,7 @@ export default (input, options) => {
console.log(`Now watching file: ${filePath}`)

const matchInputOption = input.reduce(
(found, file) =>
found || glob(path.resolve(file)).minimatch.match(filePath),
(found, file) => found || match(sync(path.resolve(file)), filePath),
false,
)

Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6332,7 +6332,7 @@ minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2:
dependencies:
brace-expansion "^1.1.7"

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

0 comments on commit 79a305f

Please sign in to comment.