@lingui/cli 5.0.0-next.0 → 5.0.0-next.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.getCatalogForFile = exports.getCatalogForMerge = exports.getCatalogs = void 0;
7
- const glob_1 = __importDefault(require("glob"));
7
+ const glob_1 = require("glob");
8
8
  const path_1 = __importDefault(require("path"));
9
9
  const catalog_1 = require("../catalog");
10
10
  const utils_1 = require("../utils");
@@ -45,7 +45,7 @@ async function getCatalogs(config) {
45
45
  return;
46
46
  }
47
47
  const patterns = include.map((path) => (0, utils_1.replacePlaceholders)(path, { name: "*" }));
48
- const candidates = glob_1.default.sync(patterns.length > 1 ? `{${patterns.join(",")}}` : patterns[0], {
48
+ const candidates = (0, glob_1.globSync)(patterns, {
49
49
  ignore: exclude,
50
50
  mark: true,
51
51
  });
@@ -93,11 +93,7 @@ function getCatalogForFile(file, catalogs) {
93
93
  for (const catalog of catalogs) {
94
94
  const catalogFile = `${catalog.path}${catalog.format.getCatalogExtension()}`;
95
95
  const catalogGlob = (0, utils_1.replacePlaceholders)(catalogFile, { locale: "*" });
96
- const matchPattern = (0, utils_1.normalizeRelativePath)(path_1.default.relative(catalog.config.rootDir, catalogGlob))
97
- .replace("(", "\\(")
98
- .replace(")", "\\)")
99
- .replace("[", "\\[")
100
- .replace("]", "\\]");
96
+ const matchPattern = (0, utils_1.normalizeRelativePath)(path_1.default.relative(catalog.config.rootDir, catalogGlob)).replace(/(\(|\)|\[|\])/g, "\\$1");
101
97
  const match = micromatch_1.default.capture(matchPattern, (0, utils_1.normalizeRelativePath)(file));
102
98
  if (match) {
103
99
  return {
@@ -3,8 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getTranslationsForCatalog = void 0;
4
4
  const getFallbackListForLocale_1 = require("./getFallbackListForLocale");
5
5
  async function getTranslationsForCatalog(catalog, locale, options) {
6
- const catalogs = await catalog.readAll();
7
- const template = (await catalog.readTemplate()) || {};
6
+ const [catalogs, template] = await Promise.all([
7
+ catalog.readAll(),
8
+ catalog.readTemplate(),
9
+ ]);
8
10
  const sourceLocaleCatalog = catalogs[options.sourceLocale] || {};
9
11
  const input = Object.assign(Object.assign(Object.assign({}, template), sourceLocaleCatalog), catalogs[locale]);
10
12
  return Object.keys(input).reduce((acc, key) => {
@@ -30,7 +30,7 @@ exports.orderByMessage = exports.order = exports.cleanObsolete = exports.Catalog
30
30
  const fs_1 = __importDefault(require("fs"));
31
31
  const path_1 = __importDefault(require("path"));
32
32
  const R = __importStar(require("ramda"));
33
- const glob_1 = __importDefault(require("glob"));
33
+ const glob_1 = require("glob");
34
34
  const normalize_path_1 = __importDefault(require("normalize-path"));
35
35
  const getTranslationsForCatalog_1 = require("./catalog/getTranslationsForCatalog");
36
36
  const mergeCatalog_1 = require("./catalog/mergeCatalog");
@@ -88,9 +88,9 @@ class Catalog {
88
88
  async collect(options = {}) {
89
89
  let paths = this.sourcePaths;
90
90
  if (options.files) {
91
- options.files = options.files.map((p) => (0, normalize_path_1.default)(p, false));
91
+ options.files = options.files.map((p) => (0, utils_1.makePathRegexSafe)((0, normalize_path_1.default)(p, false)));
92
92
  const regex = new RegExp(options.files.join("|"), "i");
93
- paths = paths.filter((path) => regex.test(path));
93
+ paths = paths.filter((path) => regex.test((0, normalize_path_1.default)(path)));
94
94
  }
95
95
  return await (0, extractFromFiles_1.extractFromFiles)(paths, this.config);
96
96
  }
@@ -177,15 +177,14 @@ class Catalog {
177
177
  ? (0, normalize_path_1.default)(path_1.default.resolve(process.cwd(), includePath === "/" ? "" : includePath, "**/*.*"))
178
178
  : includePath;
179
179
  });
180
- const patterns = includeGlobs.length > 1 ? `{${includeGlobs.join(",")}}` : includeGlobs[0];
181
- return glob_1.default.sync(patterns, { ignore: this.exclude, mark: true });
180
+ return (0, glob_1.globSync)(includeGlobs, { ignore: this.exclude, mark: true });
182
181
  }
183
182
  get localeDir() {
184
183
  const localePatternIndex = this.path.indexOf(LOCALE);
185
184
  if (localePatternIndex === -1) {
186
185
  throw Error(`Invalid catalog path: ${LOCALE} variable is missing`);
187
186
  }
188
- return this.path.substr(0, localePatternIndex);
187
+ return this.path.substring(0, localePatternIndex);
189
188
  }
190
189
  get locales() {
191
190
  return this.config.locales;
@@ -27,6 +27,6 @@ export declare const babelRe: RegExp;
27
27
  * ```
28
28
  */
29
29
  export declare function extractFromFileWithBabel(filename: string, code: string, onMessageExtracted: (msg: ExtractedMessage) => void, ctx: ExtractorCtx, parserOpts: ParserOptions, skipMacroPlugin?: boolean): Promise<void>;
30
- export declare function getBabelParserOptions(filename: string, parserOptions: LinguiConfig["extractorParserOptions"]): (import("@babel/parser").ParserPluginWithOptions | ("decimal" | "placeholders" | "asyncDoExpressions" | "asyncGenerators" | "bigInt" | "classPrivateMethods" | "classPrivateProperties" | "classProperties" | "classStaticBlock" | "decorators-legacy" | "decoratorAutoAccessors" | "destructuringPrivate" | "doExpressions" | "dynamicImport" | "explicitResourceManagement" | "exportDefaultFrom" | "exportNamespaceFrom" | "flow" | "flowComments" | "functionBind" | "functionSent" | "importMeta" | "jsx" | "logicalAssignment" | "importAssertions" | "importReflection" | "moduleBlocks" | "moduleStringNames" | "nullishCoalescingOperator" | "numericSeparator" | "objectRestSpread" | "optionalCatchBinding" | "optionalChaining" | "partialApplication" | "privateIn" | "regexpUnicodeSets" | "throwExpressions" | "topLevelAwait" | "v8intrinsic" | "decorators" | "estree" | "moduleAttributes" | "pipelineOperator" | "recordAndTuple" | "typescript"))[];
30
+ export declare function getBabelParserOptions(filename: string, parserOptions: LinguiConfig["extractorParserOptions"]): (import("@babel/parser").ParserPluginWithOptions | ("decimal" | "placeholders" | "asyncDoExpressions" | "asyncGenerators" | "bigInt" | "classPrivateMethods" | "classPrivateProperties" | "classProperties" | "classStaticBlock" | "decorators-legacy" | "deferredImportEvaluation" | "decoratorAutoAccessors" | "destructuringPrivate" | "doExpressions" | "dynamicImport" | "explicitResourceManagement" | "exportDefaultFrom" | "exportNamespaceFrom" | "flow" | "flowComments" | "functionBind" | "functionSent" | "importMeta" | "jsx" | "logicalAssignment" | "importAssertions" | "importAttributes" | "importReflection" | "moduleBlocks" | "moduleStringNames" | "nullishCoalescingOperator" | "numericSeparator" | "objectRestSpread" | "optionalCatchBinding" | "optionalChaining" | "partialApplication" | "privateIn" | "regexpUnicodeSets" | "sourcePhaseImports" | "throwExpressions" | "topLevelAwait" | "v8intrinsic" | "decorators" | "estree" | "moduleAttributes" | "optionalChainingAssign" | "pipelineOperator" | "recordAndTuple" | "typescript"))[];
31
31
  declare const extractor: ExtractorType;
32
32
  export default extractor;
@@ -31,7 +31,8 @@ async function createSourceMapper(code, sourceMaps) {
31
31
  else if (code.search(inlineSourceMapsRE) != -1) {
32
32
  const { SourceMapConsumer } = await import("source-map");
33
33
  const { fromSource } = await import("convert-source-map");
34
- sourceMapsConsumer = await new SourceMapConsumer(fromSource(code).toObject());
34
+ const t = fromSource(code).toObject();
35
+ sourceMapsConsumer = await new SourceMapConsumer(t);
35
36
  }
36
37
  return {
37
38
  destroy: () => {
@@ -114,7 +115,10 @@ async function extractFromFileWithBabel(filename, code, onMessageExtracted, ctx,
114
115
  exports.extractFromFileWithBabel = extractFromFileWithBabel;
115
116
  function getBabelParserOptions(filename, parserOptions) {
116
117
  // https://babeljs.io/docs/en/babel-parser#latest-ecmascript-features
117
- const parserPlugins = [];
118
+ const parserPlugins = [
119
+ "importAttributes",
120
+ "explicitResourceManagement", // stage3,
121
+ ];
118
122
  if ([/\.ts$/, /\.mts$/, /\.cts$/, /\.tsx$/].some((r) => filename.match(r))) {
119
123
  parserPlugins.push("typescript");
120
124
  if (parserOptions.tsExperimentalDecorators) {
package/dist/api/help.js CHANGED
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.helpRun = void 0;
4
4
  /**
5
- * Detect where's is the command lingui extract or lingui compile
6
- * and how is being run (npm, yarn) and construct help
5
+ * Detect where is the command lingui extract or lingui compile
6
+ * and how is being run (npm, yarn, pnpm) and construct help
7
7
  * for follow-up commands based on that.
8
8
  *
9
9
  * Example:
@@ -15,6 +15,10 @@ exports.helpRun = void 0;
15
15
  * ...
16
16
  * (use "yarn lingui compile" to compile catalogs for production)
17
17
  *
18
+ * $ pnpm run extract
19
+ * ...
20
+ * (use "pnpm run compile" to compile catalogs for production)
21
+ *
18
22
  * $ npm run extract
19
23
  * ...
20
24
  * (use "npm run compile" to compile catalogs for production)
@@ -32,9 +36,20 @@ function helpRun(command) {
32
36
  command = res[0];
33
37
  }
34
38
  }
35
- const isYarn = process.env.npm_config_user_agent &&
36
- process.env.npm_config_user_agent.includes("yarn");
37
- const runCommand = isYarn ? "yarn" : "npm run";
39
+ const runCommand = runCommandFrom(process.env.npm_config_user_agent);
38
40
  return `${runCommand} ${command}`;
39
41
  }
40
42
  exports.helpRun = helpRun;
43
+ function runCommandFrom(userAgent) {
44
+ const defaultRunCommand = "npm run";
45
+ if (!userAgent) {
46
+ return defaultRunCommand;
47
+ }
48
+ if (userAgent.includes("yarn")) {
49
+ return "yarn";
50
+ }
51
+ if (userAgent.includes("pnpm")) {
52
+ return "pnpm run";
53
+ }
54
+ return defaultRunCommand;
55
+ }
@@ -7,10 +7,6 @@ export declare function writeFile(fileName: string, content: string): Promise<vo
7
7
  export declare function writeFileIfChanged(filename: string, newContent: string): Promise<void>;
8
8
  export declare function hasYarn(): boolean;
9
9
  export declare function makeInstall(packageName: string, dev?: boolean): string;
10
- /**
11
- * Normalize Windows backslashes in path so they look always as posix
12
- */
13
- export declare function normalizeSlashes(path: string): string;
14
10
  /**
15
11
  * Remove ./ at the beginning: ./relative => relative
16
12
  * relative => relative
@@ -18,3 +14,7 @@ export declare function normalizeSlashes(path: string): string;
18
14
  * Preserve absolute paths: /absolute/path => /absolute/path
19
15
  */
20
16
  export declare function normalizeRelativePath(sourcePath: string): string;
17
+ /**
18
+ * Escape special regex characters used in file-based routing systems
19
+ */
20
+ export declare function makePathRegexSafe(path: string): string;
package/dist/api/utils.js CHANGED
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.normalizeRelativePath = exports.normalizeSlashes = exports.makeInstall = exports.hasYarn = exports.writeFileIfChanged = exports.writeFile = exports.isDirectory = exports.readFile = exports.replacePlaceholders = exports.prettyOrigin = exports.PATHSEP = void 0;
6
+ exports.makePathRegexSafe = exports.normalizeRelativePath = exports.makeInstall = exports.hasYarn = exports.writeFileIfChanged = exports.writeFile = exports.isDirectory = exports.readFile = exports.replacePlaceholders = exports.prettyOrigin = exports.PATHSEP = void 0;
7
7
  const fs_1 = __importDefault(require("fs"));
8
8
  const path_1 = __importDefault(require("path"));
9
9
  const normalize_path_1 = __importDefault(require("normalize-path"));
@@ -86,13 +86,6 @@ function makeInstall(packageName, dev = false) {
86
86
  : `npm install ${dev ? "--save-dev" : "--save"} ${packageName}`;
87
87
  }
88
88
  exports.makeInstall = makeInstall;
89
- /**
90
- * Normalize Windows backslashes in path so they look always as posix
91
- */
92
- function normalizeSlashes(path) {
93
- return path.replace("\\", "/");
94
- }
95
- exports.normalizeSlashes = normalizeSlashes;
96
89
  /**
97
90
  * Remove ./ at the beginning: ./relative => relative
98
91
  * relative => relative
@@ -110,3 +103,10 @@ function normalizeRelativePath(sourcePath) {
110
103
  (isDir ? "/" : ""));
111
104
  }
112
105
  exports.normalizeRelativePath = normalizeRelativePath;
106
+ /**
107
+ * Escape special regex characters used in file-based routing systems
108
+ */
109
+ function makePathRegexSafe(path) {
110
+ return path.replace(/[(){}[\]^$+]/g, "\\$&");
111
+ }
112
+ exports.makePathRegexSafe = makePathRegexSafe;
@@ -42,7 +42,6 @@ async function bundleSource(linguiConfig, entryPoints, outDir, rootDir) {
42
42
  sourceRoot: outDir,
43
43
  sourcesContent: false,
44
44
  packages: "external",
45
- outbase: rootDir,
46
45
  metafile: true,
47
46
  plugins: [
48
47
  (0, linguiEsbuildPlugin_1.pluginLinguiMacro)({ linguiConfig }),
@@ -1,12 +1,8 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.getEntryPoints = void 0;
7
- const glob_1 = __importDefault(require("glob"));
4
+ const glob_1 = require("glob");
8
5
  function getEntryPoints(entries) {
9
- const patterns = entries.length > 1 ? `{${entries.join(",")}}` : entries[0];
10
- return glob_1.default.sync(patterns, { mark: true });
6
+ return (0, glob_1.globSync)(entries, { mark: true });
11
7
  }
12
8
  exports.getEntryPoints = getEntryPoints;
@@ -38,7 +38,7 @@ const pluginLinguiMacro = (options) => ({
38
38
  ],
39
39
  ],
40
40
  });
41
- return { contents: result.code, loader: "jsx" };
41
+ return { contents: result.code, loader: "tsx" };
42
42
  });
43
43
  },
44
44
  });
@@ -12,7 +12,7 @@ const compile_1 = require("./api/compile");
12
12
  const help_1 = require("./api/help");
13
13
  const api_1 = require("./api");
14
14
  const getCatalogs_1 = require("./api/catalog/getCatalogs");
15
- const utils_1 = require("./api/utils");
15
+ const normalize_path_1 = __importDefault(require("normalize-path"));
16
16
  const path_1 = __importDefault(require("path"));
17
17
  async function command(config, options) {
18
18
  const catalogs = await (0, api_1.getCatalogs)(config);
@@ -61,7 +61,7 @@ async function command(config, options) {
61
61
  compilerBabelOptions: config.compilerBabelOptions,
62
62
  });
63
63
  let compiledPath = await catalog.writeCompiled(locale, compiledCatalog, namespace);
64
- compiledPath = (0, utils_1.normalizeSlashes)(path_1.default.relative(config.rootDir, compiledPath));
64
+ compiledPath = (0, normalize_path_1.default)(path_1.default.relative(config.rootDir, compiledPath));
65
65
  options.verbose &&
66
66
  console.error(chalk_1.default.green(`${locale} ⇒ ${compiledPath}`));
67
67
  }
@@ -76,7 +76,7 @@ async function command(config, options) {
76
76
  compilerBabelOptions: config.compilerBabelOptions,
77
77
  });
78
78
  let compiledPath = await compileCatalog.writeCompiled(locale, compiledCatalog, namespace);
79
- compiledPath = (0, utils_1.normalizeSlashes)(path_1.default.relative(config.rootDir, compiledPath));
79
+ compiledPath = (0, normalize_path_1.default)(path_1.default.relative(config.rootDir, compiledPath));
80
80
  options.verbose && console.log(chalk_1.default.green(`${locale} ⇒ ${compiledPath}`));
81
81
  }
82
82
  }
@@ -7,11 +7,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
7
7
  const commander_1 = require("commander");
8
8
  const conf_1 = require("@lingui/conf");
9
9
  const path_1 = __importDefault(require("path"));
10
- const os_1 = __importDefault(require("os"));
11
10
  const formats_1 = require("./api/formats");
12
11
  const promises_1 = __importDefault(require("fs/promises"));
13
12
  const extractFromFiles_1 = require("./api/catalog/extractFromFiles");
14
- const utils_1 = require("./api/utils");
13
+ const normalize_path_1 = __importDefault(require("normalize-path"));
15
14
  const bundleSource_1 = require("./extract-experimental/bundleSource");
16
15
  const writeCatalogs_1 = require("./extract-experimental/writeCatalogs");
17
16
  const getEntryPoints_1 = require("./extract-experimental/getEntryPoints");
@@ -30,7 +29,15 @@ async function command(linguiConfig, options) {
30
29
  " Use at your own risk.",
31
30
  "",
32
31
  ].join("\n")));
33
- const tempDir = await promises_1.default.mkdtemp(path_1.default.join(os_1.default.tmpdir(), "js-lingui-extract-"));
32
+ // unfortunately we can't use os.tmpdir() in this case
33
+ // on windows it might create a folder on a different disk then source code is stored
34
+ // (tmpdir would be always on C: but code could be stored on D:)
35
+ // and then relative path in sourcemaps produced by esbuild will be broken.
36
+ // sourcemaps itself doesn't allow to have absolute windows path, because they are not URL compatible.
37
+ // that's why we store esbuild bundles in .lingui folder
38
+ const tmpPrefix = ".lingui/";
39
+ await promises_1.default.mkdir(tmpPrefix, { recursive: true });
40
+ const tempDir = await promises_1.default.mkdtemp(tmpPrefix);
34
41
  await promises_1.default.rm(tempDir, { recursive: true, force: true });
35
42
  const bundleResult = await (0, bundleSource_1.bundleSource)(linguiConfig, (0, getEntryPoints_1.getEntryPoints)(config.entries), tempDir, linguiConfig.rootDir);
36
43
  const stats = [];
@@ -80,7 +87,7 @@ async function command(linguiConfig, options) {
80
87
  })).statMessage;
81
88
  }
82
89
  stats.push({
83
- entry: (0, utils_1.normalizeSlashes)(path_1.default.relative(linguiConfig.rootDir, entryPoint)),
90
+ entry: (0, normalize_path_1.default)(path_1.default.relative(linguiConfig.rootDir, entryPoint)),
84
91
  content: output,
85
92
  });
86
93
  }
@@ -8,7 +8,7 @@ const commander_1 = require("commander");
8
8
  const conf_1 = require("@lingui/conf");
9
9
  const api_1 = require("./api");
10
10
  const path_1 = __importDefault(require("path"));
11
- const utils_1 = require("./api/utils");
11
+ const normalize_path_1 = __importDefault(require("normalize-path"));
12
12
  async function command(config, options) {
13
13
  options.verbose && console.log("Extracting messages from source files…");
14
14
  const catalogs = await (0, api_1.getCatalogs)(config);
@@ -17,7 +17,7 @@ async function command(config, options) {
17
17
  await Promise.all(catalogs.map(async (catalog) => {
18
18
  const result = await catalog.makeTemplate(Object.assign(Object.assign({}, options), { orderBy: config.orderBy }));
19
19
  if (result) {
20
- catalogStats[(0, utils_1.normalizeSlashes)(path_1.default.relative(config.rootDir, catalog.templateFile))] = Object.keys(result).length;
20
+ catalogStats[(0, normalize_path_1.default)(path_1.default.relative(config.rootDir, catalog.templateFile))] = Object.keys(result).length;
21
21
  }
22
22
  commandSuccess && (commandSuccess = Boolean(result));
23
23
  }));
@@ -12,7 +12,7 @@ const api_1 = require("./api");
12
12
  const stats_1 = require("./api/stats");
13
13
  const help_1 = require("./api/help");
14
14
  const ora_1 = __importDefault(require("ora"));
15
- const utils_1 = require("./api/utils");
15
+ const normalize_path_1 = __importDefault(require("normalize-path"));
16
16
  async function command(config, options) {
17
17
  options.verbose && console.log("Extracting messages from source files…");
18
18
  const catalogs = await (0, api_1.getCatalogs)(config);
@@ -21,7 +21,7 @@ async function command(config, options) {
21
21
  const spinner = (0, ora_1.default)().start();
22
22
  for (let catalog of catalogs) {
23
23
  const result = await catalog.make(Object.assign(Object.assign({}, options), { orderBy: config.orderBy }));
24
- catalogStats[(0, utils_1.normalizeSlashes)(path_1.default.relative(config.rootDir, catalog.path))] = result || {};
24
+ catalogStats[(0, normalize_path_1.default)(path_1.default.relative(config.rootDir, catalog.path))] = result || {};
25
25
  commandSuccess && (commandSuccess = Boolean(result));
26
26
  }
27
27
  if (commandSuccess) {
@@ -36,8 +36,8 @@ async function command(config, options) {
36
36
  console.log();
37
37
  });
38
38
  if (!options.watch) {
39
- console.log(`(use "${chalk_1.default.yellow((0, help_1.helpRun)("extract"))}" to update catalogs with new messages)`);
40
- console.log(`(use "${chalk_1.default.yellow((0, help_1.helpRun)("compile"))}" to compile catalogs for production)`);
39
+ console.log(`(Use "${chalk_1.default.yellow((0, help_1.helpRun)("extract"))}" to update catalogs with new messages.)`);
40
+ console.log(`(Use "${chalk_1.default.yellow((0, help_1.helpRun)("compile"))}" to compile catalogs for production. Alternatively, use bundler plugins: https://lingui.dev/ref/cli#compiling-catalogs-in-ci)`);
41
41
  }
42
42
  // If service key is present in configuration, synchronize with cloud translation platform
43
43
  if (typeof config.service === "object" &&
@@ -7,7 +7,7 @@ const fs_1 = __importDefault(require("fs"));
7
7
  const path_1 = require("path");
8
8
  const pofile_1 = __importDefault(require("pofile"));
9
9
  const https_1 = __importDefault(require("https"));
10
- const glob_1 = __importDefault(require("glob"));
10
+ const glob_1 = require("glob");
11
11
  const date_fns_1 = require("date-fns");
12
12
  const EXPLICIT_ID_FLAG = "js-lingui-explicit-id";
13
13
  const EXPLICIT_ID_AND_CONTEXT_FLAG = "js-lingui-explicit-id-and-context";
@@ -262,7 +262,7 @@ function poPathsPerLocale(config) {
262
262
  const path = "".concat(catalog.path.replace(/{locale}/g, locale).replace(/{name}/g, "*"), ".po");
263
263
  // If {name} is present (replaced by *), list all the existing POs
264
264
  if (path.includes("*")) {
265
- paths[locale] = paths[locale].concat(glob_1.default.sync(path));
265
+ paths[locale] = paths[locale].concat((0, glob_1.globSync)(path));
266
266
  }
267
267
  else {
268
268
  paths[locale].push(path);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lingui/cli",
3
- "version": "5.0.0-next.0",
3
+ "version": "5.0.0-next.2",
4
4
  "description": "CLI for working wit message catalogs",
5
5
  "keywords": [
6
6
  "cli",
@@ -40,7 +40,7 @@
40
40
  "build": "rimraf ./dist && tsc -p tsconfig.build.json"
41
41
  },
42
42
  "engines": {
43
- "node": ">=16.0.0"
43
+ "node": ">=20.0.0"
44
44
  },
45
45
  "files": [
46
46
  "LICENSE",
@@ -50,26 +50,26 @@
50
50
  "dependencies": {
51
51
  "@babel/core": "^7.21.0",
52
52
  "@babel/generator": "^7.21.1",
53
- "@babel/parser": "^7.21.2",
53
+ "@babel/parser": "^7.22.0",
54
54
  "@babel/runtime": "^7.21.0",
55
55
  "@babel/types": "^7.21.2",
56
- "@lingui/babel-plugin-extract-messages": "^5.0.0-next.0",
57
- "@lingui/babel-plugin-lingui-macro": "^5.0.0-next.0",
58
- "@lingui/conf": "^5.0.0-next.0",
59
- "@lingui/core": "^5.0.0-next.0",
60
- "@lingui/format-po": "^5.0.0-next.0",
61
- "@lingui/message-utils": "^5.0.0-next.0",
56
+ "@lingui/babel-plugin-extract-messages": "^5.0.0-next.2",
57
+ "@lingui/babel-plugin-lingui-macro": "^5.0.0-next.2",
58
+ "@lingui/conf": "^5.0.0-next.2",
59
+ "@lingui/core": "^5.0.0-next.2",
60
+ "@lingui/format-po": "^5.0.0-next.2",
61
+ "@lingui/message-utils": "^5.0.0-next.2",
62
62
  "babel-plugin-macros": "^3.0.1",
63
63
  "chalk": "^4.1.0",
64
64
  "chokidar": "3.5.1",
65
- "cli-table": "0.3.6",
65
+ "cli-table": "^0.3.11",
66
66
  "commander": "^10.0.0",
67
67
  "convert-source-map": "^2.0.0",
68
68
  "date-fns": "^3.6.0",
69
69
  "esbuild": "^0.21.5",
70
- "glob": "^7.1.4",
70
+ "glob": "^11.0.0",
71
71
  "inquirer": "^7.3.3",
72
- "micromatch": "4.0.2",
72
+ "micromatch": "^4.0.7",
73
73
  "normalize-path": "^3.0.0",
74
74
  "ora": "^5.1.0",
75
75
  "pathe": "^1.1.0",
@@ -82,11 +82,10 @@
82
82
  "devDependencies": {
83
83
  "@lingui/jest-mocks": "^3.0.3",
84
84
  "@types/convert-source-map": "^2.0.0",
85
- "@types/glob": "^8.1.0",
86
85
  "@types/micromatch": "^4.0.1",
87
86
  "@types/normalize-path": "^3.0.0",
88
87
  "mock-fs": "^5.2.0",
89
88
  "mockdate": "^3.0.5"
90
89
  },
91
- "gitHead": "2192f8d54699a3846ff8fe6f3992697be2da68a8"
90
+ "gitHead": "71fa9b0b55deded4b30a25f9bda2a28a7cf4ec12"
92
91
  }