From 468f5ecb2d0b26962249196fe8b2ab3574164072 Mon Sep 17 00:00:00 2001 From: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com> Date: Tue, 7 Jul 2026 07:03:20 +0800 Subject: [PATCH] chore(cli,plugin-dev): drop unused @objectstack/studio dependency Follow-up to 3b9fd940 (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: Claude Opus 4.8 --- .changeset/drop-studio-dep-cli-plugin-dev.md | 6 +++++ packages/cli/package.json | 1 - packages/cli/src/adr-0048-app-split.test.ts | 23 ++++++++++---------- packages/plugins/plugin-dev/package.json | 1 - pnpm-lock.yaml | 6 ----- 5 files changed, 17 insertions(+), 20 deletions(-) create mode 100644 .changeset/drop-studio-dep-cli-plugin-dev.md diff --git a/.changeset/drop-studio-dep-cli-plugin-dev.md b/.changeset/drop-studio-dep-cli-plugin-dev.md new file mode 100644 index 0000000000..6da03f2122 --- /dev/null +++ b/.changeset/drop-studio-dep-cli-plugin-dev.md @@ -0,0 +1,6 @@ +--- +"@objectstack/cli": patch +"@objectstack/plugin-dev": patch +--- + +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. diff --git a/packages/cli/package.json b/packages/cli/package.json index 0c9f85621b..b32591686e 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -79,7 +79,6 @@ "@objectstack/service-storage": "workspace:*", "@objectstack/setup": "workspace:*", "@objectstack/spec": "workspace:*", - "@objectstack/studio": "workspace:*", "@objectstack/trigger-api": "workspace:*", "@objectstack/trigger-record-change": "workspace:*", "@objectstack/trigger-schedule": "workspace:*", diff --git a/packages/cli/src/adr-0048-app-split.test.ts b/packages/cli/src/adr-0048-app-split.test.ts index 0ee7451e6c..1da450ca57 100644 --- a/packages/cli/src/adr-0048-app-split.test.ts +++ b/packages/cli/src/adr-0048-app-split.test.ts @@ -7,13 +7,18 @@ * Boots a real ObjectQL engine, runs each app package's plugin `start()` against * a manifest service backed by `engine.registerApp` (exactly what the kernel * wires — see objectql plugin.ts: `register(m) => ql.registerApp(m)`), and - * asserts each app resolves under `com.objectstack.{studio,setup,account}` and - * that all three coexist (the multi-app-package ambiguity is gone). + * asserts each app resolves under `com.objectstack.{setup,account}` and that + * they coexist (the multi-app-package ambiguity is gone). + * + * Studio is one of the same one-app packages but is no longer default-loaded + * (it now lives in the console at `/_console/studio/...`), so cli/plugin-dev no + * longer depend on `@objectstack/studio`. Setup + Account exercise the identical + * app-split code path; asserting them keeps this regression intact without cli + * re-taking a dependency purely for the test. */ import { describe, it, expect, beforeEach } from 'vitest'; import { ObjectQL } from '@objectstack/objectql'; -import { createStudioAppPlugin } from '@objectstack/studio'; import { createSetupAppPlugin } from '@objectstack/setup'; import { createAccountAppPlugin } from '@objectstack/account'; @@ -35,16 +40,13 @@ describe('ADR-0048 — platform apps as one-app packages', () => { engine = new ObjectQL(); engine.registry.logLevel = 'silent'; const ctx = makeCtx(engine); - for (const plugin of [createSetupAppPlugin(), createStudioAppPlugin(), createAccountAppPlugin()]) { + for (const plugin of [createSetupAppPlugin(), createAccountAppPlugin()]) { await plugin.init?.(ctx); await plugin.start(ctx); } }); it('registers each app under its OWN package id', () => { - expect(engine.registry.getItem('app', 'studio', 'com.objectstack.studio')?._packageId).toBe( - 'com.objectstack.studio', - ); expect(engine.registry.getItem('app', 'setup', 'com.objectstack.setup')?._packageId).toBe( 'com.objectstack.setup', ); @@ -53,23 +55,20 @@ describe('ADR-0048 — platform apps as one-app packages', () => { ); }); - it('all three apps coexist and resolve by name (getApp)', () => { - expect(engine.registry.getApp('studio')?.name).toBe('studio'); + it('the apps coexist and resolve by name (getApp)', () => { expect(engine.registry.getApp('setup')?.name).toBe('setup'); expect(engine.registry.getApp('account')?.name).toBe('account'); }); it('each app package owns a distinct namespace (no install-gate conflict)', () => { - expect(engine.registry.getNamespaceOwners('studio')).toEqual(['com.objectstack.studio']); expect(engine.registry.getNamespaceOwners('setup')).toEqual(['com.objectstack.setup']); expect(engine.registry.getNamespaceOwners('account')).toEqual(['com.objectstack.account']); }); - it('records all three as installed packages', () => { + it('records the app packages as installed', () => { const ids = engine.registry.getAllPackages().map((p: any) => p.manifest.id); expect(ids).toEqual( expect.arrayContaining([ - 'com.objectstack.studio', 'com.objectstack.setup', 'com.objectstack.account', ]), diff --git a/packages/plugins/plugin-dev/package.json b/packages/plugins/plugin-dev/package.json index 2b1be2bb34..c0f59bbd23 100644 --- a/packages/plugins/plugin-dev/package.json +++ b/packages/plugins/plugin-dev/package.json @@ -30,7 +30,6 @@ "@objectstack/service-i18n": "workspace:^", "@objectstack/setup": "workspace:^", "@objectstack/spec": "workspace:*", - "@objectstack/studio": "workspace:^", "@objectstack/types": "workspace:*" }, "devDependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 921ee3e9e0..3da7154ddb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -444,9 +444,6 @@ importers: '@objectstack/spec': specifier: workspace:* version: link:../spec - '@objectstack/studio': - specifier: workspace:* - version: link:../apps/studio '@objectstack/trigger-api': specifier: workspace:* version: link:../triggers/trigger-api @@ -1367,9 +1364,6 @@ importers: '@objectstack/spec': specifier: workspace:* version: link:../../spec - '@objectstack/studio': - specifier: workspace:^ - version: link:../../apps/studio '@objectstack/types': specifier: workspace:* version: link:../../types