@lobb-js/studio 0.28.1 → 0.28.3

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.
@@ -13,7 +13,7 @@
13
13
  </script>
14
14
 
15
15
  <script lang="ts">
16
- import _ from "lodash";
16
+ import * as _ from "lodash-es";
17
17
  import { getStudioContext } from "../../context";
18
18
  import Footer from "./footer.svelte";
19
19
  import Header from "./header.svelte";
@@ -10,7 +10,7 @@
10
10
  Trash,
11
11
  } from "lucide-svelte";
12
12
  import { buttonVariants } from "../ui/button";
13
- import _ from "lodash";
13
+ import * as _ from "lodash-es";
14
14
  import { getStudioContext } from "../../context";
15
15
  import Button from "../ui/button/button.svelte";
16
16
 
@@ -1,5 +1,5 @@
1
1
  <script lang="ts">
2
- import _ from "lodash";
2
+ import * as _ from "lodash-es";
3
3
 
4
4
  import * as Popover from "../../components/ui/popover/index.js";
5
5
  import { ArrowDown, ArrowUp, GripVertical, Plus, X } from "lucide-svelte";
@@ -52,7 +52,7 @@
52
52
  CircleOff,
53
53
  } from "lucide-svelte";
54
54
  import Checkbox from "../ui/checkbox/checkbox.svelte";
55
- import { orderBy } from "lodash";
55
+ import { orderBy } from "lodash-es";
56
56
  import type { Snippet } from "svelte";
57
57
  import Button from "../ui/button/button.svelte";
58
58
 
@@ -20,7 +20,7 @@
20
20
  import { location } from "@wjfe/n-savant";
21
21
  import { Edit, Plus } from "lucide-svelte";
22
22
  import { toast } from "svelte-sonner";
23
- import { isEqual } from "lodash";
23
+ import { isEqual } from "lodash-es";
24
24
 
25
25
  interface Props {
26
26
  workflow: WorkflowEntry;
package/dist/utils.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { clsx } from "clsx";
2
2
  import { twMerge } from "tailwind-merge";
3
- import { isEqual } from "lodash";
3
+ import { isEqual } from "lodash-es";
4
4
  import { MediaQuery } from 'svelte/reactivity';
5
5
  export function cn() {
6
6
  var inputs = [];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lobb-js/studio",
3
3
  "license": "UNLICENSED",
4
- "version": "0.28.1",
4
+ "version": "0.28.3",
5
5
  "type": "module",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -40,7 +40,7 @@
40
40
  "postpublish": "./scripts/postpublish.sh"
41
41
  },
42
42
  "devDependencies": {
43
- "@lobb-js/core": "^0.31.8",
43
+ "@lobb-js/core": "^0.31.9",
44
44
  "@chromatic-com/storybook": "^4.1.2",
45
45
  "@storybook/addon-a11y": "^10.0.1",
46
46
  "@storybook/addon-docs": "^10.0.1",
@@ -48,9 +48,8 @@
48
48
  "@storybook/addon-vitest": "^10.0.1",
49
49
  "@storybook/svelte-vite": "^10.0.1",
50
50
  "@sveltejs/package": "^2.5.7",
51
- "@sveltejs/vite-plugin-svelte": "6.2.1",
51
+ "@sveltejs/vite-plugin-svelte": "^7.1.2",
52
52
  "@tsconfig/svelte": "^5.0.6",
53
- "@types/lodash": "^4.17.17",
54
53
  "@types/mustache": "^4.2.6",
55
54
  "@types/node": "^24.10.1",
56
55
  "@types/qs": "^6.9.18",
@@ -66,8 +65,9 @@
66
65
  "tailwindcss-animate": "^1.0.7",
67
66
  "tw-animate-css": "^1.4.0",
68
67
  "typescript": "~5.9.3",
69
- "vite": "6.3.3",
70
- "vitest": "^4.0.5"
68
+ "vite": "^7.3.3",
69
+ "vitest": "^4.0.5",
70
+ "@types/lodash-es": "^4.17.12"
71
71
  },
72
72
  "peerDependencies": {
73
73
  "svelte": "^5.0.0",
@@ -101,7 +101,6 @@
101
101
  "fuse.js": "^7.3.0",
102
102
  "javascript-time-ago": "^2.6.4",
103
103
  "json-stable-stringify": "^1.3.0",
104
- "lodash": "^4.17.21",
105
104
  "lucide-svelte": "^0.488.0",
106
105
  "mode-watcher": "^0.5.1",
107
106
  "mustache": "^4.2.0",
@@ -109,6 +108,7 @@
109
108
  "svelte-portal": "^2.2.1",
110
109
  "svelte-sonner": "^0.3.28",
111
110
  "tailwind-merge": "^3.4.0",
112
- "tailwind-variants": "^3.2.2"
111
+ "tailwind-variants": "^3.2.2",
112
+ "lodash-es": "^4.17.21"
113
113
  }
114
114
  }
@@ -13,7 +13,7 @@
13
13
  </script>
14
14
 
15
15
  <script lang="ts">
16
- import _ from "lodash";
16
+ import * as _ from "lodash-es";
17
17
  import { getStudioContext } from "../../context";
