diff --git a/packages/ndla-scripts/package.json b/packages/ndla-scripts/package.json index f3fd22f884..fdcaccd75e 100644 --- a/packages/ndla-scripts/package.json +++ b/packages/ndla-scripts/package.json @@ -25,6 +25,7 @@ "dependencies": { "cross-spawn": "^7.0.3", "cross-spawn-promise": "^0.10.2", + "fast-glob": "^3.3.2", "normalize-url": "^8.0.1", "url-regex-safe": "^4.0.0", "vercel": "^33.6.2" diff --git a/packages/ndla-scripts/src/run-script.js b/packages/ndla-scripts/src/run-script.js index 61b1ef7b18..d0792b04d7 100644 --- a/packages/ndla-scripts/src/run-script.js +++ b/packages/ndla-scripts/src/run-script.js @@ -10,9 +10,8 @@ import { join, dirname } from "path"; import spawn from "cross-spawn"; -import { glob } from "glob"; +import fastGlob from "fast-glob"; -const { sync } = glob; const __dirname = dirname(new URL(import.meta.url).pathname); const [executor, ignoredBin, script, ...args] = process.argv; @@ -57,7 +56,7 @@ if (script) { spawnScript(); } else { const scriptsPath = join(__dirname, "scripts/"); - const scriptsAvailable = sync(join(__dirname, "scripts", "*")); + const scriptsAvailable = fastGlob.sync(join(__dirname, "scripts", "*")); const scriptsAvailableMessage = scriptsAvailable .map((s) => s.replace(scriptsPath, "").replace(/\.js$/, "")) .filter(Boolean) diff --git a/yarn.lock b/yarn.lock index c74edd3a15..f868976ca3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2514,6 +2514,7 @@ __metadata: dependencies: cross-spawn: "npm:^7.0.3" cross-spawn-promise: "npm:^0.10.2" + fast-glob: "npm:^3.3.2" normalize-url: "npm:^8.0.1" url-regex-safe: "npm:^4.0.0" vercel: "npm:^33.6.2"