Skip to content

Commit 69a9ca3

Browse files
authored
STCLI-273 Translate compile on Windows - cross-env globbing. (#389)
switched to using `fs.globSync` and canned the dep on `fast-glob`.
1 parent 42873e4 commit 69a9ca3

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## 4.1.0 IN PROGRESS
44

55
* Populate module descriptor's `name` field with module-name if `description` is missing. Refs STCLI-272.
6+
* Use node-native glob functionality in `translate compile`. Refs STCLI-273.
67

78
## [4.0.0](https://github.com/folio-org/stripes-cli/tree/v4.0.0) (2025-02-24)
89
[Full Changelog](https://github.com/folio-org/stripes-cli/compare/v3.2.0...v4.0.0)

lib/commands/translate/compile.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ const importLazy = require('import-lazy')(require);
1010
const fs = importLazy('fs');
1111
const path = importLazy('path');
1212
const process = importLazy('process');
13-
const fg = importLazy('fast-glob');
1413
const { compile } = importLazy('@formatjs/cli-lib');
1514

1615
const { contextMiddleware } = importLazy('../../cli/context-middleware');
16+
const { globSync } = fs;
1717

1818
/**
1919
* createOutDir
@@ -42,8 +42,8 @@ function formatjsCompileCommand(argv) {
4242
ast: true,
4343
format: 'simple',
4444
};
45-
46-
const files = fg.globSync(path.join(txPath, '*.json'));
45+
const globSelect = path.join(txPath, '*.json');
46+
const files = globSync(globSelect);
4747
if (fs.existsSync(txPath) && files.length > 0) {
4848
createOutDir(outDir);
4949
Promise.all(files.map(f => compile([f], opts)))

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
"configstore": "^3.1.1",
3232
"debug": "^4.0.1",
3333
"express": "^4.17.1",
34-
"fast-glob": "^3.3.1",
3534
"fast-xml-parser": "^4.2.4",
3635
"find-up": "^2.1.0",
3736
"fs-extra": "^11.1.1",

0 commit comments

Comments
 (0)