@lingo.dev/_compiler 0.1.5 → 0.1.6
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.cjs +7 -4
- package/build/index.mjs +6 -3
- package/package.json +1 -1
package/build/index.cjs
CHANGED
|
@@ -4,7 +4,7 @@ var _unplugin = require('unplugin');
|
|
|
4
4
|
// package.json
|
|
5
5
|
var package_default = {
|
|
6
6
|
name: "@lingo.dev/_compiler",
|
|
7
|
-
version: "0.1.
|
|
7
|
+
version: "0.1.6",
|
|
8
8
|
description: "Lingo.dev Compiler",
|
|
9
9
|
private: false,
|
|
10
10
|
publishConfig: {
|
|
@@ -1513,12 +1513,15 @@ var LCPServer = (_class = class {
|
|
|
1513
1513
|
const files = _lodash2.default.call(void 0, fileNames).map((fileName) => {
|
|
1514
1514
|
const sourceFile = _lodash2.default.get(sourceDictionary.files, fileName);
|
|
1515
1515
|
const targetFile = _lodash2.default.get(targetDictionary.files, fileName);
|
|
1516
|
-
const entries = removeEmptyEntries ? _lodash2.default.pickBy(
|
|
1516
|
+
const entries = removeEmptyEntries ? _lodash2.default.pickBy(
|
|
1517
|
+
_optionalChain([sourceFile, 'optionalAccess', _38 => _38.entries]) || {},
|
|
1518
|
+
(value) => _optionalChain([String, 'call', _39 => _39(value || ""), 'optionalAccess', _40 => _40.trim, 'optionalCall', _41 => _41(), 'optionalAccess', _42 => _42.length]) > 0
|
|
1519
|
+
) : _optionalChain([sourceFile, 'optionalAccess', _43 => _43.entries]) || {};
|
|
1517
1520
|
return [
|
|
1518
1521
|
fileName,
|
|
1519
1522
|
{
|
|
1520
1523
|
...targetFile,
|
|
1521
|
-
entries: _lodash2.default.merge(_optionalChain([targetFile, 'optionalAccess',
|
|
1524
|
+
entries: _lodash2.default.merge(_optionalChain([targetFile, 'optionalAccess', _44 => _44.entries]) || {}, entries)
|
|
1522
1525
|
}
|
|
1523
1526
|
];
|
|
1524
1527
|
}).fromPairs().value();
|
|
@@ -1710,7 +1713,7 @@ function jsxFragmentMutation(payload) {
|
|
|
1710
1713
|
var jsxHtmlLangMutation = createCodeMutation((payload) => {
|
|
1711
1714
|
_traverse2.default.call(void 0, payload.ast, {
|
|
1712
1715
|
JSXElement: (path6) => {
|
|
1713
|
-
if (_optionalChain([getJsxElementName, 'call',
|
|
1716
|
+
if (_optionalChain([getJsxElementName, 'call', _45 => _45(path6), 'optionalAccess', _46 => _46.toLowerCase, 'call', _47 => _47()]) === "html") {
|
|
1714
1717
|
const mode = getModuleExecutionMode(payload.ast, payload.params.rsc);
|
|
1715
1718
|
const packagePath = mode === "client" ? "lingo.dev/react/client" /* ReactClient */ : "lingo.dev/react/rsc" /* ReactRSC */;
|
|
1716
1719
|
const lingoHtmlComponentImport = getOrCreateImport(payload.ast, {
|
package/build/index.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import { createUnplugin } from "unplugin";
|
|
|
4
4
|
// package.json
|
|
5
5
|
var package_default = {
|
|
6
6
|
name: "@lingo.dev/_compiler",
|
|
7
|
-
version: "0.1.
|
|
7
|
+
version: "0.1.6",
|
|
8
8
|
description: "Lingo.dev Compiler",
|
|
9
9
|
private: false,
|
|
10
10
|
publishConfig: {
|
|
@@ -1513,12 +1513,15 @@ var LCPServer = class {
|
|
|
1513
1513
|
const files = _7(fileNames).map((fileName) => {
|
|
1514
1514
|
const sourceFile = _7.get(sourceDictionary.files, fileName);
|
|
1515
1515
|
const targetFile = _7.get(targetDictionary.files, fileName);
|
|
1516
|
-
const entries = removeEmptyEntries ? _7.pickBy(
|
|
1516
|
+
const entries = removeEmptyEntries ? _7.pickBy(
|
|
1517
|
+
sourceFile?.entries || {},
|
|
1518
|
+
(value) => String(value || "")?.trim?.()?.length > 0
|
|
1519
|
+
) : sourceFile?.entries || {};
|
|
1517
1520
|
return [
|
|
1518
1521
|
fileName,
|
|
1519
1522
|
{
|
|
1520
1523
|
...targetFile,
|
|
1521
|
-
entries: _7.merge(targetFile?.entries, entries)
|
|
1524
|
+
entries: _7.merge(targetFile?.entries || {}, entries)
|
|
1522
1525
|
}
|
|
1523
1526
|
];
|
|
1524
1527
|
}).fromPairs().value();
|