@lingui/cli 3.17.1 → 3.17.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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,18 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [3.17.2](https://github.com/lingui/js-lingui/compare/v3.17.1...v3.17.2) (2023-02-24)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * chain extract on watched file changes ([#1435](https://github.com/lingui/js-lingui/issues/1435)) ([5dd50d3](https://github.com/lingui/js-lingui/commit/5dd50d34152e7eb393437e5de3d35b3baf09e861))
12
+ * **cli:** fix version command ([#1413](https://github.com/lingui/js-lingui/issues/1413)) ([8bc212d](https://github.com/lingui/js-lingui/commit/8bc212d2846af5609d89f51efed952b089244e4e))
13
+
14
+
15
+
16
+
17
+
6
18
  ## [3.17.1](https://github.com/lingui/js-lingui/compare/v3.17.0...v3.17.1) (2023-02-07)
7
19
 
8
20
 
@@ -107,9 +107,14 @@ if (require.main === module) {
107
107
  };
108
108
  const changedPaths = new Set();
109
109
  let debounceTimer;
110
+ let previousExtract = Promise.resolve(true);
110
111
  const dispatchExtract = filePath => {
111
- // Skip debouncing if not enabled
112
- if (!_commander.default.debounce) return extract(filePath);
112
+ // Skip debouncing if not enabled but still chain them so no racing issue
113
+ // on deleting the tmp folder.
114
+ if (!_commander.default.debounce) {
115
+ previousExtract = previousExtract.then(() => extract(filePath));
116
+ return previousExtract;
117
+ }
113
118
  filePath === null || filePath === void 0 ? void 0 : filePath.forEach(path => changedPaths.add(path));
114
119
 
115
120
  // CLear the previous timer if there is any, and schedule the next
package/build/lingui.js CHANGED
@@ -2,12 +2,8 @@
2
2
  "use strict";
3
3
 
4
4
  var _utils = require("./api/utils");
5
- const program = require("commander");
6
- let version;
7
- try {
8
- version = require("./package.json").version;
9
- } catch (e) {
10
- version = "dev";
11
- }
12
- program.version(version).command("add-locale", "Deprecated, run it for instructions").command("extract [files...]", "Extracts messages from source files").command("extract-template", "Extracts messages from source files to a .pot template").command("compile", "Compile message catalogs").parse(process.argv);
13
- (0, _utils.helpMisspelledCommand)(process.argv[2], program.commands);
5
+ var _commander = _interopRequireDefault(require("commander"));
6
+ var _package = require("../package.json");
7
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
8
+ _commander.default.version(_package.version).command("add-locale", "Deprecated, run it for instructions").command("extract [files...]", "Extracts messages from source files").command("extract-template", "Extracts messages from source files to a .pot template").command("compile", "Compile message catalogs").parse(process.argv);
9
+ (0, _utils.helpMisspelledCommand)(process.argv[2], _commander.default.commands);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lingui/cli",
3
- "version": "3.17.1",
3
+ "version": "3.17.2",
4
4
  "description": "CLI for working wit message catalogs",
5
5
  "keywords": [
6
6
  "cli",
@@ -50,9 +50,9 @@
50
50
  "@babel/plugin-syntax-jsx": "^7.18.6",
51
51
  "@babel/runtime": "^7.20.13",
52
52
  "@babel/types": "^7.20.7",
53
- "@lingui/babel-plugin-extract-messages": "3.17.1",
54
- "@lingui/conf": "3.17.1",
55
- "@lingui/core": "3.17.1",
53
+ "@lingui/babel-plugin-extract-messages": "3.17.2",
54
+ "@lingui/conf": "3.17.2",
55
+ "@lingui/core": "3.17.2",
56
56
  "@messageformat/parser": "^5.0.0",
57
57
  "babel-plugin-macros": "^3.0.1",
58
58
  "bcp-47": "^1.0.7",
@@ -91,5 +91,5 @@
91
91
  "babel-plugin-macros": "2 || 3",
92
92
  "typescript": "2 || 3 || 4"
93
93
  },
94
- "gitHead": "76ef4e8d1c668578ce2c3829ebf35d22ca5e679c"
94
+ "gitHead": "31dcab5a9a8f88bfa8b3a2c7cd12aa2d908a1d80"
95
95
  }