lingo.dev 0.78.7 → 0.78.8

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
@@ -1573,10 +1573,10 @@ function createMarkdownLoader() {
1573
1573
  yaml: yamlEngine
1574
1574
  }
1575
1575
  });
1576
- const sections = content.split(SECTION_REGEX).map((section) => section.trim()).filter(Boolean);
1576
+ const sections = content.split(SECTION_REGEX).map((section) => section?.trim() ?? "").filter(Boolean);
1577
1577
  return {
1578
1578
  ...Object.fromEntries(
1579
- sections.map((section, index) => [`${MD_SECTION_PREFIX}${index}`, section.trim()]).filter(([, section]) => Boolean(section))
1579
+ sections.map((section, index) => [`${MD_SECTION_PREFIX}${index}`, section]).filter(([, section]) => Boolean(section))
1580
1580
  ),
1581
1581
  ...Object.fromEntries(Object.entries(frontmatter).map(([key, value]) => [`${FM_ATTR_PREFIX}${key}`, value]))
1582
1582
  };
@@ -1585,7 +1585,7 @@ function createMarkdownLoader() {
1585
1585
  const frontmatter = Object.fromEntries(
1586
1586
  Object.entries(data).filter(([key]) => key.startsWith(FM_ATTR_PREFIX)).map(([key, value]) => [key.replace(FM_ATTR_PREFIX, ""), value])
1587
1587
  );
1588
- let content = Object.entries(data).filter(([key]) => key.startsWith(MD_SECTION_PREFIX)).sort(([a], [b]) => Number(a.split("-").pop()) - Number(b.split("-").pop())).map(([, value]) => value.trim()).filter(Boolean).join("\n\n");
1588
+ let content = Object.entries(data).filter(([key]) => key.startsWith(MD_SECTION_PREFIX)).sort(([a], [b]) => Number(a.split("-").pop()) - Number(b.split("-").pop())).map(([, value]) => value?.trim() ?? "").filter(Boolean).join("\n\n");
1589
1589
  if (Object.keys(frontmatter).length > 0) {
1590
1590
  content = `
1591
1591
  ${content}`;
@@ -3896,7 +3896,7 @@ var mcp_default = new Command9().command("mcp").description("Use Lingo.dev model
3896
3896
  // package.json
3897
3897
  var package_default = {
3898
3898
  name: "lingo.dev",
3899
- version: "0.78.7",
3899
+ version: "0.78.8",
3900
3900
  description: "Lingo.dev CLI",
3901
3901
  private: false,
3902
3902
  publishConfig: {