i18next-cli 1.78.0 → 1.79.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/dist/cjs/cli.js +1 -1
- package/dist/cjs/extractor/core/extractor.js +3 -3
- package/dist/cjs/instrumenter/core/instrumenter.js +2 -1
- package/dist/cjs/linter.js +2 -2
- package/dist/esm/cli.js +1 -1
- package/dist/esm/extractor/core/extractor.js +3 -3
- package/dist/esm/instrumenter/core/instrumenter.js +2 -1
- package/dist/esm/linter.js +2 -2
- package/package.json +1 -1
- package/types/instrumenter/core/instrumenter.d.ts.map +1 -1
package/dist/cjs/cli.js
CHANGED
|
@@ -39,7 +39,7 @@ const program = new commander.Command();
|
|
|
39
39
|
program
|
|
40
40
|
.name('i18next-cli')
|
|
41
41
|
.description('A unified, high-performance i18next CLI.')
|
|
42
|
-
.version('1.
|
|
42
|
+
.version('1.79.0') // This string is replaced with the actual version at build time by rollup
|
|
43
43
|
.addHelpText('after', '\nUsing an AI coding agent? Install the i18next-localization skill: npx skills add i18next/i18next-cli\n');
|
|
44
44
|
// new: global config override option
|
|
45
45
|
program.option('-c, --config <path>', 'Path to i18next-cli config file (overrides detection)');
|
|
@@ -273,9 +273,9 @@ async function processFile(file, plugins, astVisitors, pluginContext, config, lo
|
|
|
273
273
|
catch (err2) {
|
|
274
274
|
throw new validation.ExtractorError('Failed to process file', file, err2);
|
|
275
275
|
}
|
|
276
|
-
// Fallback for .js files with JSX
|
|
276
|
+
// Fallback for .js and .mjs files with JSX
|
|
277
277
|
}
|
|
278
|
-
else if (effectiveExt === '.js' && !isJSX) {
|
|
278
|
+
else if ((effectiveExt === '.js' || effectiveExt === '.mjs') && !isJSX) {
|
|
279
279
|
try {
|
|
280
280
|
ast = await core.parse(code, {
|
|
281
281
|
syntax: 'ecmascript',
|
|
@@ -386,7 +386,7 @@ async function preScanFile(file, astVisitors, config, logger$1 = new logger.Cons
|
|
|
386
386
|
throw new validation.ExtractorError('Failed to pre-scan file', file, err2);
|
|
387
387
|
}
|
|
388
388
|
}
|
|
389
|
-
else if (fileExt === '.js' && !isJSX) {
|
|
389
|
+
else if ((fileExt === '.js' || fileExt === '.mjs') && !isJSX) {
|
|
390
390
|
try {
|
|
391
391
|
ast = await core.parse(code, { syntax: 'ecmascript', jsx: true, decorators: true, dynamicImport: true, comments: true });
|
|
392
392
|
}
|
|
@@ -257,8 +257,9 @@ async function scanFileForCandidates(content, file, config) {
|
|
|
257
257
|
dynamicImport: true,
|
|
258
258
|
comments: true
|
|
259
259
|
});
|
|
260
|
+
// Fallback for .js and .mjs files with JSX
|
|
260
261
|
}
|
|
261
|
-
else if (fileExt === '.js' && !isJSX) {
|
|
262
|
+
else if ((fileExt === '.js' || fileExt === '.mjs') && !isJSX) {
|
|
262
263
|
ast = await core.parse(content, {
|
|
263
264
|
syntax: 'ecmascript',
|
|
264
265
|
jsx: true,
|
package/dist/cjs/linter.js
CHANGED
|
@@ -590,9 +590,9 @@ class Linter extends node_events.EventEmitter {
|
|
|
590
590
|
this.emit('error', wrapped);
|
|
591
591
|
continue;
|
|
592
592
|
}
|
|
593
|
-
// Fallback for .js files with JSX
|
|
593
|
+
// Fallback for .js and .mjs files with JSX
|
|
594
594
|
}
|
|
595
|
-
else if (fileExt === '.js' && !isJSX) {
|
|
595
|
+
else if ((fileExt === '.js' || fileExt === '.mjs') && !isJSX) {
|
|
596
596
|
try {
|
|
597
597
|
ast = await core.parse(code, {
|
|
598
598
|
syntax: 'ecmascript',
|
package/dist/esm/cli.js
CHANGED
|
@@ -33,7 +33,7 @@ const program = new Command();
|
|
|
33
33
|
program
|
|
34
34
|
.name('i18next-cli')
|
|
35
35
|
.description('A unified, high-performance i18next CLI.')
|
|
36
|
-
.version('1.
|
|
36
|
+
.version('1.79.0') // This string is replaced with the actual version at build time by rollup
|
|
37
37
|
.addHelpText('after', '\nUsing an AI coding agent? Install the i18next-localization skill: npx skills add i18next/i18next-cli\n');
|
|
38
38
|
// new: global config override option
|
|
39
39
|
program.option('-c, --config <path>', 'Path to i18next-cli config file (overrides detection)');
|
|
@@ -271,9 +271,9 @@ async function processFile(file, plugins, astVisitors, pluginContext, config, lo
|
|
|
271
271
|
catch (err2) {
|
|
272
272
|
throw new ExtractorError('Failed to process file', file, err2);
|
|
273
273
|
}
|
|
274
|
-
// Fallback for .js files with JSX
|
|
274
|
+
// Fallback for .js and .mjs files with JSX
|
|
275
275
|
}
|
|
276
|
-
else if (effectiveExt === '.js' && !isJSX) {
|
|
276
|
+
else if ((effectiveExt === '.js' || effectiveExt === '.mjs') && !isJSX) {
|
|
277
277
|
try {
|
|
278
278
|
ast = await parse(code, {
|
|
279
279
|
syntax: 'ecmascript',
|
|
@@ -384,7 +384,7 @@ async function preScanFile(file, astVisitors, config, logger = new ConsoleLogger
|
|
|
384
384
|
throw new ExtractorError('Failed to pre-scan file', file, err2);
|
|
385
385
|
}
|
|
386
386
|
}
|
|
387
|
-
else if (fileExt === '.js' && !isJSX) {
|
|
387
|
+
else if ((fileExt === '.js' || fileExt === '.mjs') && !isJSX) {
|
|
388
388
|
try {
|
|
389
389
|
ast = await parse(code, { syntax: 'ecmascript', jsx: true, decorators: true, dynamicImport: true, comments: true });
|
|
390
390
|
}
|
|
@@ -251,8 +251,9 @@ async function scanFileForCandidates(content, file, config) {
|
|
|
251
251
|
dynamicImport: true,
|
|
252
252
|
comments: true
|
|
253
253
|
});
|
|
254
|
+
// Fallback for .js and .mjs files with JSX
|
|
254
255
|
}
|
|
255
|
-
else if (fileExt === '.js' && !isJSX) {
|
|
256
|
+
else if ((fileExt === '.js' || fileExt === '.mjs') && !isJSX) {
|
|
256
257
|
ast = await parse(content, {
|
|
257
258
|
syntax: 'ecmascript',
|
|
258
259
|
jsx: true,
|
package/dist/esm/linter.js
CHANGED
|
@@ -588,9 +588,9 @@ class Linter extends EventEmitter {
|
|
|
588
588
|
this.emit('error', wrapped);
|
|
589
589
|
continue;
|
|
590
590
|
}
|
|
591
|
-
// Fallback for .js files with JSX
|
|
591
|
+
// Fallback for .js and .mjs files with JSX
|
|
592
592
|
}
|
|
593
|
-
else if (fileExt === '.js' && !isJSX) {
|
|
593
|
+
else if ((fileExt === '.js' || fileExt === '.mjs') && !isJSX) {
|
|
594
594
|
try {
|
|
595
595
|
ast = await parse(code, {
|
|
596
596
|
syntax: 'ecmascript',
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instrumenter.d.ts","sourceRoot":"","sources":["../../../src/instrumenter/core/instrumenter.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,MAAM,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,eAAe,EAA6B,sBAAsB,EAAiE,MAAM,gBAAgB,CAAA;AAW1N;;;;;;;;GAQG;AACH,wBAAsB,eAAe,CACnC,MAAM,EAAE,oBAAoB,EAC5B,OAAO,EAAE,mBAAmB,EAC5B,MAAM,GAAE,MAA4B,GACnC,OAAO,CAAC,sBAAsB,CAAC,CAkOjC;
|
|
1
|
+
{"version":3,"file":"instrumenter.d.ts","sourceRoot":"","sources":["../../../src/instrumenter/core/instrumenter.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,MAAM,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,eAAe,EAA6B,sBAAsB,EAAiE,MAAM,gBAAgB,CAAA;AAW1N;;;;;;;;GAQG;AACH,wBAAsB,eAAe,CACnC,MAAM,EAAE,oBAAoB,EAC5B,OAAO,EAAE,mBAAmB,EAC5B,MAAM,GAAE,MAA4B,GACnC,OAAO,CAAC,sBAAsB,CAAC,CAkOjC;AA6yCD;;GAEG;AACH,wBAAsB,mBAAmB,IAAK,OAAO,CAAC,OAAO,CAAC,CAU7D;AAID,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,aAAa,GAAG,MAAM,GAAG,SAAS,CAAA;AA6B/E;;;;;;;;;GASG;AACH,wBAAsB,wBAAwB,IAAK,OAAO,CAAC,kBAAkB,CAAC,CA8B7E;AAED;;GAEG;AACH,wBAAsB,wBAAwB,IAAK,OAAO,CAAC,OAAO,CAAC,CAOlE;AAwBD;;;;;;GAMG;AACH,wBAAsB,wBAAwB,IAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAWxE;AAiaD;;GAEG;AACH,wBAAsB,kBAAkB,CACtC,UAAU,EAAE,eAAe,EAAE,EAC7B,MAAM,EAAE,oBAAoB,EAC5B,SAAS,CAAC,EAAE,MAAM,EAClB,MAAM,GAAE,MAA4B,GACnC,OAAO,CAAC,IAAI,CAAC,CAoDf"}
|