From 2758cb8f0adbc2f289e372d46f477072c3520239 Mon Sep 17 00:00:00 2001 From: John Coburn Date: Mon, 17 Nov 2025 08:29:09 -0600 Subject: [PATCH 1/3] Translate compile on Windows - fast-glob needs posix separators. --- lib/commands/translate/compile.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/commands/translate/compile.js b/lib/commands/translate/compile.js index bc926c3..65922f2 100644 --- a/lib/commands/translate/compile.js +++ b/lib/commands/translate/compile.js @@ -43,7 +43,9 @@ function formatjsCompileCommand(argv) { format: 'simple', }; - const files = fg.globSync(path.join(txPath, '*.json')); + const globSelect = path.join(txPath, '*.json'); + const posixGlob = globSelect.split(path.sep).join(path.posix.sep); + const files = fg.globSync(posixGlob); if (fs.existsSync(txPath) && files.length > 0) { createOutDir(outDir); Promise.all(files.map(f => compile([f], opts))) From 4b7ee4c748422adf34448d7553b654fbfb6af42c Mon Sep 17 00:00:00 2001 From: John Coburn Date: Wed, 19 Nov 2025 13:57:11 -0600 Subject: [PATCH 2/3] use native globbing for translate compile, remove fast-glob dependency --- lib/commands/translate/compile.js | 6 +++--- package.json | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/commands/translate/compile.js b/lib/commands/translate/compile.js index bc926c3..43c032d 100644 --- a/lib/commands/translate/compile.js +++ b/lib/commands/translate/compile.js @@ -10,10 +10,10 @@ const importLazy = require('import-lazy')(require); const fs = importLazy('fs'); const path = importLazy('path'); const process = importLazy('process'); -const fg = importLazy('fast-glob'); const { compile } = importLazy('@formatjs/cli-lib'); const { contextMiddleware } = importLazy('../../cli/context-middleware'); +const { globSync } = fs; /** * createOutDir @@ -42,8 +42,8 @@ function formatjsCompileCommand(argv) { ast: true, format: 'simple', }; - - const files = fg.globSync(path.join(txPath, '*.json')); + const globSelect = path.join(txPath, '*.json'); + const files = globSync(globSelect); if (fs.existsSync(txPath) && files.length > 0) { createOutDir(outDir); Promise.all(files.map(f => compile([f], opts))) diff --git a/package.json b/package.json index ff72b39..3e9b21b 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,6 @@ "configstore": "^3.1.1", "debug": "^4.0.1", "express": "^4.17.1", - "fast-glob": "^3.3.1", "fast-xml-parser": "^4.2.4", "find-up": "^2.1.0", "fs-extra": "^11.1.1", From 688d230cacf087f084fb6bad29689c9764d6d82f Mon Sep 17 00:00:00 2001 From: John Coburn Date: Thu, 20 Nov 2025 08:34:36 -0600 Subject: [PATCH 3/3] log changes --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c5529f..ab13478 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## 4.1.0 IN PROGRESS * Populate module descriptor's `name` field with module-name if `description` is missing. Refs STCLI-272. +* Use node-native glob functionality in `translate compile`. Refs STCLI-273. ## [4.0.0](https://github.com/folio-org/stripes-cli/tree/v4.0.0) (2025-02-24) [Full Changelog](https://github.com/folio-org/stripes-cli/compare/v3.2.0...v4.0.0)