@lwc/compiler
Advanced tools
Comparing version 6.1.1 to 6.2.0
@@ -111,12 +111,25 @@ /** | ||
function normalizeOptions(options) { | ||
const outputConfig = Object.assign(Object.assign({}, DEFAULT_OUTPUT_CONFIG), options.outputConfig); | ||
const outputConfig = { | ||
...DEFAULT_OUTPUT_CONFIG, | ||
...options.outputConfig, | ||
}; | ||
const stylesheetConfig = { | ||
customProperties: Object.assign(Object.assign({}, DEFAULT_STYLESHEET_CONFIG.customProperties), (options.stylesheetConfig && options.stylesheetConfig.customProperties)), | ||
customProperties: { | ||
...DEFAULT_STYLESHEET_CONFIG.customProperties, | ||
...(options.stylesheetConfig && options.stylesheetConfig.customProperties), | ||
}, | ||
}; | ||
const experimentalDynamicComponent = Object.assign(Object.assign({}, DEFAULT_DYNAMIC_IMPORT_CONFIG), options.experimentalDynamicComponent); | ||
const experimentalDynamicComponent = { | ||
...DEFAULT_DYNAMIC_IMPORT_CONFIG, | ||
...options.experimentalDynamicComponent, | ||
}; | ||
const apiVersion = shared.getAPIVersionFromNumber(options.apiVersion); | ||
return Object.assign(Object.assign(Object.assign({}, DEFAULT_OPTIONS), options), { stylesheetConfig, | ||
return { | ||
...DEFAULT_OPTIONS, | ||
...options, | ||
stylesheetConfig, | ||
outputConfig, | ||
experimentalDynamicComponent, | ||
apiVersion }); | ||
apiVersion, | ||
}; | ||
} | ||
@@ -172,3 +185,3 @@ | ||
experimentalComplexExpressions, preserveHtmlComments, enableStaticContentOptimization, customRendererConfig, enableDynamicComponents, experimentalDynamicDirective: deprecatedDynamicDirective, instrumentation, namespace, name, apiVersion, } = options; | ||
const experimentalDynamicDirective = deprecatedDynamicDirective !== null && deprecatedDynamicDirective !== void 0 ? deprecatedDynamicDirective : Boolean(experimentalDynamicComponent); | ||
const experimentalDynamicDirective = deprecatedDynamicDirective ?? Boolean(experimentalDynamicComponent); | ||
let result; | ||
@@ -302,3 +315,2 @@ try { | ||
function scriptTransform(code, filename, options) { | ||
var _a; | ||
const { isExplicitImport, experimentalDynamicComponent: dynamicImports, outputConfig: { sourcemap }, enableLightningWebSecurityTransforms, namespace, name, instrumentation, apiVersion, } = options; | ||
@@ -341,3 +353,3 @@ const lwcBabelPluginOptions = { | ||
if (e.code === 'BABEL_TRANSFORM_ERROR' && | ||
((_a = e.message) === null || _a === void 0 ? void 0 : _a.includes('Decorators are not enabled.')) && | ||
e.message?.includes('Decorators are not enabled.') && | ||
/\b(track|api|wire)\b/.test(e.message) // sniff for @track/@api/@wire | ||
@@ -420,3 +432,3 @@ ) { | ||
*/ | ||
const version = "6.1.1"; | ||
const version = "6.2.0"; | ||
@@ -426,3 +438,3 @@ exports.transform = transform; | ||
exports.version = version; | ||
/** version: 6.1.1 */ | ||
/** version: 6.2.0 */ | ||
//# sourceMappingURL=index.cjs.js.map |
@@ -86,12 +86,25 @@ /** | ||
function normalizeOptions(options) { | ||
const outputConfig = Object.assign(Object.assign({}, DEFAULT_OUTPUT_CONFIG), options.outputConfig); | ||
const outputConfig = { | ||
...DEFAULT_OUTPUT_CONFIG, | ||
...options.outputConfig, | ||
}; | ||
const stylesheetConfig = { | ||
customProperties: Object.assign(Object.assign({}, DEFAULT_STYLESHEET_CONFIG.customProperties), (options.stylesheetConfig && options.stylesheetConfig.customProperties)), | ||
customProperties: { | ||
...DEFAULT_STYLESHEET_CONFIG.customProperties, | ||
...(options.stylesheetConfig && options.stylesheetConfig.customProperties), | ||
}, | ||
}; | ||
const experimentalDynamicComponent = Object.assign(Object.assign({}, DEFAULT_DYNAMIC_IMPORT_CONFIG), options.experimentalDynamicComponent); | ||
const experimentalDynamicComponent = { | ||
...DEFAULT_DYNAMIC_IMPORT_CONFIG, | ||
...options.experimentalDynamicComponent, | ||
}; | ||
const apiVersion = getAPIVersionFromNumber(options.apiVersion); | ||
return Object.assign(Object.assign(Object.assign({}, DEFAULT_OPTIONS), options), { stylesheetConfig, | ||
return { | ||
...DEFAULT_OPTIONS, | ||
...options, | ||
stylesheetConfig, | ||
outputConfig, | ||
experimentalDynamicComponent, | ||
apiVersion }); | ||
apiVersion, | ||
}; | ||
} | ||
@@ -147,3 +160,3 @@ | ||
experimentalComplexExpressions, preserveHtmlComments, enableStaticContentOptimization, customRendererConfig, enableDynamicComponents, experimentalDynamicDirective: deprecatedDynamicDirective, instrumentation, namespace, name, apiVersion, } = options; | ||
const experimentalDynamicDirective = deprecatedDynamicDirective !== null && deprecatedDynamicDirective !== void 0 ? deprecatedDynamicDirective : Boolean(experimentalDynamicComponent); | ||
const experimentalDynamicDirective = deprecatedDynamicDirective ?? Boolean(experimentalDynamicComponent); | ||
let result; | ||
@@ -277,3 +290,2 @@ try { | ||
function scriptTransform(code, filename, options) { | ||
var _a; | ||
const { isExplicitImport, experimentalDynamicComponent: dynamicImports, outputConfig: { sourcemap }, enableLightningWebSecurityTransforms, namespace, name, instrumentation, apiVersion, } = options; | ||
@@ -316,3 +328,3 @@ const lwcBabelPluginOptions = { | ||
if (e.code === 'BABEL_TRANSFORM_ERROR' && | ||
((_a = e.message) === null || _a === void 0 ? void 0 : _a.includes('Decorators are not enabled.')) && | ||
e.message?.includes('Decorators are not enabled.') && | ||
/\b(track|api|wire)\b/.test(e.message) // sniff for @track/@api/@wire | ||
@@ -395,6 +407,6 @@ ) { | ||
*/ | ||
const version = "6.1.1"; | ||
const version = "6.2.0"; | ||
export { transform, transformSync, version }; | ||
/** version: 6.1.1 */ | ||
/** version: 6.2.0 */ | ||
//# sourceMappingURL=index.js.map |
@@ -7,3 +7,3 @@ { | ||
"name": "@lwc/compiler", | ||
"version": "6.1.1", | ||
"version": "6.2.0", | ||
"description": "LWC compiler", | ||
@@ -52,8 +52,8 @@ "keywords": [ | ||
"@locker/babel-plugin-transform-unforgeables": "0.20.0", | ||
"@lwc/babel-plugin-component": "6.1.1", | ||
"@lwc/errors": "6.1.1", | ||
"@lwc/shared": "6.1.1", | ||
"@lwc/style-compiler": "6.1.1", | ||
"@lwc/template-compiler": "6.1.1" | ||
"@lwc/babel-plugin-component": "6.2.0", | ||
"@lwc/errors": "6.2.0", | ||
"@lwc/shared": "6.2.0", | ||
"@lwc/style-compiler": "6.2.0", | ||
"@lwc/template-compiler": "6.2.0" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
931
67017
+ Added@lwc/babel-plugin-component@6.2.0(transitive)
+ Added@lwc/errors@6.2.0(transitive)
+ Added@lwc/shared@6.2.0(transitive)
+ Added@lwc/style-compiler@6.2.0(transitive)
+ Added@lwc/template-compiler@6.2.0(transitive)
- Removed@lwc/babel-plugin-component@6.1.1(transitive)
- Removed@lwc/errors@6.1.1(transitive)
- Removed@lwc/shared@6.1.1(transitive)
- Removed@lwc/style-compiler@6.1.1(transitive)
- Removed@lwc/template-compiler@6.1.1(transitive)
Updated@lwc/errors@6.2.0
Updated@lwc/shared@6.2.0
Updated@lwc/style-compiler@6.2.0
Updated@lwc/template-compiler@6.2.0