Skip to content

Commit 851cfb2

Browse files
committed
chore(glob): replace with globSync
- removed glob dependency - replaced with native globSync
1 parent 6be02fc commit 851cfb2

File tree

4 files changed

+26
-173
lines changed

4 files changed

+26
-173
lines changed

packages/mjml-cli/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
"dependencies": {
2828
"@babel/runtime": "^7.28.4",
2929
"chokidar": "^3.0.0",
30-
"glob": "^10.3.10",
3130
"lodash": "^4.17.21",
3231
"minimatch": "^9.0.3",
3332
"mjml-core": "5.0.0-alpha.8",

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import fs from 'fs'
2-
import { sync } from 'glob'
2+
import { globSync } from 'fs'
33
import { flatMap } from 'lodash'
44

55
export const flatMapPaths = (paths) =>
6-
flatMap(paths, (p) => sync(p, { nodir: true }))
6+
flatMap(paths, (p) => globSync(p, { nodir: true }))
77

88
export default (path) => {
99
try {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* eslint-disable no-console */
22
import chokidar from 'chokidar'
3-
import { sync } from 'glob'
3+
import { globSync } from 'fs'
44
import { match } from 'minimatch'
55
import path from 'path'
66
import mjml2html from 'mjml-core'
@@ -90,7 +90,7 @@ export default (input, options) => {
9090

9191
const matchInputOption = input.reduce(
9292
(found, file) =>
93-
found || match(sync(path.resolve(file)), filePath)?.length > 0,
93+
found || match(globSync(path.resolve(file)), filePath)?.length > 0,
9494
false,
9595
)
9696

0 commit comments

Comments
 (0)