Skip to content

Commit c969ac2

Browse files
committed
chore(data-inspector): move jora to devDependencies (catalog:inlined)
jora no longer needs to be an installable dependency for either build: it now moves under devDependencies with catalog:inlined (matching devframe's ua-parser-modern precedent), so tsdown vendors it into this package's own dist on both the node and browser platforms by default. Drops the now-redundant deps.alwaysBundle override from tsdown.config.ts.
1 parent 2d65182 commit c969ac2

5 files changed

Lines changed: 14 additions & 20 deletions

File tree

‎plugins/data-inspector/package.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,7 @@
6363
},
6464
"dependencies": {
6565
"cac": "catalog:deps",
66-
"get-port-please": "catalog:deps",
67-
"jora": "catalog:deps"
66+
"get-port-please": "catalog:deps"
6867
},
6968
"devDependencies": {
7069
"@antfu/design": "catalog:frontend",
@@ -80,6 +79,7 @@
8079
"devframe": "workspace:*",
8180
"dompurify": "catalog:frontend",
8281
"floating-vue": "catalog:frontend",
82+
"jora": "catalog:inlined",
8383
"reka-ui": "catalog:frontend",
8484
"splitpanes": "catalog:frontend",
8585
"storybook": "catalog:storybook",

‎plugins/data-inspector/src/engine/query-engine.ts‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@
1414
* once `runQuery`/`runQueryAtPath`/`suggest` are actually called, so simply
1515
* registering the data-inspector's RPC functions (which happens on every
1616
* host that sets it up, whether or not anyone opens the panel) never pays
17-
* for parsing jora. The node build inlines jora into its own output (see
18-
* `tsdown.config.ts`'s `deps.alwaysBundle`) so that on-demand `import()`
19-
* resolves a local chunk instead of a `node_modules` lookup.
17+
* for parsing jora. jora is a `devDependency` (`catalog:inlined` in the
18+
* workspace catalog) rather than a regular `dependency`, so tsdown vendors
19+
* it straight into this package's own `dist` on both the node and browser
20+
* builds — the on-demand `import()` resolves a local chunk, and neither
21+
* side needs consumers to install jora themselves.
2022
*/
2123
import type { Jora } from 'jora'
2224
import type { NodePath, QueryOutcome, SuggestItem, SuggestOutcome } from './contract'

‎plugins/data-inspector/tsdown.config.ts‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,6 @@ export default defineConfig([
3535
tsconfig,
3636
dts: false,
3737
entry: serverEntries,
38-
// jora is loaded via a lazy `import('jora')` in `engine/query-engine.ts`
39-
// (only paid for on the first query), and inlined here so that lazy
40-
// import resolves a chunk shipped inside this package's own `dist`
41-
// instead of a `node_modules` lookup consumers would otherwise need to
42-
// satisfy just to load the RPC functions. The browser build (SPA,
43-
// `engine/index` client entry) keeps jora external/dependency-resolved,
44-
// since jora already loads eagerly there for query-editor syntax gating.
45-
deps: { alwaysBundle: ['jora'] },
4638
},
4739
// One dts graph PER entry: a single-entry graph can never split shared
4840
// chunks, so declarations always inline and the emitted .d.mts files are

‎pnpm-lock.yaml‎

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎pnpm-workspace.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ catalogs:
8989
hono: ^4.13.1
9090
image-meta: ^0.2.2
9191
immer: ^11.1.16
92-
jora: ^1.0.0-beta.16
9392
launch-editor: ^2.14.1
9493
mrmime: ^2.0.1
9594
nitro: ^3.0.260610-beta
@@ -152,6 +151,7 @@ catalogs:
152151
vue: ^3.5.41
153152
inlined:
154153
'@antfu/utils': ^9.3.0
154+
jora: ^1.0.0-beta.16
155155
ua-parser-modern: ^0.1.1
156156
storybook:
157157
'@storybook/addon-a11y': *storybook

0 commit comments

Comments
 (0)