lingo.dev 0.116.4 → 0.117.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/cli.mjs CHANGED
@@ -2107,6 +2107,13 @@ function getKeyType(yamlString) {
2107
2107
  function getStringType(yamlString) {
2108
2108
  if (yamlString) {
2109
2109
  const lines = yamlString.split("\n");
2110
+ const hasLiteralBlockScalar = lines.find((line) => {
2111
+ const trimmedLine = line.trim();
2112
+ return trimmedLine.match(/:\s*\|[-+]?\s*$/);
2113
+ });
2114
+ if (hasLiteralBlockScalar) {
2115
+ return "PLAIN";
2116
+ }
2110
2117
  const hasDoubleQuotes = lines.find((line) => {
2111
2118
  const trimmedLine = line.trim();
2112
2119
  return (trimmedLine.startsWith('"') || trimmedLine.match(/:\s*"/)) && (trimmedLine.endsWith('"') || trimmedLine.endsWith('",'));
@@ -2158,7 +2165,7 @@ function _isMetadataKey(key) {
2158
2165
  }
2159
2166
 
2160
2167
  // src/cli/loaders/android.ts
2161
- import { createRequire } from "node:module";
2168
+ import { createRequire } from "module";
2162
2169
  import { parseStringPromise } from "xml2js";
2163
2170
  var require2 = createRequire(import.meta.url);
2164
2171
  var sax = require2("sax");
@@ -6798,7 +6805,7 @@ function expand_(str, isTop) {
6798
6805
  return expansions;
6799
6806
  }
6800
6807
 
6801
- // ../../node_modules/.pnpm/minimatch@10.0.3/node_modules/minimatch/dist/esm/assert-valid-pattern.js
6808
+ // ../../node_modules/.pnpm/minimatch@10.1.1/node_modules/minimatch/dist/esm/assert-valid-pattern.js
6802
6809
  var MAX_PATTERN_LENGTH = 1024 * 64;
6803
6810
  var assertValidPattern = (pattern) => {
6804
6811
  if (typeof pattern !== "string") {
@@ -6809,7 +6816,7 @@ var assertValidPattern = (pattern) => {
6809
6816
  }
6810
6817
  };
6811
6818
 
6812
- // ../../node_modules/.pnpm/minimatch@10.0.3/node_modules/minimatch/dist/esm/brace-expressions.js
6819
+ // ../../node_modules/.pnpm/minimatch@10.1.1/node_modules/minimatch/dist/esm/brace-expressions.js
6813
6820
  var posixClasses = {
6814
6821
  "[:alnum:]": ["\\p{L}\\p{Nl}\\p{Nd}", true],
6815
6822
  "[:alpha:]": ["\\p{L}\\p{Nl}", true],
@@ -6918,12 +6925,15 @@ var parseClass = (glob3, position) => {
6918
6925
  return [comb, uflag, endPos - pos, true];
6919
6926
  };
6920
6927
 
6921
- // ../../node_modules/.pnpm/minimatch@10.0.3/node_modules/minimatch/dist/esm/unescape.js
6922
- var unescape = (s, { windowsPathsNoEscape = false } = {}) => {
6923
- return windowsPathsNoEscape ? s.replace(/\[([^\/\\])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1");
6928
+ // ../../node_modules/.pnpm/minimatch@10.1.1/node_modules/minimatch/dist/esm/unescape.js
6929
+ var unescape = (s, { windowsPathsNoEscape = false, magicalBraces = true } = {}) => {
6930
+ if (magicalBraces) {
6931
+ return windowsPathsNoEscape ? s.replace(/\[([^\/\\])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1");
6932
+ }
6933
+ return windowsPathsNoEscape ? s.replace(/\[([^\/\\{}])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^\/\\{}])\]/g, "$1$2").replace(/\\([^\/{}])/g, "$1");
6924
6934
  };
6925
6935
 
6926
- // ../../node_modules/.pnpm/minimatch@10.0.3/node_modules/minimatch/dist/esm/ast.js
6936
+ // ../../node_modules/.pnpm/minimatch@10.1.1/node_modules/minimatch/dist/esm/ast.js
6927
6937
  var types = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]);
6928
6938
  var isExtglobType = (c) => types.has(c);
6929
6939
  var startNoTraversal = "(?!(?:^|/)\\.\\.?(?:$|/))";
@@ -7274,7 +7284,7 @@ var AST = class _AST {
7274
7284
  if (this.#root === this)
7275
7285
  this.#fillNegs();
7276
7286
  if (!this.type) {
7277
- const noEmpty = this.isStart() && this.isEnd();
7287
+ const noEmpty = this.isStart() && this.isEnd() && !this.#parts.some((s) => typeof s !== "string");
7278
7288
  const src = this.#parts.map((p) => {
7279
7289
  const [re, _37, hasMagic, uflag] = typeof p === "string" ? _AST.#parseGlob(p, this.#hasMagic, noEmpty) : p.toRegExpSource(allowDot);
7280
7290
  this.#hasMagic = this.#hasMagic || hasMagic;
@@ -7384,10 +7394,7 @@ var AST = class _AST {
7384
7394
  }
7385
7395
  }
7386
7396
  if (c === "*") {
7387
- if (noEmpty && glob3 === "*")
7388
- re += starNoEmpty;
7389
- else
7390
- re += star;
7397
+ re += noEmpty && glob3 === "*" ? starNoEmpty : star;
7391
7398
  hasMagic = true;
7392
7399
  continue;
7393
7400
  }
@@ -7402,12 +7409,15 @@ var AST = class _AST {
7402
7409
  }
7403
7410
  };
7404
7411
 
7405
- // ../../node_modules/.pnpm/minimatch@10.0.3/node_modules/minimatch/dist/esm/escape.js
7406
- var escape = (s, { windowsPathsNoEscape = false } = {}) => {
7412
+ // ../../node_modules/.pnpm/minimatch@10.1.1/node_modules/minimatch/dist/esm/escape.js
7413
+ var escape = (s, { windowsPathsNoEscape = false, magicalBraces = false } = {}) => {
7414
+ if (magicalBraces) {
7415
+ return windowsPathsNoEscape ? s.replace(/[?*()[\]{}]/g, "[$&]") : s.replace(/[?*()[\]\\{}]/g, "\\$&");
7416
+ }
7407
7417
  return windowsPathsNoEscape ? s.replace(/[?*()[\]]/g, "[$&]") : s.replace(/[?*()[\]\\]/g, "\\$&");
7408
7418
  };
7409
7419
 
7410
- // ../../node_modules/.pnpm/minimatch@10.0.3/node_modules/minimatch/dist/esm/index.js
7420
+ // ../../node_modules/.pnpm/minimatch@10.1.1/node_modules/minimatch/dist/esm/index.js
7411
7421
  var minimatch = (p, pattern, options = {}) => {
7412
7422
  assertValidPattern(pattern);
7413
7423
  if (!options.nocomment && pattern.charAt(0) === "#") {
@@ -8044,16 +8054,27 @@ var Minimatch = class {
8044
8054
  pp[i] = twoStar;
8045
8055
  }
8046
8056
  } else if (next === void 0) {
8047
- pp[i - 1] = prev + "(?:\\/|" + twoStar + ")?";
8057
+ pp[i - 1] = prev + "(?:\\/|\\/" + twoStar + ")?";
8048
8058
  } else if (next !== GLOBSTAR) {
8049
8059
  pp[i - 1] = prev + "(?:\\/|\\/" + twoStar + "\\/)" + next;
8050
8060
  pp[i + 1] = GLOBSTAR;
8051
8061
  }
8052
8062
  });
8053
- return pp.filter((p) => p !== GLOBSTAR).join("/");
8063
+ const filtered = pp.filter((p) => p !== GLOBSTAR);
8064
+ if (this.partial && filtered.length >= 1) {
8065
+ const prefixes = [];
8066
+ for (let i = 1; i <= filtered.length; i++) {
8067
+ prefixes.push(filtered.slice(0, i).join("/"));
8068
+ }
8069
+ return "(?:" + prefixes.join("|") + ")";
8070
+ }
8071
+ return filtered.join("/");
8054
8072
  }).join("|");
8055
8073
  const [open3, close] = set.length > 1 ? ["(?:", ")"] : ["", ""];
8056
8074
  re = "^" + open3 + re + close + "$";
8075
+ if (this.partial) {
8076
+ re = "^(?:\\/|" + open3 + re.slice(1, -1) + close + ")$";
8077
+ }
8057
8078
  if (this.negate)
8058
8079
  re = "^(?!" + re + ").+$";
8059
8080
  try {
@@ -13381,7 +13402,7 @@ function validateParams2(i18nConfig, flags) {
13381
13402
 
13382
13403
  // src/cli/cmd/may-the-fourth.ts
13383
13404
  import { Command as Command21 } from "interactive-commander";
13384
- import * as cp from "node:child_process";
13405
+ import * as cp from "child_process";
13385
13406
  import figlet2 from "figlet";
13386
13407
  import chalk16 from "chalk";
13387
13408
  import { vice as vice2 } from "gradient-string";
@@ -13461,7 +13482,7 @@ async function renderHero2() {
13461
13482
  // package.json
13462
13483
  var package_default = {
13463
13484
  name: "lingo.dev",
13464
- version: "0.116.4",
13485
+ version: "0.117.0",
13465
13486
  description: "Lingo.dev CLI",
13466
13487
  private: false,
13467
13488
  publishConfig: {
@@ -13583,126 +13604,126 @@ var package_default = {
13583
13604
  author: "",
13584
13605
  license: "Apache-2.0",
13585
13606
  dependencies: {
13586
- "@ai-sdk/anthropic": "^1.2.11",
13587
- "@ai-sdk/google": "^1.2.19",
13588
- "@ai-sdk/mistral": "^1.2.8",
13589
- "@ai-sdk/openai": "^1.3.22",
13590
- "@babel/generator": "^7.27.1",
13591
- "@babel/parser": "^7.27.1",
13592
- "@babel/traverse": "^7.27.4",
13593
- "@babel/types": "^7.27.1",
13594
- "@biomejs/js-api": "^3.0.0",
13595
- "@biomejs/wasm-nodejs": "^2.2.4",
13596
- "@datocms/cma-client-node": "^4.0.1",
13597
- "@gitbeaker/rest": "^39.34.3",
13598
- "@inkjs/ui": "^2.0.0",
13599
- "@inquirer/prompts": "^7.8.0",
13607
+ "@ai-sdk/anthropic": "1.2.11",
13608
+ "@ai-sdk/google": "1.2.19",
13609
+ "@ai-sdk/mistral": "1.2.8",
13610
+ "@ai-sdk/openai": "1.3.22",
13611
+ "@babel/generator": "7.28.5",
13612
+ "@babel/parser": "7.28.5",
13613
+ "@babel/traverse": "7.28.5",
13614
+ "@babel/types": "7.28.5",
13615
+ "@biomejs/js-api": "3.0.0",
13616
+ "@biomejs/wasm-nodejs": "2.3.7",
13617
+ "@datocms/cma-client-node": "4.0.1",
13618
+ "@gitbeaker/rest": "39.34.3",
13619
+ "@inkjs/ui": "2.0.0",
13620
+ "@inquirer/prompts": "7.8.0",
13600
13621
  "@lingo.dev/_compiler": "workspace:*",
13601
13622
  "@lingo.dev/_locales": "workspace:*",
13602
13623
  "@lingo.dev/_react": "workspace:*",
13603
13624
  "@lingo.dev/_sdk": "workspace:*",
13604
13625
  "@lingo.dev/_spec": "workspace:*",
13605
- "@markdoc/markdoc": "^0.5.4",
13606
- "@modelcontextprotocol/sdk": "^1.5.0",
13607
- "@openrouter/ai-sdk-provider": "^0.7.1",
13608
- "@paralleldrive/cuid2": "^2.2.2",
13609
- "@types/ejs": "^3.1.5",
13610
- ai: "^4.3.15",
13611
- bitbucket: "^2.12.0",
13612
- chalk: "^5.4.1",
13613
- chokidar: "^4.0.3",
13614
- "cli-progress": "^3.12.0",
13615
- "cli-table3": "^0.6.5",
13616
- cors: "^2.8.5",
13617
- "csv-parse": "^5.6.0",
13618
- "csv-stringify": "^6.5.2",
13619
- "date-fns": "^4.1.0",
13620
- dedent: "^1.5.3",
13621
- diff: "^7.0.0",
13622
- dotenv: "^16.4.7",
13623
- ejs: "^3.1.10",
13624
- express: "^5.1.0",
13625
- "external-editor": "^3.1.0",
13626
- figlet: "^1.8.2",
13627
- flat: "^6.0.1",
13628
- "gettext-parser": "^8.0.0",
13629
- glob: "<11.0.0",
13630
- "gradient-string": "^3.0.0",
13631
- "gray-matter": "^4.0.3",
13632
- ini: "^5.0.0",
13633
- ink: "^4.2.0",
13634
- "ink-progress-bar": "^3.0.0",
13635
- "ink-spinner": "^5.0.0",
13636
- inquirer: "^12.6.0",
13637
- "interactive-commander": "^0.5.194",
13638
- "is-url": "^1.2.4",
13639
- jsdom: "^25.0.1",
13640
- json5: "^2.2.3",
13641
- "jsonc-parser": "^3.3.1",
13642
- jsonrepair: "^3.11.2",
13643
- listr2: "^8.3.2",
13644
- lodash: "^4.17.21",
13645
- marked: "^15.0.6",
13646
- "mdast-util-from-markdown": "^2.0.2",
13647
- "mdast-util-gfm": "^3.1.0",
13648
- "micromark-extension-gfm": "^3.0.0",
13649
- "node-machine-id": "^1.1.12",
13650
- "node-webvtt": "^1.9.4",
13651
- "object-hash": "^3.0.0",
13652
- octokit: "^4.0.2",
13653
- "ollama-ai-provider": "^1.2.0",
13654
- open: "^10.2.0",
13655
- ora: "^8.1.1",
13656
- "p-limit": "^6.2.0",
13657
- "php-array-reader": "^2.1.2",
13658
- plist: "^3.1.0",
13659
- "posthog-node": "^5.8.1",
13660
- prettier: "^3.6.2",
13661
- react: "^18.3.1",
13662
- "rehype-stringify": "^10.0.1",
13663
- "remark-disable-tokenizers": "^1.1.1",
13664
- "remark-frontmatter": "^5.0.0",
13665
- "remark-gfm": "^4.0.1",
13666
- "remark-mdx": "^3.1.0",
13667
- "remark-mdx-frontmatter": "^5.1.0",
13668
- "remark-parse": "^11.0.0",
13669
- "remark-rehype": "^11.1.2",
13670
- "remark-stringify": "^11.0.0",
13671
- sax: "^1.4.1",
13672
- "srt-parser-2": "^1.2.3",
13673
- unified: "^11.0.5",
13674
- "unist-util-visit": "^5.0.0",
13675
- vfile: "^6.0.3",
13676
- xliff: "^6.2.1",
13677
- xml2js: "^0.6.2",
13678
- xpath: "^0.0.34",
13679
- yaml: "^2.7.0",
13680
- zod: "^3.25.76"
13626
+ "@markdoc/markdoc": "0.5.4",
13627
+ "@modelcontextprotocol/sdk": "1.22.0",
13628
+ "@openrouter/ai-sdk-provider": "0.7.1",
13629
+ "@paralleldrive/cuid2": "2.2.2",
13630
+ "@types/ejs": "3.1.5",
13631
+ ai: "4.3.15",
13632
+ bitbucket: "2.12.0",
13633
+ chalk: "5.6.2",
13634
+ chokidar: "4.0.3",
13635
+ "cli-progress": "3.12.0",
13636
+ "cli-table3": "0.6.5",
13637
+ cors: "2.8.5",
13638
+ "csv-parse": "5.6.0",
13639
+ "csv-stringify": "6.6.0",
13640
+ "date-fns": "4.1.0",
13641
+ dedent: "1.7.0",
13642
+ diff: "7.0.0",
13643
+ dotenv: "16.4.7",
13644
+ ejs: "3.1.10",
13645
+ express: "5.1.0",
13646
+ "external-editor": "3.1.0",
13647
+ figlet: "1.9.4",
13648
+ flat: "6.0.1",
13649
+ "gettext-parser": "8.0.0",
13650
+ glob: "11.1.0",
13651
+ "gradient-string": "3.0.0",
13652
+ "gray-matter": "4.0.3",
13653
+ ini: "5.0.0",
13654
+ ink: "4.2.0",
13655
+ "ink-progress-bar": "3.0.0",
13656
+ "ink-spinner": "5.0.0",
13657
+ inquirer: "12.6.0",
13658
+ "interactive-commander": "0.5.194",
13659
+ "is-url": "1.2.4",
13660
+ jsdom: "25.0.1",
13661
+ json5: "2.2.3",
13662
+ "jsonc-parser": "3.3.1",
13663
+ jsonrepair: "3.13.1",
13664
+ listr2: "8.3.2",
13665
+ lodash: "4.17.21",
13666
+ marked: "15.0.6",
13667
+ "mdast-util-from-markdown": "2.0.2",
13668
+ "mdast-util-gfm": "3.1.0",
13669
+ "micromark-extension-gfm": "3.0.0",
13670
+ "node-machine-id": "1.1.12",
13671
+ "node-webvtt": "1.9.4",
13672
+ "object-hash": "3.0.0",
13673
+ octokit: "4.0.2",
13674
+ "ollama-ai-provider": "1.2.0",
13675
+ open: "10.2.0",
13676
+ ora: "8.1.1",
13677
+ "p-limit": "6.2.0",
13678
+ "php-array-reader": "2.1.2",
13679
+ plist: "3.1.0",
13680
+ "posthog-node": "5.14.0",
13681
+ prettier: "3.6.2",
13682
+ react: "19.2.0",
13683
+ "rehype-stringify": "10.0.1",
13684
+ "remark-disable-tokenizers": "1.1.1",
13685
+ "remark-frontmatter": "5.0.0",
13686
+ "remark-gfm": "4.0.1",
13687
+ "remark-mdx": "3.1.1",
13688
+ "remark-mdx-frontmatter": "5.2.0",
13689
+ "remark-parse": "11.0.0",
13690
+ "remark-rehype": "11.1.2",
13691
+ "remark-stringify": "11.0.0",
13692
+ sax: "1.4.3",
13693
+ "srt-parser-2": "1.2.3",
13694
+ unified: "11.0.5",
13695
+ "unist-util-visit": "5.0.0",
13696
+ vfile: "6.0.3",
13697
+ xliff: "6.2.2",
13698
+ xml2js: "0.6.2",
13699
+ xpath: "0.0.34",
13700
+ yaml: "2.8.1",
13701
+ zod: "3.25.76"
13681
13702
  },
13682
13703
  devDependencies: {
13683
- "@types/babel__generator": "^7.27.0",
13684
- "@types/chokidar": "^2.1.7",
13685
- "@types/cli-progress": "^3.11.6",
13686
- "@types/cors": "^2.8.17",
13687
- "@types/diff": "^7.0.0",
13688
- "@types/express": "^5.0.3",
13689
- "@types/figlet": "^1.7.0",
13690
- "@types/gettext-parser": "^4.0.4",
13691
- "@types/glob": "^8.1.0",
13692
- "@types/ini": "^4.1.1",
13693
- "@types/is-url": "^1.2.32",
13694
- "@types/jsdom": "^21.1.7",
13695
- "@types/lodash": "^4.17.16",
13696
- "@types/mdast": "^4.0.4",
13697
- "@types/node": "^22.10.2",
13698
- "@types/node-gettext": "^3.0.6",
13699
- "@types/object-hash": "^3.0.6",
13700
- "@types/plist": "^3.0.5",
13701
- "@types/react": "^18.3.20",
13702
- "@types/xml2js": "^0.4.14",
13703
- tsup: "^8.3.5",
13704
- typescript: "^5.8.3",
13705
- vitest: "^3.1.2"
13704
+ "@types/babel__generator": "7.27.0",
13705
+ "@types/chokidar": "2.1.7",
13706
+ "@types/cli-progress": "3.11.6",
13707
+ "@types/cors": "2.8.19",
13708
+ "@types/diff": "7.0.0",
13709
+ "@types/express": "5.0.5",
13710
+ "@types/figlet": "1.7.0",
13711
+ "@types/gettext-parser": "4.0.4",
13712
+ "@types/glob": "8.1.0",
13713
+ "@types/ini": "4.1.1",
13714
+ "@types/is-url": "1.2.32",
13715
+ "@types/jsdom": "21.1.7",
13716
+ "@types/lodash": "4.17.21",
13717
+ "@types/mdast": "4.0.4",
13718
+ "@types/node": "22.10.2",
13719
+ "@types/node-gettext": "3.0.6",
13720
+ "@types/object-hash": "3.0.6",
13721
+ "@types/plist": "3.0.5",
13722
+ "@types/react": "19.2.7",
13723
+ "@types/xml2js": "0.4.14",
13724
+ tsup: "8.5.1",
13725
+ typescript: "5.9.3",
13726
+ vitest: "3.1.2"
13706
13727
  },
13707
13728
  engines: {
13708
13729
  node: ">=18"