Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@lwc/metadata

Package Overview
Dependencies
Maintainers
14
Versions
128
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lwc/metadata - npm Package Compare versions

Comparing version 2.41.0-0 to 2.41.0-1

dist/template-metadata/__tests__/template-metadata.spec.d.ts

5

dist/bundle-metadata.js

@@ -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;

1

dist/shared/config.d.ts

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc