Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
## 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)
Expand Down
6 changes: 3 additions & 3 deletions lib/commands/translate/compile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -42,8 +42,8 @@ function formatjsCompileCommand(argv) {
ast: true,
format: 'simple',
};
const globSelect = path.join(txPath, '*.json');
const files = globSync(globSelect);

const files = fg.globSync(path.join(txPath, '*.json'));
if (fs.existsSync(txPath) && files.length > 0) {
createOutDir(outDir);
Promise.all(files.map(f => compile([f], opts)))
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"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",
Expand Down
Loading