i18next-cli 1.84.0 → 1.85.1
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/README.md +7 -1
- package/dist/cjs/cli.js +1 -1
- package/dist/cjs/extractor/core/ast-visitors.js +5 -1
- package/dist/cjs/extractor/core/key-finder.js +7 -0
- package/dist/cjs/extractor/parsers/expression-resolver.js +148 -29
- package/dist/cjs/extractor/parsers/scope-manager.js +2 -1
- package/dist/esm/cli.js +1 -1
- package/dist/esm/extractor/core/ast-visitors.js +5 -1
- package/dist/esm/extractor/core/key-finder.js +8 -1
- package/dist/esm/extractor/parsers/expression-resolver.js +149 -30
- package/dist/esm/extractor/parsers/scope-manager.js +2 -1
- package/package.json +1 -1
- package/types/extractor/core/ast-visitors.d.ts.map +1 -1
- package/types/extractor/core/key-finder.d.ts.map +1 -1
- package/types/extractor/parsers/expression-resolver.d.ts +25 -1
- package/types/extractor/parsers/expression-resolver.d.ts.map +1 -1
- package/types/extractor/parsers/scope-manager.d.ts +2 -2
- package/types/extractor/parsers/scope-manager.d.ts.map +1 -1
- package/types/types.d.ts +12 -0
- package/types/types.d.ts.map +1 -1
package/README.md
CHANGED
|
@@ -1084,7 +1084,13 @@ export default defineConfig({
|
|
|
1084
1084
|
messageFormat: 'i18next', // Default: 'i18next'
|
|
1085
1085
|
|
|
1086
1086
|
// Warn (or error) when the same ns:key is extracted with different default values.
|
|
1087
|
-
warnOnConflicts: true // Default: false
|
|
1087
|
+
warnOnConflicts: true, // Default: false
|
|
1088
|
+
|
|
1089
|
+
// Warn (or error) when the extractor has to guess which declaration a name means: a type, enum or
|
|
1090
|
+
// constant declared differently in more than one scanned file, which the file reading it neither
|
|
1091
|
+
// declares nor imports from a file the extractor can follow (a global, a package, an unscanned file).
|
|
1092
|
+
// It also reports guesses no key ends up built from.
|
|
1093
|
+
warnOnAmbiguousTypes: 'error' // Default: false
|
|
1088
1094
|
},
|
|
1089
1095
|
|
|
1090
1096
|
// options for linter
|
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.85.1') // 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)');
|
|
@@ -103,6 +103,9 @@ class ASTVisitors {
|
|
|
103
103
|
this.scopeManager.isParameter = (name) => this.expressionResolver.isParameter(name);
|
|
104
104
|
// use shared resolver when provided so captured enums/objects are visible across files
|
|
105
105
|
this.expressionResolver = expressionResolver$1 ?? new expressionResolver.ExpressionResolver(this.hooks);
|
|
106
|
+
// `useTranslation(NS)` reads the `NS` of the module it is imported from, like the resolver's tables (#327)
|
|
107
|
+
this.scopeManager.sharedConstants = this.expressionResolver.valueTable();
|
|
108
|
+
this.scopeManager.sharedConstantObjects = this.expressionResolver.valueTable();
|
|
106
109
|
this.callExpressionHandler = new callExpressionHandler.CallExpressionHandler(config, pluginContext, logger, this.expressionResolver, () => this.getCurrentFile(), () => this.getCurrentCode(), (name) => this.scopeManager.resolveSimpleStringIdentifier(name));
|
|
107
110
|
this.jsxHandler = new jsxHandler.JSXHandler(config, pluginContext, this.expressionResolver, () => this.getCurrentFile(), () => this.getCurrentCode());
|
|
108
111
|
}
|
|
@@ -176,9 +179,10 @@ class ASTVisitors {
|
|
|
176
179
|
break;
|
|
177
180
|
case 'ImportDeclaration':
|
|
178
181
|
case 'ExportNamedDeclaration':
|
|
182
|
+
case 'ExportAllDeclaration':
|
|
179
183
|
// `import { X as Y }` → ExpressionResolver.sharedImportAliases, resolved
|
|
180
184
|
// once the pre-scan has seen every file; `import * as Types` / `export * as Types`
|
|
181
|
-
// → namespace names.
|
|
185
|
+
// → namespace names; `export * from` / `export { X } from` → barrels.
|
|
182
186
|
this.expressionResolver.captureImportDeclaration(node);
|
|
183
187
|
break;
|
|
184
188
|
}
|
|
@@ -83,6 +83,7 @@ async function findKeys(config$1, logger$1 = new logger.ConsoleLogger(), fileErr
|
|
|
83
83
|
const sharedExpressionResolver = new expressionResolver.ExpressionResolver(hooks);
|
|
84
84
|
sharedExpressionResolver.maxMemberDepth = config$1.extract.maxTypeDepth ?? 5;
|
|
85
85
|
sharedExpressionResolver.pathAliases = await config.getTsConfigAliases();
|
|
86
|
+
sharedExpressionResolver.warnOnAmbiguous = !!config$1.extract.warnOnAmbiguousTypes;
|
|
86
87
|
const astVisitors$1 = new astVisitors.ASTVisitors(otherConfig, pluginContext, logger$1, hooks, sharedExpressionResolver);
|
|
87
88
|
// 4. "Wire up" the visitor's scope method to the context.
|
|
88
89
|
// This avoids a circular dependency while giving plugins access to the scope.
|
|
@@ -106,6 +107,12 @@ async function findKeys(config$1, logger$1 = new logger.ConsoleLogger(), fileErr
|
|
|
106
107
|
for (const file of sourceFiles) {
|
|
107
108
|
await extractor.processFile(file, plugins, astVisitors$1, pluginContext, otherConfig, logger$1, fileErrors);
|
|
108
109
|
}
|
|
110
|
+
// 7a. Names the extraction pass had to guess between same-named declarations of different files
|
|
111
|
+
const { ambiguities } = sharedExpressionResolver;
|
|
112
|
+
if (ambiguities.length > 0 && config$1.extract.warnOnAmbiguousTypes === 'error')
|
|
113
|
+
throw new pluginManager.ConflictError(ambiguities.join('\n'));
|
|
114
|
+
for (const msg of ambiguities)
|
|
115
|
+
logger$1.warn(msg);
|
|
109
116
|
// 7. Run onEnd hooks
|
|
110
117
|
for (const plugin of plugins) {
|
|
111
118
|
await plugin.onEnd?.(allKeys);
|
|
@@ -87,8 +87,9 @@ class ValueTable extends Map {
|
|
|
87
87
|
return this.scope.isParameter(name) ? undefined : super.get(name);
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
|
-
// `/src/api/github-api.ts`, `.d.ts`, or an import of `./github-api.js` -> `/src/api/github-api
|
|
91
|
-
|
|
90
|
+
// `/src/api/github-api.ts`, `.d.ts`, or an import of `./github-api.js` -> `/src/api/github-api`;
|
|
91
|
+
// `C:\src\types` -> `C:/src/types`, so `moduleOf` finds its `/index` on Windows too
|
|
92
|
+
const moduleKey = (path) => path.replace(/\\/g, '/').replace(/(\.d)?\.[cm]?[jt]sx?$/, '');
|
|
92
93
|
/**
|
|
93
94
|
* A cross-file table keyed by declared name. Every entry is also kept under the module that
|
|
94
95
|
* declares it (`/src/api/github-api#components`), and a lookup made while a file is being read
|
|
@@ -99,6 +100,8 @@ const moduleKey = (path) => path.replace(/(\.d)?\.[cm]?[jt]sx?$/, '');
|
|
|
99
100
|
class ModuleTable extends Map {
|
|
100
101
|
scope;
|
|
101
102
|
holdsValues;
|
|
103
|
+
// declared name -> the modules declaring it
|
|
104
|
+
declarers = new Map();
|
|
102
105
|
constructor(scope, holdsValues = false) {
|
|
103
106
|
super();
|
|
104
107
|
this.scope = scope;
|
|
@@ -110,18 +113,32 @@ class ModuleTable extends Map {
|
|
|
110
113
|
return undefined;
|
|
111
114
|
for (const key of this.scope.keysOf(name)) {
|
|
112
115
|
const value = super.get(key);
|
|
113
|
-
if (value
|
|
114
|
-
|
|
116
|
+
if (value === undefined)
|
|
117
|
+
continue;
|
|
118
|
+
// The bare name holds whichever file declared it last (#327)
|
|
119
|
+
if (!key.includes('#'))
|
|
120
|
+
this.scope.guessed(key, this);
|
|
121
|
+
return value;
|
|
115
122
|
}
|
|
116
123
|
return undefined;
|
|
117
124
|
}
|
|
125
|
+
// [module, what it declares] for every module declaring `name`
|
|
126
|
+
declarations(name) {
|
|
127
|
+
return [...this.declarers.get(name) ?? []].flatMap(module => {
|
|
128
|
+
const value = super.get(`${module}#${name}`);
|
|
129
|
+
return value === undefined ? [] : [[module, value]];
|
|
130
|
+
});
|
|
131
|
+
}
|
|
118
132
|
has(name) {
|
|
119
133
|
return this.scope.keysOf(name).some(key => super.has(key));
|
|
120
134
|
}
|
|
121
135
|
set(name, value) {
|
|
122
136
|
const key = this.scope.declaringKey(name);
|
|
123
|
-
if (key)
|
|
137
|
+
if (key) {
|
|
124
138
|
super.set(key, value);
|
|
139
|
+
this.scope.declare(name);
|
|
140
|
+
this.declarers.set(name, (this.declarers.get(name) ?? new Set()).add(key.slice(0, -name.length - 1)));
|
|
141
|
+
}
|
|
125
142
|
return super.set(name, value);
|
|
126
143
|
}
|
|
127
144
|
delete(name) {
|
|
@@ -237,22 +254,38 @@ class ExpressionResolver {
|
|
|
237
254
|
// names from (see ModuleTable)
|
|
238
255
|
currentModule;
|
|
239
256
|
knownModules = new Set();
|
|
240
|
-
// module -> local name -> { from: the import's resolved path, name: the declared name }
|
|
257
|
+
// module -> local name -> { from: the import's resolved path, if it is one of this project, name: the declared name }
|
|
241
258
|
fileImports = new Map();
|
|
259
|
+
// module -> exported name -> the same for its re-exports: `export { ABC as Letters } from './abc'`
|
|
260
|
+
fileExports = new Map();
|
|
261
|
+
// module -> the paths it re-exports everything of: `export * from './abc'`
|
|
262
|
+
fileStarExports = new Map();
|
|
242
263
|
// module -> namespace import's local name -> the import's resolved path
|
|
243
264
|
fileNamespaces = new Map();
|
|
244
|
-
// module
|
|
245
|
-
|
|
265
|
+
// `module#name` of every name a module declares (variable, type, interface, enum, function), also
|
|
266
|
+
// when its value isn't captured: it shadows the same names declared in other files (#307, #327)
|
|
267
|
+
declaredKeys = new Set();
|
|
268
|
+
// module -> its file, for messages
|
|
269
|
+
moduleFiles = new Map();
|
|
270
|
+
// `exportKey` results: a declaration found stays found, one not found may be in a file the
|
|
271
|
+
// pre-scan has not read yet, so misses are only kept once it is done
|
|
272
|
+
exportKeyCache = new Map();
|
|
273
|
+
preScanned = false;
|
|
246
274
|
// The parameters of the functions being read, innermost last
|
|
247
275
|
parameters = [];
|
|
248
276
|
// tsconfig `paths`, `@api` -> `/abs/src/api`
|
|
249
277
|
pathAliases = {};
|
|
278
|
+
// `extract.warnOnAmbiguousTypes`: collect the names the extraction pass had to guess (see `guessed`)
|
|
279
|
+
warnOnAmbiguous = false;
|
|
280
|
+
ambiguities = [];
|
|
281
|
+
checkedAmbiguous = new Map();
|
|
250
282
|
constructor(hooks) {
|
|
251
283
|
this.hooks = hooks;
|
|
252
284
|
}
|
|
253
285
|
setCurrentFile(file) {
|
|
254
286
|
this.currentModule = moduleKey(node_path.resolve(file));
|
|
255
287
|
this.knownModules.add(this.currentModule);
|
|
288
|
+
this.moduleFiles.set(this.currentModule, file);
|
|
256
289
|
}
|
|
257
290
|
// `./api/github-api` / `@api/github-api` imported in the current file -> its path, or undefined
|
|
258
291
|
// for a package or anything else that isn't a file of this project
|
|
@@ -273,19 +306,92 @@ class ExpressionResolver {
|
|
|
273
306
|
}
|
|
274
307
|
// ModuleTable: the keys `name` read in the current file may be stored under, most specific first
|
|
275
308
|
keysOf(name) {
|
|
276
|
-
|
|
309
|
+
// `GH.components` through `import * as GH from './github-api'`, which may be a barrel
|
|
310
|
+
const at = name.lastIndexOf('#');
|
|
311
|
+
if (at >= 0) {
|
|
312
|
+
const key = this.exportKey(name.slice(0, at), name.slice(at + 1));
|
|
313
|
+
return [key ?? name.slice(at + 1)];
|
|
314
|
+
}
|
|
315
|
+
if (!this.currentModule)
|
|
277
316
|
return [name];
|
|
278
|
-
const keys = [];
|
|
279
317
|
const imported = this.fileImports.get(this.currentModule)?.get(name);
|
|
280
|
-
const
|
|
281
|
-
if (
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
//
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
318
|
+
const key = imported && this.exportKey(imported.from, imported.name);
|
|
319
|
+
if (key)
|
|
320
|
+
return [key];
|
|
321
|
+
// The bare name holds whichever file declared it last: a guess, only made for a name this file
|
|
322
|
+
// neither declares nor imports from a file that does (a global, a package, an unscanned file) (#307, #327)
|
|
323
|
+
const own = `${this.currentModule}#${name}`;
|
|
324
|
+
return this.declaredKeys.has(own) ? [own] : [own, name];
|
|
325
|
+
}
|
|
326
|
+
/**
|
|
327
|
+
* The key of the declaration of `name` exported by the module at `path`: in that module, or in the
|
|
328
|
+
* module it re-exports it from, `export { ABC } from './abc'` / `export * from './abc'` (#327)
|
|
329
|
+
*/
|
|
330
|
+
exportKey(path, name) {
|
|
331
|
+
const id = `${path}#${name}`;
|
|
332
|
+
if (this.exportKeyCache.has(id))
|
|
333
|
+
return this.exportKeyCache.get(id);
|
|
334
|
+
const key = this.findExportKey(path, name, new Set());
|
|
335
|
+
if (key || this.preScanned)
|
|
336
|
+
this.exportKeyCache.set(id, key);
|
|
337
|
+
return key;
|
|
338
|
+
}
|
|
339
|
+
// ponytail: one search per imported name, cached; nested barrels of thousands of modules make it ~2x slower
|
|
340
|
+
// than direct imports, a per-module export map (built once the pre-scan is done) if that ever matters
|
|
341
|
+
findExportKey(path, name, seen) {
|
|
342
|
+
const module = path && this.moduleOf(path);
|
|
343
|
+
const key = `${module}#${name}`;
|
|
344
|
+
if (!module || seen.has(key))
|
|
345
|
+
return undefined;
|
|
346
|
+
seen.add(key);
|
|
347
|
+
if (this.declaredKeys.has(key))
|
|
348
|
+
return key;
|
|
349
|
+
// `export { ABC } from './abc'`, or `import { ABC } from './abc'; export { ABC }`
|
|
350
|
+
const via = this.fileExports.get(module)?.get(name) ?? this.fileImports.get(module)?.get(name);
|
|
351
|
+
const found = via && this.findExportKey(via.from, via.name, seen);
|
|
352
|
+
if (found)
|
|
353
|
+
return found;
|
|
354
|
+
for (const from of this.fileStarExports.get(module) ?? []) {
|
|
355
|
+
const starred = this.findExportKey(from, name, seen);
|
|
356
|
+
if (starred)
|
|
357
|
+
return starred;
|
|
358
|
+
}
|
|
359
|
+
return undefined;
|
|
360
|
+
}
|
|
361
|
+
// Record that the current file declares `name`, whether or not its value is captured
|
|
362
|
+
declare(name) {
|
|
363
|
+
if (this.currentModule)
|
|
364
|
+
this.declaredKeys.add(`${this.currentModule}#${name}`);
|
|
365
|
+
}
|
|
366
|
+
/**
|
|
367
|
+
* ModuleTable: `name`, read in the current file, resolved to whichever file declared it last. With
|
|
368
|
+
* `warnOnAmbiguous`, the extraction pass records it in `ambiguities` when several files declare it
|
|
369
|
+
* differently (#327).
|
|
370
|
+
*/
|
|
371
|
+
guessed(name, table) {
|
|
372
|
+
if (!this.warnOnAmbiguous || this.recording || this.replaying || !this.currentModule)
|
|
373
|
+
return;
|
|
374
|
+
const declared = this.fileImports.get(this.currentModule)?.get(name)?.name ?? name;
|
|
375
|
+
const checked = this.checkedAmbiguous.get(table) ?? new Set();
|
|
376
|
+
this.checkedAmbiguous.set(table, checked);
|
|
377
|
+
if (checked.has(`${this.currentModule}#${declared}`))
|
|
378
|
+
return;
|
|
379
|
+
checked.add(`${this.currentModule}#${declared}`);
|
|
380
|
+
const found = table.declarations(declared);
|
|
381
|
+
// AST nodes of identical declarations differ only by their position, unions only by their order
|
|
382
|
+
const variants = new Set(found.map(([, value]) => JSON.stringify(value, (k, v) => k === 'span' || k === 'ctxt' ? undefined : Array.isArray(v) && v.every(x => typeof x === 'string') ? [...v].sort() : v)));
|
|
383
|
+
if (variants.size < 2)
|
|
384
|
+
return;
|
|
385
|
+
const fileOf = (module) => node_path.relative(process.cwd(), this.moduleFiles.get(module) ?? module);
|
|
386
|
+
const file = fileOf(this.currentModule);
|
|
387
|
+
const msg = `Cannot tell which "${declared}" ${file} means: ${found.map(([module]) => fileOf(module)).join(', ')} declare it differently, ` +
|
|
388
|
+
`and ${file} neither declares it nor imports it from a file the extractor can follow. Keys built from it may come from the wrong one.`;
|
|
389
|
+
if (!this.ambiguities.includes(msg))
|
|
390
|
+
this.ambiguities.push(msg);
|
|
391
|
+
}
|
|
392
|
+
// A cross-file table of values that knows which module a name is imported from, for ScopeManager
|
|
393
|
+
valueTable() {
|
|
394
|
+
return new ModuleTable(this, true);
|
|
289
395
|
}
|
|
290
396
|
// ValueTable / ModuleTable: whether `name` is a parameter of a function being read
|
|
291
397
|
isParameter(name) {
|
|
@@ -371,6 +477,7 @@ class ExpressionResolver {
|
|
|
371
477
|
this.applyImportAliases();
|
|
372
478
|
this.replays = [];
|
|
373
479
|
this.resetFileSymbols();
|
|
480
|
+
this.preScanned = true;
|
|
374
481
|
}
|
|
375
482
|
/**
|
|
376
483
|
* Write an entry of a cross-file table. While replaying, an entry only grows:
|
|
@@ -460,11 +567,7 @@ class ExpressionResolver {
|
|
|
460
567
|
if (node.id.type !== 'Identifier')
|
|
461
568
|
return;
|
|
462
569
|
const name = node.id.value;
|
|
463
|
-
|
|
464
|
-
if (!this.fileVariables.has(this.currentModule))
|
|
465
|
-
this.fileVariables.set(this.currentModule, new Set());
|
|
466
|
-
this.fileVariables.get(this.currentModule).add(name);
|
|
467
|
-
}
|
|
570
|
+
this.declare(name);
|
|
468
571
|
// `const items: IProps[] = …` → remember the element's member map so
|
|
469
572
|
// `items.map(({ size }) => …)` can bind the callback parameter.
|
|
470
573
|
const idTypeAnnotation = this.extractTypeAnnotation(node.id);
|
|
@@ -585,6 +688,7 @@ class ExpressionResolver {
|
|
|
585
688
|
const name = node?.id?.type === 'Identifier' ? node.id.value : undefined;
|
|
586
689
|
if (!name)
|
|
587
690
|
return;
|
|
691
|
+
this.declare(name);
|
|
588
692
|
// SWC puts the actual type in `.typeAnnotation`
|
|
589
693
|
const tsType = node.typeAnnotation ?? node.typeAnn;
|
|
590
694
|
if (!tsType)
|
|
@@ -627,10 +731,19 @@ class ExpressionResolver {
|
|
|
627
731
|
*/
|
|
628
732
|
captureImportDeclaration(node) {
|
|
629
733
|
try {
|
|
630
|
-
const
|
|
631
|
-
const
|
|
734
|
+
const module = this.currentModule;
|
|
735
|
+
const from = typeof node?.source?.value === 'string' ? this.importPath(node.source.value) : undefined;
|
|
736
|
+
// `export * from './abc'`
|
|
737
|
+
if (node?.type === 'ExportAllDeclaration') {
|
|
738
|
+
if (module && from)
|
|
739
|
+
this.fileStarExports.set(module, [...this.fileStarExports.get(module) ?? [], from]);
|
|
740
|
+
return;
|
|
741
|
+
}
|
|
742
|
+
// `import { ABC } from …` / `export { ABC } from …`: local or exported name -> where it is declared
|
|
743
|
+
const table = node?.type === 'ImportDeclaration' ? this.fileImports : node?.source ? this.fileExports : undefined;
|
|
744
|
+
const imports = module && table ? (table.get(module) ?? new Map()) : undefined;
|
|
632
745
|
if (imports)
|
|
633
|
-
|
|
746
|
+
table.set(module, imports);
|
|
634
747
|
for (const spec of node?.specifiers ?? []) {
|
|
635
748
|
// `import * as Types from …` / `export * as Types from …`
|
|
636
749
|
if (spec?.type === 'ImportNamespaceSpecifier' && spec.local?.value) {
|
|
@@ -643,6 +756,9 @@ class ExpressionResolver {
|
|
|
643
756
|
}
|
|
644
757
|
if (spec?.type === 'ExportNamespaceSpecifier' && spec.name?.value)
|
|
645
758
|
this.sharedNamespaceNames.add(spec.name.value);
|
|
759
|
+
// `export { ABC as Letters } from './abc'`
|
|
760
|
+
if (spec?.type === 'ExportSpecifier' && spec.orig?.value)
|
|
761
|
+
imports?.set(spec.exported?.value ?? spec.orig.value, { from, name: spec.orig.value });
|
|
646
762
|
if (spec?.type !== 'ImportSpecifier')
|
|
647
763
|
continue;
|
|
648
764
|
const local = spec.local?.value;
|
|
@@ -650,8 +766,8 @@ class ExpressionResolver {
|
|
|
650
766
|
if (local && imported && local !== imported)
|
|
651
767
|
this.sharedImportAliases.set(local, imported);
|
|
652
768
|
// `import { components as githubComponents } from './github-api'` → that module's `components`
|
|
653
|
-
if (local && imported
|
|
654
|
-
imports
|
|
769
|
+
if (local && imported)
|
|
770
|
+
imports?.set(local, { from, name: imported });
|
|
655
771
|
}
|
|
656
772
|
}
|
|
657
773
|
catch {
|
|
@@ -720,6 +836,7 @@ class ExpressionResolver {
|
|
|
720
836
|
const name = node?.id?.type === 'Identifier' ? node.id.value : undefined;
|
|
721
837
|
if (!name)
|
|
722
838
|
return;
|
|
839
|
+
this.declare(name);
|
|
723
840
|
if (this.recording)
|
|
724
841
|
this.replays.push(this.inCurrentFile(() => this.captureInterfaceDeclaration(node)));
|
|
725
842
|
const params = node.typeParams?.parameters;
|
|
@@ -1025,6 +1142,7 @@ class ExpressionResolver {
|
|
|
1025
1142
|
const name = node?.identifier?.value ?? node?.id?.value;
|
|
1026
1143
|
if (!name)
|
|
1027
1144
|
return;
|
|
1145
|
+
this.declare(name);
|
|
1028
1146
|
// SWC places the return type annotation in `.function.returnType` (FunctionDeclaration)
|
|
1029
1147
|
// or directly in `.returnType` (FunctionExpression / ArrowFunctionExpression).
|
|
1030
1148
|
this.captureFunctionReturn(name, node.function ?? node);
|
|
@@ -1223,6 +1341,7 @@ class ExpressionResolver {
|
|
|
1223
1341
|
const name = node.id.type === 'Identifier' ? node.id.value : undefined;
|
|
1224
1342
|
if (!name)
|
|
1225
1343
|
return;
|
|
1344
|
+
this.declare(name);
|
|
1226
1345
|
const map = {};
|
|
1227
1346
|
for (const m of node.members) {
|
|
1228
1347
|
if (!m || !m.id)
|
|
@@ -27,7 +27,8 @@ class ScopeManager {
|
|
|
27
27
|
// constant tables are ValueTables: `useTranslation(ns)` in `useT(ns)` is no `const ns` of another file
|
|
28
28
|
isParameter = () => false;
|
|
29
29
|
// Shared (cross-file) tables so that exported constants from one file can be
|
|
30
|
-
// resolved when imported in another. These are NOT cleared by reset().
|
|
30
|
+
// resolved when imported in another. These are NOT cleared by reset(). The visitor
|
|
31
|
+
// replaces them by tables that know which module a name is imported from.
|
|
31
32
|
sharedConstants = new expressionResolver.ValueTable(this);
|
|
32
33
|
sharedConstantObjects = new expressionResolver.ValueTable(this);
|
|
33
34
|
constructor(config) {
|
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.85.1') // 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)');
|
|
@@ -101,6 +101,9 @@ class ASTVisitors {
|
|
|
101
101
|
this.scopeManager.isParameter = (name) => this.expressionResolver.isParameter(name);
|
|
102
102
|
// use shared resolver when provided so captured enums/objects are visible across files
|
|
103
103
|
this.expressionResolver = expressionResolver ?? new ExpressionResolver(this.hooks);
|
|
104
|
+
// `useTranslation(NS)` reads the `NS` of the module it is imported from, like the resolver's tables (#327)
|
|
105
|
+
this.scopeManager.sharedConstants = this.expressionResolver.valueTable();
|
|
106
|
+
this.scopeManager.sharedConstantObjects = this.expressionResolver.valueTable();
|
|
104
107
|
this.callExpressionHandler = new CallExpressionHandler(config, pluginContext, logger, this.expressionResolver, () => this.getCurrentFile(), () => this.getCurrentCode(), (name) => this.scopeManager.resolveSimpleStringIdentifier(name));
|
|
105
108
|
this.jsxHandler = new JSXHandler(config, pluginContext, this.expressionResolver, () => this.getCurrentFile(), () => this.getCurrentCode());
|
|
106
109
|
}
|
|
@@ -174,9 +177,10 @@ class ASTVisitors {
|
|
|
174
177
|
break;
|
|
175
178
|
case 'ImportDeclaration':
|
|
176
179
|
case 'ExportNamedDeclaration':
|
|
180
|
+
case 'ExportAllDeclaration':
|
|
177
181
|
// `import { X as Y }` → ExpressionResolver.sharedImportAliases, resolved
|
|
178
182
|
// once the pre-scan has seen every file; `import * as Types` / `export * as Types`
|
|
179
|
-
// → namespace names.
|
|
183
|
+
// → namespace names; `export * from` / `export { X } from` → barrels.
|
|
180
184
|
this.expressionResolver.captureImportDeclaration(node);
|
|
181
185
|
break;
|
|
182
186
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { glob } from 'glob';
|
|
2
2
|
import { preScanFile, processFile } from './extractor.js';
|
|
3
3
|
import { ConsoleLogger } from '../../utils/logger.js';
|
|
4
|
-
import { createPluginContext, initializePlugins } from '../plugin-manager.js';
|
|
4
|
+
import { createPluginContext, initializePlugins, ConflictError } from '../plugin-manager.js';
|
|
5
5
|
import { ASTVisitors } from './ast-visitors.js';
|
|
6
6
|
import { ExpressionResolver } from '../parsers/expression-resolver.js';
|
|
7
7
|
import { getTsConfigAliases } from '../../config.js';
|
|
@@ -81,6 +81,7 @@ async function findKeys(config, logger = new ConsoleLogger(), fileErrors) {
|
|
|
81
81
|
const sharedExpressionResolver = new ExpressionResolver(hooks);
|
|
82
82
|
sharedExpressionResolver.maxMemberDepth = config.extract.maxTypeDepth ?? 5;
|
|
83
83
|
sharedExpressionResolver.pathAliases = await getTsConfigAliases();
|
|
84
|
+
sharedExpressionResolver.warnOnAmbiguous = !!config.extract.warnOnAmbiguousTypes;
|
|
84
85
|
const astVisitors = new ASTVisitors(otherConfig, pluginContext, logger, hooks, sharedExpressionResolver);
|
|
85
86
|
// 4. "Wire up" the visitor's scope method to the context.
|
|
86
87
|
// This avoids a circular dependency while giving plugins access to the scope.
|
|
@@ -104,6 +105,12 @@ async function findKeys(config, logger = new ConsoleLogger(), fileErrors) {
|
|
|
104
105
|
for (const file of sourceFiles) {
|
|
105
106
|
await processFile(file, plugins, astVisitors, pluginContext, otherConfig, logger, fileErrors);
|
|
106
107
|
}
|
|
108
|
+
// 7a. Names the extraction pass had to guess between same-named declarations of different files
|
|
109
|
+
const { ambiguities } = sharedExpressionResolver;
|
|
110
|
+
if (ambiguities.length > 0 && config.extract.warnOnAmbiguousTypes === 'error')
|
|
111
|
+
throw new ConflictError(ambiguities.join('\n'));
|
|
112
|
+
for (const msg of ambiguities)
|
|
113
|
+
logger.warn(msg);
|
|
107
114
|
// 7. Run onEnd hooks
|
|
108
115
|
for (const plugin of plugins) {
|
|
109
116
|
await plugin.onEnd?.(allKeys);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { resolve, dirname } from 'node:path';
|
|
1
|
+
import { resolve, dirname, relative } from 'node:path';
|
|
2
2
|
import { unwrapParens } from './ast-utils.js';
|
|
3
3
|
|
|
4
4
|
// Whether `next` holds everything `prev` does: every value of a list, every
|
|
@@ -85,8 +85,9 @@ class ValueTable extends Map {
|
|
|
85
85
|
return this.scope.isParameter(name) ? undefined : super.get(name);
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
|
-
// `/src/api/github-api.ts`, `.d.ts`, or an import of `./github-api.js` -> `/src/api/github-api
|
|
89
|
-
|
|
88
|
+
// `/src/api/github-api.ts`, `.d.ts`, or an import of `./github-api.js` -> `/src/api/github-api`;
|
|
89
|
+
// `C:\src\types` -> `C:/src/types`, so `moduleOf` finds its `/index` on Windows too
|
|
90
|
+
const moduleKey = (path) => path.replace(/\\/g, '/').replace(/(\.d)?\.[cm]?[jt]sx?$/, '');
|
|
90
91
|
/**
|
|
91
92
|
* A cross-file table keyed by declared name. Every entry is also kept under the module that
|
|
92
93
|
* declares it (`/src/api/github-api#components`), and a lookup made while a file is being read
|
|
@@ -97,6 +98,8 @@ const moduleKey = (path) => path.replace(/(\.d)?\.[cm]?[jt]sx?$/, '');
|
|
|
97
98
|
class ModuleTable extends Map {
|
|
98
99
|
scope;
|
|
99
100
|
holdsValues;
|
|
101
|
+
// declared name -> the modules declaring it
|
|
102
|
+
declarers = new Map();
|
|
100
103
|
constructor(scope, holdsValues = false) {
|
|
101
104
|
super();
|
|
102
105
|
this.scope = scope;
|
|
@@ -108,18 +111,32 @@ class ModuleTable extends Map {
|
|
|
108
111
|
return undefined;
|
|
109
112
|
for (const key of this.scope.keysOf(name)) {
|
|
110
113
|
const value = super.get(key);
|
|
111
|
-
if (value
|
|
112
|
-
|
|
114
|
+
if (value === undefined)
|
|
115
|
+
continue;
|
|
116
|
+
// The bare name holds whichever file declared it last (#327)
|
|
117
|
+
if (!key.includes('#'))
|
|
118
|
+
this.scope.guessed(key, this);
|
|
119
|
+
return value;
|
|
113
120
|
}
|
|
114
121
|
return undefined;
|
|
115
122
|
}
|
|
123
|
+
// [module, what it declares] for every module declaring `name`
|
|
124
|
+
declarations(name) {
|
|
125
|
+
return [...this.declarers.get(name) ?? []].flatMap(module => {
|
|
126
|
+
const value = super.get(`${module}#${name}`);
|
|
127
|
+
return value === undefined ? [] : [[module, value]];
|
|
128
|
+
});
|
|
129
|
+
}
|
|
116
130
|
has(name) {
|
|
117
131
|
return this.scope.keysOf(name).some(key => super.has(key));
|
|
118
132
|
}
|
|
119
133
|
set(name, value) {
|
|
120
134
|
const key = this.scope.declaringKey(name);
|
|
121
|
-
if (key)
|
|
135
|
+
if (key) {
|
|
122
136
|
super.set(key, value);
|
|
137
|
+
this.scope.declare(name);
|
|
138
|
+
this.declarers.set(name, (this.declarers.get(name) ?? new Set()).add(key.slice(0, -name.length - 1)));
|
|
139
|
+
}
|
|
123
140
|
return super.set(name, value);
|
|
124
141
|
}
|
|
125
142
|
delete(name) {
|
|
@@ -235,22 +252,38 @@ class ExpressionResolver {
|
|
|
235
252
|
// names from (see ModuleTable)
|
|
236
253
|
currentModule;
|
|
237
254
|
knownModules = new Set();
|
|
238
|
-
// module -> local name -> { from: the import's resolved path, name: the declared name }
|
|
255
|
+
// module -> local name -> { from: the import's resolved path, if it is one of this project, name: the declared name }
|
|
239
256
|
fileImports = new Map();
|
|
257
|
+
// module -> exported name -> the same for its re-exports: `export { ABC as Letters } from './abc'`
|
|
258
|
+
fileExports = new Map();
|
|
259
|
+
// module -> the paths it re-exports everything of: `export * from './abc'`
|
|
260
|
+
fileStarExports = new Map();
|
|
240
261
|
// module -> namespace import's local name -> the import's resolved path
|
|
241
262
|
fileNamespaces = new Map();
|
|
242
|
-
// module
|
|
243
|
-
|
|
263
|
+
// `module#name` of every name a module declares (variable, type, interface, enum, function), also
|
|
264
|
+
// when its value isn't captured: it shadows the same names declared in other files (#307, #327)
|
|
265
|
+
declaredKeys = new Set();
|
|
266
|
+
// module -> its file, for messages
|
|
267
|
+
moduleFiles = new Map();
|
|
268
|
+
// `exportKey` results: a declaration found stays found, one not found may be in a file the
|
|
269
|
+
// pre-scan has not read yet, so misses are only kept once it is done
|
|
270
|
+
exportKeyCache = new Map();
|
|
271
|
+
preScanned = false;
|
|
244
272
|
// The parameters of the functions being read, innermost last
|
|
245
273
|
parameters = [];
|
|
246
274
|
// tsconfig `paths`, `@api` -> `/abs/src/api`
|
|
247
275
|
pathAliases = {};
|
|
276
|
+
// `extract.warnOnAmbiguousTypes`: collect the names the extraction pass had to guess (see `guessed`)
|
|
277
|
+
warnOnAmbiguous = false;
|
|
278
|
+
ambiguities = [];
|
|
279
|
+
checkedAmbiguous = new Map();
|
|
248
280
|
constructor(hooks) {
|
|
249
281
|
this.hooks = hooks;
|
|
250
282
|
}
|
|
251
283
|
setCurrentFile(file) {
|
|
252
284
|
this.currentModule = moduleKey(resolve(file));
|
|
253
285
|
this.knownModules.add(this.currentModule);
|
|
286
|
+
this.moduleFiles.set(this.currentModule, file);
|
|
254
287
|
}
|
|
255
288
|
// `./api/github-api` / `@api/github-api` imported in the current file -> its path, or undefined
|
|
256
289
|
// for a package or anything else that isn't a file of this project
|
|
@@ -271,19 +304,92 @@ class ExpressionResolver {
|
|
|
271
304
|
}
|
|
272
305
|
// ModuleTable: the keys `name` read in the current file may be stored under, most specific first
|
|
273
306
|
keysOf(name) {
|
|
274
|
-
|
|
307
|
+
// `GH.components` through `import * as GH from './github-api'`, which may be a barrel
|
|
308
|
+
const at = name.lastIndexOf('#');
|
|
309
|
+
if (at >= 0) {
|
|
310
|
+
const key = this.exportKey(name.slice(0, at), name.slice(at + 1));
|
|
311
|
+
return [key ?? name.slice(at + 1)];
|
|
312
|
+
}
|
|
313
|
+
if (!this.currentModule)
|
|
275
314
|
return [name];
|
|
276
|
-
const keys = [];
|
|
277
315
|
const imported = this.fileImports.get(this.currentModule)?.get(name);
|
|
278
|
-
const
|
|
279
|
-
if (
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
//
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
316
|
+
const key = imported && this.exportKey(imported.from, imported.name);
|
|
317
|
+
if (key)
|
|
318
|
+
return [key];
|
|
319
|
+
// The bare name holds whichever file declared it last: a guess, only made for a name this file
|
|
320
|
+
// neither declares nor imports from a file that does (a global, a package, an unscanned file) (#307, #327)
|
|
321
|
+
const own = `${this.currentModule}#${name}`;
|
|
322
|
+
return this.declaredKeys.has(own) ? [own] : [own, name];
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
* The key of the declaration of `name` exported by the module at `path`: in that module, or in the
|
|
326
|
+
* module it re-exports it from, `export { ABC } from './abc'` / `export * from './abc'` (#327)
|
|
327
|
+
*/
|
|
328
|
+
exportKey(path, name) {
|
|
329
|
+
const id = `${path}#${name}`;
|
|
330
|
+
if (this.exportKeyCache.has(id))
|
|
331
|
+
return this.exportKeyCache.get(id);
|
|
332
|
+
const key = this.findExportKey(path, name, new Set());
|
|
333
|
+
if (key || this.preScanned)
|
|
334
|
+
this.exportKeyCache.set(id, key);
|
|
335
|
+
return key;
|
|
336
|
+
}
|
|
337
|
+
// ponytail: one search per imported name, cached; nested barrels of thousands of modules make it ~2x slower
|
|
338
|
+
// than direct imports, a per-module export map (built once the pre-scan is done) if that ever matters
|
|
339
|
+
findExportKey(path, name, seen) {
|
|
340
|
+
const module = path && this.moduleOf(path);
|
|
341
|
+
const key = `${module}#${name}`;
|
|
342
|
+
if (!module || seen.has(key))
|
|
343
|
+
return undefined;
|
|
344
|
+
seen.add(key);
|
|
345
|
+
if (this.declaredKeys.has(key))
|
|
346
|
+
return key;
|
|
347
|
+
// `export { ABC } from './abc'`, or `import { ABC } from './abc'; export { ABC }`
|
|
348
|
+
const via = this.fileExports.get(module)?.get(name) ?? this.fileImports.get(module)?.get(name);
|
|
349
|
+
const found = via && this.findExportKey(via.from, via.name, seen);
|
|
350
|
+
if (found)
|
|
351
|
+
return found;
|
|
352
|
+
for (const from of this.fileStarExports.get(module) ?? []) {
|
|
353
|
+
const starred = this.findExportKey(from, name, seen);
|
|
354
|
+
if (starred)
|
|
355
|
+
return starred;
|
|
356
|
+
}
|
|
357
|
+
return undefined;
|
|
358
|
+
}
|
|
359
|
+
// Record that the current file declares `name`, whether or not its value is captured
|
|
360
|
+
declare(name) {
|
|
361
|
+
if (this.currentModule)
|
|
362
|
+
this.declaredKeys.add(`${this.currentModule}#${name}`);
|
|
363
|
+
}
|
|
364
|
+
/**
|
|
365
|
+
* ModuleTable: `name`, read in the current file, resolved to whichever file declared it last. With
|
|
366
|
+
* `warnOnAmbiguous`, the extraction pass records it in `ambiguities` when several files declare it
|
|
367
|
+
* differently (#327).
|
|
368
|
+
*/
|
|
369
|
+
guessed(name, table) {
|
|
370
|
+
if (!this.warnOnAmbiguous || this.recording || this.replaying || !this.currentModule)
|
|
371
|
+
return;
|
|
372
|
+
const declared = this.fileImports.get(this.currentModule)?.get(name)?.name ?? name;
|
|
373
|
+
const checked = this.checkedAmbiguous.get(table) ?? new Set();
|
|
374
|
+
this.checkedAmbiguous.set(table, checked);
|
|
375
|
+
if (checked.has(`${this.currentModule}#${declared}`))
|
|
376
|
+
return;
|
|
377
|
+
checked.add(`${this.currentModule}#${declared}`);
|
|
378
|
+
const found = table.declarations(declared);
|
|
379
|
+
// AST nodes of identical declarations differ only by their position, unions only by their order
|
|
380
|
+
const variants = new Set(found.map(([, value]) => JSON.stringify(value, (k, v) => k === 'span' || k === 'ctxt' ? undefined : Array.isArray(v) && v.every(x => typeof x === 'string') ? [...v].sort() : v)));
|
|
381
|
+
if (variants.size < 2)
|
|
382
|
+
return;
|
|
383
|
+
const fileOf = (module) => relative(process.cwd(), this.moduleFiles.get(module) ?? module);
|
|
384
|
+
const file = fileOf(this.currentModule);
|
|
385
|
+
const msg = `Cannot tell which "${declared}" ${file} means: ${found.map(([module]) => fileOf(module)).join(', ')} declare it differently, ` +
|
|
386
|
+
`and ${file} neither declares it nor imports it from a file the extractor can follow. Keys built from it may come from the wrong one.`;
|
|
387
|
+
if (!this.ambiguities.includes(msg))
|
|
388
|
+
this.ambiguities.push(msg);
|
|
389
|
+
}
|
|
390
|
+
// A cross-file table of values that knows which module a name is imported from, for ScopeManager
|
|
391
|
+
valueTable() {
|
|
392
|
+
return new ModuleTable(this, true);
|
|
287
393
|
}
|
|
288
394
|
// ValueTable / ModuleTable: whether `name` is a parameter of a function being read
|
|
289
395
|
isParameter(name) {
|
|
@@ -369,6 +475,7 @@ class ExpressionResolver {
|
|
|
369
475
|
this.applyImportAliases();
|
|
370
476
|
this.replays = [];
|
|
371
477
|
this.resetFileSymbols();
|
|
478
|
+
this.preScanned = true;
|
|
372
479
|
}
|
|
373
480
|
/**
|
|
374
481
|
* Write an entry of a cross-file table. While replaying, an entry only grows:
|
|
@@ -458,11 +565,7 @@ class ExpressionResolver {
|
|
|
458
565
|
if (node.id.type !== 'Identifier')
|
|
459
566
|
return;
|
|
460
567
|
const name = node.id.value;
|
|
461
|
-
|
|
462
|
-
if (!this.fileVariables.has(this.currentModule))
|
|
463
|
-
this.fileVariables.set(this.currentModule, new Set());
|
|
464
|
-
this.fileVariables.get(this.currentModule).add(name);
|
|
465
|
-
}
|
|
568
|
+
this.declare(name);
|
|
466
569
|
// `const items: IProps[] = …` → remember the element's member map so
|
|
467
570
|
// `items.map(({ size }) => …)` can bind the callback parameter.
|
|
468
571
|
const idTypeAnnotation = this.extractTypeAnnotation(node.id);
|
|
@@ -583,6 +686,7 @@ class ExpressionResolver {
|
|
|
583
686
|
const name = node?.id?.type === 'Identifier' ? node.id.value : undefined;
|
|
584
687
|
if (!name)
|
|
585
688
|
return;
|
|
689
|
+
this.declare(name);
|
|
586
690
|
// SWC puts the actual type in `.typeAnnotation`
|
|
587
691
|
const tsType = node.typeAnnotation ?? node.typeAnn;
|
|
588
692
|
if (!tsType)
|
|
@@ -625,10 +729,19 @@ class ExpressionResolver {
|
|
|
625
729
|
*/
|
|
626
730
|
captureImportDeclaration(node) {
|
|
627
731
|
try {
|
|
628
|
-
const
|
|
629
|
-
const
|
|
732
|
+
const module = this.currentModule;
|
|
733
|
+
const from = typeof node?.source?.value === 'string' ? this.importPath(node.source.value) : undefined;
|
|
734
|
+
// `export * from './abc'`
|
|
735
|
+
if (node?.type === 'ExportAllDeclaration') {
|
|
736
|
+
if (module && from)
|
|
737
|
+
this.fileStarExports.set(module, [...this.fileStarExports.get(module) ?? [], from]);
|
|
738
|
+
return;
|
|
739
|
+
}
|
|
740
|
+
// `import { ABC } from …` / `export { ABC } from …`: local or exported name -> where it is declared
|
|
741
|
+
const table = node?.type === 'ImportDeclaration' ? this.fileImports : node?.source ? this.fileExports : undefined;
|
|
742
|
+
const imports = module && table ? (table.get(module) ?? new Map()) : undefined;
|
|
630
743
|
if (imports)
|
|
631
|
-
|
|
744
|
+
table.set(module, imports);
|
|
632
745
|
for (const spec of node?.specifiers ?? []) {
|
|
633
746
|
// `import * as Types from …` / `export * as Types from …`
|
|
634
747
|
if (spec?.type === 'ImportNamespaceSpecifier' && spec.local?.value) {
|
|
@@ -641,6 +754,9 @@ class ExpressionResolver {
|
|
|
641
754
|
}
|
|
642
755
|
if (spec?.type === 'ExportNamespaceSpecifier' && spec.name?.value)
|
|
643
756
|
this.sharedNamespaceNames.add(spec.name.value);
|
|
757
|
+
// `export { ABC as Letters } from './abc'`
|
|
758
|
+
if (spec?.type === 'ExportSpecifier' && spec.orig?.value)
|
|
759
|
+
imports?.set(spec.exported?.value ?? spec.orig.value, { from, name: spec.orig.value });
|
|
644
760
|
if (spec?.type !== 'ImportSpecifier')
|
|
645
761
|
continue;
|
|
646
762
|
const local = spec.local?.value;
|
|
@@ -648,8 +764,8 @@ class ExpressionResolver {
|
|
|
648
764
|
if (local && imported && local !== imported)
|
|
649
765
|
this.sharedImportAliases.set(local, imported);
|
|
650
766
|
// `import { components as githubComponents } from './github-api'` → that module's `components`
|
|
651
|
-
if (local && imported
|
|
652
|
-
imports
|
|
767
|
+
if (local && imported)
|
|
768
|
+
imports?.set(local, { from, name: imported });
|
|
653
769
|
}
|
|
654
770
|
}
|
|
655
771
|
catch {
|
|
@@ -718,6 +834,7 @@ class ExpressionResolver {
|
|
|
718
834
|
const name = node?.id?.type === 'Identifier' ? node.id.value : undefined;
|
|
719
835
|
if (!name)
|
|
720
836
|
return;
|
|
837
|
+
this.declare(name);
|
|
721
838
|
if (this.recording)
|
|
722
839
|
this.replays.push(this.inCurrentFile(() => this.captureInterfaceDeclaration(node)));
|
|
723
840
|
const params = node.typeParams?.parameters;
|
|
@@ -1023,6 +1140,7 @@ class ExpressionResolver {
|
|
|
1023
1140
|
const name = node?.identifier?.value ?? node?.id?.value;
|
|
1024
1141
|
if (!name)
|
|
1025
1142
|
return;
|
|
1143
|
+
this.declare(name);
|
|
1026
1144
|
// SWC places the return type annotation in `.function.returnType` (FunctionDeclaration)
|
|
1027
1145
|
// or directly in `.returnType` (FunctionExpression / ArrowFunctionExpression).
|
|
1028
1146
|
this.captureFunctionReturn(name, node.function ?? node);
|
|
@@ -1221,6 +1339,7 @@ class ExpressionResolver {
|
|
|
1221
1339
|
const name = node.id.type === 'Identifier' ? node.id.value : undefined;
|
|
1222
1340
|
if (!name)
|
|
1223
1341
|
return;
|
|
1342
|
+
this.declare(name);
|
|
1224
1343
|
const map = {};
|
|
1225
1344
|
for (const m of node.members) {
|
|
1226
1345
|
if (!m || !m.id)
|
|
@@ -25,7 +25,8 @@ class ScopeManager {
|
|
|
25
25
|
// constant tables are ValueTables: `useTranslation(ns)` in `useT(ns)` is no `const ns` of another file
|
|
26
26
|
isParameter = () => false;
|
|
27
27
|
// Shared (cross-file) tables so that exported constants from one file can be
|
|
28
|
-
// resolved when imported in another. These are NOT cleared by reset().
|
|
28
|
+
// resolved when imported in another. These are NOT cleared by reset(). The visitor
|
|
29
|
+
// replaces them by tables that know which module a name is imported from.
|
|
29
30
|
sharedConstants = new ValueTable(this);
|
|
30
31
|
sharedConstantObjects = new ValueTable(this);
|
|
31
32
|
constructor(config) {
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ast-visitors.d.ts","sourceRoot":"","sources":["../../../src/extractor/core/ast-visitors.ts"],"names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G;IACH,OAAO,CAAC,kBAAkB;IAiH1B;;;;OAIG;IACH,OAAO,CAAC,iBAAiB;IAIzB,mFAAmF;IACnF,OAAO,CAAC,oBAAoB;IAoB5B;;;;;;;;OAQG;IACH,OAAO,CAAC,gCAAgC;IAgDxC;;;;;;;OAOG;IACH,OAAO,CAAC,gBAAgB;IA+CxB;;;;;;;;;OASG;IACH,OAAO,CAAC,0BAA0B;IA8ClC;;;;OAIG;IACH,OAAO,CAAC,oBAAoB;IAqB5B;;;;;;;;OAQG;IACI,eAAe,CAAE,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS;IAI5D;;OAEG;IACI,cAAc,CAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;IAMxD;;;;;;OAMG;IACI,cAAc,IAAK,MAAM;IAIhC;;OAEG;IACI,cAAc,IAAK,MAAM;CAGjC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"key-finder.d.ts","sourceRoot":"","sources":["../../../src/extractor/core/key-finder.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,oBAAoB,EAAmB,MAAM,gBAAgB,CAAA;AAQjG;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAsB,QAAQ,CAC5B,MAAM,EAAE,oBAAoB,EAC5B,MAAM,GAAE,MAA4B,EACpC,UAAU,CAAC,EAAE,MAAM,EAAE,GACpB,OAAO,CAAC;IAAE,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IAAC,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAAC,YAAY,EAAE,YAAY,EAAE,CAAA;CAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"key-finder.d.ts","sourceRoot":"","sources":["../../../src/extractor/core/key-finder.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,oBAAoB,EAAmB,MAAM,gBAAgB,CAAA;AAQjG;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAsB,QAAQ,CAC5B,MAAM,EAAE,oBAAoB,EAC5B,MAAM,GAAE,MAA4B,EACpC,UAAU,CAAC,EAAE,MAAM,EAAE,GACpB,OAAO,CAAC;IAAE,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IAAC,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAAC,YAAY,EAAE,YAAY,EAAE,CAAA;CAAE,CAAC,CAoGxG"}
|
|
@@ -39,15 +39,39 @@ export declare class ExpressionResolver {
|
|
|
39
39
|
private currentModule;
|
|
40
40
|
private knownModules;
|
|
41
41
|
private fileImports;
|
|
42
|
+
private fileExports;
|
|
43
|
+
private fileStarExports;
|
|
42
44
|
private fileNamespaces;
|
|
43
|
-
private
|
|
45
|
+
private declaredKeys;
|
|
46
|
+
private moduleFiles;
|
|
47
|
+
private exportKeyCache;
|
|
48
|
+
private preScanned;
|
|
44
49
|
private parameters;
|
|
45
50
|
pathAliases: Record<string, string>;
|
|
51
|
+
warnOnAmbiguous: boolean;
|
|
52
|
+
ambiguities: string[];
|
|
53
|
+
private checkedAmbiguous;
|
|
46
54
|
constructor(hooks: ASTVisitorHooks);
|
|
47
55
|
setCurrentFile(file: string): void;
|
|
48
56
|
private importPath;
|
|
49
57
|
private moduleOf;
|
|
50
58
|
keysOf(name: string): string[];
|
|
59
|
+
/**
|
|
60
|
+
* The key of the declaration of `name` exported by the module at `path`: in that module, or in the
|
|
61
|
+
* module it re-exports it from, `export { ABC } from './abc'` / `export * from './abc'` (#327)
|
|
62
|
+
*/
|
|
63
|
+
private exportKey;
|
|
64
|
+
private findExportKey;
|
|
65
|
+
declare(name: string): void;
|
|
66
|
+
/**
|
|
67
|
+
* ModuleTable: `name`, read in the current file, resolved to whichever file declared it last. With
|
|
68
|
+
* `warnOnAmbiguous`, the extraction pass records it in `ambiguities` when several files declare it
|
|
69
|
+
* differently (#327).
|
|
70
|
+
*/
|
|
71
|
+
guessed(name: string, table: {
|
|
72
|
+
declarations(name: string): Array<[string, unknown]>;
|
|
73
|
+
}): void;
|
|
74
|
+
valueTable<V>(): Map<string, V>;
|
|
51
75
|
isParameter(name: string): boolean;
|
|
52
76
|
/**
|
|
53
77
|
* Hide the values declared under the names of `fn`'s parameters while its body is read.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expression-resolver.d.ts","sourceRoot":"","sources":["../../../src/extractor/parsers/expression-resolver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAkD,MAAM,WAAW,CAAA;AAC7G,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AA2BrD,eAAO,MAAM,aAAa,GAAI,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,SAAS,EAAE,MAAM,MAAM,KAAG,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,SAetH,CAAA;AAsCD,qBAAa,UAAU,CAAC,CAAC,CAAE,SAAQ,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC;IAClC,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAAL,KAAK,EAAE;QAAE,WAAW,CAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE;IAI5E,GAAG,CAAE,IAAI,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS;CAGlC;
|
|
1
|
+
{"version":3,"file":"expression-resolver.d.ts","sourceRoot":"","sources":["../../../src/extractor/parsers/expression-resolver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAkD,MAAM,WAAW,CAAA;AAC7G,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AA2BrD,eAAO,MAAM,aAAa,GAAI,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,EA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AC,GAAG,SAAS;IAMtE,wFAAwF;IACjF,aAAa,CAAE,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS;IAOzD;;;;;OAKG;IACH,sBAAsB,CAAE,IAAI,EAAE,GAAG,GAAG,IAAI;IAyBxC;;;;;;;OAOG;IACH,kCAAkC,CAAE,UAAU,EAAE,UAAU,GAAG,MAAM,EAAE;IAKrE;;;;;;;OAOG;IACH,8BAA8B,CAAE,UAAU,EAAE,UAAU,GAAG,MAAM,EAAE;IAKjE;;;;;;;;;;;;;;;;;;OAkBG;IACH,OAAO,CAAC,yCAAyC;IA+OjD,OAAO,CAAC,mCAAmC;IAwI3C;;;;;;OAMG;IACH,OAAO,CAAC,6CAA6C;IAyBrD;;;;;;OAMG;IACH,OAAO,CAAC,kDAAkD;CAwB3D"}
|
|
@@ -11,8 +11,8 @@ export declare class ScopeManager {
|
|
|
11
11
|
private paramDefaults;
|
|
12
12
|
identifierFallback?: (name: string) => string | undefined;
|
|
13
13
|
isParameter: (name: string) => boolean;
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
sharedConstants: Map<string, string>;
|
|
15
|
+
sharedConstantObjects: Map<string, Record<string, string>>;
|
|
16
16
|
constructor(config: Omit<I18nextToolkitConfig, 'plugins'>);
|
|
17
17
|
/**
|
|
18
18
|
* Recursively unwraps TypeScript type assertion wrappers to reach the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scope-manager.d.ts","sourceRoot":"","sources":["../../../src/extractor/parsers/scope-manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EAEV,kBAAkB,EAMnB,MAAM,WAAW,CAAA;AAClB,OAAO,KAAK,EAAE,SAAS,EAA4B,oBAAoB,EAAE,MAAM,gBAAgB,CAAA;AAI/F,qBAAa,YAAY;IACvB,OAAO,CAAC,UAAU,CAAoC;IACtD,OAAO,CAAC,MAAM,CAAuC;IACrD,OAAO,CAAC,KAAK,CAAqE;IAMlF,OAAO,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;;;OASG;IACH,OAAO,CAAC,qCAAqC;IAqB7C;;;;;;OAMG;IACH,OAAO,CAAC,MAAM,CAAC,oBAAoB;IAgBnC;;;OAGG;IACH,OAAO,CAAC,6BAA6B;IAyBrC;;;;;;;;;;;OAWG;IACH,kBAAkB,CAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI;IAwBlF;;;;;OAKG;IACH,OAAO,CAAC,4BAA4B;CA+DrC"}
|
package/types/types.d.ts
CHANGED
|
@@ -227,6 +227,18 @@ export interface I18nextToolkitConfig {
|
|
|
227
227
|
* - `false` or omitted: silent (default)
|
|
228
228
|
*/
|
|
229
229
|
warnOnConflicts?: boolean | 'warn' | 'error';
|
|
230
|
+
/**
|
|
231
|
+
* Warn (or error) when the extractor has to guess which declaration a name means: a type, interface,
|
|
232
|
+
* enum, constant or function is declared differently in more than one scanned file, and the file reading
|
|
233
|
+
* it neither declares it nor imports it from a file the extractor can follow (it is a global, or comes
|
|
234
|
+
* from a package, an unscanned file, a path outside tsconfig `paths`, or `export { default as X }`).
|
|
235
|
+
* Keys built from it may then come from the wrong declaration. It also reports guesses no key ends up
|
|
236
|
+
* built from, e.g. a parameter typed by a package's `Props` while two scanned files declare their own.
|
|
237
|
+
* - `true` or `'warn'`: log a warning for each such name
|
|
238
|
+
* - `'error'`: abort extraction, listing them
|
|
239
|
+
* - `false` or omitted: silent (default)
|
|
240
|
+
*/
|
|
241
|
+
warnOnAmbiguousTypes?: boolean | 'warn' | 'error';
|
|
230
242
|
};
|
|
231
243
|
/** Configuration options for linter */
|
|
232
244
|
lint?: {
|
package/types/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA;AAEnE;;;;;;;;;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