lingo.dev 0.92.18 → 0.93.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/README.md +18 -123
- package/build/cli.cjs +74 -2
- package/build/cli.cjs.map +1 -1
- package/build/cli.mjs +74 -2
- package/build/cli.mjs.map +1 -1
- package/build/compiler.cjs +8 -0
- package/build/compiler.cjs.map +1 -0
- package/build/compiler.d.cts +2 -0
- package/build/compiler.d.ts +2 -0
- package/build/compiler.mjs +6 -0
- package/build/compiler.mjs.map +1 -0
- package/build/react/client.cjs +3 -0
- package/build/react/client.cjs.map +1 -0
- package/build/react/client.d.cts +1 -0
- package/build/react/client.d.ts +1 -0
- package/build/react/client.mjs +3 -0
- package/build/react/client.mjs.map +1 -0
- package/build/react/react-router.cjs +3 -0
- package/build/react/react-router.cjs.map +1 -0
- package/build/react/react-router.d.cts +1 -0
- package/build/react/react-router.d.ts +1 -0
- package/build/react/react-router.mjs +3 -0
- package/build/react/react-router.mjs.map +1 -0
- package/build/react/rsc.cjs +3 -0
- package/build/react/rsc.cjs.map +1 -0
- package/build/react/rsc.d.cts +1 -0
- package/build/react/rsc.d.ts +1 -0
- package/build/react/rsc.mjs +3 -0
- package/build/react/rsc.mjs.map +1 -0
- package/build/react.cjs +3 -0
- package/build/react.cjs.map +1 -0
- package/build/react.d.cts +1 -0
- package/build/react.d.ts +1 -0
- package/build/react.mjs +3 -0
- package/build/react.mjs.map +1 -0
- package/build/sdk.d.cts +5 -0
- package/build/sdk.d.ts +5 -0
- package/package.json +45 -3
package/build/cli.mjs
CHANGED
|
@@ -2311,10 +2311,11 @@ function createPoDataLoader(params) {
|
|
|
2311
2311
|
}
|
|
2312
2312
|
}
|
|
2313
2313
|
});
|
|
2314
|
-
|
|
2314
|
+
const updatedSection = gettextParser.po.compile(updatedPo, { foldLength: params.multiline ? 76 : false }).toString().replace(
|
|
2315
2315
|
[`msgid ""`, `msgstr "Content-Type: text/plain\\n"`].join("\n"),
|
|
2316
2316
|
""
|
|
2317
2317
|
).trim();
|
|
2318
|
+
return preserveCommentOrder(updatedSection, section);
|
|
2318
2319
|
}
|
|
2319
2320
|
return section.trim();
|
|
2320
2321
|
}).filter(Boolean).join("\n\n");
|
|
@@ -2354,6 +2355,35 @@ function createPoContentLoader() {
|
|
|
2354
2355
|
}
|
|
2355
2356
|
});
|
|
2356
2357
|
}
|
|
2358
|
+
function preserveCommentOrder(section, originalSection) {
|
|
2359
|
+
const sectionLines = section.split(/\r?\n/);
|
|
2360
|
+
const originalLines = originalSection.split(/\r?\n/);
|
|
2361
|
+
const isComment = (line) => line.trim().startsWith("#");
|
|
2362
|
+
const sectionComments = sectionLines.filter(isComment);
|
|
2363
|
+
const nonCommentLines = sectionLines.filter((line) => !isComment(line));
|
|
2364
|
+
if (sectionComments.length <= 1) {
|
|
2365
|
+
return section;
|
|
2366
|
+
}
|
|
2367
|
+
const originalCommentOrder = originalLines.filter(isComment);
|
|
2368
|
+
const commentMap = /* @__PURE__ */ new Map();
|
|
2369
|
+
for (const line of sectionComments) {
|
|
2370
|
+
commentMap.set(line.trim(), line);
|
|
2371
|
+
}
|
|
2372
|
+
const reorderedComments = [];
|
|
2373
|
+
for (const orig of originalCommentOrder) {
|
|
2374
|
+
const trimmed = orig.trim();
|
|
2375
|
+
if (commentMap.has(trimmed)) {
|
|
2376
|
+
reorderedComments.push(commentMap.get(trimmed));
|
|
2377
|
+
commentMap.delete(trimmed);
|
|
2378
|
+
}
|
|
2379
|
+
}
|
|
2380
|
+
for (const line of sectionComments) {
|
|
2381
|
+
if (!originalCommentOrder.some((orig) => orig.trim() === line.trim())) {
|
|
2382
|
+
reorderedComments.push(line);
|
|
2383
|
+
}
|
|
2384
|
+
}
|
|
2385
|
+
return [...reorderedComments, ...nonCommentLines].join("\n").replace(/\n{3,}/g, "\n\n").trim();
|
|
2386
|
+
}
|
|
2357
2387
|
|
|
2358
2388
|
// src/cli/loaders/xliff.ts
|
|
2359
2389
|
import xliff from "xliff";
|
|
@@ -6550,7 +6580,7 @@ async function renderHero() {
|
|
|
6550
6580
|
// package.json
|
|
6551
6581
|
var package_default = {
|
|
6552
6582
|
name: "lingo.dev",
|
|
6553
|
-
version: "0.
|
|
6583
|
+
version: "0.93.0",
|
|
6554
6584
|
description: "Lingo.dev CLI",
|
|
6555
6585
|
private: false,
|
|
6556
6586
|
publishConfig: {
|
|
@@ -6573,6 +6603,31 @@ var package_default = {
|
|
|
6573
6603
|
types: "./build/spec.d.ts",
|
|
6574
6604
|
import: "./build/spec.mjs",
|
|
6575
6605
|
require: "./build/spec.cjs"
|
|
6606
|
+
},
|
|
6607
|
+
"./compiler": {
|
|
6608
|
+
types: "./build/compiler.d.ts",
|
|
6609
|
+
import: "./build/compiler.mjs",
|
|
6610
|
+
require: "./build/compiler.cjs"
|
|
6611
|
+
},
|
|
6612
|
+
"./react": {
|
|
6613
|
+
types: "./build/react.d.ts",
|
|
6614
|
+
import: "./build/react.mjs",
|
|
6615
|
+
require: "./build/react.cjs"
|
|
6616
|
+
},
|
|
6617
|
+
"./react/client": {
|
|
6618
|
+
types: "./build/react/client.d.ts",
|
|
6619
|
+
import: "./build/react/client.mjs",
|
|
6620
|
+
require: "./build/react/client.cjs"
|
|
6621
|
+
},
|
|
6622
|
+
"./react/rsc": {
|
|
6623
|
+
types: "./build/react/rsc.d.ts",
|
|
6624
|
+
import: "./build/react/rsc.mjs",
|
|
6625
|
+
require: "./build/react/rsc.cjs"
|
|
6626
|
+
},
|
|
6627
|
+
"./react/react-router": {
|
|
6628
|
+
types: "./build/react/react-router.d.ts",
|
|
6629
|
+
import: "./build/react/react-router.mjs",
|
|
6630
|
+
require: "./build/react/react-router.cjs"
|
|
6576
6631
|
}
|
|
6577
6632
|
},
|
|
6578
6633
|
typesVersions: {
|
|
@@ -6585,6 +6640,21 @@ var package_default = {
|
|
|
6585
6640
|
],
|
|
6586
6641
|
spec: [
|
|
6587
6642
|
"./build/spec.d.ts"
|
|
6643
|
+
],
|
|
6644
|
+
compiler: [
|
|
6645
|
+
"./build/compiler.d.ts"
|
|
6646
|
+
],
|
|
6647
|
+
react: [
|
|
6648
|
+
"./build/react.d.ts"
|
|
6649
|
+
],
|
|
6650
|
+
"react/client": [
|
|
6651
|
+
"./build/react/client.d.ts"
|
|
6652
|
+
],
|
|
6653
|
+
"react/rsc": [
|
|
6654
|
+
"./build/react/rsc.d.ts"
|
|
6655
|
+
],
|
|
6656
|
+
"react/react-router": [
|
|
6657
|
+
"./build/react/react-router.d.ts"
|
|
6588
6658
|
]
|
|
6589
6659
|
}
|
|
6590
6660
|
},
|
|
@@ -6619,6 +6689,8 @@ var package_default = {
|
|
|
6619
6689
|
"@inquirer/prompts": "^7.4.1",
|
|
6620
6690
|
"@lingo.dev/_sdk": "workspace:*",
|
|
6621
6691
|
"@lingo.dev/_spec": "workspace:*",
|
|
6692
|
+
"@lingo.dev/_react": "workspace:*",
|
|
6693
|
+
"@lingo.dev/_compiler": "workspace:*",
|
|
6622
6694
|
"@modelcontextprotocol/sdk": "^1.5.0",
|
|
6623
6695
|
"@paralleldrive/cuid2": "^2.2.2",
|
|
6624
6696
|
ai: "^4.3.15",
|