@lwc/template-compiler 9.0.2 → 9.0.4-alpha.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/dist/index.js CHANGED
@@ -10586,8 +10586,7 @@ function parseExpression(ctx, source, location, unquotedAttributeExpression) {
10586
10586
  }, ParserDiagnostics.TEMPLATE_EXPRESSION_PARSING_ERROR, location, (err) => `Invalid expression ${source} - ${err.message}`);
10587
10587
  }
10588
10588
  function parseIdentifier(ctx, source, location) {
10589
- let isValid = true;
10590
- isValid = isIdentifierStart(source.charCodeAt(0));
10589
+ let isValid = isIdentifierStart(source.charCodeAt(0));
10591
10590
  for (let i = 1; i < source.length && isValid; i++) {
10592
10591
  isValid = isIdentifierChar(source.charCodeAt(i));
10593
10592
  }
@@ -10736,7 +10735,7 @@ const HTML_ELEMENT_ATTRIBUTE_MAP = {
10736
10735
  colgroup: ['align', 'char', 'charoff', 'span', 'valign', 'width'],
10737
10736
  data: ['value'],
10738
10737
  del: ['cite', 'datetime'],
10739
- details: ['open'],
10738
+ details: ['name', 'open'],
10740
10739
  dialog: ['open'],
10741
10740
  dir: ['compact'],
10742
10741
  div: ['align'],
@@ -12504,9 +12503,8 @@ function shouldAddCustomRenderer(element, state) {
12504
12503
  }
12505
12504
  const { attributes, directives } = element;
12506
12505
  if (directives.length) {
12507
- let directiveMatched = false;
12508
12506
  // If any directives require custom renderer
12509
- directiveMatched = directives.some((dir) => {
12507
+ const directiveMatched = directives.some((dir) => {
12510
12508
  return state.crDirectives.has(ElementDirectiveName[dir.name]);
12511
12509
  });
12512
12510
  if (directiveMatched) {
@@ -13741,7 +13739,7 @@ class CodeGen {
13741
13739
  // then static IDs/IDrefs/fragment refs will be rendered directly into HTML strings.
13742
13740
  const needsScoping = this.isSyntheticShadow && (isIdOrIdRef || isScopedFragmentRef);
13743
13741
  if (isExpression$1(value) || isSvgHref || needsScoping) {
13744
- let partToken = '';
13742
+ let partToken;
13745
13743
  if (name === 'style') {
13746
13744
  partToken = `${"s" /* STATIC_PART_TOKEN_ID.STYLE */}${partId}`;
13747
13745
  databag.push(property$1(identifier('style'), this.bindExpression(value)));
@@ -14543,5 +14541,5 @@ function compile(source, filename, config) {
14543
14541
  }
14544
14542
 
14545
14543
  export { ElementDirectiveName, LWCDirectiveDomMode, LWCDirectiveRenderMode, LwcTagName, RootDirectiveName, TemplateDirectiveName, bindExpression, compile, compile as default, generateScopeTokens, kebabcaseToCamelcase, parse, toPropertyName };
14546
- /** version: 9.0.2 */
14544
+ /** version: 9.0.4-alpha.0 */
14547
14545
  //# 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": "9.0.2",
7
+ "version": "9.0.4-alpha.0",
8
8
  "description": "Template compiler package",
9
9
  "keywords": [
10
10
  "lwc"
@@ -34,6 +34,7 @@
34
34
  "types": "dist/index.d.ts",
35
35
  "files": [
36
36
  "dist/**/*.js",
37
+ "dist/**/*.cjs",
37
38
  "dist/**/*.d.ts"
38
39
  ],
39
40
  "scripts": {
@@ -50,9 +51,9 @@
50
51
  }
51
52
  },
52
53
  "dependencies": {
53
- "@lwc/errors": "9.0.2",
54
- "@lwc/shared": "9.0.2",
55
- "acorn": "~8.15.0",
54
+ "@lwc/errors": "9.0.4-alpha.0",
55
+ "@lwc/shared": "9.0.4-alpha.0",
56
+ "acorn": "~8.16.0",
56
57
  "astring": "~1.9.0",
57
58
  "he": "~1.2.0"
58
59
  },