@litsx/compiler 0.8.1 → 0.8.3
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/index.cjs +4 -0
- package/dist/index.cjs.map +1 -1
- package/package.json +2 -2
- package/src/index.js +4 -0
package/dist/index.cjs
CHANGED
|
@@ -300,6 +300,7 @@ function createCompilerCaches() {
|
|
|
300
300
|
sourceFeatures: new Map(),
|
|
301
301
|
authoredInput: new Map(),
|
|
302
302
|
importedModuleAnalyses: new Map(),
|
|
303
|
+
importedHookModuleAnalyses: new Map(),
|
|
303
304
|
resolvedImports: new Map(),
|
|
304
305
|
presetPluginsByOptions: {
|
|
305
306
|
default: new Map(),
|
|
@@ -333,6 +334,7 @@ function createLitsxCompilationSession(sessionOptions = {}) {
|
|
|
333
334
|
sourceFeaturesCache: caches.sourceFeatures,
|
|
334
335
|
authoredInputCache: caches.authoredInput,
|
|
335
336
|
importedModuleAnalysisCache: caches.importedModuleAnalyses,
|
|
337
|
+
importedHookModuleAnalysisCache: caches.importedHookModuleAnalyses,
|
|
336
338
|
resolvedImportCache: caches.resolvedImports,
|
|
337
339
|
transform(source, options = {}) {
|
|
338
340
|
return transformLitsx(source, {
|
|
@@ -360,6 +362,7 @@ function createLitsxCompilationSession(sessionOptions = {}) {
|
|
|
360
362
|
this.sourceFeaturesCache.clear();
|
|
361
363
|
this.authoredInputCache.clear();
|
|
362
364
|
this.importedModuleAnalysisCache.clear();
|
|
365
|
+
this.importedHookModuleAnalysisCache.clear();
|
|
363
366
|
this.resolvedImportCache.clear();
|
|
364
367
|
this.typescriptSession?.invalidate?.({ host: true });
|
|
365
368
|
return;
|
|
@@ -378,6 +381,7 @@ function createLitsxCompilationSession(sessionOptions = {}) {
|
|
|
378
381
|
}
|
|
379
382
|
}
|
|
380
383
|
this.importedModuleAnalysisCache.delete(normalizedFile);
|
|
384
|
+
this.importedHookModuleAnalysisCache.delete(normalizedFile);
|
|
381
385
|
for (const key of [...this.resolvedImportCache.keys()]) {
|
|
382
386
|
if (key.startsWith(`${normalizedFile}::`)) {
|
|
383
387
|
this.resolvedImportCache.delete(key);
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../src/index.js"],"sourcesContent":["import babelCore from \"@babel/core\";\nimport * as babelParser from \"@babel/parser\";\nimport * as babelTypes from \"@babel/types\";\nimport transformTypescript from \"@babel/plugin-transform-typescript\";\nimport transformJsxHtmlTemplate from \"@litsx/babel-plugin-transform-jsx-html-template\";\nimport { decodeVirtualAttributeName } from \"@litsx/authoring\";\nimport {\n createLitsxPresetPlugins,\n detectLitsxSourceFeatures,\n} from \"@litsx/babel-preset-litsx\";\nimport { ensureTypescriptModule } from \"@litsx/babel-preset-litsx/internal/transform-litsx-properties\";\nimport { parseWithLitsxVirtualization } from \"@litsx/authoring/parser\";\nimport { createLitsxTypecheckSession } from \"@litsx/typescript/typecheck\";\nimport {\n createStandaloneTsSession,\n normalizeFilePath,\n} from \"@litsx/typescript-session\";\nimport { SourceMapConsumer } from \"source-map-js\";\nimport {\n patchLitAttributeSourcemap,\n} from \"@litsx/babel-plugin-transform-jsx-html-template\";\nimport {\n ensureLitsxParserPlugins,\n prepareLitsxAuthoredInput,\n} from \"./authored-input.js\";\nimport { mergeLitsxWarnings } from \"./warnings.js\";\nexport {\n ensureLitsxParserPlugins,\n prepareLitsxAuthoredInput,\n} from \"./authored-input.js\";\n\nconst { transformFromAstAsync, transformFromAstSync } = babelCore;\nconst PROFILE_ENABLED = process.env.LITSX_PROFILE === \"1\";\nconst PRESET_PLUGIN_CACHE = new WeakMap();\nconst DEFAULT_PRESET_PLUGIN_CACHE = new Map();\n\nfunction createStandaloneTsCompilerOptions(ts) {\n return {\n target: ts.ScriptTarget.ESNext,\n module: ts.ModuleKind.ESNext,\n moduleResolution: ts.ModuleResolutionKind.Bundler,\n jsx: ts.JsxEmit.Preserve,\n allowJs: true,\n checkJs: false,\n skipLibCheck: true,\n strict: false,\n esModuleInterop: true,\n allowSyntheticDefaultImports: true,\n types: [],\n };\n}\n\nfunction getSourceFeaturesCacheKey(sourceFeatures) {\n if (!sourceFeatures) {\n return \"all\";\n }\n\n return [\n sourceFeatures.hooks ? \"1\" : \"0\",\n sourceFeatures.domRefs ? \"1\" : \"0\",\n sourceFeatures.scopedElements ? \"1\" : \"0\",\n ].join(\"\");\n}\n\nfunction profilePhase(name, callback, profile = null) {\n if (!PROFILE_ENABLED) {\n return callback();\n }\n\n const start = performance.now();\n try {\n return callback();\n } finally {\n const durationMs = performance.now() - start;\n if (profile) {\n profile.push({ name, durationMs });\n }\n if (PROFILE_ENABLED) {\n globalThis.__litsxProfileEvents ??= [];\n globalThis.__litsxProfileEvents.push({\n namespace: \"compiler\",\n name,\n durationMs,\n });\n }\n }\n}\n\nfunction normalizePluginList(plugins) {\n return Array.isArray(plugins) ? plugins : [];\n}\n\nfunction shouldStripTypescriptSyntax(filename = \"\") {\n return /\\.(?:ts|tsx|litsx)$/.test(filename) || filename.endsWith(\".litsx.jsx\");\n}\n\nfunction reparseTemplateLoweringAst(source, options = {}) {\n return parseWithLitsxVirtualization(babelParser.parse, source, {\n sourceType: \"module\",\n plugins: ensureLitsxParserPlugins(\n options.filename,\n options.parserPlugins,\n { requireJsx: true },\n ),\n sourceFileName: options.filename,\n litsxSourceMap: false,\n });\n}\n\nfunction collectAuthoredTemplateAttributeMappings(\n node,\n mappings = [],\n options = {},\n) {\n if (!node || typeof node !== \"object\") {\n return mappings;\n }\n\n if (node.type === \"JSXElement\") {\n for (const attr of node.openingElement?.attributes || []) {\n if (attr?.type !== \"JSXAttribute\") {\n continue;\n }\n\n const rawName = decodeVirtualAttributeName(attr.name.name) ?? attr.name.name;\n const prefix = rawName[0];\n const generatedName =\n prefix === \".\" || prefix === \"@\" || prefix === \"?\"\n ? `${prefix}${rawName.slice(1)}`\n : rawName;\n const sourceLocation = attr.name?.loc ?? attr.loc ?? null;\n\n mappings.push({\n generatedNeedle: attr.value\n ? ` ${generatedName}=`\n : ` ${generatedName}`,\n generatedOffset: 1,\n source: sourceLocation?.filename ?? options.sourceFileName ?? null,\n line: sourceLocation?.start?.line ?? null,\n column: sourceLocation?.start?.column ?? null,\n });\n }\n }\n\n const visitorKeys = babelTypes.VISITOR_KEYS?.[node.type];\n if (!visitorKeys) {\n return mappings;\n }\n\n for (const key of visitorKeys) {\n const value = node[key];\n if (Array.isArray(value)) {\n for (const child of value) {\n collectAuthoredTemplateAttributeMappings(child, mappings, options);\n }\n continue;\n }\n\n collectAuthoredTemplateAttributeMappings(value, mappings, options);\n }\n\n return mappings;\n}\n\nfunction remapTemplateAttributeMappings(mappings = [], inputSourceMap = null) {\n if (!Array.isArray(mappings) || mappings.length === 0 || !inputSourceMap) {\n return mappings;\n }\n\n const consumer = new SourceMapConsumer(inputSourceMap);\n\n try {\n return mappings.map((mapping) => {\n if (!mapping?.source || mapping.line == null || mapping.column == null) {\n return mapping;\n }\n\n const original = consumer.originalPositionFor({\n line: mapping.line,\n column: mapping.column,\n });\n\n if (original.source == null || original.line == null || original.column == null) {\n return mapping;\n }\n\n return {\n ...mapping,\n source: original.source,\n line: original.line,\n column: original.column,\n };\n });\n } finally {\n consumer.destroy?.();\n }\n}\n\nfunction mergeTemplateLoweringMetadata(\n firstPassMetadata = {},\n secondPassMetadata = {},\n firstPassMap = null,\n authoredTemplateAttributeMappings = [],\n) {\n const remappedTemplateAttributeMappings = remapTemplateAttributeMappings(\n secondPassMetadata.litsxTemplateAttributeMappings || [],\n firstPassMap,\n );\n const templateAttributeMappings =\n authoredTemplateAttributeMappings.length > 0\n ? authoredTemplateAttributeMappings\n : remappedTemplateAttributeMappings;\n\n return {\n ...firstPassMetadata,\n ...secondPassMetadata,\n ...(templateAttributeMappings.length > 0\n ? { litsxTemplateAttributeMappings: templateAttributeMappings }\n : {}),\n };\n}\n\nfunction getStandaloneTsSessionKey(filename = \"\", ts = ensureTypescriptModule()) {\n const normalizedFilename = normalizeFilePath(filename);\n const directory = normalizedFilename ? normalizedFilename.slice(0, normalizedFilename.lastIndexOf(\"/\")) || \"/\" : \"/\";\n return JSON.stringify({\n directory,\n compilerOptions: createStandaloneTsCompilerOptions(ts),\n });\n}\n\nfunction getMemoizedPresetPlugins(options, sourceFeatures = null, session = null) {\n const featureKey = getSourceFeaturesCacheKey(sourceFeatures);\n if (session) {\n const cache = session.presetPluginsByOptions;\n const optionsKey = options && typeof options === \"object\" ? options : null;\n\n if (!optionsKey) {\n if (!cache.default.has(featureKey)) {\n cache.default.set(featureKey, createLitsxPresetPlugins({}, sourceFeatures));\n }\n return cache.default.get(featureKey);\n }\n\n let cachedPluginsByFeature = cache.byOptions.get(optionsKey);\n if (!cachedPluginsByFeature) {\n cachedPluginsByFeature = new Map();\n cache.byOptions.set(optionsKey, cachedPluginsByFeature);\n }\n\n const cachedPlugins = cachedPluginsByFeature.get(featureKey);\n if (cachedPlugins) {\n return cachedPlugins;\n }\n\n const plugins = createLitsxPresetPlugins(options, sourceFeatures);\n cachedPluginsByFeature.set(featureKey, plugins);\n return plugins;\n }\n\n if (!options || typeof options !== \"object\") {\n if (!DEFAULT_PRESET_PLUGIN_CACHE.has(featureKey)) {\n DEFAULT_PRESET_PLUGIN_CACHE.set(\n featureKey,\n createLitsxPresetPlugins({}, sourceFeatures),\n );\n }\n return DEFAULT_PRESET_PLUGIN_CACHE.get(featureKey);\n }\n\n let cachedPluginsByFeature = PRESET_PLUGIN_CACHE.get(options);\n if (!cachedPluginsByFeature) {\n cachedPluginsByFeature = new Map();\n PRESET_PLUGIN_CACHE.set(options, cachedPluginsByFeature);\n }\n\n const cachedPlugins = cachedPluginsByFeature.get(featureKey);\n if (cachedPlugins) {\n return cachedPlugins;\n }\n\n const plugins = createLitsxPresetPlugins(options, sourceFeatures);\n cachedPluginsByFeature.set(featureKey, plugins);\n return plugins;\n}\n\nfunction getSessionFeatureCacheKey(source, options = {}) {\n return `${options.filename || \"\"}:${source}`;\n}\n\nfunction createCompilerCaches() {\n return {\n sourceFeatures: new Map(),\n authoredInput: new Map(),\n importedModuleAnalyses: new Map(),\n resolvedImports: new Map(),\n presetPluginsByOptions: {\n default: new Map(),\n byOptions: new WeakMap(),\n },\n };\n}\n\nfunction createStandaloneCompilerTsSession(options = {}) {\n const typescriptModule = options.typescriptModule || ensureTypescriptModule();\n return createStandaloneTsSession({\n sessionKey: getStandaloneTsSessionKey(options.filename, typescriptModule),\n typescript: typescriptModule,\n compilerOptions: createStandaloneTsCompilerOptions(typescriptModule),\n });\n}\n\nexport function createLitsxCompilationSession(sessionOptions = {}) {\n const caches = createCompilerCaches();\n const session = {\n projectPath: sessionOptions.projectPath || null,\n transformOptions: sessionOptions.transformOptions || {},\n typescriptSession:\n sessionOptions.projectPath\n ? createLitsxTypecheckSession([\"--project\", sessionOptions.projectPath]).projectSession\n : createStandaloneCompilerTsSession({\n filename: sessionOptions.transformOptions?.filename,\n typescriptModule: sessionOptions.typescriptModule,\n }),\n presetPluginsByOptions: caches.presetPluginsByOptions,\n sourceFeaturesCache: caches.sourceFeatures,\n authoredInputCache: caches.authoredInput,\n importedModuleAnalysisCache: caches.importedModuleAnalyses,\n resolvedImportCache: caches.resolvedImports,\n transform(source, options = {}) {\n return transformLitsx(source, {\n ...this.transformOptions,\n ...options,\n typescriptSession: this.typescriptSession,\n __litsxCompilationSession: this,\n });\n },\n transformSync(source, options = {}) {\n return transformLitsxSync(source, {\n ...this.transformOptions,\n ...options,\n typescriptSession: this.typescriptSession,\n __litsxCompilationSession: this,\n });\n },\n getTypecheckSession(rawArgs = this.projectPath ? [\"--project\", this.projectPath] : []) {\n return createLitsxTypecheckSession(rawArgs, {\n projectSession: this.typescriptSession,\n });\n },\n invalidate(files = null) {\n if (!files || files.length === 0) {\n this.sourceFeaturesCache.clear();\n this.authoredInputCache.clear();\n this.importedModuleAnalysisCache.clear();\n this.resolvedImportCache.clear();\n this.typescriptSession?.invalidate?.({ host: true });\n return;\n }\n\n for (const file of files) {\n const normalizedFile = normalizeFilePath(file);\n for (const key of [...this.sourceFeaturesCache.keys()]) {\n if (key.startsWith(`${normalizedFile}:`)) {\n this.sourceFeaturesCache.delete(key);\n }\n }\n for (const key of [...this.authoredInputCache.keys()]) {\n if (key.startsWith(`${normalizedFile}:`)) {\n this.authoredInputCache.delete(key);\n }\n }\n this.importedModuleAnalysisCache.delete(normalizedFile);\n for (const key of [...this.resolvedImportCache.keys()]) {\n if (key.startsWith(`${normalizedFile}::`)) {\n this.resolvedImportCache.delete(key);\n }\n }\n if (/\\.(jsx|tsx|js|ts|litsx)$/.test(file) || file.endsWith(\".litsx.jsx\")) {\n this.typescriptSession?.invalidate?.();\n }\n }\n },\n dispose() {\n this.invalidate();\n this.typescriptSession?.clearOverlayFiles?.();\n this.typescriptSession = null;\n },\n };\n return session;\n}\n\nexport function createLitsxTransformConfig(source, options = {}) {\n const profile = PROFILE_ENABLED ? [] : null;\n const compilationSession = options.__litsxCompilationSession || null;\n const memoizationOptions = options.__litsxMemoizeOptions || options;\n const featureCacheKey = getSessionFeatureCacheKey(source, options);\n const sourceFeatures = profilePhase(\n \"feature-detection\",\n () => {\n if (compilationSession?.sourceFeaturesCache?.has(featureCacheKey)) {\n return compilationSession.sourceFeaturesCache.get(featureCacheKey);\n }\n const detected = detectLitsxSourceFeatures(source, options);\n compilationSession?.sourceFeaturesCache?.set(featureCacheKey, detected);\n return detected;\n },\n profile,\n );\n const authoredInputCacheKey = featureCacheKey;\n const { filename, virtualization, inputAst, authoredWarnings } = profilePhase(\n \"authored-input\",\n () => {\n if (compilationSession?.authoredInputCache?.has(authoredInputCacheKey)) {\n return compilationSession.authoredInputCache.get(authoredInputCacheKey);\n }\n const prepared = prepareLitsxAuthoredInput(\n source,\n options,\n {\n transformFromAstSync,\n }\n );\n compilationSession?.authoredInputCache?.set(authoredInputCacheKey, prepared);\n return prepared;\n },\n profile,\n );\n const shouldRunFinalTemplatePass = options.jsxTemplate !== false;\n const outputPlugins = normalizePluginList(options.outputPlugins);\n const presetOptions = shouldRunFinalTemplatePass\n ? {\n ...memoizationOptions,\n jsxTemplate: false,\n }\n : memoizationOptions;\n const presetPlugins = profilePhase(\n \"preset-plugins\",\n () => getMemoizedPresetPlugins(presetOptions, sourceFeatures, compilationSession),\n profile,\n );\n\n const finalTemplatePlugins = shouldRunFinalTemplatePass\n ? [\n ...(options.jsxTemplateOptions && Object.keys(options.jsxTemplateOptions).length > 0\n ? [[transformJsxHtmlTemplate, options.jsxTemplateOptions]]\n : [transformJsxHtmlTemplate]),\n ...outputPlugins,\n ...(shouldStripTypescriptSyntax(filename)\n ? [[transformTypescript, { isTSX: true, allowDeclareFields: true }]]\n : []),\n ]\n : [];\n const authoredTemplateAttributeMappings =\n shouldRunFinalTemplatePass && options.sourceMaps === true\n ? collectAuthoredTemplateAttributeMappings(inputAst.program, [], {\n sourceFileName: filename,\n })\n : [];\n\n return {\n filename,\n inputAst,\n authoredWarnings,\n profile,\n shouldRunFinalTemplatePass,\n finalTemplatePlugins,\n authoredTemplateAttributeMappings,\n babelOptions: {\n filename,\n sourceFileName: filename,\n configFile: false,\n babelrc: false,\n inputSourceMap:\n options.sourceMaps === true ? virtualization?.map ?? undefined : undefined,\n sourceMaps: options.sourceMaps === true,\n plugins: shouldRunFinalTemplatePass\n ? [...presetPlugins]\n : [\n ...presetPlugins,\n ...outputPlugins,\n ...(shouldStripTypescriptSyntax(filename)\n ? [[transformTypescript, { isTSX: true, allowDeclareFields: true }]]\n : []),\n ],\n },\n };\n}\n\nfunction finalizeTransformResult(result, options, authoredWarnings = [], profile = []) {\n if (!result) {\n return {\n code: \"\",\n map: null,\n metadata: profile?.length > 0 ? { litsxProfile: profile } : {},\n };\n }\n\n const metadata = {\n ...(result.metadata || {}),\n };\n const mergedWarnings = mergeLitsxWarnings(\n metadata.litsxWarnings || [],\n authoredWarnings,\n { filename: options.filename }\n );\n if (mergedWarnings.length > 0) {\n metadata.litsxWarnings = mergedWarnings;\n }\n if (profile?.length > 0) {\n metadata.litsxProfile = profile;\n }\n const templateAttributeMappings = metadata.litsxTemplateAttributeMappings || [];\n const map =\n options.sourceMaps === true\n ? options.jsxTemplate === false\n ? result.map ?? null\n : templateAttributeMappings.length === 0\n ? result.map ?? null\n : profilePhase(\n \"sourcemap-patching\",\n () => patchLitAttributeSourcemap(\n result.code || \"\",\n result.map ?? null,\n templateAttributeMappings,\n ),\n profile,\n )\n : null;\n\n return {\n code: result.code || \"\",\n map,\n metadata,\n };\n}\n\nexport async function transformLitsx(source, options = {}) {\n if (!options.__litsxCompilationSession) {\n const standaloneTsSession = createStandaloneCompilerTsSession({\n filename: options.filename,\n });\n const nextOptions = {\n ...options,\n typescriptSession: standaloneTsSession,\n __litsxMemoizeOptions: options,\n };\n const {\n inputAst,\n babelOptions,\n shouldRunFinalTemplatePass,\n finalTemplatePlugins,\n authoredTemplateAttributeMappings,\n authoredWarnings,\n profile,\n } = createLitsxTransformConfig(source, nextOptions);\n const firstPassResult = await profilePhase(\n \"babel-transform\",\n () => transformFromAstAsync(inputAst, source, {\n ...babelOptions,\n ast: shouldRunFinalTemplatePass,\n plugins: babelOptions.plugins,\n }),\n profile,\n );\n const result = shouldRunFinalTemplatePass\n ? await profilePhase(\n \"template-lowering\",\n async () => {\n const reparsedTemplateAst = reparseTemplateLoweringAst(\n firstPassResult?.code ?? source,\n nextOptions,\n );\n const secondPassResult = await transformFromAstAsync(\n reparsedTemplateAst,\n firstPassResult?.code ?? source,\n {\n filename: babelOptions.filename,\n sourceFileName: babelOptions.sourceFileName,\n configFile: false,\n babelrc: false,\n inputSourceMap:\n options.sourceMaps === true ? firstPassResult?.map ?? undefined : undefined,\n sourceMaps: options.sourceMaps === true,\n plugins: finalTemplatePlugins,\n }\n );\n\n return {\n ...secondPassResult,\n metadata: mergeTemplateLoweringMetadata(\n firstPassResult?.metadata || {},\n secondPassResult?.metadata || {},\n firstPassResult?.map ?? null,\n authoredTemplateAttributeMappings,\n ),\n };\n },\n profile,\n )\n : firstPassResult;\n return finalizeTransformResult(result, nextOptions, authoredWarnings, profile);\n }\n\n const {\n inputAst,\n babelOptions,\n shouldRunFinalTemplatePass,\n finalTemplatePlugins,\n authoredTemplateAttributeMappings,\n authoredWarnings,\n profile,\n } = createLitsxTransformConfig(source, options);\n const firstPassResult = await profilePhase(\n \"babel-transform\",\n () => transformFromAstAsync(inputAst, source, {\n ...babelOptions,\n ast: shouldRunFinalTemplatePass,\n plugins: babelOptions.plugins,\n }),\n profile,\n );\n const result = shouldRunFinalTemplatePass\n ? await profilePhase(\n \"template-lowering\",\n async () => {\n const reparsedTemplateAst = reparseTemplateLoweringAst(\n firstPassResult?.code ?? source,\n options,\n );\n const secondPassResult = await transformFromAstAsync(\n reparsedTemplateAst,\n firstPassResult?.code ?? source,\n {\n filename: babelOptions.filename,\n sourceFileName: babelOptions.sourceFileName,\n configFile: false,\n babelrc: false,\n inputSourceMap:\n options.sourceMaps === true ? firstPassResult?.map ?? undefined : undefined,\n sourceMaps: options.sourceMaps === true,\n plugins: finalTemplatePlugins,\n }\n );\n\n return {\n ...secondPassResult,\n metadata: mergeTemplateLoweringMetadata(\n firstPassResult?.metadata || {},\n secondPassResult?.metadata || {},\n firstPassResult?.map ?? null,\n authoredTemplateAttributeMappings,\n ),\n };\n },\n profile,\n )\n : firstPassResult;\n return finalizeTransformResult(result, options, authoredWarnings, profile);\n}\n\nexport function transformLitsxSync(source, options = {}) {\n if (!options.__litsxCompilationSession) {\n const standaloneTsSession = createStandaloneCompilerTsSession({\n filename: options.filename,\n });\n const nextOptions = {\n ...options,\n typescriptSession: standaloneTsSession,\n __litsxMemoizeOptions: options,\n };\n const {\n inputAst,\n babelOptions,\n shouldRunFinalTemplatePass,\n finalTemplatePlugins,\n authoredTemplateAttributeMappings,\n authoredWarnings,\n profile,\n } = createLitsxTransformConfig(source, nextOptions);\n const firstPassResult = profilePhase(\n \"babel-transform\",\n () => transformFromAstSync(inputAst, source, {\n ...babelOptions,\n ast: shouldRunFinalTemplatePass,\n }),\n profile,\n );\n const result = shouldRunFinalTemplatePass\n ? profilePhase(\n \"template-lowering\",\n () => {\n const reparsedTemplateAst = reparseTemplateLoweringAst(\n firstPassResult?.code ?? source,\n nextOptions,\n );\n const secondPassResult = transformFromAstSync(\n reparsedTemplateAst,\n firstPassResult?.code ?? source,\n {\n filename: babelOptions.filename,\n sourceFileName: babelOptions.sourceFileName,\n configFile: false,\n babelrc: false,\n inputSourceMap:\n options.sourceMaps === true ? firstPassResult?.map ?? undefined : undefined,\n sourceMaps: options.sourceMaps === true,\n plugins: finalTemplatePlugins,\n }\n );\n\n return {\n ...secondPassResult,\n metadata: mergeTemplateLoweringMetadata(\n firstPassResult?.metadata || {},\n secondPassResult?.metadata || {},\n firstPassResult?.map ?? null,\n authoredTemplateAttributeMappings,\n ),\n };\n },\n profile,\n )\n : firstPassResult;\n return finalizeTransformResult(result, nextOptions, authoredWarnings, profile);\n }\n\n const {\n inputAst,\n babelOptions,\n shouldRunFinalTemplatePass,\n finalTemplatePlugins,\n authoredTemplateAttributeMappings,\n authoredWarnings,\n profile,\n } = createLitsxTransformConfig(source, options);\n const firstPassResult = profilePhase(\n \"babel-transform\",\n () => transformFromAstSync(inputAst, source, {\n ...babelOptions,\n ast: shouldRunFinalTemplatePass,\n }),\n profile,\n );\n const result = shouldRunFinalTemplatePass\n ? profilePhase(\n \"template-lowering\",\n () => {\n const reparsedTemplateAst = reparseTemplateLoweringAst(\n firstPassResult?.code ?? source,\n options,\n );\n const secondPassResult = transformFromAstSync(\n reparsedTemplateAst,\n firstPassResult?.code ?? source,\n {\n filename: babelOptions.filename,\n sourceFileName: babelOptions.sourceFileName,\n configFile: false,\n babelrc: false,\n inputSourceMap:\n options.sourceMaps === true ? firstPassResult?.map ?? undefined : undefined,\n sourceMaps: options.sourceMaps === true,\n plugins: finalTemplatePlugins,\n }\n );\n\n return {\n ...secondPassResult,\n metadata: mergeTemplateLoweringMetadata(\n firstPassResult?.metadata || {},\n secondPassResult?.metadata || {},\n firstPassResult?.map ?? null,\n authoredTemplateAttributeMappings,\n ),\n };\n },\n profile,\n )\n : firstPassResult;\n return finalizeTransformResult(result, options, authoredWarnings, profile);\n}\n\nexport default transformLitsx;\n"],"names":["parseWithLitsxVirtualization","babelParser","ensureLitsxParserPlugins","decodeVirtualAttributeName","babelTypes","SourceMapConsumer","ensureTypescriptModule","normalizeFilePath","createLitsxPresetPlugins","createStandaloneTsSession","createLitsxTypecheckSession","detectLitsxSourceFeatures","prepareLitsxAuthoredInput","mergeLitsxWarnings","patchLitAttributeSourcemap"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,MAAM,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,GAAG,SAAS;AACjE,MAAM,eAAe,GAAG,OAAO,CAAC,GAAG,CAAC,aAAa,KAAK,GAAG;AACzD,MAAM,mBAAmB,GAAG,IAAI,OAAO,EAAE;AACzC,MAAM,2BAA2B,GAAG,IAAI,GAAG,EAAE;;AAE7C,SAAS,iCAAiC,CAAC,EAAE,EAAE;AAC/C,EAAE,OAAO;AACT,IAAI,MAAM,EAAE,EAAE,CAAC,YAAY,CAAC,MAAM;AAClC,IAAI,MAAM,EAAE,EAAE,CAAC,UAAU,CAAC,MAAM;AAChC,IAAI,gBAAgB,EAAE,EAAE,CAAC,oBAAoB,CAAC,OAAO;AACrD,IAAI,GAAG,EAAE,EAAE,CAAC,OAAO,CAAC,QAAQ;AAC5B,IAAI,OAAO,EAAE,IAAI;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,IAAI,YAAY,EAAE,IAAI;AACtB,IAAI,MAAM,EAAE,KAAK;AACjB,IAAI,eAAe,EAAE,IAAI;AACzB,IAAI,4BAA4B,EAAE,IAAI;AACtC,IAAI,KAAK,EAAE,EAAE;AACb,GAAG;AACH;;AAEA,SAAS,yBAAyB,CAAC,cAAc,EAAE;AACnD,EAAE,IAAI,CAAC,cAAc,EAAE;AACvB,IAAI,OAAO,KAAK;AAChB,EAAE;;AAEF,EAAE,O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3C;AACA,WAAW;;AAEX,UAAU,OAAO;AACjB,YAAY,GAAG,gBAAgB;AAC/B,YAAY,QAAQ,EAAE,6BAA6B;AACnD,cAAc,eAAe,EAAE,QAAQ,IAAI,EAAE;AAC7C,cAAc,gBAAgB,EAAE,QAAQ,IAAI,EAAE;AAC9C,cAAc,eAAe,EAAE,GAAG,IAAI,IAAI;AAC1C,cAAc,iCAAiC;AAC/C,aAAa;AACb,WAAW;AACX,QAAQ,CAAC;AACT,QAAQ,OAAO;AACf;AACA,MAAM,eAAe;AACrB,EAAE,OAAO,uBAAuB,CAAC,MAAM,EAAE,OAAO,EAAE,gBAAgB,EAAE,OAAO,CAAC;AAC5E;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../src/index.js"],"sourcesContent":["import babelCore from \"@babel/core\";\nimport * as babelParser from \"@babel/parser\";\nimport * as babelTypes from \"@babel/types\";\nimport transformTypescript from \"@babel/plugin-transform-typescript\";\nimport transformJsxHtmlTemplate from \"@litsx/babel-plugin-transform-jsx-html-template\";\nimport { decodeVirtualAttributeName } from \"@litsx/authoring\";\nimport {\n createLitsxPresetPlugins,\n detectLitsxSourceFeatures,\n} from \"@litsx/babel-preset-litsx\";\nimport { ensureTypescriptModule } from \"@litsx/babel-preset-litsx/internal/transform-litsx-properties\";\nimport { parseWithLitsxVirtualization } from \"@litsx/authoring/parser\";\nimport { createLitsxTypecheckSession } from \"@litsx/typescript/typecheck\";\nimport {\n createStandaloneTsSession,\n normalizeFilePath,\n} from \"@litsx/typescript-session\";\nimport { SourceMapConsumer } from \"source-map-js\";\nimport {\n patchLitAttributeSourcemap,\n} from \"@litsx/babel-plugin-transform-jsx-html-template\";\nimport {\n ensureLitsxParserPlugins,\n prepareLitsxAuthoredInput,\n} from \"./authored-input.js\";\nimport { mergeLitsxWarnings } from \"./warnings.js\";\nexport {\n ensureLitsxParserPlugins,\n prepareLitsxAuthoredInput,\n} from \"./authored-input.js\";\n\nconst { transformFromAstAsync, transformFromAstSync } = babelCore;\nconst PROFILE_ENABLED = process.env.LITSX_PROFILE === \"1\";\nconst PRESET_PLUGIN_CACHE = new WeakMap();\nconst DEFAULT_PRESET_PLUGIN_CACHE = new Map();\n\nfunction createStandaloneTsCompilerOptions(ts) {\n return {\n target: ts.ScriptTarget.ESNext,\n module: ts.ModuleKind.ESNext,\n moduleResolution: ts.ModuleResolutionKind.Bundler,\n jsx: ts.JsxEmit.Preserve,\n allowJs: true,\n checkJs: false,\n skipLibCheck: true,\n strict: false,\n esModuleInterop: true,\n allowSyntheticDefaultImports: true,\n types: [],\n };\n}\n\nfunction getSourceFeaturesCacheKey(sourceFeatures) {\n if (!sourceFeatures) {\n return \"all\";\n }\n\n return [\n sourceFeatures.hooks ? \"1\" : \"0\",\n sourceFeatures.domRefs ? \"1\" : \"0\",\n sourceFeatures.scopedElements ? \"1\" : \"0\",\n ].join(\"\");\n}\n\nfunction profilePhase(name, callback, profile = null) {\n if (!PROFILE_ENABLED) {\n return callback();\n }\n\n const start = performance.now();\n try {\n return callback();\n } finally {\n const durationMs = performance.now() - start;\n if (profile) {\n profile.push({ name, durationMs });\n }\n if (PROFILE_ENABLED) {\n globalThis.__litsxProfileEvents ??= [];\n globalThis.__litsxProfileEvents.push({\n namespace: \"compiler\",\n name,\n durationMs,\n });\n }\n }\n}\n\nfunction normalizePluginList(plugins) {\n return Array.isArray(plugins) ? plugins : [];\n}\n\nfunction shouldStripTypescriptSyntax(filename = \"\") {\n return /\\.(?:ts|tsx|litsx)$/.test(filename) || filename.endsWith(\".litsx.jsx\");\n}\n\nfunction reparseTemplateLoweringAst(source, options = {}) {\n return parseWithLitsxVirtualization(babelParser.parse, source, {\n sourceType: \"module\",\n plugins: ensureLitsxParserPlugins(\n options.filename,\n options.parserPlugins,\n { requireJsx: true },\n ),\n sourceFileName: options.filename,\n litsxSourceMap: false,\n });\n}\n\nfunction collectAuthoredTemplateAttributeMappings(\n node,\n mappings = [],\n options = {},\n) {\n if (!node || typeof node !== \"object\") {\n return mappings;\n }\n\n if (node.type === \"JSXElement\") {\n for (const attr of node.openingElement?.attributes || []) {\n if (attr?.type !== \"JSXAttribute\") {\n continue;\n }\n\n const rawName = decodeVirtualAttributeName(attr.name.name) ?? attr.name.name;\n const prefix = rawName[0];\n const generatedName =\n prefix === \".\" || prefix === \"@\" || prefix === \"?\"\n ? `${prefix}${rawName.slice(1)}`\n : rawName;\n const sourceLocation = attr.name?.loc ?? attr.loc ?? null;\n\n mappings.push({\n generatedNeedle: attr.value\n ? ` ${generatedName}=`\n : ` ${generatedName}`,\n generatedOffset: 1,\n source: sourceLocation?.filename ?? options.sourceFileName ?? null,\n line: sourceLocation?.start?.line ?? null,\n column: sourceLocation?.start?.column ?? null,\n });\n }\n }\n\n const visitorKeys = babelTypes.VISITOR_KEYS?.[node.type];\n if (!visitorKeys) {\n return mappings;\n }\n\n for (const key of visitorKeys) {\n const value = node[key];\n if (Array.isArray(value)) {\n for (const child of value) {\n collectAuthoredTemplateAttributeMappings(child, mappings, options);\n }\n continue;\n }\n\n collectAuthoredTemplateAttributeMappings(value, mappings, options);\n }\n\n return mappings;\n}\n\nfunction remapTemplateAttributeMappings(mappings = [], inputSourceMap = null) {\n if (!Array.isArray(mappings) || mappings.length === 0 || !inputSourceMap) {\n return mappings;\n }\n\n const consumer = new SourceMapConsumer(inputSourceMap);\n\n try {\n return mappings.map((mapping) => {\n if (!mapping?.source || mapping.line == null || mapping.column == null) {\n return mapping;\n }\n\n const original = consumer.originalPositionFor({\n line: mapping.line,\n column: mapping.column,\n });\n\n if (original.source == null || original.line == null || original.column == null) {\n return mapping;\n }\n\n return {\n ...mapping,\n source: original.source,\n line: original.line,\n column: original.column,\n };\n });\n } finally {\n consumer.destroy?.();\n }\n}\n\nfunction mergeTemplateLoweringMetadata(\n firstPassMetadata = {},\n secondPassMetadata = {},\n firstPassMap = null,\n authoredTemplateAttributeMappings = [],\n) {\n const remappedTemplateAttributeMappings = remapTemplateAttributeMappings(\n secondPassMetadata.litsxTemplateAttributeMappings || [],\n firstPassMap,\n );\n const templateAttributeMappings =\n authoredTemplateAttributeMappings.length > 0\n ? authoredTemplateAttributeMappings\n : remappedTemplateAttributeMappings;\n\n return {\n ...firstPassMetadata,\n ...secondPassMetadata,\n ...(templateAttributeMappings.length > 0\n ? { litsxTemplateAttributeMappings: templateAttributeMappings }\n : {}),\n };\n}\n\nfunction getStandaloneTsSessionKey(filename = \"\", ts = ensureTypescriptModule()) {\n const normalizedFilename = normalizeFilePath(filename);\n const directory = normalizedFilename ? normalizedFilename.slice(0, normalizedFilename.lastIndexOf(\"/\")) || \"/\" : \"/\";\n return JSON.stringify({\n directory,\n compilerOptions: createStandaloneTsCompilerOptions(ts),\n });\n}\n\nfunction getMemoizedPresetPlugins(options, sourceFeatures = null, session = null) {\n const featureKey = getSourceFeaturesCacheKey(sourceFeatures);\n if (session) {\n const cache = session.presetPluginsByOptions;\n const optionsKey = options && typeof options === \"object\" ? options : null;\n\n if (!optionsKey) {\n if (!cache.default.has(featureKey)) {\n cache.default.set(featureKey, createLitsxPresetPlugins({}, sourceFeatures));\n }\n return cache.default.get(featureKey);\n }\n\n let cachedPluginsByFeature = cache.byOptions.get(optionsKey);\n if (!cachedPluginsByFeature) {\n cachedPluginsByFeature = new Map();\n cache.byOptions.set(optionsKey, cachedPluginsByFeature);\n }\n\n const cachedPlugins = cachedPluginsByFeature.get(featureKey);\n if (cachedPlugins) {\n return cachedPlugins;\n }\n\n const plugins = createLitsxPresetPlugins(options, sourceFeatures);\n cachedPluginsByFeature.set(featureKey, plugins);\n return plugins;\n }\n\n if (!options || typeof options !== \"object\") {\n if (!DEFAULT_PRESET_PLUGIN_CACHE.has(featureKey)) {\n DEFAULT_PRESET_PLUGIN_CACHE.set(\n featureKey,\n createLitsxPresetPlugins({}, sourceFeatures),\n );\n }\n return DEFAULT_PRESET_PLUGIN_CACHE.get(featureKey);\n }\n\n let cachedPluginsByFeature = PRESET_PLUGIN_CACHE.get(options);\n if (!cachedPluginsByFeature) {\n cachedPluginsByFeature = new Map();\n PRESET_PLUGIN_CACHE.set(options, cachedPluginsByFeature);\n }\n\n const cachedPlugins = cachedPluginsByFeature.get(featureKey);\n if (cachedPlugins) {\n return cachedPlugins;\n }\n\n const plugins = createLitsxPresetPlugins(options, sourceFeatures);\n cachedPluginsByFeature.set(featureKey, plugins);\n return plugins;\n}\n\nfunction getSessionFeatureCacheKey(source, options = {}) {\n return `${options.filename || \"\"}:${source}`;\n}\n\nfunction createCompilerCaches() {\n return {\n sourceFeatures: new Map(),\n authoredInput: new Map(),\n importedModuleAnalyses: new Map(),\n importedHookModuleAnalyses: new Map(),\n resolvedImports: new Map(),\n presetPluginsByOptions: {\n default: new Map(),\n byOptions: new WeakMap(),\n },\n };\n}\n\nfunction createStandaloneCompilerTsSession(options = {}) {\n const typescriptModule = options.typescriptModule || ensureTypescriptModule();\n return createStandaloneTsSession({\n sessionKey: getStandaloneTsSessionKey(options.filename, typescriptModule),\n typescript: typescriptModule,\n compilerOptions: createStandaloneTsCompilerOptions(typescriptModule),\n });\n}\n\nexport function createLitsxCompilationSession(sessionOptions = {}) {\n const caches = createCompilerCaches();\n const session = {\n projectPath: sessionOptions.projectPath || null,\n transformOptions: sessionOptions.transformOptions || {},\n typescriptSession:\n sessionOptions.projectPath\n ? createLitsxTypecheckSession([\"--project\", sessionOptions.projectPath]).projectSession\n : createStandaloneCompilerTsSession({\n filename: sessionOptions.transformOptions?.filename,\n typescriptModule: sessionOptions.typescriptModule,\n }),\n presetPluginsByOptions: caches.presetPluginsByOptions,\n sourceFeaturesCache: caches.sourceFeatures,\n authoredInputCache: caches.authoredInput,\n importedModuleAnalysisCache: caches.importedModuleAnalyses,\n importedHookModuleAnalysisCache: caches.importedHookModuleAnalyses,\n resolvedImportCache: caches.resolvedImports,\n transform(source, options = {}) {\n return transformLitsx(source, {\n ...this.transformOptions,\n ...options,\n typescriptSession: this.typescriptSession,\n __litsxCompilationSession: this,\n });\n },\n transformSync(source, options = {}) {\n return transformLitsxSync(source, {\n ...this.transformOptions,\n ...options,\n typescriptSession: this.typescriptSession,\n __litsxCompilationSession: this,\n });\n },\n getTypecheckSession(rawArgs = this.projectPath ? [\"--project\", this.projectPath] : []) {\n return createLitsxTypecheckSession(rawArgs, {\n projectSession: this.typescriptSession,\n });\n },\n invalidate(files = null) {\n if (!files || files.length === 0) {\n this.sourceFeaturesCache.clear();\n this.authoredInputCache.clear();\n this.importedModuleAnalysisCache.clear();\n this.importedHookModuleAnalysisCache.clear();\n this.resolvedImportCache.clear();\n this.typescriptSession?.invalidate?.({ host: true });\n return;\n }\n\n for (const file of files) {\n const normalizedFile = normalizeFilePath(file);\n for (const key of [...this.sourceFeaturesCache.keys()]) {\n if (key.startsWith(`${normalizedFile}:`)) {\n this.sourceFeaturesCache.delete(key);\n }\n }\n for (const key of [...this.authoredInputCache.keys()]) {\n if (key.startsWith(`${normalizedFile}:`)) {\n this.authoredInputCache.delete(key);\n }\n }\n this.importedModuleAnalysisCache.delete(normalizedFile);\n this.importedHookModuleAnalysisCache.delete(normalizedFile);\n for (const key of [...this.resolvedImportCache.keys()]) {\n if (key.startsWith(`${normalizedFile}::`)) {\n this.resolvedImportCache.delete(key);\n }\n }\n if (/\\.(jsx|tsx|js|ts|litsx)$/.test(file) || file.endsWith(\".litsx.jsx\")) {\n this.typescriptSession?.invalidate?.();\n }\n }\n },\n dispose() {\n this.invalidate();\n this.typescriptSession?.clearOverlayFiles?.();\n this.typescriptSession = null;\n },\n };\n return session;\n}\n\nexport function createLitsxTransformConfig(source, options = {}) {\n const profile = PROFILE_ENABLED ? [] : null;\n const compilationSession = options.__litsxCompilationSession || null;\n const memoizationOptions = options.__litsxMemoizeOptions || options;\n const featureCacheKey = getSessionFeatureCacheKey(source, options);\n const sourceFeatures = profilePhase(\n \"feature-detection\",\n () => {\n if (compilationSession?.sourceFeaturesCache?.has(featureCacheKey)) {\n return compilationSession.sourceFeaturesCache.get(featureCacheKey);\n }\n const detected = detectLitsxSourceFeatures(source, options);\n compilationSession?.sourceFeaturesCache?.set(featureCacheKey, detected);\n return detected;\n },\n profile,\n );\n const authoredInputCacheKey = featureCacheKey;\n const { filename, virtualization, inputAst, authoredWarnings } = profilePhase(\n \"authored-input\",\n () => {\n if (compilationSession?.authoredInputCache?.has(authoredInputCacheKey)) {\n return compilationSession.authoredInputCache.get(authoredInputCacheKey);\n }\n const prepared = prepareLitsxAuthoredInput(\n source,\n options,\n {\n transformFromAstSync,\n }\n );\n compilationSession?.authoredInputCache?.set(authoredInputCacheKey, prepared);\n return prepared;\n },\n profile,\n );\n const shouldRunFinalTemplatePass = options.jsxTemplate !== false;\n const outputPlugins = normalizePluginList(options.outputPlugins);\n const presetOptions = shouldRunFinalTemplatePass\n ? {\n ...memoizationOptions,\n jsxTemplate: false,\n }\n : memoizationOptions;\n const presetPlugins = profilePhase(\n \"preset-plugins\",\n () => getMemoizedPresetPlugins(presetOptions, sourceFeatures, compilationSession),\n profile,\n );\n\n const finalTemplatePlugins = shouldRunFinalTemplatePass\n ? [\n ...(options.jsxTemplateOptions && Object.keys(options.jsxTemplateOptions).length > 0\n ? [[transformJsxHtmlTemplate, options.jsxTemplateOptions]]\n : [transformJsxHtmlTemplate]),\n ...outputPlugins,\n ...(shouldStripTypescriptSyntax(filename)\n ? [[transformTypescript, { isTSX: true, allowDeclareFields: true }]]\n : []),\n ]\n : [];\n const authoredTemplateAttributeMappings =\n shouldRunFinalTemplatePass && options.sourceMaps === true\n ? collectAuthoredTemplateAttributeMappings(inputAst.program, [], {\n sourceFileName: filename,\n })\n : [];\n\n return {\n filename,\n inputAst,\n authoredWarnings,\n profile,\n shouldRunFinalTemplatePass,\n finalTemplatePlugins,\n authoredTemplateAttributeMappings,\n babelOptions: {\n filename,\n sourceFileName: filename,\n configFile: false,\n babelrc: false,\n inputSourceMap:\n options.sourceMaps === true ? virtualization?.map ?? undefined : undefined,\n sourceMaps: options.sourceMaps === true,\n plugins: shouldRunFinalTemplatePass\n ? [...presetPlugins]\n : [\n ...presetPlugins,\n ...outputPlugins,\n ...(shouldStripTypescriptSyntax(filename)\n ? [[transformTypescript, { isTSX: true, allowDeclareFields: true }]]\n : []),\n ],\n },\n };\n}\n\nfunction finalizeTransformResult(result, options, authoredWarnings = [], profile = []) {\n if (!result) {\n return {\n code: \"\",\n map: null,\n metadata: profile?.length > 0 ? { litsxProfile: profile } : {},\n };\n }\n\n const metadata = {\n ...(result.metadata || {}),\n };\n const mergedWarnings = mergeLitsxWarnings(\n metadata.litsxWarnings || [],\n authoredWarnings,\n { filename: options.filename }\n );\n if (mergedWarnings.length > 0) {\n metadata.litsxWarnings = mergedWarnings;\n }\n if (profile?.length > 0) {\n metadata.litsxProfile = profile;\n }\n const templateAttributeMappings = metadata.litsxTemplateAttributeMappings || [];\n const map =\n options.sourceMaps === true\n ? options.jsxTemplate === false\n ? result.map ?? null\n : templateAttributeMappings.length === 0\n ? result.map ?? null\n : profilePhase(\n \"sourcemap-patching\",\n () => patchLitAttributeSourcemap(\n result.code || \"\",\n result.map ?? null,\n templateAttributeMappings,\n ),\n profile,\n )\n : null;\n\n return {\n code: result.code || \"\",\n map,\n metadata,\n };\n}\n\nexport async function transformLitsx(source, options = {}) {\n if (!options.__litsxCompilationSession) {\n const standaloneTsSession = createStandaloneCompilerTsSession({\n filename: options.filename,\n });\n const nextOptions = {\n ...options,\n typescriptSession: standaloneTsSession,\n __litsxMemoizeOptions: options,\n };\n const {\n inputAst,\n babelOptions,\n shouldRunFinalTemplatePass,\n finalTemplatePlugins,\n authoredTemplateAttributeMappings,\n authoredWarnings,\n profile,\n } = createLitsxTransformConfig(source, nextOptions);\n const firstPassResult = await profilePhase(\n \"babel-transform\",\n () => transformFromAstAsync(inputAst, source, {\n ...babelOptions,\n ast: shouldRunFinalTemplatePass,\n plugins: babelOptions.plugins,\n }),\n profile,\n );\n const result = shouldRunFinalTemplatePass\n ? await profilePhase(\n \"template-lowering\",\n async () => {\n const reparsedTemplateAst = reparseTemplateLoweringAst(\n firstPassResult?.code ?? source,\n nextOptions,\n );\n const secondPassResult = await transformFromAstAsync(\n reparsedTemplateAst,\n firstPassResult?.code ?? source,\n {\n filename: babelOptions.filename,\n sourceFileName: babelOptions.sourceFileName,\n configFile: false,\n babelrc: false,\n inputSourceMap:\n options.sourceMaps === true ? firstPassResult?.map ?? undefined : undefined,\n sourceMaps: options.sourceMaps === true,\n plugins: finalTemplatePlugins,\n }\n );\n\n return {\n ...secondPassResult,\n metadata: mergeTemplateLoweringMetadata(\n firstPassResult?.metadata || {},\n secondPassResult?.metadata || {},\n firstPassResult?.map ?? null,\n authoredTemplateAttributeMappings,\n ),\n };\n },\n profile,\n )\n : firstPassResult;\n return finalizeTransformResult(result, nextOptions, authoredWarnings, profile);\n }\n\n const {\n inputAst,\n babelOptions,\n shouldRunFinalTemplatePass,\n finalTemplatePlugins,\n authoredTemplateAttributeMappings,\n authoredWarnings,\n profile,\n } = createLitsxTransformConfig(source, options);\n const firstPassResult = await profilePhase(\n \"babel-transform\",\n () => transformFromAstAsync(inputAst, source, {\n ...babelOptions,\n ast: shouldRunFinalTemplatePass,\n plugins: babelOptions.plugins,\n }),\n profile,\n );\n const result = shouldRunFinalTemplatePass\n ? await profilePhase(\n \"template-lowering\",\n async () => {\n const reparsedTemplateAst = reparseTemplateLoweringAst(\n firstPassResult?.code ?? source,\n options,\n );\n const secondPassResult = await transformFromAstAsync(\n reparsedTemplateAst,\n firstPassResult?.code ?? source,\n {\n filename: babelOptions.filename,\n sourceFileName: babelOptions.sourceFileName,\n configFile: false,\n babelrc: false,\n inputSourceMap:\n options.sourceMaps === true ? firstPassResult?.map ?? undefined : undefined,\n sourceMaps: options.sourceMaps === true,\n plugins: finalTemplatePlugins,\n }\n );\n\n return {\n ...secondPassResult,\n metadata: mergeTemplateLoweringMetadata(\n firstPassResult?.metadata || {},\n secondPassResult?.metadata || {},\n firstPassResult?.map ?? null,\n authoredTemplateAttributeMappings,\n ),\n };\n },\n profile,\n )\n : firstPassResult;\n return finalizeTransformResult(result, options, authoredWarnings, profile);\n}\n\nexport function transformLitsxSync(source, options = {}) {\n if (!options.__litsxCompilationSession) {\n const standaloneTsSession = createStandaloneCompilerTsSession({\n filename: options.filename,\n });\n const nextOptions = {\n ...options,\n typescriptSession: standaloneTsSession,\n __litsxMemoizeOptions: options,\n };\n const {\n inputAst,\n babelOptions,\n shouldRunFinalTemplatePass,\n finalTemplatePlugins,\n authoredTemplateAttributeMappings,\n authoredWarnings,\n profile,\n } = createLitsxTransformConfig(source, nextOptions);\n const firstPassResult = profilePhase(\n \"babel-transform\",\n () => transformFromAstSync(inputAst, source, {\n ...babelOptions,\n ast: shouldRunFinalTemplatePass,\n }),\n profile,\n );\n const result = shouldRunFinalTemplatePass\n ? profilePhase(\n \"template-lowering\",\n () => {\n const reparsedTemplateAst = reparseTemplateLoweringAst(\n firstPassResult?.code ?? source,\n nextOptions,\n );\n const secondPassResult = transformFromAstSync(\n reparsedTemplateAst,\n firstPassResult?.code ?? source,\n {\n filename: babelOptions.filename,\n sourceFileName: babelOptions.sourceFileName,\n configFile: false,\n babelrc: false,\n inputSourceMap:\n options.sourceMaps === true ? firstPassResult?.map ?? undefined : undefined,\n sourceMaps: options.sourceMaps === true,\n plugins: finalTemplatePlugins,\n }\n );\n\n return {\n ...secondPassResult,\n metadata: mergeTemplateLoweringMetadata(\n firstPassResult?.metadata || {},\n secondPassResult?.metadata || {},\n firstPassResult?.map ?? null,\n authoredTemplateAttributeMappings,\n ),\n };\n },\n profile,\n )\n : firstPassResult;\n return finalizeTransformResult(result, nextOptions, authoredWarnings, profile);\n }\n\n const {\n inputAst,\n babelOptions,\n shouldRunFinalTemplatePass,\n finalTemplatePlugins,\n authoredTemplateAttributeMappings,\n authoredWarnings,\n profile,\n } = createLitsxTransformConfig(source, options);\n const firstPassResult = profilePhase(\n \"babel-transform\",\n () => transformFromAstSync(inputAst, source, {\n ...babelOptions,\n ast: shouldRunFinalTemplatePass,\n }),\n profile,\n );\n const result = shouldRunFinalTemplatePass\n ? profilePhase(\n \"template-lowering\",\n () => {\n const reparsedTemplateAst = reparseTemplateLoweringAst(\n firstPassResult?.code ?? source,\n options,\n );\n const secondPassResult = transformFromAstSync(\n reparsedTemplateAst,\n firstPassResult?.code ?? source,\n {\n filename: babelOptions.filename,\n sourceFileName: babelOptions.sourceFileName,\n configFile: false,\n babelrc: false,\n inputSourceMap:\n options.sourceMaps === true ? firstPassResult?.map ?? undefined : undefined,\n sourceMaps: options.sourceMaps === true,\n plugins: finalTemplatePlugins,\n }\n );\n\n return {\n ...secondPassResult,\n metadata: mergeTemplateLoweringMetadata(\n firstPassResult?.metadata || {},\n secondPassResult?.metadata || {},\n firstPassResult?.map ?? null,\n authoredTemplateAttributeMappings,\n ),\n };\n },\n profile,\n )\n : firstPassResult;\n return finalizeTransformResult(result, options, authoredWarnings, profile);\n}\n\nexport default transformLitsx;\n"],"names":["parseWithLitsxVirtualization","babelParser","ensureLitsxParserPlugins","decodeVirtualAttributeName","babelTypes","SourceMapConsumer","ensureTypescriptModule","normalizeFilePath","createLitsxPresetPlugins","createStandaloneTsSession","createLitsxTypecheckSession","detectLitsxSourceFeatures","prepareLitsxAuthoredInput","mergeLitsxWarnings","patchLitAttributeSourcemap"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,MAAM,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,GAAG,SAAS;AACjE,MAAM,eAAe,GAAG,OAAO,CAAC,GAAG,CAAC,aAAa,KAAK,GAAG;AACzD,MAAM,mBAAmB,GAAG,IAAI,OAAO,EAAE;AACzC,MAAM,2BAA2B,GAAG,IAAI,GAAG,EAAE;;AAE7C,SAAS,iCAAiC,CAAC,EAAE,EAAE;AAC/C,EAAE,OAAO;AACT,IAAI,MAAM,EAAE,EAAE,CAAC,YAAY,CAAC,MAAM;AAClC,IAAI,MAAM,EAAE,EAAE,CAAC,UAAU,CAAC,MAAM;AAChC,IAAI,gBAAgB,EAAE,EAAE,CAAC,oBAAoB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facade with correct parser and sourcemap handling",
|
|
5
5
|
"author": "LitSX Team",
|
|
6
6
|
"type": "module",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@babel/types": "^7.29.0",
|
|
55
55
|
"@litsx/authoring": "^0.5.0",
|
|
56
56
|
"@litsx/babel-plugin-transform-jsx-html-template": "^0.3.5",
|
|
57
|
-
"@litsx/babel-preset-litsx": "^0.9.
|
|
57
|
+
"@litsx/babel-preset-litsx": "^0.9.2",
|
|
58
58
|
"@litsx/typescript": "^0.7.0",
|
|
59
59
|
"@litsx/typescript-session": "^0.2.1",
|
|
60
60
|
"source-map-js": "^1.2.1"
|
package/src/index.js
CHANGED
|
@@ -293,6 +293,7 @@ function createCompilerCaches() {
|
|
|
293
293
|
sourceFeatures: new Map(),
|
|
294
294
|
authoredInput: new Map(),
|
|
295
295
|
importedModuleAnalyses: new Map(),
|
|
296
|
+
importedHookModuleAnalyses: new Map(),
|
|
296
297
|
resolvedImports: new Map(),
|
|
297
298
|
presetPluginsByOptions: {
|
|
298
299
|
default: new Map(),
|
|
@@ -326,6 +327,7 @@ export function createLitsxCompilationSession(sessionOptions = {}) {
|
|
|
326
327
|
sourceFeaturesCache: caches.sourceFeatures,
|
|
327
328
|
authoredInputCache: caches.authoredInput,
|
|
328
329
|
importedModuleAnalysisCache: caches.importedModuleAnalyses,
|
|
330
|
+
importedHookModuleAnalysisCache: caches.importedHookModuleAnalyses,
|
|
329
331
|
resolvedImportCache: caches.resolvedImports,
|
|
330
332
|
transform(source, options = {}) {
|
|
331
333
|
return transformLitsx(source, {
|
|
@@ -353,6 +355,7 @@ export function createLitsxCompilationSession(sessionOptions = {}) {
|
|
|
353
355
|
this.sourceFeaturesCache.clear();
|
|
354
356
|
this.authoredInputCache.clear();
|
|
355
357
|
this.importedModuleAnalysisCache.clear();
|
|
358
|
+
this.importedHookModuleAnalysisCache.clear();
|
|
356
359
|
this.resolvedImportCache.clear();
|
|
357
360
|
this.typescriptSession?.invalidate?.({ host: true });
|
|
358
361
|
return;
|
|
@@ -371,6 +374,7 @@ export function createLitsxCompilationSession(sessionOptions = {}) {
|
|
|
371
374
|
}
|
|
372
375
|
}
|
|
373
376
|
this.importedModuleAnalysisCache.delete(normalizedFile);
|
|
377
|
+
this.importedHookModuleAnalysisCache.delete(normalizedFile);
|
|
374
378
|
for (const key of [...this.resolvedImportCache.keys()]) {
|
|
375
379
|
if (key.startsWith(`${normalizedFile}::`)) {
|
|
376
380
|
this.resolvedImportCache.delete(key);
|