v3.0: Remove all @deprecated items across spec and runtime packages#638
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Phase 8 deprecation cleanup: - Remove definePlugin() from kernel/plugin.zod.ts - Remove createErrorResponse(), getHttpStatusForCategory() from api/errors.zod.ts - Remove createEventBusConfig/TypeDefinition/WebhookConfig from events/bus.zod.ts - Remove RateLimitSchema alias from api/endpoint.zod.ts - Remove RealtimePresenceStatus, RealtimeAction aliases from api/realtime.zod.ts - Remove deprecated location field from ui/action.zod.ts - Remove ApiCapabilitiesSchema from api/discovery.zod.ts (inline in stack.zod.ts) - Remove hub/ barrel re-export + Hub namespace from index.ts - Tighten z.any() in ui/i18n.zod.ts to z.union([z.string(), z.number(), z.boolean()]) - Remove createHonoApp() from @objectstack/hono - Remove HttpDispatcher re-export from @objectstack/runtime - Remove IPluginConfigValidator from @objectstack/core - Remove deprecated value/count/getObject from @objectstack/client - Remove ApiRegistryConfig/createApiRegistryPlugin from @objectstack/rest - Update all tests for breaking changes (191 files, 5157 tests pass) Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
- Fix unused PresenceStatus import in realtime.zod.ts - Fix pre-existing unused MetadataFallbackStrategySchema import - Update Hono adapter tests (remove createHonoApp tests, keep objectStackMiddleware tests) - Remove metadata-api.test.ts (tested removed createHonoApp) - Restore HttpDispatcher export (still needed by NestJS/NextJS adapters internally) - Remove backward-compatible alias test from rest package - All spec tests pass (191 files, 5157 tests) - All adapter tests pass (Hono 3, NestJS 57, NextJS 56) - All runtime tests pass (17), core tests pass (201), rest tests pass (36) Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Completes v3.0 Phase 8 deprecation cleanup by removing deprecated helpers/aliases across @objectstack/spec and runtime packages, and updating tests/docs accordingly.
Changes:
- Removed deprecated helper functions from spec (plugin/events/errors) and tightened
ui/i18ninterpolation param typing. - Removed deprecated schema aliases and legacy fields (e.g., ActionSchema
location, realtime and rate-limit aliases, discovery capabilities alias). - Removed deprecated runtime/adapters aliases/APIs (notably Hono
createHonoApp) and updated tests, migration guide, and roadmap.
Reviewed changes
Copilot reviewed 28 out of 28 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/spec/src/ui/i18n.zod.ts | Tightens interpolation params from any to primitive union. |
| packages/spec/src/ui/action.zod.ts | Removes deprecated location field (use locations). |
| packages/spec/src/stack.zod.ts | Inlines previous network capability shape after removing discovery alias. |
| packages/spec/src/kernel/plugin.zod.ts | Removes deprecated definePlugin() helper (runtime logic). |
| packages/spec/src/kernel/metadata-plugin.zod.ts | Cleans up unused import tied to deprecated loader types. |
| packages/spec/src/kernel/events/bus.zod.ts | Removes deprecated event helper functions (runtime logic). |
| packages/spec/src/index.ts | Drops Hub namespace export and definePlugin re-export. |
| packages/spec/src/hub/index.ts | Removes deprecated hub re-export barrel. |
| packages/spec/src/api/realtime.zod.ts | Removes deprecated realtime alias exports; uses shared schemas directly. |
| packages/spec/src/api/realtime.test.ts | Updates tests to validate shared realtime enums directly. |
| packages/spec/src/api/realtime-shared.test.ts | Updates cross-protocol test to use PresenceStatus. |
| packages/spec/src/api/errors.zod.ts | Removes deprecated error helper functions (runtime logic). |
| packages/spec/src/api/errors.test.ts | Updates tests to validate ErrorHttpStatusMap instead of removed helpers. |
| packages/spec/src/api/endpoint.zod.ts | Removes deprecated RateLimitSchema alias; uses shared config schema. |
| packages/spec/src/api/endpoint.test.ts | Updates tests to validate RateLimitConfigSchema. |
| packages/spec/src/api/discovery.zod.ts | Removes deprecated ApiCapabilitiesSchema and related type export. |
| packages/spec/src/api/discovery.test.ts | Removes tests for deprecated capabilities alias. |
| packages/spec/V3_MIGRATION_GUIDE.md | Marks migration checklist items as completed for v3.0. |
| packages/runtime/src/index.ts | Removes deprecated rest alias re-exports and updates export list. |
| packages/rest/src/rest.test.ts | Removes backward-compat alias tests tied to deleted exports. |
| packages/rest/src/rest-api-plugin.ts | Removes deprecated ApiRegistryConfig and createApiRegistryPlugin aliases. |
| packages/rest/src/index.ts | Stops exporting deprecated rest aliases. |
| packages/core/src/plugin-loader.ts | Removes deprecated IPluginConfigValidator interface. |
| packages/client/src/index.ts | Removes deprecated pagination alias props and deprecated getObject(). |
| packages/adapters/hono/src/metadata-api.test.ts | Deletes legacy integration tests tied to removed createHonoApp(). |
| packages/adapters/hono/src/index.ts | Removes createHonoApp() and leaves only objectStackMiddleware(). |
| packages/adapters/hono/src/hono.test.ts | Updates tests to cover middleware-only adapter surface. |
| ROADMAP.md | Updates Phase 8 checklist and Hono adapter description for v3.0 changes. |
| export interface ObjectStackHonoOptions { | ||
| kernel: ObjectKernel; | ||
| prefix?: string; | ||
| } | ||
|
|
There was a problem hiding this comment.
ObjectStackHonoOptions is still exported (and includes prefix) but createHonoApp() has been removed, so this type is now unused within the package and no longer describes any public API surface. Consider removing it or replacing it with a middleware-specific type (or exporting only objectStackMiddleware without the legacy options type) to avoid confusing consumers.
| export interface ObjectStackHonoOptions { | |
| kernel: ObjectKernel; | |
| prefix?: string; | |
| } |
Complete Phase 8 of the ROADMAP — remove all 23 deprecated items (14 spec, 9 runtime) targeting v3.0.0.
Spec: Runtime logic extraction (6 functions removed)
definePlugin(),createErrorResponse(),getHttpStatusForCategory()— moved to@objectstack/corecreateEventBusConfig(),createEventTypeDefinition(),createEventWebhookConfig()— moved to@objectstack/coreSpec: Schema alias removal (5 items)
RateLimitSchema→ useRateLimitConfigSchemafromshared/http.zod.tsRealtimePresenceStatus/RealtimeAction→ usePresenceStatus/RealtimeRecordActionfromrealtime-shared.zod.tsActionSchema.locationfield → uselocationsApiCapabilitiesSchema→ derived fromservicesmap inDiscoverySchemaSpec: Module cleanup
hub/barrel — consumers import directly fromsystem/orkernel/Hub.*namespace anddefinePluginre-export from rootindex.tsz.any()inui/i18n.zod.tsparams toz.union([z.string(), z.number(), z.boolean()])Runtime packages (8 items removed)
createHonoApp()from@objectstack/hono(use plugin-basedHonoServerPlugin)IPluginConfigValidatorfrom@objectstack/core(usePluginConfigValidatorclass)value/count/getObjectfrom@objectstack/client(userecords/total/getItem())ApiRegistryConfig/createApiRegistryPluginfrom@objectstack/rest(useRestApiPluginConfig/createRestApiPlugin)Migration example
Metrics
@deprecatedin spec.zod.ts@deprecatedin runtimeHttpDispatcher— adapters depend on it)z.any()non-filter💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.