@formatjs/cli-lib 7.2.0 → 7.3.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/lib_esnext/src/cli.js
CHANGED
|
@@ -46,7 +46,6 @@ See https://github.com/webpack/loader-utils#interpolatename for sample patterns`
|
|
|
46
46
|
.option('--extract-source-location', `Whether the metadata about the location of the message in the source file should be
|
|
47
47
|
extracted. If \`true\`, then \`file\`, \`start\`, and \`end\` fields will exist for each
|
|
48
48
|
extracted message descriptors.`, false)
|
|
49
|
-
.option('--remove-default-message', 'Remove `defaultMessage` field in generated js after extraction', false)
|
|
50
49
|
.option('--additional-component-names <comma-separated-names>', `Additional component names to extract messages from, e.g: \`'FormattedFooBarMessage'\`.
|
|
51
50
|
**NOTE**: By default we check for the fact that \`FormattedMessage\`
|
|
52
51
|
is imported from \`moduleSourceName\` to make sure variable alias
|
|
@@ -150,6 +149,7 @@ This is especially useful to convert from a TMS-specific format back to react-in
|
|
|
150
149
|
.option('--source-locale <sourceLocale>', `The source locale of the translation files.
|
|
151
150
|
There must be a file named <sourceLocale>.json in the list of translation files.
|
|
152
151
|
This is used as source to verify other translations against.`)
|
|
152
|
+
.option('--ignore <files...>', 'List of glob paths to ignore')
|
|
153
153
|
.option('--missing-keys', `Whether to check for missing keys in target locale compared to source locale.
|
|
154
154
|
This basically guarantees that no messages are untranslated.`)
|
|
155
155
|
.option('--structural-equality', `Whether to check for structural equality of messages between source and target locale.
|
|
@@ -157,7 +157,9 @@ This is especially useful to convert from a TMS-specific format back to react-in
|
|
|
157
157
|
.action(async (filePatterns, opts) => {
|
|
158
158
|
debug('File pattern:', filePatterns);
|
|
159
159
|
debug('Options:', opts);
|
|
160
|
-
const files = globSync(filePatterns
|
|
160
|
+
const files = globSync(filePatterns, {
|
|
161
|
+
ignore: opts.ignore,
|
|
162
|
+
});
|
|
161
163
|
if (!files.length) {
|
|
162
164
|
throw new Error(`No input file found with pattern ${filePatterns}`);
|
|
163
165
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CompileFn, FormatFn } from './default';
|
|
2
|
-
export type
|
|
2
|
+
export type CrowdinJson = Record<string, {
|
|
3
3
|
message: string;
|
|
4
4
|
description?: string;
|
|
5
5
|
}>;
|
|
6
|
-
export declare const format: FormatFn<
|
|
7
|
-
export declare const compile: CompileFn<
|
|
6
|
+
export declare const format: FormatFn<CrowdinJson>;
|
|
7
|
+
export declare const compile: CompileFn<CrowdinJson>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@formatjs/cli-lib",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.3.0",
|
|
4
4
|
"description": "Lib for CLI for formatjs.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"intl",
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
"loud-rejection": "2",
|
|
45
45
|
"tslib": "2",
|
|
46
46
|
"typescript": "5",
|
|
47
|
+
"@formatjs/icu-messageformat-parser": "2.11.0",
|
|
47
48
|
"@formatjs/icu-skeleton-parser": "1.8.12",
|
|
48
|
-
"@formatjs/ts-transformer": "3.13.
|
|
49
|
-
"@formatjs/icu-messageformat-parser": "2.11.0"
|
|
49
|
+
"@formatjs/ts-transformer": "3.13.31"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"@glimmer/env": "^0.1.7",
|