@formatjs/cli-lib 5.0.3 → 5.0.6
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/package.json
CHANGED
package/src/extract.js
CHANGED
|
@@ -155,7 +155,7 @@ function extract(files, extractOpts) {
|
|
|
155
155
|
}
|
|
156
156
|
if (extractedMessages.has(id)) {
|
|
157
157
|
existing = extractedMessages.get(id);
|
|
158
|
-
if (description !== existing.description ||
|
|
158
|
+
if ((0, json_stable_stringify_1.default)(description) !== (0, json_stable_stringify_1.default)(existing.description) ||
|
|
159
159
|
defaultMessage !== existing.defaultMessage) {
|
|
160
160
|
error = new Error("[FormatJS CLI] Duplicate message id: \"".concat(id, "\", ") +
|
|
161
161
|
'but the `description` and/or `defaultMessage` are different.');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../packages/cli-lib/src/formatters/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,QAAQ,EAAE,SAAS,EAAC,MAAM,WAAW,CAAA;AAM7C,OAAO,EAAC,UAAU,EAAC,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../packages/cli-lib/src/formatters/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,QAAQ,EAAE,SAAS,EAAC,MAAM,WAAW,CAAA;AAM7C,OAAO,EAAC,UAAU,EAAC,MAAM,uBAAuB,CAAA;AAIhD,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,QAAQ,CAAA;IAChB,OAAO,EAAE,SAAS,CAAA;IAClB,eAAe,CAAC,EAAE,UAAU,CAAA;CAC7B;AAED,wBAAsB,uBAAuB,CAC3C,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,GAC1B,OAAO,CAAC,GAAG,CAAC,CA0Bd"}
|
package/src/formatters/index.js
CHANGED
|
@@ -9,6 +9,7 @@ var simple = (0, tslib_1.__importStar)(require("./simple"));
|
|
|
9
9
|
var lokalise = (0, tslib_1.__importStar)(require("./lokalise"));
|
|
10
10
|
var crowdin = (0, tslib_1.__importStar)(require("./crowdin"));
|
|
11
11
|
var path_1 = require("path");
|
|
12
|
+
var url_1 = require("url");
|
|
12
13
|
function resolveBuiltinFormatter(format) {
|
|
13
14
|
return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
|
|
14
15
|
return (0, tslib_1.__generator)(this, function (_a) {
|
|
@@ -32,7 +33,7 @@ function resolveBuiltinFormatter(format) {
|
|
|
32
33
|
}
|
|
33
34
|
try {
|
|
34
35
|
// eslint-disable-next-line import/dynamic-import-chunkname
|
|
35
|
-
return [2 /*return*/, Promise.resolve().then(function () { return (0, tslib_1.__importStar)(require((0, path_1.resolve)(process.cwd(), format))); })];
|
|
36
|
+
return [2 /*return*/, Promise.resolve().then(function () { return (0, tslib_1.__importStar)(require((0, url_1.pathToFileURL)((0, path_1.resolve)(process.cwd(), format)).href)); })];
|
|
36
37
|
}
|
|
37
38
|
catch (e) {
|
|
38
39
|
console.error("Cannot resolve formatter ".concat(format));
|