@lwc/template-compiler 2.49.0 → 2.49.1

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/README.md CHANGED
@@ -54,7 +54,7 @@ const { code, warnings } = compile(`<template><h1>Hello World!</h1></template>`,
54
54
  - `enableDynamicComponents` (boolean, optional, `false` by default) - set to `true` to enable `lwc:is` directive in the template.
55
55
  - `preserveHtmlComments` (boolean, optional, `false` by default) - set to `true` to disable the default behavior of stripping HTML comments.
56
56
  - `enableStaticContentOptimization` (boolean, optional, `true` by default) - set to `false` to disable static content optimizations.
57
- - `enableLwcSpread` (boolean, optional, `false` by default) - set to `true` to enable `lwc:spread` directive in the template.
57
+ - `enableLwcSpread` (boolean, optional, `true` by default) - Deprecated. Ignored by template-compiler. `lwc:spread` is always enabled.
58
58
  - `customRendererConfig` (CustomRendererConfig, optional) - specifies a configuration to use to match elements. Matched elements will get a custom renderer hook in the generated template.
59
59
  - `instrumentation` (InstrumentationObject, optional) - instrumentation object to gather metrics and non-error logs for internal use. See the `@lwc/errors` package for details on the interface.
60
60
 
package/dist/config.d.ts CHANGED
@@ -48,7 +48,7 @@ export interface Config {
48
48
  */
49
49
  enableStaticContentOptimization?: boolean;
50
50
  /**
51
- * When true, enables `lwc:spread` directive.
51
+ * @deprecated Spread operator is now always enabled.
52
52
  */
53
53
  enableLwcSpread?: boolean;
54
54
  /**
package/dist/index.cjs.js CHANGED
@@ -182,7 +182,7 @@ function normalizeConfig(config) {
182
182
  }
183
183
  return Object.assign(Object.assign(Object.assign({ preserveHtmlComments: false, experimentalComputedMemberExpression: false,
184
184
  // TODO [#3370]: remove experimental template expression flag
185
- experimentalComplexExpressions: false, experimentalDynamicDirective: false, enableDynamicComponents: false, enableStaticContentOptimization: true, enableLwcSpread: false }, config), { customRendererConfig }), { instrumentation });
185
+ experimentalComplexExpressions: false, experimentalDynamicDirective: false, enableDynamicComponents: false, enableStaticContentOptimization: true, enableLwcSpread: true }, config), { customRendererConfig }), { instrumentation });
186
186
  }
187
187
 
188
188
  function isIdentifier(node) {
@@ -3186,9 +3186,6 @@ function applyLwcSpreadDirective(ctx, parsedAttr, element) {
3186
3186
  if (!lwcSpread) {
3187
3187
  return;
3188
3188
  }
3189
- if (!ctx.config.enableLwcSpread) {
3190
- ctx.throwOnNode(errors.ParserDiagnostics.INVALID_OPTS_LWC_SPREAD, element);
3191
- }
3192
3189
  const { value: lwcSpreadAttr } = lwcSpread;
3193
3190
  if (!isExpression$1(lwcSpreadAttr)) {
3194
3191
  ctx.throwOnNode(errors.ParserDiagnostics.INVALID_LWC_SPREAD_LITERAL_PROP, element, [`<${tag}>`]);
@@ -5351,5 +5348,5 @@ function compile(source, config) {
5351
5348
  exports.compile = compile;
5352
5349
  exports.default = compile;
5353
5350
  exports.parse = parse;
5354
- /** version: 2.49.0 */
5351
+ /** version: 2.49.1 */
5355
5352
  //# sourceMappingURL=index.cjs.js.map