i18next-cli 1.70.1 → 1.70.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 CHANGED
@@ -37,7 +37,7 @@ const program = new commander.Command();
37
37
  program
38
38
  .name('i18next-cli')
39
39
  .description('A unified, high-performance i18next CLI.')
40
- .version('1.70.1'); // This string is replaced with the actual version at build time by rollup
40
+ .version('1.70.2'); // This string is replaced with the actual version at build time by rollup
41
41
  // new: global config override option
42
42
  program.option('-c, --config <path>', 'Path to i18next-cli config file (overrides detection)');
43
43
  program
@@ -218,6 +218,13 @@ class ASTVisitors {
218
218
  node.type === 'ObjectMethod') {
219
219
  this.scopeManager.enterScope();
220
220
  isNewScope = true;
221
+ // `<Ns extends 'a' | 'b'>(t: TFunction<Ns>)` → constraint lookup for type params
222
+ const typeParamConstraints = {};
223
+ for (const tp of (node.typeParameters?.parameters ?? node.typeParameters?.params ?? [])) {
224
+ const name = tp?.name?.value ?? tp?.name?.name;
225
+ if (name && tp.constraint)
226
+ typeParamConstraints[name] = tp.constraint;
227
+ }
221
228
  const params = (node.params && Array.isArray(node.params)) ? node.params : (node.params || []);
222
229
  for (const p of params) {
223
230
  // handle common param shapes: Identifier, AssignmentPattern (default), RestElement ignored
@@ -241,7 +248,7 @@ class ASTVisitors {
241
248
  if (!memberName || !localName)
242
249
  continue;
243
250
  // `({ t }: { t: TFunction<'ns'> })` → bind `t` to that namespace
244
- this.bindTFunctionParam(localName, this.getMemberTypeNode(patType, memberName));
251
+ this.bindTFunctionParam(localName, this.getMemberTypeNode(patType, memberName), typeParamConstraints);
245
252
  if (!members?.[memberName])
246
253
  continue;
247
254
  this.expressionResolver.setTemporaryVariable(localName, members[memberName]);
@@ -294,7 +301,11 @@ class ASTVisitors {
294
301
  else {
295
302
  typeAnn = undefined;
296
303
  }
297
- this.bindTFunctionParam(paramKey, typeAnn);
304
+ this.bindTFunctionParam(paramKey, typeAnn, typeParamConstraints);
305
+ // `props: { t: TFunction<'ns'> }` → bind `props.t` so `props.t('key')` resolves
306
+ for (const { name, typeNode } of this.getObjectTypeMembers(typeAnn)) {
307
+ this.bindTFunctionParam(`${paramKey}.${name}`, typeNode, typeParamConstraints);
308
+ }
298
309
  // Capture parameter type annotations as temporary variables in the
299
310
  // expression resolver so that dynamic bracket expressions like
300
311
  // `t(($) => $.table.columns[field])` can resolve `field` to its
@@ -560,7 +571,7 @@ class ASTVisitors {
560
571
  * If `typeAnn` is a `TFunction<Ns, KPrefix>` type reference, register
561
572
  * `paramKey` in the current scope with that namespace / keyPrefix.
562
573
  */
563
- bindTFunctionParam(paramKey, typeAnn) {
574
+ bindTFunctionParam(paramKey, typeAnn, typeParamConstraints = {}) {
564
575
  // Small helpers to robustly extract the referenced type name and literal string
565
576
  const extractTypeName = (ta) => {
566
577
  if (!ta)
@@ -584,6 +595,16 @@ class ASTVisitors {
584
595
  const extractStringLiteralValue = (node) => {
585
596
  if (!node)
586
597
  return undefined;
598
+ // Union (`'a' | 'b'`), local alias, or generic constrained to those: use the
599
+ // first member. Mirrors i18next's type-level behaviour (first ns wins).
600
+ if (node.type === 'TsUnionType')
601
+ return extractStringLiteralValue(node.types?.[0]);
602
+ if (node.type === 'TsTypeReference' && node.typeName?.type === 'Identifier') {
603
+ const constraint = typeParamConstraints[node.typeName.value];
604
+ if (constraint)
605
+ return extractStringLiteralValue(constraint);
606
+ return this.expressionResolver.resolveTypeToStringValues(node)[0];
607
+ }
587
608
  // Handle: typeof SomeConst → TsTypeQuery { exprName: { value: 'SomeConst' } }
588
609
  if (node?.type === 'TsTypeQuery') {
589
610
  const name = node.exprName?.value ?? node.exprName?.name;
@@ -682,8 +703,12 @@ class ASTVisitors {
682
703
  * alias name).
683
704
  */
684
705
  getMemberTypeNode(tsType, memberName) {
706
+ return this.getObjectTypeMembers(tsType).find(m => m.name === memberName)?.typeNode;
707
+ }
708
+ /** `{ name, typeNode }` for every property of an object-shaped type annotation. */
709
+ getObjectTypeMembers(tsType) {
685
710
  if (!tsType)
686
- return undefined;
711
+ return [];
687
712
  let members;
688
713
  if (tsType.type === 'TsTypeLiteral')
689
714
  members = tsType.members;
@@ -691,15 +716,16 @@ class ASTVisitors {
691
716
  members = this.expressionResolver.getObjectTypeMembersRaw(tsType.typeName.value);
692
717
  }
693
718
  if (!Array.isArray(members))
694
- return undefined;
719
+ return [];
720
+ const out = [];
695
721
  for (const m of members) {
696
722
  if (m?.type !== 'TsPropertySignature')
697
723
  continue;
698
724
  const name = m.key?.type === 'Identifier' || m.key?.type === 'StringLiteral' ? m.key.value : undefined;
699
- if (name === memberName)
700
- return m.typeAnnotation?.typeAnnotation ?? m.typeAnnotation;
725
+ if (name)
726
+ out.push({ name, typeNode: m.typeAnnotation?.typeAnnotation ?? m.typeAnnotation });
701
727
  }
702
- return undefined;
728
+ return out;
703
729
  }
704
730
  /**
705
731
  * If `node` is a call like `ARRAY.map(param => ...)` where ARRAY is a known
@@ -15,6 +15,8 @@ class ScopeManager {
15
15
  simpleConstants = new Map();
16
16
  // Track simple local constant objects with string literal property values
17
17
  simpleConstantObjects = new Map();
18
+ // `const NS = ['a', 'b']` → used by resolveNsArg for `useTranslation(NS)`.
19
+ simpleConstantArrays = new Map();
18
20
  // Shared (cross-file) tables so that exported constants from one file can be
19
21
  // resolved when imported in another. These are NOT cleared by reset().
20
22
  sharedConstants = new Map();
@@ -68,6 +70,7 @@ class ScopeManager {
68
70
  this.scope = new Map();
69
71
  this.simpleConstants.clear();
70
72
  this.simpleConstantObjects.clear();
73
+ this.simpleConstantArrays.clear();
71
74
  this.thisFieldStack = [];
72
75
  }
73
76
  /**
@@ -258,6 +261,15 @@ class ScopeManager {
258
261
  this.sharedConstantObjects.set(node.id.value, map);
259
262
  }
260
263
  }
264
+ else if (unwrapped?.type === 'ArrayExpression') {
265
+ const arr = unwrapped.elements
266
+ .map((el) => ScopeManager.unwrapTsExpression(el?.expression))
267
+ .filter((e) => e?.type === 'StringLiteral')
268
+ .map((e) => e.value);
269
+ if (arr.length > 0 && arr.length === unwrapped.elements.length) {
270
+ this.simpleConstantArrays.set(node.id.value, arr);
271
+ }
272
+ }
261
273
  else {
262
274
  const fromType = ScopeManager.extractStringFromTypeAnnotation(node);
263
275
  if (fromType !== undefined) {
@@ -555,10 +567,15 @@ class ScopeManager {
555
567
  resolveNsArg(nsNode) {
556
568
  if (!nsNode)
557
569
  return {};
570
+ nsNode = ScopeManager.unwrapTsExpression(nsNode); // `[...] as const`, `satisfies`, `as X`
558
571
  if (nsNode.type === 'StringLiteral')
559
572
  return { defaultNs: nsNode.value };
560
- if (nsNode.type === 'Identifier')
573
+ if (nsNode.type === 'Identifier') {
574
+ const arr = this.simpleConstantArrays.get(nsNode.value);
575
+ if (arr)
576
+ return { defaultNs: arr[0], namespaces: arr };
561
577
  return { defaultNs: this.resolveSimpleStringIdentifier(nsNode.value) };
578
+ }
562
579
  if (nsNode.type === 'MemberExpression')
563
580
  return { defaultNs: this.resolveSimpleMemberExpression(nsNode) };
564
581
  // `useTranslation(ns ?? 'fallback')` / `useTranslation(ns || 'fallback')`:
package/dist/esm/cli.js CHANGED
@@ -31,7 +31,7 @@ const program = new Command();
31
31
  program
32
32
  .name('i18next-cli')
33
33
  .description('A unified, high-performance i18next CLI.')
34
- .version('1.70.1'); // This string is replaced with the actual version at build time by rollup
34
+ .version('1.70.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
@@ -216,6 +216,13 @@ class ASTVisitors {
216
216
  node.type === 'ObjectMethod') {
217
217
  this.scopeManager.enterScope();
218
218
  isNewScope = true;
219
+ // `<Ns extends 'a' | 'b'>(t: TFunction<Ns>)` → constraint lookup for type params
220
+ const typeParamConstraints = {};
221
+ for (const tp of (node.typeParameters?.parameters ?? node.typeParameters?.params ?? [])) {
222
+ const name = tp?.name?.value ?? tp?.name?.name;
223
+ if (name && tp.constraint)
224
+ typeParamConstraints[name] = tp.constraint;
225
+ }
219
226
  const params = (node.params && Array.isArray(node.params)) ? node.params : (node.params || []);
220
227
  for (const p of params) {
221
228
  // handle common param shapes: Identifier, AssignmentPattern (default), RestElement ignored
@@ -239,7 +246,7 @@ class ASTVisitors {
239
246
  if (!memberName || !localName)
240
247
  continue;
241
248
  // `({ t }: { t: TFunction<'ns'> })` → bind `t` to that namespace
242
- this.bindTFunctionParam(localName, this.getMemberTypeNode(patType, memberName));
249
+ this.bindTFunctionParam(localName, this.getMemberTypeNode(patType, memberName), typeParamConstraints);
243
250
  if (!members?.[memberName])
244
251
  continue;
245
252
  this.expressionResolver.setTemporaryVariable(localName, members[memberName]);
@@ -292,7 +299,11 @@ class ASTVisitors {
292
299
  else {
293
300
  typeAnn = undefined;
294
301
  }
295
- this.bindTFunctionParam(paramKey, typeAnn);
302
+ this.bindTFunctionParam(paramKey, typeAnn, typeParamConstraints);
303
+ // `props: { t: TFunction<'ns'> }` → bind `props.t` so `props.t('key')` resolves
304
+ for (const { name, typeNode } of this.getObjectTypeMembers(typeAnn)) {
305
+ this.bindTFunctionParam(`${paramKey}.${name}`, typeNode, typeParamConstraints);
306
+ }
296
307
  // Capture parameter type annotations as temporary variables in the
297
308
  // expression resolver so that dynamic bracket expressions like
298
309
  // `t(($) => $.table.columns[field])` can resolve `field` to its
@@ -558,7 +569,7 @@ class ASTVisitors {
558
569
  * If `typeAnn` is a `TFunction<Ns, KPrefix>` type reference, register
559
570
  * `paramKey` in the current scope with that namespace / keyPrefix.
560
571
  */
561
- bindTFunctionParam(paramKey, typeAnn) {
572
+ bindTFunctionParam(paramKey, typeAnn, typeParamConstraints = {}) {
562
573
  // Small helpers to robustly extract the referenced type name and literal string
563
574
  const extractTypeName = (ta) => {
564
575
  if (!ta)
@@ -582,6 +593,16 @@ class ASTVisitors {
582
593
  const extractStringLiteralValue = (node) => {
583
594
  if (!node)
584
595
  return undefined;
596
+ // Union (`'a' | 'b'`), local alias, or generic constrained to those: use the
597
+ // first member. Mirrors i18next's type-level behaviour (first ns wins).
598
+ if (node.type === 'TsUnionType')
599
+ return extractStringLiteralValue(node.types?.[0]);
600
+ if (node.type === 'TsTypeReference' && node.typeName?.type === 'Identifier') {
601
+ const constraint = typeParamConstraints[node.typeName.value];
602
+ if (constraint)
603
+ return extractStringLiteralValue(constraint);
604
+ return this.expressionResolver.resolveTypeToStringValues(node)[0];
605
+ }
585
606
  // Handle: typeof SomeConst → TsTypeQuery { exprName: { value: 'SomeConst' } }
586
607
  if (node?.type === 'TsTypeQuery') {
587
608
  const name = node.exprName?.value ?? node.exprName?.name;
@@ -680,8 +701,12 @@ class ASTVisitors {
680
701
  * alias name).
681
702
  */
682
703
  getMemberTypeNode(tsType, memberName) {
704
+ return this.getObjectTypeMembers(tsType).find(m => m.name === memberName)?.typeNode;
705
+ }
706
+ /** `{ name, typeNode }` for every property of an object-shaped type annotation. */
707
+ getObjectTypeMembers(tsType) {
683
708
  if (!tsType)
684
- return undefined;
709
+ return [];
685
710
  let members;
686
711
  if (tsType.type === 'TsTypeLiteral')
687
712
  members = tsType.members;
@@ -689,15 +714,16 @@ class ASTVisitors {
689
714
  members = this.expressionResolver.getObjectTypeMembersRaw(tsType.typeName.value);
690
715
  }
691
716
  if (!Array.isArray(members))
692
- return undefined;
717
+ return [];
718
+ const out = [];
693
719
  for (const m of members) {
694
720
  if (m?.type !== 'TsPropertySignature')
695
721
  continue;
696
722
  const name = m.key?.type === 'Identifier' || m.key?.type === 'StringLiteral' ? m.key.value : undefined;
697
- if (name === memberName)
698
- return m.typeAnnotation?.typeAnnotation ?? m.typeAnnotation;
723
+ if (name)
724
+ out.push({ name, typeNode: m.typeAnnotation?.typeAnnotation ?? m.typeAnnotation });
699
725
  }
700
- return undefined;
726
+ return out;
701
727
  }
702
728
  /**
703
729
  * If `node` is a call like `ARRAY.map(param => ...)` where ARRAY is a known
@@ -13,6 +13,8 @@ class ScopeManager {
13
13
  simpleConstants = new Map();
14
14
  // Track simple local constant objects with string literal property values
15
15
  simpleConstantObjects = new Map();
16
+ // `const NS = ['a', 'b']` → used by resolveNsArg for `useTranslation(NS)`.
17
+ simpleConstantArrays = new Map();
16
18
  // Shared (cross-file) tables so that exported constants from one file can be
17
19
  // resolved when imported in another. These are NOT cleared by reset().
18
20
  sharedConstants = new Map();
@@ -66,6 +68,7 @@ class ScopeManager {
66
68
  this.scope = new Map();
67
69
  this.simpleConstants.clear();
68
70
  this.simpleConstantObjects.clear();
71
+ this.simpleConstantArrays.clear();
69
72
  this.thisFieldStack = [];
70
73
  }
71
74
  /**
@@ -256,6 +259,15 @@ class ScopeManager {
256
259
  this.sharedConstantObjects.set(node.id.value, map);
257
260
  }
258
261
  }
262
+ else if (unwrapped?.type === 'ArrayExpression') {
263
+ const arr = unwrapped.elements
264
+ .map((el) => ScopeManager.unwrapTsExpression(el?.expression))
265
+ .filter((e) => e?.type === 'StringLiteral')
266
+ .map((e) => e.value);
267
+ if (arr.length > 0 && arr.length === unwrapped.elements.length) {
268
+ this.simpleConstantArrays.set(node.id.value, arr);
269
+ }
270
+ }
259
271
  else {
260
272
  const fromType = ScopeManager.extractStringFromTypeAnnotation(node);
261
273
  if (fromType !== undefined) {
@@ -553,10 +565,15 @@ class ScopeManager {
553
565
  resolveNsArg(nsNode) {
554
566
  if (!nsNode)
555
567
  return {};
568
+ nsNode = ScopeManager.unwrapTsExpression(nsNode); // `[...] as const`, `satisfies`, `as X`
556
569
  if (nsNode.type === 'StringLiteral')
557
570
  return { defaultNs: nsNode.value };
558
- if (nsNode.type === 'Identifier')
571
+ if (nsNode.type === 'Identifier') {
572
+ const arr = this.simpleConstantArrays.get(nsNode.value);
573
+ if (arr)
574
+ return { defaultNs: arr[0], namespaces: arr };
559
575
  return { defaultNs: this.resolveSimpleStringIdentifier(nsNode.value) };
576
+ }
560
577
  if (nsNode.type === 'MemberExpression')
561
578
  return { defaultNs: this.resolveSimpleMemberExpression(nsNode) };
562
579
  // `useTranslation(ns ?? 'fallback')` / `useTranslation(ns || 'fallback')`:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "i18next-cli",
3
- "version": "1.70.1",
3
+ "version": "1.70.2",
4
4
  "description": "A unified, high-performance i18next CLI.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -96,6 +96,8 @@ export declare class ASTVisitors {
96
96
  * alias name).
97
97
  */
98
98
  private getMemberTypeNode;
99
+ /** `{ name, typeNode }` for every property of an object-shaped type annotation. */
100
+ private getObjectTypeMembers;
99
101
  /**
100
102
  * If `node` is a call like `ARRAY.map(param => ...)` where ARRAY is a known
101
103
  * string-array constant, returns the callback's first parameter name and the
@@ -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,EAAE,MAAM,mCAAmC,CAAA;AAItE;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBAAa,WAAW;IACtB,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAe;IAC7C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAuC;IAC9D,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAQ;IAC/B,OAAO,CAAC,KAAK,CAAiB;IAE9B,IAAW,UAAU,gBAEpB;IAED,SAAgB,YAAY,EAAE,YAAY,CAAA;IAC1C,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAoB;IACvD,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAAuB;IAC7D,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAY;IACvC,OAAO,CAAC,WAAW,CAAa;IAChC,OAAO,CAAC,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;;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;IAKxD;;;;;;OAMG;IACI,cAAc,IAAK,MAAM;IAIhC;;OAEG;IACI,cAAc,IAAK,MAAM;CAGjC"}
@@ -7,6 +7,7 @@ export declare class ScopeManager {
7
7
  private thisFieldStack;
8
8
  private simpleConstants;
9
9
  private simpleConstantObjects;
10
+ private simpleConstantArrays;
10
11
  private sharedConstants;
11
12
  private sharedConstantObjects;
12
13
  constructor(config: Omit<I18nextToolkitConfig, 'plugins'>);
@@ -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;AAG/F,qBAAa,YAAY;IACvB,OAAO,CAAC,UAAU,CAAoC;IACtD,OAAO,CAAC,MAAM,CAAuC;IACrD,OAAO,CAAC,KAAK,CAAqE;IAMlF,OAAO,CAAC,cAAc,CAAoC;IAG1D,OAAO,CAAC,eAAe,CAAiC;IAGxD,OAAO,CAAC,qBAAqB,CAAiD;IAI9E,OAAO,CAAC,eAAe,CAAiC;IACxD,OAAO,CAAC,qBAAqB,CAAiD;gBAEjE,MAAM,EAAE,IAAI,CAAC,oBAAoB,EAAE,SAAS,CAAC;IAI1D;;;OAGG;IACH,OAAO,CAAC,MAAM,CAAC,kBAAkB;IAcjC;;;OAGG;IACH,OAAO,CAAC,MAAM,CAAC,+BAA+B;IAgB9C;;;;;;OAMG;IACI,KAAK,IAAK,IAAI;IAQrB;;;;OAIG;IACH,eAAe,IAAK,IAAI;IAIxB;;;OAGG;IACH,cAAc,IAAK,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