@litsx/compiler 0.7.1 → 0.8.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/dist/authored-input.cjs +2 -1
- package/dist/authored-input.cjs.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/shared/{authored-input-BR-PbNgr.cjs → authored-input-C-rtcXFm.cjs} +7 -139
- package/dist/shared/authored-input-C-rtcXFm.cjs.map +1 -0
- package/package.json +5 -5
- package/src/authored-input.js +8 -137
- package/dist/shared/authored-input-BR-PbNgr.cjs.map +0 -1
package/dist/authored-input.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authored-input.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"authored-input.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
|
package/dist/index.cjs
CHANGED
|
@@ -14,7 +14,7 @@ var parser = require('@litsx/authoring/parser');
|
|
|
14
14
|
var typecheck = require('@litsx/typescript/typecheck');
|
|
15
15
|
var typescriptSession = require('@litsx/typescript-session');
|
|
16
16
|
var sourceMapJs = require('source-map-js');
|
|
17
|
-
var authoredInput = require('./shared/authored-input-
|
|
17
|
+
var authoredInput = require('./shared/authored-input-C-rtcXFm.cjs');
|
|
18
18
|
|
|
19
19
|
function _interopNamespaceDefault(e) {
|
|
20
20
|
var n = Object.create(null);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var babelParser = require('@babel/parser');
|
|
4
|
+
var authoring = require('@litsx/authoring');
|
|
4
5
|
var parser = require('@litsx/authoring/parser');
|
|
5
6
|
|
|
6
7
|
function _interopNamespaceDefault(e) {
|
|
@@ -89,142 +90,6 @@ function mergeLitsxWarnings(existingWarnings = [], additionalWarnings = [], cont
|
|
|
89
90
|
return merged;
|
|
90
91
|
}
|
|
91
92
|
|
|
92
|
-
function isNativeIntrinsicJsxName(nameNode) {
|
|
93
|
-
return nameNode?.type === "JSXIdentifier" && /^[a-z]/.test(nameNode.name);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
function collectNativeClassNameWarnings(ast) {
|
|
97
|
-
const warnings = [];
|
|
98
|
-
|
|
99
|
-
function visit(node, currentTagName = null) {
|
|
100
|
-
if (!node || typeof node !== "object") {
|
|
101
|
-
return;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
let nextTagName = currentTagName;
|
|
105
|
-
if (node.type === "JSXOpeningElement" && isNativeIntrinsicJsxName(node.name)) {
|
|
106
|
-
nextTagName = node.name.name;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
if (
|
|
110
|
-
node.type === "JSXAttribute" &&
|
|
111
|
-
nextTagName &&
|
|
112
|
-
node.name?.type === "JSXIdentifier" &&
|
|
113
|
-
node.name.name === "className"
|
|
114
|
-
) {
|
|
115
|
-
warnings.push({
|
|
116
|
-
code: "LITSX_NATIVE_CLASSNAME",
|
|
117
|
-
message:
|
|
118
|
-
'`className` is not native LitSX syntax. Use `class` in native LitSX, or add the React compatibility layer to rewrite `className`.',
|
|
119
|
-
attributeName: "className",
|
|
120
|
-
tagName: nextTagName,
|
|
121
|
-
line: node.name.loc?.start?.line ?? null,
|
|
122
|
-
column: node.name.loc?.start?.column ?? null,
|
|
123
|
-
});
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
for (const value of Object.values(node)) {
|
|
127
|
-
if (Array.isArray(value)) {
|
|
128
|
-
value.forEach((child) => visit(child, nextTagName));
|
|
129
|
-
} else {
|
|
130
|
-
visit(value, nextTagName);
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
visit(ast.program ?? ast, null);
|
|
136
|
-
return warnings;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
function collectReactMemoWarnings(ast) {
|
|
140
|
-
const warnings = [];
|
|
141
|
-
const reactMemoLocalNames = new Set();
|
|
142
|
-
const reactNamespaceNames = new Set();
|
|
143
|
-
|
|
144
|
-
const body = ast?.program?.body ?? ast?.body ?? [];
|
|
145
|
-
for (const node of body) {
|
|
146
|
-
if (node?.type !== "ImportDeclaration" || node.source?.value !== "react") {
|
|
147
|
-
continue;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
for (const specifier of node.specifiers || []) {
|
|
151
|
-
if (
|
|
152
|
-
specifier?.type === "ImportSpecifier" &&
|
|
153
|
-
specifier.imported?.type === "Identifier" &&
|
|
154
|
-
specifier.imported.name === "memo" &&
|
|
155
|
-
specifier.local?.type === "Identifier"
|
|
156
|
-
) {
|
|
157
|
-
reactMemoLocalNames.add(specifier.local.name);
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
if (
|
|
161
|
-
(specifier?.type === "ImportDefaultSpecifier" ||
|
|
162
|
-
specifier?.type === "ImportNamespaceSpecifier") &&
|
|
163
|
-
specifier.local?.type === "Identifier"
|
|
164
|
-
) {
|
|
165
|
-
reactNamespaceNames.add(specifier.local.name);
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
function addMemoWarnings(node) {
|
|
171
|
-
const line = node.loc?.start?.line ?? null;
|
|
172
|
-
const column = node.loc?.start?.column ?? null;
|
|
173
|
-
|
|
174
|
-
warnings.push({
|
|
175
|
-
code: 91016,
|
|
176
|
-
message:
|
|
177
|
-
"`memo(...)` is removed during LitSX lowering. LitSX does not use React-style parent re-render bailout semantics, so `memo` is treated as a migration wrapper only.",
|
|
178
|
-
line,
|
|
179
|
-
column,
|
|
180
|
-
});
|
|
181
|
-
|
|
182
|
-
if ((node.arguments || []).length > 1) {
|
|
183
|
-
warnings.push({
|
|
184
|
-
code: 91017,
|
|
185
|
-
message:
|
|
186
|
-
"`memo(Component, areEqual)` ignores the comparator during LitSX lowering because LitSX does not use React-style parent re-render bailout semantics.",
|
|
187
|
-
line,
|
|
188
|
-
column,
|
|
189
|
-
});
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
function visit(node) {
|
|
194
|
-
if (!node || typeof node !== "object") {
|
|
195
|
-
return;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
if (node.type === "CallExpression") {
|
|
199
|
-
const callee = node.callee;
|
|
200
|
-
const isImportedMemo =
|
|
201
|
-
callee?.type === "Identifier" && reactMemoLocalNames.has(callee.name);
|
|
202
|
-
const isNamespacedMemo =
|
|
203
|
-
callee?.type === "MemberExpression" &&
|
|
204
|
-
callee.computed === false &&
|
|
205
|
-
callee.object?.type === "Identifier" &&
|
|
206
|
-
reactNamespaceNames.has(callee.object.name) &&
|
|
207
|
-
callee.property?.type === "Identifier" &&
|
|
208
|
-
callee.property.name === "memo";
|
|
209
|
-
|
|
210
|
-
if (isImportedMemo || isNamespacedMemo) {
|
|
211
|
-
addMemoWarnings(node);
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
for (const value of Object.values(node)) {
|
|
216
|
-
if (Array.isArray(value)) {
|
|
217
|
-
value.forEach((child) => visit(child));
|
|
218
|
-
} else {
|
|
219
|
-
visit(value);
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
visit(ast.program ?? ast);
|
|
225
|
-
return warnings;
|
|
226
|
-
}
|
|
227
|
-
|
|
228
93
|
function normalizeParserPlugins(filename, parserPlugins = []) {
|
|
229
94
|
if (Array.isArray(parserPlugins) && parserPlugins.length > 0) {
|
|
230
95
|
return parserPlugins;
|
|
@@ -283,8 +148,11 @@ function prepareLitsxAuthoredInput(
|
|
|
283
148
|
});
|
|
284
149
|
const virtualization = parser.getLitsxVirtualizationMetadata(virtualizedAst);
|
|
285
150
|
const authoredWarnings = mergeLitsxWarnings(
|
|
286
|
-
collectNativeClassNameWarnings(virtualizedAst)
|
|
287
|
-
|
|
151
|
+
authoring.collectNativeClassNameWarnings(virtualizedAst).map((warning) => ({
|
|
152
|
+
...warning,
|
|
153
|
+
code: "LITSX_NATIVE_CLASSNAME",
|
|
154
|
+
})),
|
|
155
|
+
authoring.collectReactMemoWarnings(virtualizedAst),
|
|
288
156
|
{ filename }
|
|
289
157
|
);
|
|
290
158
|
const authoringPlugins = normalizePluginList(options.authoringPlugins);
|
|
@@ -322,4 +190,4 @@ function prepareLitsxAuthoredInput(
|
|
|
322
190
|
exports.ensureLitsxParserPlugins = ensureLitsxParserPlugins;
|
|
323
191
|
exports.mergeLitsxWarnings = mergeLitsxWarnings;
|
|
324
192
|
exports.prepareLitsxAuthoredInput = prepareLitsxAuthoredInput;
|
|
325
|
-
//# sourceMappingURL=authored-input-
|
|
193
|
+
//# sourceMappingURL=authored-input-C-rtcXFm.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authored-input-C-rtcXFm.cjs","sources":["../../src/warnings.js","../../src/authored-input.js"],"sourcesContent":["function normalizeLocationNumber(value) {\n return typeof value === \"number\" && Number.isFinite(value) ? value : null;\n}\n\nexport function normalizeLitsxWarning(warning, context = {}) {\n const normalized = warning && typeof warning === \"object\" ? { ...warning } : {};\n\n normalized.code =\n (typeof normalized.code === \"string\" && normalized.code !== \"\") ||\n (typeof normalized.code === \"number\" && Number.isFinite(normalized.code))\n ? normalized.code\n : null;\n normalized.message =\n typeof normalized.message === \"string\" && normalized.message !== \"\"\n ? normalized.message\n : \"LitSX emitted a warning during compilation.\";\n normalized.filename =\n typeof normalized.filename === \"string\" && normalized.filename !== \"\"\n ? normalized.filename\n : typeof context.filename === \"string\" && context.filename !== \"\"\n ? context.filename\n : null;\n normalized.line = normalizeLocationNumber(normalized.line);\n normalized.column = normalizeLocationNumber(normalized.column);\n normalized.attributeName =\n typeof normalized.attributeName === \"string\" && normalized.attributeName !== \"\"\n ? normalized.attributeName\n : null;\n normalized.tagName =\n typeof normalized.tagName === \"string\" && normalized.tagName !== \"\"\n ? normalized.tagName\n : null;\n normalized.propName =\n typeof normalized.propName === \"string\" && normalized.propName !== \"\"\n ? normalized.propName\n : null;\n\n return normalized;\n}\n\nexport function mergeLitsxWarnings(existingWarnings = [], additionalWarnings = [], context = {}) {\n const merged = [];\n const seen = new Set();\n\n for (const rawWarning of [...existingWarnings, ...additionalWarnings]) {\n const warning = normalizeLitsxWarning(rawWarning, context);\n const key = [\n warning.code ?? \"\",\n warning.attributeName ?? \"\",\n warning.tagName ?? \"\",\n warning.propName ?? \"\",\n warning.line ?? \"\",\n warning.column ?? \"\",\n warning.message ?? \"\",\n ].join(\":\");\n\n if (seen.has(key)) {\n continue;\n }\n\n seen.add(key);\n merged.push(warning);\n }\n\n return merged;\n}\n","import * as babelParser from \"@babel/parser\";\nimport {\n collectNativeClassNameWarnings,\n collectReactMemoWarnings,\n} from \"@litsx/authoring\";\nimport {\n getLitsxVirtualizationMetadata,\n parseWithLitsxVirtualization,\n} from \"@litsx/authoring/parser\";\nimport { mergeLitsxWarnings } from \"./warnings.js\";\n\nfunction normalizeParserPlugins(filename, parserPlugins = []) {\n if (Array.isArray(parserPlugins) && parserPlugins.length > 0) {\n return parserPlugins;\n }\n\n if (typeof filename === \"string\" && (\n filename.endsWith(\".tsx\") ||\n filename.endsWith(\".litsx\")\n )) {\n return [\"typescript\"];\n }\n\n return [];\n}\n\nfunction normalizePluginList(plugins) {\n return Array.isArray(plugins) ? plugins : [];\n}\n\nexport function ensureLitsxParserPlugins(filename, parserPlugins = [], { requireJsx = false } = {}) {\n const normalized = normalizeParserPlugins(filename, parserPlugins);\n if (!requireJsx) {\n return normalized;\n }\n\n const hasJsx = normalized.some((plugin) => {\n if (typeof plugin === \"string\") {\n return plugin === \"jsx\";\n }\n return Array.isArray(plugin) && plugin[0] === \"jsx\";\n });\n\n return hasJsx ? normalized : [...normalized, \"jsx\"];\n}\n\nexport function prepareLitsxAuthoredInput(\n source,\n options = {},\n runtime = {}\n) {\n const runtimeImpl = {\n parse: babelParser.parse,\n transformFromAstSync: null,\n ...runtime,\n };\n const filename = options.filename;\n const sourceMaps = options.sourceMaps === true;\n const parserPlugins = ensureLitsxParserPlugins(filename, options.parserPlugins, {\n requireJsx: options.requireJsx === true,\n });\n const virtualizedAst = parseWithLitsxVirtualization(runtimeImpl.parse, source, {\n sourceType: \"module\",\n plugins: parserPlugins,\n sourceFileName: filename,\n litsxSourceMap: sourceMaps,\n });\n const virtualization = getLitsxVirtualizationMetadata(virtualizedAst);\n const authoredWarnings = mergeLitsxWarnings(\n collectNativeClassNameWarnings(virtualizedAst).map((warning) => ({\n ...warning,\n code: \"LITSX_NATIVE_CLASSNAME\",\n })),\n collectReactMemoWarnings(virtualizedAst),\n { filename }\n );\n const authoringPlugins = normalizePluginList(options.authoringPlugins);\n\n let inputAst = virtualizedAst;\n if (authoringPlugins.length > 0) {\n if (typeof runtimeImpl.transformFromAstSync !== \"function\") {\n throw new Error(\n \"prepareLitsxAuthoredInput(...) requires runtime.transformFromAstSync when authoringPlugins are provided.\"\n );\n }\n\n const authoringPass = runtimeImpl.transformFromAstSync(virtualizedAst, source, {\n filename,\n sourceFileName: filename,\n configFile: false,\n babelrc: false,\n ast: true,\n code: false,\n sourceMaps: false,\n plugins: authoringPlugins,\n });\n\n inputAst = authoringPass?.ast ?? virtualizedAst;\n }\n\n return {\n filename,\n virtualization,\n inputAst,\n authoredWarnings,\n };\n}\n"],"names":["babelParser","parseWithLitsxVirtualization","getLitsxVirtualizationMetadata","collectNativeClassNameWarnings","collectReactMemoWarnings"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,uBAAuB,CAAC,KAAK,EAAE;AACxC,EAAE,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,KAAK,GAAG,IAAI;AAC3E;;AAEO,SAAS,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,EAAE,EAAE;AAC7D,EAAE,MAAM,UAAU,GAAG,OAAO,IAAI,OAAO,OAAO,KAAK,QAAQ,GAAG,EAAE,GAAG,O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B,CAAC,cAAc,EAAE,MAAM,EAAE;AACnF,MAAM,QAAQ;AACd,MAAM,cAAc,EAAE,QAAQ;AAC9B,MAAM,UAAU,EAAE,KAAK;AACvB,MAAM,OAAO,EAAE,KAAK;AACpB,MAAM,GAAG,EAAE,IAAI;AACf,MAAM,IAAI,EAAE,KAAK;AACjB,MAAM,UAAU,EAAE,KAAK;AACvB,MAAM,OAAO,EAAE,gBAAgB;AAC/B,KAAK,CAAC;;AAEN,IAAI,QAAQ,GAAG,aAAa,EAAE,GAAG,IAAI,cAAc;AACnD,EAAE;;AAEF,EAAE,OAAO;AACT,IAAI,QAAQ;AACZ,IAAI,cAAc;AAClB,IAAI,QAAQ;AACZ,IAAI,gBAAgB;AACpB,GAAG;AACH;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@litsx/compiler",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "Build-facing LitSX compilation facade with correct parser and sourcemap handling",
|
|
5
5
|
"author": "LitSX Team",
|
|
6
6
|
"type": "module",
|
|
@@ -52,10 +52,10 @@
|
|
|
52
52
|
"@babel/parser": "^7.29.3",
|
|
53
53
|
"@babel/plugin-transform-typescript": "^7.28.5",
|
|
54
54
|
"@babel/types": "^7.29.0",
|
|
55
|
-
"@litsx/authoring": "^0.
|
|
56
|
-
"@litsx/babel-plugin-transform-jsx-html-template": "^0.3.
|
|
57
|
-
"@litsx/babel-preset-litsx": "^0.
|
|
58
|
-
"@litsx/typescript": "^0.
|
|
55
|
+
"@litsx/authoring": "^0.5.0",
|
|
56
|
+
"@litsx/babel-plugin-transform-jsx-html-template": "^0.3.5",
|
|
57
|
+
"@litsx/babel-preset-litsx": "^0.8.0",
|
|
58
|
+
"@litsx/typescript": "^0.7.0",
|
|
59
59
|
"@litsx/typescript-session": "^0.2.1",
|
|
60
60
|
"source-map-js": "^1.2.1"
|
|
61
61
|
},
|
package/src/authored-input.js
CHANGED
|
@@ -1,146 +1,14 @@
|
|
|
1
1
|
import * as babelParser from "@babel/parser";
|
|
2
|
+
import {
|
|
3
|
+
collectNativeClassNameWarnings,
|
|
4
|
+
collectReactMemoWarnings,
|
|
5
|
+
} from "@litsx/authoring";
|
|
2
6
|
import {
|
|
3
7
|
getLitsxVirtualizationMetadata,
|
|
4
8
|
parseWithLitsxVirtualization,
|
|
5
9
|
} from "@litsx/authoring/parser";
|
|
6
10
|
import { mergeLitsxWarnings } from "./warnings.js";
|
|
7
11
|
|
|
8
|
-
function isNativeIntrinsicJsxName(nameNode) {
|
|
9
|
-
return nameNode?.type === "JSXIdentifier" && /^[a-z]/.test(nameNode.name);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
function collectNativeClassNameWarnings(ast) {
|
|
13
|
-
const warnings = [];
|
|
14
|
-
|
|
15
|
-
function visit(node, currentTagName = null) {
|
|
16
|
-
if (!node || typeof node !== "object") {
|
|
17
|
-
return;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
let nextTagName = currentTagName;
|
|
21
|
-
if (node.type === "JSXOpeningElement" && isNativeIntrinsicJsxName(node.name)) {
|
|
22
|
-
nextTagName = node.name.name;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
if (
|
|
26
|
-
node.type === "JSXAttribute" &&
|
|
27
|
-
nextTagName &&
|
|
28
|
-
node.name?.type === "JSXIdentifier" &&
|
|
29
|
-
node.name.name === "className"
|
|
30
|
-
) {
|
|
31
|
-
warnings.push({
|
|
32
|
-
code: "LITSX_NATIVE_CLASSNAME",
|
|
33
|
-
message:
|
|
34
|
-
'`className` is not native LitSX syntax. Use `class` in native LitSX, or add the React compatibility layer to rewrite `className`.',
|
|
35
|
-
attributeName: "className",
|
|
36
|
-
tagName: nextTagName,
|
|
37
|
-
line: node.name.loc?.start?.line ?? null,
|
|
38
|
-
column: node.name.loc?.start?.column ?? null,
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
for (const value of Object.values(node)) {
|
|
43
|
-
if (Array.isArray(value)) {
|
|
44
|
-
value.forEach((child) => visit(child, nextTagName));
|
|
45
|
-
} else {
|
|
46
|
-
visit(value, nextTagName);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
visit(ast.program ?? ast, null);
|
|
52
|
-
return warnings;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
function collectReactMemoWarnings(ast) {
|
|
56
|
-
const warnings = [];
|
|
57
|
-
const reactMemoLocalNames = new Set();
|
|
58
|
-
const reactNamespaceNames = new Set();
|
|
59
|
-
|
|
60
|
-
const body = ast?.program?.body ?? ast?.body ?? [];
|
|
61
|
-
for (const node of body) {
|
|
62
|
-
if (node?.type !== "ImportDeclaration" || node.source?.value !== "react") {
|
|
63
|
-
continue;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
for (const specifier of node.specifiers || []) {
|
|
67
|
-
if (
|
|
68
|
-
specifier?.type === "ImportSpecifier" &&
|
|
69
|
-
specifier.imported?.type === "Identifier" &&
|
|
70
|
-
specifier.imported.name === "memo" &&
|
|
71
|
-
specifier.local?.type === "Identifier"
|
|
72
|
-
) {
|
|
73
|
-
reactMemoLocalNames.add(specifier.local.name);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
if (
|
|
77
|
-
(specifier?.type === "ImportDefaultSpecifier" ||
|
|
78
|
-
specifier?.type === "ImportNamespaceSpecifier") &&
|
|
79
|
-
specifier.local?.type === "Identifier"
|
|
80
|
-
) {
|
|
81
|
-
reactNamespaceNames.add(specifier.local.name);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
function addMemoWarnings(node) {
|
|
87
|
-
const line = node.loc?.start?.line ?? null;
|
|
88
|
-
const column = node.loc?.start?.column ?? null;
|
|
89
|
-
|
|
90
|
-
warnings.push({
|
|
91
|
-
code: 91016,
|
|
92
|
-
message:
|
|
93
|
-
"`memo(...)` is removed during LitSX lowering. LitSX does not use React-style parent re-render bailout semantics, so `memo` is treated as a migration wrapper only.",
|
|
94
|
-
line,
|
|
95
|
-
column,
|
|
96
|
-
});
|
|
97
|
-
|
|
98
|
-
if ((node.arguments || []).length > 1) {
|
|
99
|
-
warnings.push({
|
|
100
|
-
code: 91017,
|
|
101
|
-
message:
|
|
102
|
-
"`memo(Component, areEqual)` ignores the comparator during LitSX lowering because LitSX does not use React-style parent re-render bailout semantics.",
|
|
103
|
-
line,
|
|
104
|
-
column,
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
function visit(node) {
|
|
110
|
-
if (!node || typeof node !== "object") {
|
|
111
|
-
return;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
if (node.type === "CallExpression") {
|
|
115
|
-
const callee = node.callee;
|
|
116
|
-
const isImportedMemo =
|
|
117
|
-
callee?.type === "Identifier" && reactMemoLocalNames.has(callee.name);
|
|
118
|
-
const isNamespacedMemo =
|
|
119
|
-
callee?.type === "MemberExpression" &&
|
|
120
|
-
callee.computed === false &&
|
|
121
|
-
callee.object?.type === "Identifier" &&
|
|
122
|
-
reactNamespaceNames.has(callee.object.name) &&
|
|
123
|
-
callee.property?.type === "Identifier" &&
|
|
124
|
-
callee.property.name === "memo";
|
|
125
|
-
|
|
126
|
-
if (isImportedMemo || isNamespacedMemo) {
|
|
127
|
-
addMemoWarnings(node);
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
for (const value of Object.values(node)) {
|
|
132
|
-
if (Array.isArray(value)) {
|
|
133
|
-
value.forEach((child) => visit(child));
|
|
134
|
-
} else {
|
|
135
|
-
visit(value);
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
visit(ast.program ?? ast);
|
|
141
|
-
return warnings;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
12
|
function normalizeParserPlugins(filename, parserPlugins = []) {
|
|
145
13
|
if (Array.isArray(parserPlugins) && parserPlugins.length > 0) {
|
|
146
14
|
return parserPlugins;
|
|
@@ -199,7 +67,10 @@ export function prepareLitsxAuthoredInput(
|
|
|
199
67
|
});
|
|
200
68
|
const virtualization = getLitsxVirtualizationMetadata(virtualizedAst);
|
|
201
69
|
const authoredWarnings = mergeLitsxWarnings(
|
|
202
|
-
collectNativeClassNameWarnings(virtualizedAst)
|
|
70
|
+
collectNativeClassNameWarnings(virtualizedAst).map((warning) => ({
|
|
71
|
+
...warning,
|
|
72
|
+
code: "LITSX_NATIVE_CLASSNAME",
|
|
73
|
+
})),
|
|
203
74
|
collectReactMemoWarnings(virtualizedAst),
|
|
204
75
|
{ filename }
|
|
205
76
|
);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"authored-input-BR-PbNgr.cjs","sources":["../../src/warnings.js","../../src/authored-input.js"],"sourcesContent":["function normalizeLocationNumber(value) {\n return typeof value === \"number\" && Number.isFinite(value) ? value : null;\n}\n\nexport function normalizeLitsxWarning(warning, context = {}) {\n const normalized = warning && typeof warning === \"object\" ? { ...warning } : {};\n\n normalized.code =\n (typeof normalized.code === \"string\" && normalized.code !== \"\") ||\n (typeof normalized.code === \"number\" && Number.isFinite(normalized.code))\n ? normalized.code\n : null;\n normalized.message =\n typeof normalized.message === \"string\" && normalized.message !== \"\"\n ? normalized.message\n : \"LitSX emitted a warning during compilation.\";\n normalized.filename =\n typeof normalized.filename === \"string\" && normalized.filename !== \"\"\n ? normalized.filename\n : typeof context.filename === \"string\" && context.filename !== \"\"\n ? context.filename\n : null;\n normalized.line = normalizeLocationNumber(normalized.line);\n normalized.column = normalizeLocationNumber(normalized.column);\n normalized.attributeName =\n typeof normalized.attributeName === \"string\" && normalized.attributeName !== \"\"\n ? normalized.attributeName\n : null;\n normalized.tagName =\n typeof normalized.tagName === \"string\" && normalized.tagName !== \"\"\n ? normalized.tagName\n : null;\n normalized.propName =\n typeof normalized.propName === \"string\" && normalized.propName !== \"\"\n ? normalized.propName\n : null;\n\n return normalized;\n}\n\nexport function mergeLitsxWarnings(existingWarnings = [], additionalWarnings = [], context = {}) {\n const merged = [];\n const seen = new Set();\n\n for (const rawWarning of [...existingWarnings, ...additionalWarnings]) {\n const warning = normalizeLitsxWarning(rawWarning, context);\n const key = [\n warning.code ?? \"\",\n warning.attributeName ?? \"\",\n warning.tagName ?? \"\",\n warning.propName ?? \"\",\n warning.line ?? \"\",\n warning.column ?? \"\",\n warning.message ?? \"\",\n ].join(\":\");\n\n if (seen.has(key)) {\n continue;\n }\n\n seen.add(key);\n merged.push(warning);\n }\n\n return merged;\n}\n","import * as babelParser from \"@babel/parser\";\nimport {\n getLitsxVirtualizationMetadata,\n parseWithLitsxVirtualization,\n} from \"@litsx/authoring/parser\";\nimport { mergeLitsxWarnings } from \"./warnings.js\";\n\nfunction isNativeIntrinsicJsxName(nameNode) {\n return nameNode?.type === \"JSXIdentifier\" && /^[a-z]/.test(nameNode.name);\n}\n\nfunction collectNativeClassNameWarnings(ast) {\n const warnings = [];\n\n function visit(node, currentTagName = null) {\n if (!node || typeof node !== \"object\") {\n return;\n }\n\n let nextTagName = currentTagName;\n if (node.type === \"JSXOpeningElement\" && isNativeIntrinsicJsxName(node.name)) {\n nextTagName = node.name.name;\n }\n\n if (\n node.type === \"JSXAttribute\" &&\n nextTagName &&\n node.name?.type === \"JSXIdentifier\" &&\n node.name.name === \"className\"\n ) {\n warnings.push({\n code: \"LITSX_NATIVE_CLASSNAME\",\n message:\n '`className` is not native LitSX syntax. Use `class` in native LitSX, or add the React compatibility layer to rewrite `className`.',\n attributeName: \"className\",\n tagName: nextTagName,\n line: node.name.loc?.start?.line ?? null,\n column: node.name.loc?.start?.column ?? null,\n });\n }\n\n for (const value of Object.values(node)) {\n if (Array.isArray(value)) {\n value.forEach((child) => visit(child, nextTagName));\n } else {\n visit(value, nextTagName);\n }\n }\n }\n\n visit(ast.program ?? ast, null);\n return warnings;\n}\n\nfunction collectReactMemoWarnings(ast) {\n const warnings = [];\n const reactMemoLocalNames = new Set();\n const reactNamespaceNames = new Set();\n\n const body = ast?.program?.body ?? ast?.body ?? [];\n for (const node of body) {\n if (node?.type !== \"ImportDeclaration\" || node.source?.value !== \"react\") {\n continue;\n }\n\n for (const specifier of node.specifiers || []) {\n if (\n specifier?.type === \"ImportSpecifier\" &&\n specifier.imported?.type === \"Identifier\" &&\n specifier.imported.name === \"memo\" &&\n specifier.local?.type === \"Identifier\"\n ) {\n reactMemoLocalNames.add(specifier.local.name);\n }\n\n if (\n (specifier?.type === \"ImportDefaultSpecifier\" ||\n specifier?.type === \"ImportNamespaceSpecifier\") &&\n specifier.local?.type === \"Identifier\"\n ) {\n reactNamespaceNames.add(specifier.local.name);\n }\n }\n }\n\n function addMemoWarnings(node) {\n const line = node.loc?.start?.line ?? null;\n const column = node.loc?.start?.column ?? null;\n\n warnings.push({\n code: 91016,\n message:\n \"`memo(...)` is removed during LitSX lowering. LitSX does not use React-style parent re-render bailout semantics, so `memo` is treated as a migration wrapper only.\",\n line,\n column,\n });\n\n if ((node.arguments || []).length > 1) {\n warnings.push({\n code: 91017,\n message:\n \"`memo(Component, areEqual)` ignores the comparator during LitSX lowering because LitSX does not use React-style parent re-render bailout semantics.\",\n line,\n column,\n });\n }\n }\n\n function visit(node) {\n if (!node || typeof node !== \"object\") {\n return;\n }\n\n if (node.type === \"CallExpression\") {\n const callee = node.callee;\n const isImportedMemo =\n callee?.type === \"Identifier\" && reactMemoLocalNames.has(callee.name);\n const isNamespacedMemo =\n callee?.type === \"MemberExpression\" &&\n callee.computed === false &&\n callee.object?.type === \"Identifier\" &&\n reactNamespaceNames.has(callee.object.name) &&\n callee.property?.type === \"Identifier\" &&\n callee.property.name === \"memo\";\n\n if (isImportedMemo || isNamespacedMemo) {\n addMemoWarnings(node);\n }\n }\n\n for (const value of Object.values(node)) {\n if (Array.isArray(value)) {\n value.forEach((child) => visit(child));\n } else {\n visit(value);\n }\n }\n }\n\n visit(ast.program ?? ast);\n return warnings;\n}\n\nfunction normalizeParserPlugins(filename, parserPlugins = []) {\n if (Array.isArray(parserPlugins) && parserPlugins.length > 0) {\n return parserPlugins;\n }\n\n if (typeof filename === \"string\" && (\n filename.endsWith(\".tsx\") ||\n filename.endsWith(\".litsx\")\n )) {\n return [\"typescript\"];\n }\n\n return [];\n}\n\nfunction normalizePluginList(plugins) {\n return Array.isArray(plugins) ? plugins : [];\n}\n\nexport function ensureLitsxParserPlugins(filename, parserPlugins = [], { requireJsx = false } = {}) {\n const normalized = normalizeParserPlugins(filename, parserPlugins);\n if (!requireJsx) {\n return normalized;\n }\n\n const hasJsx = normalized.some((plugin) => {\n if (typeof plugin === \"string\") {\n return plugin === \"jsx\";\n }\n return Array.isArray(plugin) && plugin[0] === \"jsx\";\n });\n\n return hasJsx ? normalized : [...normalized, \"jsx\"];\n}\n\nexport function prepareLitsxAuthoredInput(\n source,\n options = {},\n runtime = {}\n) {\n const runtimeImpl = {\n parse: babelParser.parse,\n transformFromAstSync: null,\n ...runtime,\n };\n const filename = options.filename;\n const sourceMaps = options.sourceMaps === true;\n const parserPlugins = ensureLitsxParserPlugins(filename, options.parserPlugins, {\n requireJsx: options.requireJsx === true,\n });\n const virtualizedAst = parseWithLitsxVirtualization(runtimeImpl.parse, source, {\n sourceType: \"module\",\n plugins: parserPlugins,\n sourceFileName: filename,\n litsxSourceMap: sourceMaps,\n });\n const virtualization = getLitsxVirtualizationMetadata(virtualizedAst);\n const authoredWarnings = mergeLitsxWarnings(\n collectNativeClassNameWarnings(virtualizedAst),\n collectReactMemoWarnings(virtualizedAst),\n { filename }\n );\n const authoringPlugins = normalizePluginList(options.authoringPlugins);\n\n let inputAst = virtualizedAst;\n if (authoringPlugins.length > 0) {\n if (typeof runtimeImpl.transformFromAstSync !== \"function\") {\n throw new Error(\n \"prepareLitsxAuthoredInput(...) requires runtime.transformFromAstSync when authoringPlugins are provided.\"\n );\n }\n\n const authoringPass = runtimeImpl.transformFromAstSync(virtualizedAst, source, {\n filename,\n sourceFileName: filename,\n configFile: false,\n babelrc: false,\n ast: true,\n code: false,\n sourceMaps: false,\n plugins: authoringPlugins,\n });\n\n inputAst = authoringPass?.ast ?? virtualizedAst;\n }\n\n return {\n filename,\n virtualization,\n inputAst,\n authoredWarnings,\n };\n}\n"],"names":["babelParser","parseWithLitsxVirtualization","getLitsxVirtualizationMetadata"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,uBAAuB,CAAC,KAAK,EAAE;AACxC,EAAE,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,KAAK,GAAG,IAAI;AAC3E;;AAEO,SAAS,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,EAAE,EAAE;AAC7D,EAAE,MAAM,UAAU,GAAG,OAAO,IAAI,OAAO,OAAO,KAAK,QAAQ,GAAG,EAAE,GAAG,OAAO,EAAE,GAAG,EAAE;;AAEjF,EAAE,UAAU,CAAC,IAAI;AACjB,IAAI,CAAC,OAAO,UAAU,CAAC,IAAI,KAAK,QAAQ,IAAI,UAAU,CAAC,IAAI,KAAK,EAAE;AAClE,KAAK,OAAO,UAAU,CAAC,IAAI,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC;AAC5E,QAAQ,UAAU,CAAC;AACnB,QAAQ,IAAI;AACZ,EAAE,UAAU,CAAC,OAAO;AACpB,IAAI,OAAO,UAAU,CAAC,OAAO,KAAK,QAAQ,IAAI,UAAU,CAAC,OAAO,KAAK;AACrE,QAAQ,UAAU,CAAC;AACnB,QAAQ,6CAA6C;AACrD,EAAE,UAAU,CAAC,QAAQ;AACrB,IAAI,OAAO,UAAU,CAAC,QAAQ,KAAK,QAAQ,IAAI,UAAU,CAAC,QAAQ,KAAK;AACvE,QAAQ,UAAU,CAAC;AACnB,QAAQ,OAAO,OAAO,CAAC,QAAQ,KAA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