i18next-cli 1.47.0 → 1.47.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/dist/cjs/cli.js +1 -1
- package/dist/cjs/linter.js +2 -2
- package/dist/cjs/locize.js +1 -0
- package/dist/esm/cli.js +1 -1
- package/dist/esm/linter.js +2 -2
- package/dist/esm/locize.js +1 -0
- package/package.json +1 -1
- package/types/locize.d.ts.map +1 -1
package/dist/cjs/cli.js
CHANGED
|
@@ -31,7 +31,7 @@ const program = new commander.Command();
|
|
|
31
31
|
program
|
|
32
32
|
.name('i18next-cli')
|
|
33
33
|
.description('A unified, high-performance i18next CLI.')
|
|
34
|
-
.version('1.47.
|
|
34
|
+
.version('1.47.2'); // This string is replaced with the actual version at build time by rollup
|
|
35
35
|
// new: global config override option
|
|
36
36
|
program.option('-c, --config <path>', 'Path to i18next-cli config file (overrides detection)');
|
|
37
37
|
program
|
package/dist/cjs/linter.js
CHANGED
|
@@ -75,8 +75,8 @@ async function loadPrimaryTranslationValues(config) {
|
|
|
75
75
|
function extractInterpolationKeys(str, config) {
|
|
76
76
|
const prefix = config.extract.interpolationPrefix ?? '{{';
|
|
77
77
|
const suffix = config.extract.interpolationSuffix ?? '}}';
|
|
78
|
-
// Regex to match {{key}}
|
|
79
|
-
const regex = new RegExp(`${prefix.replace(/[-/\\^$*+?.()|[\]{}]/g, '\\$&')}\\s*([\\w.-]+)\\s
|
|
78
|
+
// Regex to match {{key}} or {{key, format}} (i18next formatting syntax)
|
|
79
|
+
const regex = new RegExp(`${prefix.replace(/[-/\\^$*+?.()|[\]{}]/g, '\\$&')}\\s*([\\w.-]+)\\s*(?:,[^}]*)?${suffix.replace(/[-/\\^$*+?.()|[\]{}]/g, '\\$&')}`, 'g');
|
|
80
80
|
const keys = [];
|
|
81
81
|
let match;
|
|
82
82
|
while ((match = regex.exec(str))) {
|
package/dist/cjs/locize.js
CHANGED
|
@@ -227,6 +227,7 @@ async function runLocizeCommand(command, config, cliOptions = {}) {
|
|
|
227
227
|
const stderr = error.stderr || '';
|
|
228
228
|
if (stderr.includes('missing required argument')) {
|
|
229
229
|
// 2. Auth failure, trigger interactive setup
|
|
230
|
+
spinner.stop();
|
|
230
231
|
const newCredentials = await interactiveCredentialSetup();
|
|
231
232
|
if (newCredentials) {
|
|
232
233
|
effectiveConfig = { ...effectiveConfig, locize: newCredentials };
|
package/dist/esm/cli.js
CHANGED
|
@@ -29,7 +29,7 @@ const program = new Command();
|
|
|
29
29
|
program
|
|
30
30
|
.name('i18next-cli')
|
|
31
31
|
.description('A unified, high-performance i18next CLI.')
|
|
32
|
-
.version('1.47.
|
|
32
|
+
.version('1.47.2'); // This string is replaced with the actual version at build time by rollup
|
|
33
33
|
// new: global config override option
|
|
34
34
|
program.option('-c, --config <path>', 'Path to i18next-cli config file (overrides detection)');
|
|
35
35
|
program
|
package/dist/esm/linter.js
CHANGED
|
@@ -73,8 +73,8 @@ async function loadPrimaryTranslationValues(config) {
|
|
|
73
73
|
function extractInterpolationKeys(str, config) {
|
|
74
74
|
const prefix = config.extract.interpolationPrefix ?? '{{';
|
|
75
75
|
const suffix = config.extract.interpolationSuffix ?? '}}';
|
|
76
|
-
// Regex to match {{key}}
|
|
77
|
-
const regex = new RegExp(`${prefix.replace(/[-/\\^$*+?.()|[\]{}]/g, '\\$&')}\\s*([\\w.-]+)\\s
|
|
76
|
+
// Regex to match {{key}} or {{key, format}} (i18next formatting syntax)
|
|
77
|
+
const regex = new RegExp(`${prefix.replace(/[-/\\^$*+?.()|[\]{}]/g, '\\$&')}\\s*([\\w.-]+)\\s*(?:,[^}]*)?${suffix.replace(/[-/\\^$*+?.()|[\]{}]/g, '\\$&')}`, 'g');
|
|
78
78
|
const keys = [];
|
|
79
79
|
let match;
|
|
80
80
|
while ((match = regex.exec(str))) {
|
package/dist/esm/locize.js
CHANGED
|
@@ -225,6 +225,7 @@ async function runLocizeCommand(command, config, cliOptions = {}) {
|
|
|
225
225
|
const stderr = error.stderr || '';
|
|
226
226
|
if (stderr.includes('missing required argument')) {
|
|
227
227
|
// 2. Auth failure, trigger interactive setup
|
|
228
|
+
spinner.stop();
|
|
228
229
|
const newCredentials = await interactiveCredentialSetup();
|
|
229
230
|
if (newCredentials) {
|
|
230
231
|
effectiveConfig = { ...effectiveConfig, locize: newCredentials };
|
package/package.json
CHANGED
package/types/locize.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locize.d.ts","sourceRoot":"","sources":["../src/locize.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"locize.d.ts","sourceRoot":"","sources":["../src/locize.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAoQnD,eAAO,MAAM,aAAa,GAAI,QAAQ,oBAAoB,EAAE,aAAa,GAAG,kBAAiD,CAAA;AAC7H,eAAO,MAAM,iBAAiB,GAAI,QAAQ,oBAAoB,EAAE,aAAa,GAAG,kBAAqD,CAAA;AACrI,eAAO,MAAM,gBAAgB,GAAI,QAAQ,oBAAoB,EAAE,aAAa,GAAG,kBAAoD,CAAA"}
|