babel-plugin-jsx-dom-expressions 0.37.22 → 0.38.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.
Files changed (2) hide show
  1. package/index.js +3 -2
  2. package/package.json +2 -2
package/index.js CHANGED
@@ -773,6 +773,7 @@ const alwaysClose = [
773
773
  "select",
774
774
  "iframe",
775
775
  "script",
776
+ "noscript",
776
777
  "template",
777
778
  "fieldset"
778
779
  ];
@@ -782,7 +783,7 @@ function transformElement$3(path, info) {
782
783
  config = getConfig(path),
783
784
  wrapSVG = info.topLevel && tagName != "svg" && SVGElements.has(tagName),
784
785
  voidTag = VoidElements.indexOf(tagName) > -1,
785
- isCustomElement = tagName.indexOf("-") > -1,
786
+ isCustomElement = tagName.indexOf("-") > -1 || !!path.get("openingElement").get("attributes").find(a => a.node.name?.name === "is"),
786
787
  results = {
787
788
  template: `<${tagName}`,
788
789
  declarations: [],
@@ -833,7 +834,7 @@ function transformElement$3(path, info) {
833
834
  results.toBeClosed.add(tagName);
834
835
  if (InlineElements.includes(tagName)) BlockElements.forEach(i => results.toBeClosed.add(i));
835
836
  } else results.toBeClosed = info.toBeClosed;
836
- transformChildren$2(path, results, config);
837
+ if (tagName !== "noscript") transformChildren$2(path, results, config);
837
838
  if (toBeClosed) results.template += `</${tagName}>`;
838
839
  }
839
840
  if (info.topLevel && config.hydratable && results.hasHydratableEvent) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "babel-plugin-jsx-dom-expressions",
3
3
  "description": "A JSX to DOM plugin that wraps expressions for fine grained change detection",
4
- "version": "0.37.22",
4
+ "version": "0.38.0",
5
5
  "author": "Ryan Carniato",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -31,5 +31,5 @@
31
31
  "devDependencies": {
32
32
  "@babel/core": "^7.20.12"
33
33
  },
34
- "gitHead": "8fa34b71f185b76a910fca56980bb5297638f768"
34
+ "gitHead": "458e00e067c2a842f28a71ce906d8e4ce62214e5"
35
35
  }