Skip to content

Commit f85635e

Browse files
os-zhuangclaude
andauthored
chore(cli,plugin-dev): drop unused @objectstack/studio dependency (#2665)
Follow-up to 3b9fd94 (Studio no longer default-loaded by os dev/start/serve). With the default registration gone, neither cli nor plugin-dev imports @objectstack/studio at runtime. The last remaining consumer was the ADR-0048 app-split test, which now exercises the identical one-app-package code path via Setup + Account. The @objectstack/studio package itself is unchanged and still registerable explicitly. Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 12e11b6 commit f85635e

5 files changed

Lines changed: 17 additions & 20 deletions

File tree

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@objectstack/cli": patch
3+
"@objectstack/plugin-dev": patch
4+
---
5+
6+
Drop the `@objectstack/studio` dependency from `cli` and `plugin-dev`. Since Studio is no longer default-loaded by `os dev` / `os start` / `os serve` (the console hosts it at `/_console/studio/...`), neither package imports it at runtime any more. The only remaining consumer was the ADR-0048 app-split test in `cli`, which now exercises the identical one-app-package code path via Setup + Account. The `@objectstack/studio` package itself is unchanged and still registerable explicitly.

packages/cli/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@
7979
"@objectstack/service-storage": "workspace:*",
8080
"@objectstack/setup": "workspace:*",
8181
"@objectstack/spec": "workspace:*",
82-
"@objectstack/studio": "workspace:*",
8382
"@objectstack/trigger-api": "workspace:*",
8483
"@objectstack/trigger-record-change": "workspace:*",
8584
"@objectstack/trigger-schedule": "workspace:*",

packages/cli/src/adr-0048-app-split.test.ts

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,18 @@
77
* Boots a real ObjectQL engine, runs each app package's plugin `start()` against
88
* a manifest service backed by `engine.registerApp` (exactly what the kernel
99
* wires — see objectql plugin.ts: `register(m) => ql.registerApp(m)`), and
10-
* asserts each app resolves under `com.objectstack.{studio,setup,account}` and
11-
* that all three coexist (the multi-app-package ambiguity is gone).
10+
* asserts each app resolves under `com.objectstack.{setup,account}` and that
11+
* they coexist (the multi-app-package ambiguity is gone).
12+
*
13+
* Studio is one of the same one-app packages but is no longer default-loaded
14+
* (it now lives in the console at `/_console/studio/...`), so cli/plugin-dev no
15+
* longer depend on `@objectstack/studio`. Setup + Account exercise the identical
16+
* app-split code path; asserting them keeps this regression intact without cli
17+
* re-taking a dependency purely for the test.
1218
*/
1319

1420
import { describe, it, expect, beforeEach } from 'vitest';
1521
import { ObjectQL } from '@objectstack/objectql';
16-
import { createStudioAppPlugin } from '@objectstack/studio';
1722
import { createSetupAppPlugin } from '@objectstack/setup';
1823
import { createAccountAppPlugin } from '@objectstack/account';
1924

@@ -35,16 +40,13 @@ describe('ADR-0048 — platform apps as one-app packages', () => {
3540
engine = new ObjectQL();
3641
engine.registry.logLevel = 'silent';
3742
const ctx = makeCtx(engine);
38-
for (const plugin of [createSetupAppPlugin(), createStudioAppPlugin(), createAccountAppPlugin()]) {
43+
for (const plugin of [createSetupAppPlugin(), createAccountAppPlugin()]) {
3944
await plugin.init?.(ctx);
4045
await plugin.start(ctx);
4146
}
4247
});
4348

4449
it('registers each app under its OWN package id', () => {
45-
expect(engine.registry.getItem<any>('app', 'studio', 'com.objectstack.studio')?._packageId).toBe(
46-
'com.objectstack.studio',
47-
);
4850
expect(engine.registry.getItem<any>('app', 'setup', 'com.objectstack.setup')?._packageId).toBe(
4951
'com.objectstack.setup',
5052
);
@@ -53,23 +55,20 @@ describe('ADR-0048 — platform apps as one-app packages', () => {
5355
);
5456
});
5557

56-
it('all three apps coexist and resolve by name (getApp)', () => {
57-
expect(engine.registry.getApp('studio')?.name).toBe('studio');
58+
it('the apps coexist and resolve by name (getApp)', () => {
5859
expect(engine.registry.getApp('setup')?.name).toBe('setup');
5960
expect(engine.registry.getApp('account')?.name).toBe('account');
6061
});
6162

6263
it('each app package owns a distinct namespace (no install-gate conflict)', () => {
63-
expect(engine.registry.getNamespaceOwners('studio')).toEqual(['com.objectstack.studio']);
6464
expect(engine.registry.getNamespaceOwners('setup')).toEqual(['com.objectstack.setup']);
6565
expect(engine.registry.getNamespaceOwners('account')).toEqual(['com.objectstack.account']);
6666
});
6767

68-
it('records all three as installed packages', () => {
68+
it('records the app packages as installed', () => {
6969
const ids = engine.registry.getAllPackages().map((p: any) => p.manifest.id);
7070
expect(ids).toEqual(
7171
expect.arrayContaining([
72-
'com.objectstack.studio',
7372
'com.objectstack.setup',
7473
'com.objectstack.account',
7574
]),

packages/plugins/plugin-dev/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
"@objectstack/service-i18n": "workspace:^",
3131
"@objectstack/setup": "workspace:^",
3232
"@objectstack/spec": "workspace:*",
33-
"@objectstack/studio": "workspace:^",
3433
"@objectstack/types": "workspace:*"
3534
},
3635
"devDependencies": {

pnpm-lock.yaml

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

0 commit comments

Comments
 (0)