From e3661d6d454f6e175c1bc2f2f0241312dd4fdd95 Mon Sep 17 00:00:00 2001 From: Maxime Brazeilles Date: Mon, 29 Jan 2024 16:31:55 +0100 Subject: [PATCH] [HOTFIX] Glob package BC in cli (#2820) [HOTFIX] Glob package BC in cli --- packages/mjml-cli/src/commands/readFile.js | 4 ++-- packages/mjml-cli/src/commands/watchFiles.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/mjml-cli/src/commands/readFile.js b/packages/mjml-cli/src/commands/readFile.js index eaaa460d0..840820b29 100644 --- a/packages/mjml-cli/src/commands/readFile.js +++ b/packages/mjml-cli/src/commands/readFile.js @@ -1,9 +1,9 @@ import fs from 'fs' -import glob from 'glob' +import { sync } from 'glob' import { flatMap } from 'lodash' export const flatMapPaths = (paths) => - flatMap(paths, (p) => glob.sync(p, { nodir: true })) + flatMap(paths, (p) => sync(p, { nodir: true })) export default (path) => { try { diff --git a/packages/mjml-cli/src/commands/watchFiles.js b/packages/mjml-cli/src/commands/watchFiles.js index 09033c87d..24884a70d 100644 --- a/packages/mjml-cli/src/commands/watchFiles.js +++ b/packages/mjml-cli/src/commands/watchFiles.js @@ -1,6 +1,6 @@ /* eslint-disable no-console */ import chokidar from 'chokidar' -import glob from 'glob' +import { glob } from 'glob' import path from 'path' import mjml2html from 'mjml-core' import { flow, pickBy, flatMap, uniq, difference, remove } from 'lodash/fp'