babel-plugin-jsx-dom-expressions 0.35.12 → 0.35.14

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 +7 -6
  2. package/package.json +3 -3
package/index.js CHANGED
@@ -1793,6 +1793,7 @@ function transformElement$2(path, info) {
1793
1793
  wontEscape: path.node.wontEscape,
1794
1794
  renderer: "ssr"
1795
1795
  };
1796
+ if (tagName === "script" || tagName === "style") path.doNotEscape = true;
1796
1797
 
1797
1798
  if (info.topLevel && config.hydratable) {
1798
1799
  if (tagName === "head") {
@@ -2832,7 +2833,8 @@ function transformComponent(path) {
2832
2833
  // Normalize expressions for non-null and type-as
2833
2834
  while (
2834
2835
  t__namespace.isTSNonNullExpression(value.expression) ||
2835
- t__namespace.isTSAsExpression(value.expression)
2836
+ t__namespace.isTSAsExpression(value.expression) ||
2837
+ t__namespace.isTSSatisfiesExpression(value.expression)
2836
2838
  ) {
2837
2839
  value.expression = value.expression.expression;
2838
2840
  }
@@ -3220,7 +3222,7 @@ var config = {
3220
3222
  staticMarker: "@once",
3221
3223
  effectWrapper: "effect",
3222
3224
  memoWrapper: "memo",
3223
- validate: false
3225
+ validate: true
3224
3226
  };
3225
3227
 
3226
3228
  const { isValidHTMLNesting } = require("validate-html-nesting");
@@ -3229,11 +3231,10 @@ const { isValidHTMLNesting } = require("validate-html-nesting");
3229
3231
  const JSXValidator = {
3230
3232
  JSXElement(path) {
3231
3233
  const elName = path.node.openingElement.name;
3232
- if (!t__namespace.isJSXIdentifier(elName)) return;
3233
- const elTagName = elName.name;
3234
- if (!isComponent(elTagName)) return;
3235
3234
  const parent = path.parent;
3236
- if (!t__namespace.isJSXElement(parent)) return;
3235
+ if (!t__namespace.isJSXElement(parent) || !t__namespace.isJSXIdentifier(elName)) return;
3236
+ const elTagName = elName.name;
3237
+ if (isComponent(elTagName)) return;
3237
3238
  const parentElName = parent.openingElement.name;
3238
3239
  if (!t__namespace.isJSXIdentifier(parentElName)) return;
3239
3240
  const parentElTagName = parentElName.name;
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.35.12",
4
+ "version": "0.35.14",
5
5
  "author": "Ryan Carniato",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -23,7 +23,7 @@
23
23
  "@babel/plugin-syntax-jsx": "^7.18.6",
24
24
  "@babel/types": "^7.20.7",
25
25
  "html-entities": "2.3.3",
26
- "validate-html-nesting": "^1.0.2"
26
+ "validate-html-nesting": "^1.2.0"
27
27
  },
28
28
  "peerDependencies": {
29
29
  "@babel/core": "^7.20.12"
@@ -31,5 +31,5 @@
31
31
  "devDependencies": {
32
32
  "@babel/core": "^7.20.12"
33
33
  },
34
- "gitHead": "7c83569e6b30a64cc08e5c8cbdc4b44235551b4b"
34
+ "gitHead": "4b32c4922f0294e01dc218475d342287abc3a215"
35
35
  }