diff --git a/tasks/zip-create.js b/tasks/zip-create.js index 8d7058d0..f7291751 100644 --- a/tasks/zip-create.js +++ b/tasks/zip-create.js @@ -1,6 +1,6 @@ import {parse, dirname, join, basename} from 'node:path'; import fs from 'fs-extra'; -import {globSync} from 'glob'; +import glob from 'glob'; import fsUtils from '@tryghost/mg-fs-utils'; import {makeTaskRunner} from '@tryghost/listr-smart-renderer'; @@ -98,7 +98,7 @@ const getFullTaskList = (options) => { task: async (ctx) => { // 2. Get the size for each image that was just copied try { - let filePaths = globSync(`${ctx.fileCache.tmpDir}/**/*`, { + let filePaths = glob.globSync(`${ctx.fileCache.tmpDir}/**/*`, { dot: false, nodir: true }); @@ -155,7 +155,7 @@ const getFullTaskList = (options) => { task: async (ctx) => { // 5. Zip each of those new chunk directories try { - let chunkDirs = globSync(`${ctx.fileCache.zipDir}/chunks/*`); + let chunkDirs = glob.globSync(`${ctx.fileCache.zipDir}/chunks/*`); // This does not work properly, and is still trying to create the zip file when the tmp dir has been deleted // When resolved, re-enable the 'Cleaning up' task @@ -173,7 +173,7 @@ const getFullTaskList = (options) => { task: async (ctx) => { // 6. Move each new zip to the desired destination path try { - let filePaths = globSync(`${ctx.fileCache.zipDir}/*.zip`); + let filePaths = glob.globSync(`${ctx.fileCache.zipDir}/*.zip`); await Promise.all(filePaths.map(async (filePath) => { let fileName = basename(filePath); diff --git a/tasks/zip-split.js b/tasks/zip-split.js index 899270a9..35348539 100644 --- a/tasks/zip-split.js +++ b/tasks/zip-split.js @@ -2,7 +2,7 @@ import {dirname, basename, parse, join} from 'node:path'; import fsUtils from '@tryghost/mg-fs-utils'; import zip from '@tryghost/zip'; import fs from 'fs-extra'; -import {globSync} from 'glob'; +import glob from 'glob'; import {makeTaskRunner} from '@tryghost/listr-smart-renderer'; import superbytes from 'superbytes'; @@ -102,7 +102,7 @@ const getFullTaskList = (options) => { task: async (ctx, task) => { // 2. Get the size for each image that was just unzipped try { - let filePaths = globSync(`${ctx.fileCache.tmpDir}/**/*`, { + let filePaths = glob.globSync(`${ctx.fileCache.tmpDir}/**/*`, { dot: false, nodir: true }); @@ -163,7 +163,7 @@ const getFullTaskList = (options) => { task: async (ctx) => { // 5. Zip each of those new chunk directories let tasks = []; - let chunkDirs = globSync(`${ctx.fileCache.zipDir}/chunks/*`); + let chunkDirs = glob.globSync(`${ctx.fileCache.zipDir}/chunks/*`); chunkDirs.forEach((dir, index) => { const zipFileParts = parse(ctx.args.zipFile);