@discord/jest-processor-discord-intl 0.22.0-rc.0 → 0.22.0
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/index.js +5 -0
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -27,6 +27,11 @@ module.exports = {
|
|
|
27
27
|
const forceTranslation = filePath === '?forceTranslation';
|
|
28
28
|
if (isMessageDefinitionsFile(filePath) && !forceTranslation) {
|
|
29
29
|
const result = processDefinitionsFile(filePath, source, { processTranslations: false });
|
|
30
|
+
if (!result.succeeded) {
|
|
31
|
+
throw new Error(
|
|
32
|
+
`Failed to process intl messages file ${filePath}: ` + result.errors[0].message,
|
|
33
|
+
);
|
|
34
|
+
}
|
|
30
35
|
|
|
31
36
|
const sourceMessages = /** @type {Buffer} */ (
|
|
32
37
|
precompileFileForLocale(filePath, result.locale, undefined, precompileOptions)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@discord/jest-processor-discord-intl",
|
|
3
|
-
"version": "0.22.0
|
|
3
|
+
"version": "0.22.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Processor plugin for Jest to handle intl message definitions and translations from @discord/intl",
|
|
6
6
|
"exports": {
|
|
@@ -11,6 +11,6 @@
|
|
|
11
11
|
"url": "https://github.com/discord/discord-intl"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@discord/intl-loader-core": "0.22.0
|
|
14
|
+
"@discord/intl-loader-core": "0.22.0"
|
|
15
15
|
}
|
|
16
16
|
}
|