@ogygia/data-shake 0.14.0 → 0.14.1

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/analysis.js +4 -0
  2. package/package.json +4 -4
package/dist/analysis.js CHANGED
@@ -494,6 +494,10 @@ function runs_on(test) {
494
494
  const inner = runs_on(t.argument);
495
495
  return inner && FLIP_SIDE[inner];
496
496
  }
497
+ if (t.type === "LogicalExpression" && t.operator === "??") {
498
+ const side = runs_on(t.left);
499
+ return side !== null && side === runs_on(t.right) ? side : null;
500
+ }
497
501
  if (t.type === "MemberExpression" && !t.computed && t.property?.name === "SSR" && t.object?.type === "MemberExpression" && t.object.property?.name === "env" && t.object.object?.type === "MetaProperty") return "server";
498
502
  if (t.type !== "BinaryExpression") return null;
499
503
  const eq = t.operator === "===" || t.operator === "==";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ogygia/data-shake",
3
- "version": "0.14.0",
3
+ "version": "0.14.1",
4
4
  "description": "Data shaking for ogygia apps: a page ships only the data its regions' code reads, starting with page.data",
5
5
  "keywords": [
6
6
  "data-shaking",
@@ -30,9 +30,9 @@
30
30
  }
31
31
  },
32
32
  "devDependencies": {
33
- "@ogygia/compiler": "0.14.0",
33
+ "@ogygia/compiler": "0.14.1",
34
34
  "@ogygia/config": "0.0.0",
35
- "@ogygia/core": "0.14.0",
35
+ "@ogygia/core": "0.14.1",
36
36
  "@typescript/native": "npm:typescript@^7.0.2",
37
37
  "svelte": "5.57.3",
38
38
  "tsdown": "^0.23.4",
@@ -41,7 +41,7 @@
41
41
  "vitest": "^4.1.12"
42
42
  },
43
43
  "peerDependencies": {
44
- "@ogygia/compiler": "^0.14.0",
44
+ "@ogygia/compiler": "^0.14.1",
45
45
  "svelte": "^5.56.8",
46
46
  "vite": "^8.2.4"
47
47
  },