@lingo.dev/_spec 0.45.0 → 0.47.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/index.mjs CHANGED
@@ -380,7 +380,8 @@ var bucketTypes = [
380
380
  "vue-json",
381
381
  "typescript",
382
382
  "txt",
383
- "json-dictionary"
383
+ "json-dictionary",
384
+ "csv-per-locale"
384
385
  ];
385
386
  var bucketTypeSchema = Z2.enum(bucketTypes);
386
387
 
@@ -407,7 +408,7 @@ var extendConfigDefinition = (definition, params) => {
407
408
  if (safeResult.success) {
408
409
  return safeResult.data;
409
410
  }
410
- const localeErrors = safeResult.error.errors.filter((issue) => issue.message.includes("Invalid locale code")).map((issue) => {
411
+ const localeErrors = safeResult.error.issues.filter((issue) => issue.message.includes("Invalid locale code")).map((issue) => {
411
412
  let unsupportedLocale = "";
412
413
  const path = issue.path;
413
414
  const config = rawConfig;
@@ -467,13 +468,13 @@ var configV1Definition = extendConfigDefinition(configV0Definition, {
467
468
  });
468
469
  var configV1_1Definition = extendConfigDefinition(configV1Definition, {
469
470
  createSchema: (baseSchema) => baseSchema.extend({
470
- buckets: Z3.record(
471
+ buckets: Z3.partialRecord(
471
472
  bucketTypeSchema,
472
473
  Z3.object({
473
474
  include: Z3.array(Z3.string()).default([]).describe(
474
475
  "File paths or glob patterns to include for this bucket."
475
476
  ),
476
- exclude: Z3.array(Z3.string()).default([]).optional().describe(
477
+ exclude: Z3.array(Z3.string()).optional().describe(
477
478
  "File paths or glob patterns to exclude from this bucket."
478
479
  )
479
480
  })
@@ -535,7 +536,7 @@ var bucketItemSchema = Z3.object({
535
536
  );
536
537
  var bucketValueSchemaV1_3 = Z3.object({
537
538
  include: Z3.array(Z3.union([Z3.string(), bucketItemSchema])).default([]).describe("Glob patterns or bucket items to include for this bucket."),
538
- exclude: Z3.array(Z3.union([Z3.string(), bucketItemSchema])).default([]).optional().describe("Glob patterns or bucket items to exclude from this bucket."),
539
+ exclude: Z3.array(Z3.union([Z3.string(), bucketItemSchema])).optional().describe("Glob patterns or bucket items to exclude from this bucket."),
539
540
  injectLocale: Z3.array(Z3.string()).optional().describe(
540
541
  "Keys within files where the current locale should be injected or removed."
541
542
  )
@@ -544,7 +545,10 @@ var configV1_3Definition = extendConfigDefinition(
544
545
  configV1_2Definition,
545
546
  {
546
547
  createSchema: (baseSchema) => baseSchema.extend({
547
- buckets: Z3.record(bucketTypeSchema, bucketValueSchemaV1_3).default({})
548
+ buckets: Z3.partialRecord(
549
+ bucketTypeSchema,
550
+ bucketValueSchemaV1_3
551
+ ).default({})
548
552
  }),
549
553
  createDefaultValue: (baseDefaultValue) => ({
550
554
  ...baseDefaultValue,
@@ -607,7 +611,7 @@ var configV1_5Definition = extendConfigDefinition(
607
611
  }
608
612
  );
609
613
  var bucketValueSchemaV1_6 = bucketValueSchemaV1_3.extend({
610
- lockedKeys: Z3.array(Z3.string()).default([]).optional().describe(
614
+ lockedKeys: Z3.array(Z3.string()).optional().describe(
611
615
  "Keys that must remain unchanged and should never be overwritten by translations."
612
616
  )
613
617
  });
@@ -615,7 +619,10 @@ var configV1_6Definition = extendConfigDefinition(
615
619
  configV1_5Definition,
616
620
  {
617
621
  createSchema: (baseSchema) => baseSchema.extend({
618
- buckets: Z3.record(bucketTypeSchema, bucketValueSchemaV1_6).default({})
622
+ buckets: Z3.partialRecord(
623
+ bucketTypeSchema,
624
+ bucketValueSchemaV1_6
625
+ ).default({})
619
626
  }),
620
627
  createDefaultValue: (baseDefaultValue) => ({
621
628
  ...baseDefaultValue,
@@ -628,7 +635,7 @@ var configV1_6Definition = extendConfigDefinition(
628
635
  }
629
636
  );
630
637
  var bucketValueSchemaV1_7 = bucketValueSchemaV1_6.extend({
631
- lockedPatterns: Z3.array(Z3.string()).default([]).optional().describe(
638
+ lockedPatterns: Z3.array(Z3.string()).optional().describe(
632
639
  "Regular expression patterns whose matched content should remain locked during translation."
633
640
  )
634
641
  });
@@ -636,7 +643,10 @@ var configV1_7Definition = extendConfigDefinition(
636
643
  configV1_6Definition,
637
644
  {
638
645
  createSchema: (baseSchema) => baseSchema.extend({
639
- buckets: Z3.record(bucketTypeSchema, bucketValueSchemaV1_7).default({})
646
+ buckets: Z3.partialRecord(
647
+ bucketTypeSchema,
648
+ bucketValueSchemaV1_7
649
+ ).default({})
640
650
  }),
641
651
  createDefaultValue: (baseDefaultValue) => ({
642
652
  ...baseDefaultValue,
@@ -649,7 +659,7 @@ var configV1_7Definition = extendConfigDefinition(
649
659
  }
650
660
  );
651
661
  var bucketValueSchemaV1_8 = bucketValueSchemaV1_7.extend({
652
- ignoredKeys: Z3.array(Z3.string()).default([]).optional().describe(
662
+ ignoredKeys: Z3.array(Z3.string()).optional().describe(
653
663
  "Keys that should be completely ignored by translation processes."
654
664
  )
655
665
  });
@@ -657,7 +667,10 @@ var configV1_8Definition = extendConfigDefinition(
657
667
  configV1_7Definition,
658
668
  {
659
669
  createSchema: (baseSchema) => baseSchema.extend({
660
- buckets: Z3.record(bucketTypeSchema, bucketValueSchemaV1_8).default({})
670
+ buckets: Z3.partialRecord(
671
+ bucketTypeSchema,
672
+ bucketValueSchemaV1_8
673
+ ).default({})
661
674
  }),
662
675
  createDefaultValue: (baseDefaultValue) => ({
663
676
  ...baseDefaultValue,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lingo.dev/_spec",
3
- "version": "0.45.0",
3
+ "version": "0.47.0",
4
4
  "description": "Lingo.dev open specification",
5
5
  "private": false,
6
6
  "repository": {
@@ -24,9 +24,8 @@
24
24
  "author": "",
25
25
  "license": "Apache-2.0",
26
26
  "dependencies": {
27
- "zod": "3.25.76",
28
- "zod-to-json-schema": "3.25.0",
29
- "@lingo.dev/_locales": "0.3.2"
27
+ "zod": "4.1.12",
28
+ "@lingo.dev/_locales": "0.3.3"
30
29
  },
31
30
  "devDependencies": {
32
31
  "@types/node": "22.13.5",