@m2c2kit/build-helpers 0.3.6 → 0.3.7

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/dist/index.js +8 -0
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -11234,6 +11234,14 @@ function expressionNeedsParenthesis(state, node, parentNode, isRightHand) {
11234
11234
  // Exponentiation operator has right-to-left associativity
11235
11235
  return !isRightHand
11236
11236
  }
11237
+ if (
11238
+ nodePrecedence === 13 &&
11239
+ parentNodePrecedence === 13 &&
11240
+ (node.operator === '??' || parentNode.operator === '??')
11241
+ ) {
11242
+ // Nullish coalescing and boolean operators cannot be combined
11243
+ return true
11244
+ }
11237
11245
  if (isRightHand) {
11238
11246
  // Parenthesis are used if both operators have the same precedence
11239
11247
  return (
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m2c2kit/build-helpers",
3
- "version": "0.3.6",
3
+ "version": "0.3.7",
4
4
  "description": "",
5
5
  "module": "dist/index.js",
6
6
  "type": "module",
@@ -11,7 +11,7 @@
11
11
  ],
12
12
  "devDependencies": {
13
13
  "@rollup/plugin-commonjs": "25.0.0",
14
- "@rollup/plugin-node-resolve": "15.0.2",
14
+ "@rollup/plugin-node-resolve": "15.1.0",
15
15
  "@types/estree": "1.0.1",
16
16
  "@types/findup-sync": "4.0.2",
17
17
  "cpy": "10.1.0",
@@ -22,7 +22,7 @@
22
22
  "rollup-plugin-copy": "^3.4.0",
23
23
  "rollup-plugin-dts": "5.3.0",
24
24
  "rollup-plugin-esbuild": "5.0.0",
25
- "typescript": "5.0.4"
25
+ "typescript": "5.1.3"
26
26
  },
27
27
  "scripts": {
28
28
  "build": "npm run clean && tsc && rollup -c",
@@ -33,7 +33,7 @@
33
33
  "dependencies": {
34
34
  "acorn": "8.8.2",
35
35
  "acorn-walk": "8.2.0",
36
- "astring": "1.8.5",
36
+ "astring": "1.8.6",
37
37
  "css-select": "5.1.0",
38
38
  "dom-serializer": "2.0.0",
39
39
  "domhandler": "5.0.3",