18
18
  import Footer from "./footer.svelte";
19
19
  import Header from "./header.svelte";
@@ -10,7 +10,7 @@
10
10
  Trash,
11
11
  } from "lucide-svelte";
12
12
  import { buttonVariants } from "../ui/button";
13
- import _ from "lodash";
13
+ import * as _ from "lodash-es";
14
14
  import { getStudioContext } from "../../context";
15
15
  import Button from "../ui/button/button.svelte";
16
16
 
@@ -1,5 +1,5 @@
1
1
  <script lang="ts">
2
- import _ from "lodash";
2
+ import * as _ from "lodash-es";
3
3
 
4
4
  import * as Popover from "../../components/ui/popover/index.js";
5
5
  import { ArrowDown, ArrowUp, GripVertical, Plus, X } from "lucide-svelte";
@@ -52,7 +52,7 @@
52
52
  CircleOff,
53
53
  } from "lucide-svelte";
54
54
  import Checkbox from "../ui/checkbox/checkbox.svelte";
55
- import { orderBy } from "lodash";
55
+ import { orderBy } from "lodash-es";
56
56
  import type { Snippet } from "svelte";
57
57
  import Button from "../ui/button/button.svelte";
58
58
 
@@ -20,7 +20,7 @@
20
20
  import { location } from "@wjfe/n-savant";
21
21
  import { Edit, Plus } from "lucide-svelte";
22
22
  import { toast } from "svelte-sonner";
23
- import { isEqual } from "lodash";
23
+ import { isEqual } from "lodash-es";
24
24
 
25
25
  interface Props {
26
26
  workflow: WorkflowEntry;
package/src/lib/utils.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { clsx, type ClassValue } from "clsx";
2
2
  import { twMerge } from "tailwind-merge";
3
- import { isEqual } from "lodash";
3
+ import { isEqual } from "lodash-es";
4
4
 
5
5
  import { MediaQuery } from 'svelte/reactivity';
6
6
 
@@ -1,5 +1,5 @@
1
1
  import { contextualLibAlias } from "./contextual-lib-alias.js";
2
- import { lobbWorkspaceOptimize } from "./monorepo-workspace.js";
2
+ import { lobbWorkspaceOptimize } from "./workspace-optimize.js";
3
3
  import { lobbExtensionsPlugin } from "./lobb-extensions.js";
4
4
  import { lobbProxyPlugin } from "./lobb-proxy.js";
5
5
 
@@ -11,8 +11,6 @@ import { join, resolve, dirname } from "node:path";
11
11
  * - entries: Tells Vite to crawl workspace packages at startup so
12
12
  * all their deps are discovered and pre-bundled upfront
13
13
  * (avoids 504 timeouts on first browser load).
14
- * - include: Re-includes leaf CJS deps of excluded packages so
15
- * Vite still pre-bundles them for the browser.
16
14
  * - holdUntilCrawlEnd: Blocks the first response until optimization is done.
17
15
  * - server.fs.allow: Allows Vite to serve files from the monorepo root
18
16
  * (needed to follow symlinks into workspace packages).
@@ -36,7 +34,6 @@ export function lobbWorkspaceOptimize() {
36
34
  holdUntilCrawlEnd: true,
37
35
  entries: getWorkspaceEntries(workspacePkgs),
38
36
  exclude: workspacePkgs,
39
- include: getCjsDepsOf(workspacePkgs),
40
37
  },
41
38
  server: {
42
39
  fs: {
@@ -59,6 +56,7 @@ function getLobbWorkspacePackages() {
59
56
  }
60
57
  }
61
58
 
59
+
62
60
  function getMonorepoRoot(pkgNames) {
63
61
  for (const name of pkgNames) {
64
62
  try {
@@ -98,36 +96,6 @@ function getWorkspaceEntries(pkgNames) {
98
96
  return entries;
99
97
  }
100
98
 
101
- function readPkgFrom(name, baseDir) {
102
- let dir = baseDir;
103
- for (let i = 0; i < 8; i++) {
104
- const pkg = tryReadJson(join(dir, "node_modules", name, "package.json"));
105
- if (pkg) return pkg;
106
- const parent = dirname(dir);
107
- if (parent === dir) break;
108
- dir = parent;
109
- }
110
- return null;
111
- }
112
-
113
- function getCjsDepsOf(pkgNames) {
114
- const deps = [];
115
- for (const name of pkgNames) {
116
- try {
117
- const realPath = realpathSync(resolve(`node_modules/${name}`));
118
- const pkg = tryReadJson(join(realPath, "package.json"));
119
- if (!pkg) continue;
120
- for (const dep of Object.keys(pkg.dependencies ?? {})) {
121
- const depPkg = readPkgFrom(dep, realPath);
122
- if (!depPkg) continue;
123
- const isCjs = depPkg.type !== "module";
124
- const isLeaf = Object.keys(depPkg.dependencies ?? {}).length === 0;
125
- if (isCjs && isLeaf) deps.push(dep);
126
- }
127
- } catch { /* skip */ }
128
- }
129
- return [...new Set(deps)];
130
- }
131
99
 
132
100
  function tryReadJson(filePath) {
133
101
  try {