@lwc/metadata
Advanced tools
Comparing version 2.41.0-0 to 2.41.0-1
@@ -76,6 +76,6 @@ 'use strict'; | ||
} */ | ||
const version = '2.41.0-0'; | ||
const version = '2.41.0-1'; | ||
function collectBundleMetadata(config) { | ||
// validateBundleConfig(config); | ||
const { namespace, name, type, namespaceMapping, files, enableKomaci, strictCSSTokenCollection, enableLuvio, } = config; | ||
const { namespace, name, type, namespaceMapping, files, enableKomaci, strictCSSTokenCollection, enableLuvio, experimentalComplexExpressions, } = config; | ||
const filesResult = []; | ||
@@ -89,2 +89,3 @@ files.forEach(({ fileName, source }) => { | ||
enableKomaci, | ||
experimentalComplexExpressions, | ||
})); | ||
@@ -91,0 +92,0 @@ break; |
@@ -17,2 +17,3 @@ export type NamespaceMapping = { | ||
enableLuvio?: boolean; | ||
experimentalComplexExpressions?: boolean; | ||
} |
@@ -6,2 +6,3 @@ import { HTMLTemplateFile } from '../schema/typescript-types/template-metadata-types'; | ||
enableKomaci?: boolean; | ||
experimentalComplexExpressions?: boolean; | ||
}): HTMLTemplateFile; |
@@ -34,3 +34,8 @@ 'use strict'; | ||
try { | ||
parseResult = templateCompiler.parse(source, PARSE_DEFAULT_CONFIG); | ||
parseResult = templateCompiler.parse(source, { | ||
...PARSE_DEFAULT_CONFIG, | ||
// Enabling template expressions changes AST shape due to usage to introduction of ComplexExpression nodes | ||
// Keeping it disabled by default | ||
experimentalComplexExpressions: config.experimentalComplexExpressions ?? false, | ||
}); | ||
// Diagnostic from @lwc/template-compiler parse() does not have a filename | ||
@@ -86,4 +91,9 @@ parseWarnings = parseResult.warnings.map((warning) => { | ||
if (Array.isArray(value)) { | ||
for (const node of value) { | ||
trimLocationFromAst(node); | ||
for (const item of value) { | ||
// With the introduction of ComplexExpression nodes for template expressions, | ||
// item cannot be assumed to be a node, duck type to check if it looks like a base node | ||
// for example, Acorn's MemberExpression.range is an array of integers | ||
if (item !== null && typeof item === 'object' && 'type' in item) { | ||
trimLocationFromAst(item); | ||
} | ||
} | ||
@@ -90,0 +100,0 @@ } |
{ | ||
"name": "@lwc/metadata", | ||
"version": "2.41.0-0", | ||
"version": "2.41.0-1", | ||
"description": "Extract metadata about Lightning Web Components modules. This software is provided as-is with no support provided.", | ||
@@ -25,3 +25,3 @@ "main": "dist/index.js", | ||
"peerDependencies": { | ||
"@lwc/sfdc-compiler-utils": "2.41.0-0", | ||
"@lwc/sfdc-compiler-utils": "2.41.0-1", | ||
"@lwc/errors": "~2.41.0", | ||
@@ -28,0 +28,0 @@ "@lwc/template-compiler": "~2.41.0" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
330828
235
5034