@lwrjs/shared-utils 0.7.0-alpha.8 → 0.7.0-alpha.9

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.
@@ -62,7 +62,7 @@ async function extractMetadataFromHtml(htmlSource) {
62
62
  tagName,
63
63
  location: {startOffset, endOffset},
64
64
  props: attrs.length ? attrs.reduce((obj, {name, value}) => {
65
- obj[(0, import_identity.getPropFromAttrName)(name)] = value;
65
+ obj[(0, import_identity.getPropFromAttrName)(name)] = value === "" ? "true" : value;
66
66
  return obj;
67
67
  }, {}) : void 0
68
68
  };
@@ -39,9 +39,10 @@ export async function extractMetadataFromHtml(htmlSource) {
39
39
  location: { startOffset, endOffset },
40
40
  // transform attributes [{ name: 'some-attr', value: 'the value' }] into properties { someAttr: 'the value' }
41
41
  // leave props as undefined if there are no attributes
42
+ // set boolean attribute values to "true", or lwc will see them as falsy
42
43
  props: attrs.length
43
44
  ? attrs.reduce((obj, { name, value }) => {
44
- obj[getPropFromAttrName(name)] = value;
45
+ obj[getPropFromAttrName(name)] = value === '' ? 'true' : value;
45
46
  return obj;
46
47
  }, {})
47
48
  : undefined,
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "0.7.0-alpha.8",
7
+ "version": "0.7.0-alpha.9",
8
8
  "homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
9
9
  "repository": {
10
10
  "type": "git",
@@ -44,13 +44,13 @@
44
44
  "winston": "^3.7.2"
45
45
  },
46
46
  "devDependencies": {
47
- "@lwrjs/diagnostics": "0.7.0-alpha.8",
48
- "@lwrjs/types": "0.7.0-alpha.8",
47
+ "@lwrjs/diagnostics": "0.7.0-alpha.9",
48
+ "@lwrjs/types": "0.7.0-alpha.9",
49
49
  "@types/mime-types": "2.1.1",
50
50
  "@types/path-to-regexp": "^1.7.0"
51
51
  },
52
52
  "engines": {
53
53
  "node": ">=14.15.4 <17"
54
54
  },
55
- "gitHead": "fbe1daed908cf07eaf9fc8821f2ba2947f5d919f"
55
+ "gitHead": "522665298cc74f1898da6ed018fa72504bd72645"
56
56
  }