@lwc/template-compiler 8.27.0 → 8.28.0

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/LICENSE.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  MIT LICENSE
4
4
 
5
- Copyright (c) 2025, Salesforce, Inc.
5
+ Copyright (c) 2026, Salesforce, Inc.
6
6
  All rights reserved.
7
7
 
8
8
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
package/dist/index.cjs.js CHANGED
@@ -10621,7 +10621,12 @@ function parseIdentifier(ctx, source, location) {
10621
10621
  for (let i = 1; i < source.length && isValid; i++) {
10622
10622
  isValid = acorn.isIdentifierChar(source.charCodeAt(i));
10623
10623
  }
10624
- if (isValid && !isReservedES6Keyword(source)) {
10624
+ if (isValid) {
10625
+ if (isReservedES6Keyword(source)) {
10626
+ ctx.throwAtLocation(errors.ParserDiagnostics.RESERVED_KEYWORD_AS_IDENTIFIER, location, [
10627
+ source,
10628
+ ]);
10629
+ }
10625
10630
  return {
10626
10631
  ...identifier(source),
10627
10632
  location,
@@ -14574,5 +14579,5 @@ exports.generateScopeTokens = generateScopeTokens;
14574
14579
  exports.kebabcaseToCamelcase = kebabcaseToCamelcase;
14575
14580
  exports.parse = parse;
14576
14581
  exports.toPropertyName = toPropertyName;
14577
- /** version: 8.27.0 */
14582
+ /** version: 8.28.0 */
14578
14583
  //# sourceMappingURL=index.cjs.js.map
package/dist/index.js CHANGED
@@ -10597,7 +10597,12 @@ function parseIdentifier(ctx, source, location) {
10597
10597
  for (let i = 1; i < source.length && isValid; i++) {
10598
10598
  isValid = isIdentifierChar(source.charCodeAt(i));
10599
10599
  }
10600
- if (isValid && !isReservedES6Keyword(source)) {
10600
+ if (isValid) {
10601
+ if (isReservedES6Keyword(source)) {
10602
+ ctx.throwAtLocation(ParserDiagnostics.RESERVED_KEYWORD_AS_IDENTIFIER, location, [
10603
+ source,
10604
+ ]);
10605
+ }
10601
10606
  return {
10602
10607
  ...identifier(source),
10603
10608
  location,
@@ -14544,5 +14549,5 @@ function compile(source, filename, config) {
14544
14549
  }
14545
14550
 
14546
14551
  export { ElementDirectiveName, LWCDirectiveDomMode, LWCDirectiveRenderMode, LwcTagName, RootDirectiveName, TemplateDirectiveName, bindExpression, compile, compile as default, generateScopeTokens, kebabcaseToCamelcase, parse, toPropertyName };
14547
- /** version: 8.27.0 */
14552
+ /** version: 8.28.0 */
14548
14553
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "You can safely modify dependencies, devDependencies, keywords, etc., but other props will be overwritten."
5
5
  ],
6
6
  "name": "@lwc/template-compiler",
7
- "version": "8.27.0",
7
+ "version": "8.28.0",
8
8
  "description": "Template compiler package",
9
9
  "keywords": [
10
10
  "lwc"
@@ -46,8 +46,8 @@
46
46
  }
47
47
  },
48
48
  "dependencies": {
49
- "@lwc/errors": "8.27.0",
50
- "@lwc/shared": "8.27.0",
49
+ "@lwc/errors": "8.28.0",
50
+ "@lwc/shared": "8.28.0",
51
51
  "acorn": "~8.15.0",
52
52
  "astring": "~1.9.0",
53
53
  "he": "~1.2.0"