@lingui/cli 4.10.1 → 4.11.1

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,15 +4,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.extractFromFiles = void 0;
7
- const extractors_1 = __importDefault(require("../extractors"));
8
- const path_1 = __importDefault(require("path"));
9
7
  const chalk_1 = __importDefault(require("chalk"));
8
+ const path_1 = __importDefault(require("path"));
9
+ const extractors_1 = __importDefault(require("../extractors"));
10
10
  const utils_1 = require("../utils");
11
11
  async function extractFromFiles(paths, config) {
12
12
  const messages = {};
13
13
  let catalogSuccess = true;
14
14
  for (let filename of paths) {
15
15
  const fileSuccess = await (0, extractors_1.default)(filename, (next) => {
16
+ var _a;
16
17
  if (!messages[next.id]) {
17
18
  messages[next.id] = {
18
19
  message: next.message,
@@ -32,7 +33,7 @@ async function extractFromFiles(paths, config) {
32
33
  `\n${chalk_1.default.yellow((0, utils_1.prettyOrigin)(prev.origin))} ${prev.message}` +
33
34
  `\n${chalk_1.default.yellow((0, utils_1.prettyOrigin)([origin]))} ${next.message}`);
34
35
  }
35
- messages[next.id] = Object.assign(Object.assign({}, prev), { comments: next.comment
36
+ messages[next.id] = Object.assign(Object.assign({}, prev), { message: (_a = prev.message) !== null && _a !== void 0 ? _a : next.message, comments: next.comment
36
37
  ? [...prev.comments, next.comment]
37
38
  : prev.comments, origin: [...prev.origin, [filename, next.origin[1]]] });
38
39
  }, config, {
@@ -22,6 +22,7 @@ async function bundleSource(config, entryPoints, outDir, rootDir) {
22
22
  "png",
23
23
  "css",
24
24
  "sass",
25
+ "scss",
25
26
  "less",
26
27
  "jpg",
27
28
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lingui/cli",
3
- "version": "4.10.1",
3
+ "version": "4.11.1",
4
4
  "description": "CLI for working wit message catalogs",
5
5
  "keywords": [
6
6
  "cli",
@@ -53,11 +53,11 @@
53
53
  "@babel/parser": "^7.21.2",
54
54
  "@babel/runtime": "^7.21.0",
55
55
  "@babel/types": "^7.21.2",
56
- "@lingui/babel-plugin-extract-messages": "4.10.1",
57
- "@lingui/conf": "4.10.1",
58
- "@lingui/core": "4.10.1",
59
- "@lingui/format-po": "4.10.1",
60
- "@lingui/message-utils": "4.10.1",
56
+ "@lingui/babel-plugin-extract-messages": "4.11.1",
57
+ "@lingui/conf": "4.11.1",
58
+ "@lingui/core": "4.11.1",
59
+ "@lingui/format-po": "4.11.1",
60
+ "@lingui/message-utils": "4.11.1",
61
61
  "babel-plugin-macros": "^3.0.1",
62
62
  "chalk": "^4.1.0",
63
63
  "chokidar": "3.5.1",
@@ -80,7 +80,7 @@
80
80
  },
81
81
  "devDependencies": {
82
82
  "@lingui/jest-mocks": "*",
83
- "@lingui/macro": "4.10.1",
83
+ "@lingui/macro": "4.11.1",
84
84
  "@types/convert-source-map": "^2.0.0",
85
85
  "@types/glob": "^8.1.0",
86
86
  "@types/micromatch": "^4.0.1",
@@ -88,5 +88,5 @@
88
88
  "mock-fs": "^5.2.0",
89
89
  "mockdate": "^3.0.5"
90
90
  },
91
- "gitHead": "fbea0ab14b43a5ef7d31931cb76c263fd78f0481"
91
+ "gitHead": "ec49d0cc53dbc4f9e0f92f0edcdf59f3e5c1de1f"
92
92
  }