i18next-cli 1.74.5 → 1.74.7
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/ast-visitors.js +66 -26
- package/dist/cjs/extractor/parsers/call-expression-handler.js +53 -52
- package/dist/cjs/extractor/parsers/expression-resolver.js +153 -44
- package/dist/cjs/extractor/parsers/jsx-handler.js +18 -10
- package/dist/esm/cli.js +1 -1
- package/dist/esm/extractor/core/ast-visitors.js +67 -27
- package/dist/esm/extractor/parsers/call-expression-handler.js +53 -53
- package/dist/esm/extractor/parsers/expression-resolver.js +153 -45
- package/dist/esm/extractor/parsers/jsx-handler.js +19 -11
- package/package.json +2 -2
- package/types/extractor/core/ast-visitors.d.ts +1 -0
- package/types/extractor/core/ast-visitors.d.ts.map +1 -1
- package/types/extractor/parsers/call-expression-handler.d.ts +25 -25
- package/types/extractor/parsers/call-expression-handler.d.ts.map +1 -1
- package/types/extractor/parsers/expression-resolver.d.ts +15 -1
- package/types/extractor/parsers/expression-resolver.d.ts.map +1 -1
- package/types/extractor/parsers/jsx-handler.d.ts.map +1 -1
|
@@ -12,6 +12,41 @@ const covers = (next, prev) => {
|
|
|
12
12
|
}
|
|
13
13
|
return next === prev;
|
|
14
14
|
};
|
|
15
|
+
// `(x)`, `x as const`, `x as T`, `x satisfies T` -> `x`
|
|
16
|
+
const unwrapExpr = (expr) => {
|
|
17
|
+
while (['ParenthesisExpression', 'TsConstAssertion', 'TsAsExpression', 'TsSatisfiesExpression'].includes(expr?.type))
|
|
18
|
+
expr = expr.expression;
|
|
19
|
+
return expr;
|
|
20
|
+
};
|
|
21
|
+
// Nested object members are flattened to dotted paths (`{ 'Foo.Bar.status': [...] }`).
|
|
22
|
+
// ponytail: capped so recursive types (`interface Node { child: Node }`) stay small;
|
|
23
|
+
// raise it if real code reads deeper chains in a key.
|
|
24
|
+
const MAX_MEMBER_DEPTH = 5;
|
|
25
|
+
// The members nested under `name`: { 'Bar.status': v } -> { status: v }. Member maps
|
|
26
|
+
// are never changed once built, so each is split by its first segment only once:
|
|
27
|
+
// resolving every `components['schemas'][X]` of an OpenAPI schema stays linear.
|
|
28
|
+
const nestedIndex = new WeakMap();
|
|
29
|
+
const nestedMembers = (members, name) => {
|
|
30
|
+
if (!members)
|
|
31
|
+
return undefined;
|
|
32
|
+
let index = nestedIndex.get(members);
|
|
33
|
+
if (!index) {
|
|
34
|
+
index = new Map();
|
|
35
|
+
for (const [path, vals] of Object.entries(members)) {
|
|
36
|
+
const dot = path.indexOf('.');
|
|
37
|
+
if (dot < 0)
|
|
38
|
+
continue;
|
|
39
|
+
const head = path.slice(0, dot);
|
|
40
|
+
if (!index.has(head))
|
|
41
|
+
index.set(head, {});
|
|
42
|
+
index.get(head)[path.slice(dot + 1)] = vals;
|
|
43
|
+
}
|
|
44
|
+
nestedIndex.set(members, index);
|
|
45
|
+
}
|
|
46
|
+
return index.get(name);
|
|
47
|
+
};
|
|
48
|
+
// `T['a']` -> 'a'
|
|
49
|
+
const indexedKey = (type) => type?.indexType?.type === 'TsLiteralType' && type.indexType.literal?.type === 'StringLiteral' ? type.indexType.literal.value : undefined;
|
|
15
50
|
// Whether replacing `prev` by `next` only adds to it.
|
|
16
51
|
const grows = (next, prev) => prev === undefined || (covers(next, prev) && !covers(prev, next));
|
|
17
52
|
// The parts of return expressions that still resolve without the file's local
|
|
@@ -94,6 +129,7 @@ class ExpressionResolver {
|
|
|
94
129
|
replays = [];
|
|
95
130
|
replaying = false;
|
|
96
131
|
grew = false;
|
|
132
|
+
memberDepth = 0;
|
|
97
133
|
constructor(hooks) {
|
|
98
134
|
this.hooks = hooks;
|
|
99
135
|
}
|
|
@@ -250,12 +286,7 @@ class ExpressionResolver {
|
|
|
250
286
|
// Unwrap TS type assertion wrappers before inspecting the shape of the initializer.
|
|
251
287
|
// `{ ... } as const` → TsConstAssertion; `x as Type` → TsAsExpression; etc.
|
|
252
288
|
// We need the raw expression to detect ObjectExpression and ArrowFunctionExpression.
|
|
253
|
-
|
|
254
|
-
while (unwrappedInit?.type === 'TsConstAssertion' ||
|
|
255
|
-
unwrappedInit?.type === 'TsAsExpression' ||
|
|
256
|
-
unwrappedInit?.type === 'TsSatisfiesExpression') {
|
|
257
|
-
unwrappedInit = unwrappedInit.expression;
|
|
258
|
-
}
|
|
289
|
+
const unwrappedInit = unwrapExpr(init);
|
|
259
290
|
// ObjectExpression -> map of string props
|
|
260
291
|
if (unwrappedInit.type === 'ObjectExpression' && Array.isArray(unwrappedInit.properties)) {
|
|
261
292
|
const map = {};
|
|
@@ -282,15 +313,8 @@ class ExpressionResolver {
|
|
|
282
313
|
// ArrayExpression -> list of string values
|
|
283
314
|
// Handles `const OPTS = ['a', 'b', 'c'] as const`
|
|
284
315
|
if (unwrappedInit.type === 'ArrayExpression' && Array.isArray(unwrappedInit.elements)) {
|
|
285
|
-
const vals =
|
|
286
|
-
|
|
287
|
-
if (!elem || !elem.expression)
|
|
288
|
-
continue;
|
|
289
|
-
const resolved = this.resolvePossibleStringValuesFromExpression(elem.expression);
|
|
290
|
-
if (resolved.length === 1)
|
|
291
|
-
vals.push(resolved[0]);
|
|
292
|
-
}
|
|
293
|
-
if (vals.length > 0) {
|
|
316
|
+
const vals = this.arrayLiteralValues(unwrappedInit);
|
|
317
|
+
if (vals) {
|
|
294
318
|
this.variableTable.set(name, vals);
|
|
295
319
|
// Also share so importing files can see this array
|
|
296
320
|
this.sharedVariableTable.set(name, vals);
|
|
@@ -299,30 +323,8 @@ class ExpressionResolver {
|
|
|
299
323
|
// Array of object literals — `const UNITS = [{ unit: 'day' }, …] as const`.
|
|
300
324
|
// Collect each property's possible values so `UNITS.map(({ unit }) => …)`
|
|
301
325
|
// and `for (const { unit } of UNITS)` can bind the destructured names.
|
|
302
|
-
const members =
|
|
303
|
-
|
|
304
|
-
let objExpr = elem?.expression;
|
|
305
|
-
while (objExpr?.type === 'TsConstAssertion' ||
|
|
306
|
-
objExpr?.type === 'TsAsExpression' ||
|
|
307
|
-
objExpr?.type === 'TsSatisfiesExpression')
|
|
308
|
-
objExpr = objExpr.expression;
|
|
309
|
-
if (objExpr?.type !== 'ObjectExpression')
|
|
310
|
-
continue;
|
|
311
|
-
for (const p of (objExpr.properties ?? [])) {
|
|
312
|
-
if (p?.type !== 'KeyValueProperty')
|
|
313
|
-
continue;
|
|
314
|
-
const keyName = p.key?.type === 'Identifier' || p.key?.type === 'StringLiteral' ? p.key.value : undefined;
|
|
315
|
-
if (!keyName)
|
|
316
|
-
continue;
|
|
317
|
-
const resolved = this.resolvePossibleStringValuesFromExpression(p.value);
|
|
318
|
-
if (resolved.length !== 1)
|
|
319
|
-
continue;
|
|
320
|
-
const list = members[keyName] ??= [];
|
|
321
|
-
if (!list.includes(resolved[0]))
|
|
322
|
-
list.push(resolved[0]);
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
if (Object.keys(members).length > 0) {
|
|
326
|
+
const members = this.arrayLiteralMembers(unwrappedInit);
|
|
327
|
+
if (members) {
|
|
326
328
|
this.arrayElementMembers.set(name, members);
|
|
327
329
|
return;
|
|
328
330
|
}
|
|
@@ -511,10 +513,18 @@ class ExpressionResolver {
|
|
|
511
513
|
*/
|
|
512
514
|
objectMembersOf(expr) {
|
|
513
515
|
expr = unwrapParens(expr);
|
|
516
|
+
if (expr?.type === 'OptionalChainingExpression')
|
|
517
|
+
return this.objectMembersOf(expr.base);
|
|
514
518
|
if (expr?.type === 'Identifier')
|
|
515
519
|
return this.temporaryObjectVariables.get(expr.value) ?? this.objectVariables.get(expr.value);
|
|
516
520
|
if (expr?.type === 'CallExpression' && expr.callee?.type === 'Identifier')
|
|
517
521
|
return this.sharedFunctionReturnMembers.get(expr.callee.value);
|
|
522
|
+
// `deepObject.Foo.Bar` → the members nested under `Foo.Bar`
|
|
523
|
+
if (expr?.type === 'MemberExpression') {
|
|
524
|
+
const prop = expr.property;
|
|
525
|
+
const name = prop?.type === 'Identifier' ? prop.value : prop?.type === 'Computed' && prop.expression?.type === 'StringLiteral' ? prop.expression.value : undefined;
|
|
526
|
+
return name === undefined ? undefined : nestedMembers(this.objectMembersOf(expr.object), name);
|
|
527
|
+
}
|
|
518
528
|
return undefined;
|
|
519
529
|
}
|
|
520
530
|
/**
|
|
@@ -523,7 +533,7 @@ class ExpressionResolver {
|
|
|
523
533
|
* resolves to a finite string set are kept; returns undefined when none do.
|
|
524
534
|
*/
|
|
525
535
|
collectObjectTypeMembers(members) {
|
|
526
|
-
if (!Array.isArray(members))
|
|
536
|
+
if (!Array.isArray(members) || this.memberDepth >= MAX_MEMBER_DEPTH)
|
|
527
537
|
return undefined;
|
|
528
538
|
const map = {};
|
|
529
539
|
for (const m of members) {
|
|
@@ -536,8 +546,24 @@ class ExpressionResolver {
|
|
|
536
546
|
if (!tsType)
|
|
537
547
|
continue;
|
|
538
548
|
const vals = this.resolvePossibleStringValuesFromType(tsType);
|
|
539
|
-
if (vals.length > 0)
|
|
549
|
+
if (vals.length > 0) {
|
|
540
550
|
map[memberName] = vals;
|
|
551
|
+
continue;
|
|
552
|
+
}
|
|
553
|
+
// `Bar: { status: '201' | '400' }` → `Bar.status`, and the element of
|
|
554
|
+
// `items: Item[]` the same way so `props.items.map(({ size }) => …)` binds
|
|
555
|
+
this.memberDepth++;
|
|
556
|
+
let nested;
|
|
557
|
+
try {
|
|
558
|
+
nested = this.resolveTypeMembers(tsType) ?? this.resolveArrayElementMembers(tsType);
|
|
559
|
+
}
|
|
560
|
+
finally {
|
|
561
|
+
this.memberDepth--;
|
|
562
|
+
}
|
|
563
|
+
for (const [path, v] of Object.entries(nested ?? {})) {
|
|
564
|
+
if (path.split('.').length < MAX_MEMBER_DEPTH)
|
|
565
|
+
map[`${memberName}.${path}`] = v;
|
|
566
|
+
}
|
|
541
567
|
}
|
|
542
568
|
return Object.keys(map).length > 0 ? map : undefined;
|
|
543
569
|
}
|
|
@@ -554,6 +580,11 @@ class ExpressionResolver {
|
|
|
554
580
|
return undefined;
|
|
555
581
|
if (tsType.type === 'TsParenthesizedType')
|
|
556
582
|
return this.resolveTypeMembers(tsType.typeAnnotation);
|
|
583
|
+
// `components['schemas']['Pet']` → the members nested under `schemas.Pet`
|
|
584
|
+
if (tsType.type === 'TsIndexedAccessType') {
|
|
585
|
+
const key = indexedKey(tsType);
|
|
586
|
+
return key === undefined ? undefined : nestedMembers(this.resolveTypeMembers(tsType.objectType), key);
|
|
587
|
+
}
|
|
557
588
|
if (tsType.type === 'TsTypeLiteral') {
|
|
558
589
|
return this.collectObjectTypeMembers(tsType.members);
|
|
559
590
|
}
|
|
@@ -594,6 +625,9 @@ class ExpressionResolver {
|
|
|
594
625
|
if (tsType.type === 'TsArrayType') {
|
|
595
626
|
return this.resolveTypeMembers(tsType.elemType);
|
|
596
627
|
}
|
|
628
|
+
if (tsType.type === 'TsTypeOperator' && tsType.op === 'readonly') {
|
|
629
|
+
return this.resolveArrayElementMembers(tsType.typeAnnotation);
|
|
630
|
+
}
|
|
597
631
|
if (tsType.type === 'TsTypeReference' && tsType.typeName?.type === 'Identifier') {
|
|
598
632
|
const name = tsType.typeName.value;
|
|
599
633
|
if (name !== 'Array' && name !== 'ReadonlyArray')
|
|
@@ -605,6 +639,74 @@ class ExpressionResolver {
|
|
|
605
639
|
catch { }
|
|
606
640
|
return undefined;
|
|
607
641
|
}
|
|
642
|
+
// `['day', 'hour']` -> ['day', 'hour']
|
|
643
|
+
arrayLiteralValues(arr) {
|
|
644
|
+
const vals = [];
|
|
645
|
+
for (const elem of arr.elements ?? []) {
|
|
646
|
+
if (!elem?.expression)
|
|
647
|
+
continue;
|
|
648
|
+
const resolved = this.resolvePossibleStringValuesFromExpression(elem.expression);
|
|
649
|
+
if (resolved.length === 1)
|
|
650
|
+
vals.push(resolved[0]);
|
|
651
|
+
}
|
|
652
|
+
return vals.length > 0 ? vals : undefined;
|
|
653
|
+
}
|
|
654
|
+
// `[{ unit: 'day' }, { unit: 'hour' }]` -> { unit: ['day', 'hour'] }
|
|
655
|
+
arrayLiteralMembers(arr) {
|
|
656
|
+
const members = {};
|
|
657
|
+
for (const elem of arr.elements ?? []) {
|
|
658
|
+
const objExpr = unwrapExpr(elem?.expression);
|
|
659
|
+
if (objExpr?.type !== 'ObjectExpression')
|
|
660
|
+
continue;
|
|
661
|
+
for (const p of (objExpr.properties ?? [])) {
|
|
662
|
+
if (p?.type !== 'KeyValueProperty')
|
|
663
|
+
continue;
|
|
664
|
+
const keyName = p.key?.type === 'Identifier' || p.key?.type === 'StringLiteral' ? p.key.value : undefined;
|
|
665
|
+
if (!keyName)
|
|
666
|
+
continue;
|
|
667
|
+
const resolved = this.resolvePossibleStringValuesFromExpression(p.value);
|
|
668
|
+
if (resolved.length !== 1)
|
|
669
|
+
continue;
|
|
670
|
+
const list = members[keyName] ??= [];
|
|
671
|
+
if (!list.includes(resolved[0]))
|
|
672
|
+
list.push(resolved[0]);
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
return Object.keys(members).length > 0 ? members : undefined;
|
|
676
|
+
}
|
|
677
|
+
/**
|
|
678
|
+
* The values an iterated array holds: a known constant (`QUARTERS.map(…)`), an
|
|
679
|
+
* inline literal (`([1, 2, 3, 4] as const).map(…)`) or a typed member (`props.colors`).
|
|
680
|
+
*/
|
|
681
|
+
arrayValuesOf(expr) {
|
|
682
|
+
expr = unwrapExpr(expr);
|
|
683
|
+
if (expr?.type === 'Identifier')
|
|
684
|
+
return this.getVariableValues(expr.value);
|
|
685
|
+
if (expr?.type === 'ArrayExpression')
|
|
686
|
+
return this.arrayLiteralValues(expr);
|
|
687
|
+
// `props.colors` where `colors: Color[]`
|
|
688
|
+
if (expr?.type === 'MemberExpression') {
|
|
689
|
+
const vals = this.resolvePossibleStringValuesFromExpression(expr);
|
|
690
|
+
return vals.length > 0 ? vals : undefined;
|
|
691
|
+
}
|
|
692
|
+
return undefined;
|
|
693
|
+
}
|
|
694
|
+
/**
|
|
695
|
+
* The element member map of an iterated array of objects: a typed or constant
|
|
696
|
+
* identifier (`items: IProps[]`), an inline literal (`[{ unit: 'day' }]`) or a
|
|
697
|
+
* typed member (`props.items`).
|
|
698
|
+
*/
|
|
699
|
+
arrayMembersOf(expr) {
|
|
700
|
+
expr = unwrapExpr(expr);
|
|
701
|
+
if (expr?.type === 'Identifier')
|
|
702
|
+
return this.arrayElementMembers.get(expr.value);
|
|
703
|
+
if (expr?.type === 'ArrayExpression')
|
|
704
|
+
return this.arrayLiteralMembers(expr);
|
|
705
|
+
// `props.items` where `items: Item[]`
|
|
706
|
+
if (expr?.type === 'MemberExpression')
|
|
707
|
+
return this.objectMembersOf(expr);
|
|
708
|
+
return undefined;
|
|
709
|
+
}
|
|
608
710
|
/**
|
|
609
711
|
* Bind an identifier to the member map of its array element type
|
|
610
712
|
* (`items: IProps[]`).
|
|
@@ -612,9 +714,6 @@ class ExpressionResolver {
|
|
|
612
714
|
setArrayElementMembers(name, members) {
|
|
613
715
|
this.arrayElementMembers.set(name, members);
|
|
614
716
|
}
|
|
615
|
-
getArrayElementMembers(name) {
|
|
616
|
-
return this.arrayElementMembers.get(name);
|
|
617
|
-
}
|
|
618
717
|
deleteArrayElementMembers(name) {
|
|
619
718
|
this.arrayElementMembers.delete(name);
|
|
620
719
|
}
|
|
@@ -885,6 +984,10 @@ class ExpressionResolver {
|
|
|
885
984
|
resolvePossibleStringValuesFromExpression(expression, returnEmptyStrings = false) {
|
|
886
985
|
// `t(('key'))` / `t(cond ? 'a' : ('b'))`: parens are just a wrapper node (#295).
|
|
887
986
|
expression = unwrapParens(expression);
|
|
987
|
+
// `pet.category?.kind` → `pet.category.kind`
|
|
988
|
+
if (expression.type === 'OptionalChainingExpression') {
|
|
989
|
+
return this.resolvePossibleStringValuesFromExpression(expression.base, returnEmptyStrings);
|
|
990
|
+
}
|
|
888
991
|
// Support selector-style arrow functions used by the selector API:
|
|
889
992
|
// e.g. ($) => $.path.to.key -> ['path.to.key']
|
|
890
993
|
// e.g. ($) => $.table.columns[field] -> ['table.columns.name', 'table.columns.age']
|
|
@@ -1204,6 +1307,11 @@ class ExpressionResolver {
|
|
|
1204
1307
|
}
|
|
1205
1308
|
}
|
|
1206
1309
|
}
|
|
1310
|
+
// `DeepObject['Bar']['status']` → that member's values
|
|
1311
|
+
const key = indexedKey(type);
|
|
1312
|
+
const vals = key === undefined ? undefined : this.resolveTypeMembers(type.objectType)?.[key];
|
|
1313
|
+
if (vals)
|
|
1314
|
+
return vals;
|
|
1207
1315
|
}
|
|
1208
1316
|
catch { }
|
|
1209
1317
|
}
|
|
@@ -1292,4 +1400,4 @@ class ExpressionResolver {
|
|
|
1292
1400
|
}
|
|
1293
1401
|
}
|
|
1294
1402
|
|
|
1295
|
-
export { ExpressionResolver };
|
|
1403
|
+
export { ExpressionResolver, nestedMembers };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { safePluralRules } from '../../utils/plural-rules.js';
|
|
2
2
|
import { extractFromTransComponent } from './jsx-parser.js';
|
|
3
|
-
import { lineColumnFromOffset, getObjectPropValue, isSimpleTemplateLiteral } from './ast-utils.js';
|
|
3
|
+
import { lineColumnFromOffset, unwrapParens, getObjectPropValue, isSimpleTemplateLiteral } from './ast-utils.js';
|
|
4
|
+
import { applySelectorNsRewrite } from './call-expression-handler.js';
|
|
4
5
|
|
|
5
6
|
// Checks if a string looks like natural language (contains spaces, punctuation, etc.)
|
|
6
7
|
const naturalLanguageChars = /[ ,?!;]/;
|
|
@@ -167,7 +168,22 @@ class JSXHandler {
|
|
|
167
168
|
// If ns is not explicitly set on the component, try to find it from the key
|
|
168
169
|
// or the `t` prop
|
|
169
170
|
if (!extractedAttributes.ns) {
|
|
171
|
+
const tProp = node.opening.attributes?.find(attr => attr.type === 'JSXAttribute' &&
|
|
172
|
+
attr.name.type === 'Identifier' &&
|
|
173
|
+
attr.name.value === 't');
|
|
174
|
+
// Check if the prop value is an identifier (e.g., t={t})
|
|
175
|
+
const scopeInfo = tProp?.type === 'JSXAttribute' &&
|
|
176
|
+
tProp.value?.type === 'JSXExpressionContainer' &&
|
|
177
|
+
tProp.value.expression.type === 'Identifier'
|
|
178
|
+
? getScopeInfo(tProp.value.expression.value)
|
|
179
|
+
: undefined;
|
|
180
|
+
// Trans leaves a selector key to the `t` prop, which routes it into the
|
|
181
|
+
// hook's other namespaces like t() does (react-i18next#1933)
|
|
182
|
+
const isSelector = !!extractedAttributes.keyExpression &&
|
|
183
|
+
unwrapParens(extractedAttributes.keyExpression).type === 'ArrowFunctionExpression';
|
|
170
184
|
extractedKeys = keysToProcess.map(key => {
|
|
185
|
+
if (isSelector)
|
|
186
|
+
key = applySelectorNsRewrite(key, scopeInfo, this.config);
|
|
171
187
|
const nsSeparator = this.config.extract.nsSeparator ?? ':';
|
|
172
188
|
let ns;
|
|
173
189
|
// If the key contains a namespace separator, it takes precedence
|
|
@@ -189,16 +205,8 @@ class JSXHandler {
|
|
|
189
205
|
locations
|
|
190
206
|
};
|
|
191
207
|
});
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
attr.name.value === 't');
|
|
195
|
-
// Check if the prop value is an identifier (e.g., t={t})
|
|
196
|
-
if (tProp?.type === 'JSXAttribute' &&
|
|
197
|
-
tProp.value?.type === 'JSXExpressionContainer' &&
|
|
198
|
-
tProp.value.expression.type === 'Identifier') {
|
|
199
|
-
const tIdentifier = tProp.value.expression.value;
|
|
200
|
-
const scopeInfo = getScopeInfo(tIdentifier);
|
|
201
|
-
if (scopeInfo?.defaultNs) {
|
|
208
|
+
if (scopeInfo) {
|
|
209
|
+
if (scopeInfo.defaultNs) {
|
|
202
210
|
// One copy per namespace when the hook's ns was a conditional (#299)
|
|
203
211
|
const scopeNamespaces = [scopeInfo.defaultNs, ...(scopeInfo.altNs ?? [])];
|
|
204
212
|
extractedKeys = extractedKeys.flatMap(key => key.ns ? [key] : scopeNamespaces.map(ns => ({ ...key, ns })));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "i18next-cli",
|
|
3
|
-
"version": "1.74.
|
|
3
|
+
"version": "1.74.7",
|
|
4
4
|
"description": "A unified, high-performance i18next CLI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"magic-string": "^1.4.2",
|
|
87
87
|
"minimatch": "^10.2.6",
|
|
88
88
|
"ora": "^9.4.1",
|
|
89
|
-
"react-i18next": "^17.0.
|
|
89
|
+
"react-i18next": "^17.0.16",
|
|
90
90
|
"yaml": "^2.9.1"
|
|
91
91
|
}
|
|
92
92
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ast-visitors.d.ts","sourceRoot":"","sources":["../../../src/extractor/core/ast-visitors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAQ,MAAM,WAAW,CAAA;AAC7C,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC7G,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAA;AAC1D,OAAO,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"ast-visitors.d.ts","sourceRoot":"","sources":["../../../src/extractor/core/ast-visitors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAQ,MAAM,WAAW,CAAA;AAC7C,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC7G,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAA;AAC1D,OAAO,EAAE,kBAAkB,EAAiB,MAAM,mCAAmC,CAAA;AAuCrF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBAAa,WAAW;IACtB,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAe;IAC7C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAuC;IAC9D,OAA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AAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;IAKxD;;;;;;OAMG;IACI,cAAc,IAAK,MAAM;IAIhC;;OAEG;IACI,cAAc,IAAK,MAAM;CAGjC"}
|
|
@@ -1,6 +1,31 @@
|
|
|
1
1
|
import type { CallExpression } from '@swc/core';
|
|
2
2
|
import type { PluginContext, I18nextToolkitConfig, Logger, ScopeInfo } from '../../types.js';
|
|
3
3
|
import { ExpressionResolver } from './expression-resolver.js';
|
|
4
|
+
/**
|
|
5
|
+
* Mirror i18next's runtime selector rule (v25.8.19 default, or
|
|
6
|
+
* `enableSelector: 'strict'` when `types.enableSelector === 'strict'`).
|
|
7
|
+
*
|
|
8
|
+
* **Default mode** — rewrite only when the hook was called with a multi-element
|
|
9
|
+
* namespace array and the path's first segment matches a *secondary* namespace.
|
|
10
|
+
* The primary is intentionally not rewritten (preserves #2405): its keys are
|
|
11
|
+
* exposed flat on `$`, so `$.primary.foo` means a literal sub-key.
|
|
12
|
+
*
|
|
13
|
+
* **Strict mode** — every namespace (primary included) is exposed only under
|
|
14
|
+
* its own key on `$`. So a leading segment matching *any* namespace in the
|
|
15
|
+
* scope's list — primary or secondary, single-ns or multi-ns — is rewritten.
|
|
16
|
+
* Mirrors `i18next/src/selector.js` strict branch.
|
|
17
|
+
*
|
|
18
|
+
* In strict mode we also accept a single-ns scope, falling back to
|
|
19
|
+
* `[scopeInfo.defaultNs]` when the scope didn't capture an explicit array
|
|
20
|
+
* (e.g. `useTranslation('only')`).
|
|
21
|
+
*
|
|
22
|
+
* Falls through to the input string when:
|
|
23
|
+
* - the call had no selector (string keys go through this path unchanged),
|
|
24
|
+
* - scope has no namespaces info,
|
|
25
|
+
* - first segment isn't in the scope's namespaces list, or
|
|
26
|
+
* - separators are configured off.
|
|
27
|
+
*/
|
|
28
|
+
export declare function applySelectorNsRewrite(key: string, scopeInfo: ScopeInfo | undefined, config: Pick<I18nextToolkitConfig, 'extract' | 'types'>): string;
|
|
4
29
|
export declare class CallExpressionHandler {
|
|
5
30
|
private pluginContext;
|
|
6
31
|
private config;
|
|
@@ -57,31 +82,6 @@ export declare class CallExpressionHandler {
|
|
|
57
82
|
* @returns An object containing the keys to process and a flag indicating if the selector API is used
|
|
58
83
|
*/
|
|
59
84
|
private handleCallExpressionArgument;
|
|
60
|
-
/**
|
|
61
|
-
* Mirror i18next's runtime selector rule (v25.8.19 default, or
|
|
62
|
-
* `enableSelector: 'strict'` when `types.enableSelector === 'strict'`).
|
|
63
|
-
*
|
|
64
|
-
* **Default mode** — rewrite only when the hook was called with a multi-element
|
|
65
|
-
* namespace array and the path's first segment matches a *secondary* namespace.
|
|
66
|
-
* The primary is intentionally not rewritten (preserves #2405): its keys are
|
|
67
|
-
* exposed flat on `$`, so `$.primary.foo` means a literal sub-key.
|
|
68
|
-
*
|
|
69
|
-
* **Strict mode** — every namespace (primary included) is exposed only under
|
|
70
|
-
* its own key on `$`. So a leading segment matching *any* namespace in the
|
|
71
|
-
* scope's list — primary or secondary, single-ns or multi-ns — is rewritten.
|
|
72
|
-
* Mirrors `i18next/src/selector.js` strict branch.
|
|
73
|
-
*
|
|
74
|
-
* In strict mode we also accept a single-ns scope, falling back to
|
|
75
|
-
* `[scopeInfo.defaultNs]` when the scope didn't capture an explicit array
|
|
76
|
-
* (e.g. `useTranslation('only')`).
|
|
77
|
-
*
|
|
78
|
-
* Falls through to the input string when:
|
|
79
|
-
* - the call had no selector (string keys go through this path unchanged),
|
|
80
|
-
* - scope has no namespaces info,
|
|
81
|
-
* - first segment isn't in the scope's namespaces list, or
|
|
82
|
-
* - separators are configured off.
|
|
83
|
-
*/
|
|
84
|
-
private applySelectorNsRewrite;
|
|
85
85
|
/**
|
|
86
86
|
* Extracts translation key(s) from selector API arrow function.
|
|
87
87
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"call-expression-handler.d.ts","sourceRoot":"","sources":["../../../src/extractor/parsers/call-expression-handler.ts"],"names":[],"mappings":"AAAA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AG,SAAS,GAAG,IAAI;IA8CxG,OAAO,CAAC,eAAe;IA0XvB;;;;OAIG;IACH,OAAO,CAAC,iBAAiB;IAmBzB,OAAO,CAAC,wBAAwB;IAyEhC;;;;;;OAMG;IACH,OAAO,CAAC,4BAA4B;IAsDpC;;;;;;;;;;;;;;;;OAgBG;IACH,OAAO,CAAC,uBAAuB;IAiB/B;;;;;;;;OAQG;IACH,OAAO,CAAC,iCAAiC;IAwFzC;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,gBAAgB;IAyMxB;;;;;;;;;OASG;IACH,OAAO,CAAC,eAAe;CA2BxB"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Expression } from '@swc/core';
|
|
2
2
|
import type { ASTVisitorHooks } from '../../types.js';
|
|
3
|
+
export declare const nestedMembers: (members: Record<string, string[]> | undefined, name: string) => Record<string, string[]> | undefined;
|
|
3
4
|
export declare class ExpressionResolver {
|
|
4
5
|
private hooks;
|
|
5
6
|
private variableTable;
|
|
@@ -22,6 +23,7 @@ export declare class ExpressionResolver {
|
|
|
22
23
|
private replays;
|
|
23
24
|
private replaying;
|
|
24
25
|
private grew;
|
|
26
|
+
private memberDepth;
|
|
25
27
|
constructor(hooks: ASTVisitorHooks);
|
|
26
28
|
/**
|
|
27
29
|
* Clear per-file captured variables. Enums / shared maps are kept.
|
|
@@ -118,12 +120,24 @@ export declare class ExpressionResolver {
|
|
|
118
120
|
* that `items.map(({ size }) => …)` can bind the callback parameter.
|
|
119
121
|
*/
|
|
120
122
|
resolveArrayElementMembers(tsType: any): Record<string, string[]> | undefined;
|
|
123
|
+
private arrayLiteralValues;
|
|
124
|
+
private arrayLiteralMembers;
|
|
125
|
+
/**
|
|
126
|
+
* The values an iterated array holds: a known constant (`QUARTERS.map(…)`), an
|
|
127
|
+
* inline literal (`([1, 2, 3, 4] as const).map(…)`) or a typed member (`props.colors`).
|
|
128
|
+
*/
|
|
129
|
+
arrayValuesOf(expr: any): string[] | undefined;
|
|
130
|
+
/**
|
|
131
|
+
* The element member map of an iterated array of objects: a typed or constant
|
|
132
|
+
* identifier (`items: IProps[]`), an inline literal (`[{ unit: 'day' }]`) or a
|
|
133
|
+
* typed member (`props.items`).
|
|
134
|
+
*/
|
|
135
|
+
arrayMembersOf(expr: any): Record<string, string[]> | undefined;
|
|
121
136
|
/**
|
|
122
137
|
* Bind an identifier to the member map of its array element type
|
|
123
138
|
* (`items: IProps[]`).
|
|
124
139
|
*/
|
|
125
140
|
setArrayElementMembers(name: string, members: Record<string, string[]>): void;
|
|
126
|
-
getArrayElementMembers(name: string): Record<string, string[]> | undefined;
|
|
127
141
|
deleteArrayElementMembers(name: string): void;
|
|
128
142
|
/**
|
|
129
143
|
* Temporarily bind an identifier to an object-shaped type's members, so that
|
|
@@ -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,EAAkD,MAAM,WAAW,CAAA;AAC3F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;
|
|
1
|
+
{"version":3,"file":"expression-resolver.d.ts","sourceRoot":"","sources":["../../../src/extractor/parsers/expression-resolver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAkD,MAAM,WAAW,CAAA;AAC3F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AA+BrD,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;AA6BD,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,KAAK,CAAiB;IAK9B,OAAO,CAAC,aAAa,CAA4D;IAGjF,OAAO,CAAC,eAAe,CAAiD;IAIxE,OAAO,CAAC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,IAAI,EAAE,MAAM,GAAG,IAAI;IAInD;;;;OAIG;IACI,yBAAyB,CAAE,MAAM,EAAE,GAAG,GAAG,MAAM,EAAE;IAQxD;;;OAGG;IACI,iBAAiB,CAAE,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS;IAQ7D;;;;OAIG;IACI,YAAY,CAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS;IAQtE;;;;;OAKG;IACH,sBAAsB,CAAE,IAAI,EAAE,GAAG,GAAG,IAAI;IAwBxC;;;;;;;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;IA8OjD,OAAO,CAAC,mCAAmC;IA+I3C;;;;;;OAMG;IACH,OAAO,CAAC,6CAA6C;IAyBrD;;;;;;OAMG;IACH,OAAO,CAAC,kDAAkD;CAwB3D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsx-handler.d.ts","sourceRoot":"","sources":["../../../src/extractor/parsers/jsx-handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAc,UAAU,EAAqC,MAAM,WAAW,CAAA;AAC1F,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAgB,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAClG,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;
|
|
1
|
+
{"version":3,"file":"jsx-handler.d.ts","sourceRoot":"","sources":["../../../src/extractor/parsers/jsx-handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAc,UAAU,EAAqC,MAAM,WAAW,CAAA;AAC1F,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAgB,SAAS,EAAE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