@lingui/cli 5.5.0 → 5.5.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.
@@ -7,8 +7,9 @@ function getFallbackListForLocale(fallbackLocales, locale) {
7
7
  const mapping = fallbackLocales === null || fallbackLocales === void 0 ? void 0 : fallbackLocales[locale];
8
8
  Array.isArray(mapping) ? fL.push(...mapping) : fL.push(mapping);
9
9
  }
10
- if ((fallbackLocales === null || fallbackLocales === void 0 ? void 0 : fallbackLocales.default) && locale !== (fallbackLocales === null || fallbackLocales === void 0 ? void 0 : fallbackLocales.default)) {
11
- fL.push(fallbackLocales === null || fallbackLocales === void 0 ? void 0 : fallbackLocales.default);
10
+ if (typeof (fallbackLocales === null || fallbackLocales === void 0 ? void 0 : fallbackLocales.default) === "string" &&
11
+ locale !== (fallbackLocales === null || fallbackLocales === void 0 ? void 0 : fallbackLocales.default)) {
12
+ fL.push(fallbackLocales.default);
12
13
  }
13
14
  return fL;
14
15
  }
@@ -248,7 +248,9 @@ function orderByMessage(messages) {
248
248
  .sort((a, b) => {
249
249
  const aMsg = messages[a].message || "";
250
250
  const bMsg = messages[b].message || "";
251
- return collator.compare(aMsg, bMsg);
251
+ const aCtxt = messages[a].context || "";
252
+ const bCtxt = messages[b].context || "";
253
+ return collator.compare(aMsg, bMsg) || collator.compare(aCtxt, bCtxt);
252
254
  })
253
255
  .reduce((acc, key) => {
254
256
  ;
@@ -63,7 +63,7 @@ async function command(config, options) {
63
63
  await pool.completed(true);
64
64
  }
65
65
  finally {
66
- await pool.terminate();
66
+ await pool.terminate(true);
67
67
  }
68
68
  }
69
69
  console.log(`Done in ${(0, ms_1.default)(Date.now() - startTime)}`);
@@ -65,7 +65,7 @@ async function command(linguiConfig, options) {
65
65
  await pool.completed();
66
66
  }
67
67
  finally {
68
- await pool.terminate();
68
+ await pool.terminate(true);
69
69
  }
70
70
  }
71
71
  else {
@@ -34,7 +34,7 @@ async function command(config, options) {
34
34
  }
35
35
  finally {
36
36
  if (workerPool) {
37
- await workerPool.terminate();
37
+ await workerPool.terminate(true);
38
38
  }
39
39
  }
40
40
  Object.entries(catalogStats).forEach(([key, value]) => {
@@ -43,7 +43,7 @@ async function command(config, options) {
43
43
  }
44
44
  finally {
45
45
  if (workerPool) {
46
- await workerPool.terminate();
46
+ await workerPool.terminate(true);
47
47
  }
48
48
  }
49
49
  const doneMsg = `Done in ${(0, ms_1.default)(Date.now() - startTime)}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lingui/cli",
3
- "version": "5.5.0",
3
+ "version": "5.5.2",
4
4
  "description": "CLI for working wit message catalogs",
5
5
  "keywords": [
6
6
  "cli",
@@ -62,12 +62,12 @@
62
62
  "@babel/parser": "^7.22.0",
63
63
  "@babel/runtime": "^7.21.0",
64
64
  "@babel/types": "^7.21.2",
65
- "@lingui/babel-plugin-extract-messages": "5.5.0",
66
- "@lingui/babel-plugin-lingui-macro": "5.5.0",
67
- "@lingui/conf": "5.5.0",
68
- "@lingui/core": "5.5.0",
69
- "@lingui/format-po": "5.5.0",
70
- "@lingui/message-utils": "5.5.0",
65
+ "@lingui/babel-plugin-extract-messages": "5.5.2",
66
+ "@lingui/babel-plugin-lingui-macro": "5.5.2",
67
+ "@lingui/conf": "5.5.2",
68
+ "@lingui/core": "5.5.2",
69
+ "@lingui/format-po": "5.5.2",
70
+ "@lingui/message-utils": "5.5.2",
71
71
  "chokidar": "3.5.1",
72
72
  "cli-table": "^0.3.11",
73
73
  "commander": "^10.0.0",
@@ -95,5 +95,5 @@
95
95
  "mockdate": "^3.0.5",
96
96
  "ts-node": "^10.9.2"
97
97
  },
98
- "gitHead": "26700f071cd540651822b7f786d3c1d07c9d8625"
98
+ "gitHead": "197bcd9ab7eca588ba9436a2d20996f92deb7547"
99
99
  }