Deprecate @objectql/core per migration guide#390
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
…s pass Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
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
This PR deprecates @objectql/core in favor of the upstream @objectstack/objectql@3.0.4 package, implementing the migration strategy outlined in the spec repository. The core functionality (ObjectQL engine, SchemaRegistry, createObjectQLKernel, utility functions) is now re-exported from upstream, while the bridge class and ObjectQLPlugin orchestrator remain for backward compatibility.
Changes:
- Added deprecation notices to
@objectql/corepackage.json and all exports in index.ts - Updated CLI tools (repl, migrate, doctor) to import directly from
@objectstack/objectql - Migrated
@objectql/platform-nodeto use upstream utilities (toTitleCase) - Added comprehensive migration guide documentation
Reviewed changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/foundation/core/package.json | Added deprecated field and updated description |
| packages/foundation/core/src/index.ts | Added @deprecated tags and re-exported symbols from upstream |
| packages/foundation/core/README.md | Added deprecation warning and migration guide link |
| packages/foundation/platform-node/package.json | Replaced @objectql/core dependency with @objectstack/objectql |
| packages/foundation/platform-node/src/loader.ts | Updated toTitleCase import to use upstream package |
| packages/tools/cli/package.json | Added @objectstack/objectql dependency |
| packages/tools/cli/src/commands/repl.ts | Updated ObjectQL and ObjectRepository imports |
| packages/tools/cli/src/commands/migrate.ts | Updated migration template to use upstream import |
| packages/tools/cli/src/commands/doctor.ts | Added @objectstack/objectql to dependency checks |
| content/docs/guides/objectql-migration.mdx | New comprehensive migration guide |
| content/docs/guides/meta.json | Added migration guide to navigation |
| content/docs/architecture/core.mdx | Added deprecation callout with migration guide link |
| examples/showcase/enterprise-erp/src/plugins/audit/audit.plugin.ts | Clarified comment about local type definitions |
| pnpm-lock.yaml | Added @objectstack/objectql@3.0.4 dependencies |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
| export { createObjectQLKernel } from '@objectstack/objectql'; | ||
| /** @deprecated Import from `@objectstack/objectql` instead. */ | ||
| export { toTitleCase, convertIntrospectedSchemaToObjects } from '@objectstack/objectql'; | ||
| /** @deprecated Import from `@objectstack/objectql` instead. */ | ||
| export type { ObjectQLKernelOptions, HookHandler, HookEntry, OperationContext, EngineMiddleware, ObjectQLHostContext } from '@objectstack/objectql'; |
There was a problem hiding this comment.
The index.ts is now re-exporting createObjectQLKernel and ObjectQLKernelOptions from @objectstack/objectql, but the local kernel-factory.ts file still exists with its own implementation. This creates a potential breaking change if the upstream and local implementations differ.
The local implementation (in kernel-factory.ts lines 42-47) creates an ObjectKernel with UpstreamObjectQLPlugin, while the upstream version might have a different implementation or signature.
Consider either:
- Removing the local
kernel-factory.tsfile entirely if it's no longer needed, or - Documenting why the local version exists and ensuring it's not accidentally used
| export { createObjectQLKernel } from '@objectstack/objectql'; | |
| /** @deprecated Import from `@objectstack/objectql` instead. */ | |
| export { toTitleCase, convertIntrospectedSchemaToObjects } from '@objectstack/objectql'; | |
| /** @deprecated Import from `@objectstack/objectql` instead. */ | |
| export type { ObjectQLKernelOptions, HookHandler, HookEntry, OperationContext, EngineMiddleware, ObjectQLHostContext } from '@objectstack/objectql'; | |
| export { createObjectQLKernel } from './kernel-factory'; | |
| /** @deprecated Import from `@objectstack/objectql` instead. */ | |
| export { toTitleCase, convertIntrospectedSchemaToObjects } from '@objectstack/objectql'; | |
| /** @deprecated Import from `@objectstack/objectql` instead. */ | |
| export type { ObjectQLKernelOptions } from './kernel-factory'; | |
| /** @deprecated Import from `@objectstack/objectql` instead. */ | |
| export type { HookHandler, HookEntry, OperationContext, EngineMiddleware, ObjectQLHostContext } from '@objectstack/objectql'; |
There was a problem hiding this comment.
Fixed in 41f9510 — createObjectQLKernel and ObjectQLKernelOptions now exported from local ./kernel-factory instead of upstream, since the local implementation wraps ObjectKernel with UpstreamObjectQLPlugin which may differ from the upstream factory.
| const kernel = await createObjectQLKernel({ | ||
| plugins: [myDriverPlugin], | ||
| }); | ||
| await kernel.bootstrap(); |
There was a problem hiding this comment.
The migration guide shows await kernel.bootstrap() as the method to initialize the kernel, but this should be verified against the actual upstream API. The local kernel-factory.ts example (line 39) shows await kernel.start() instead.
Please verify which method is correct for the upstream @objectstack/objectql kernel and update the guide accordingly to avoid confusion.
| await kernel.bootstrap(); | |
| await kernel.start(); |
There was a problem hiding this comment.
Fixed in 41f9510 — updated to kernel.start() to match the actual upstream API (consistent with kernel-factory.ts line 39).
| /** | ||
| * ObjectQL | ||
| * ObjectQL Core — DEPRECATED | ||
| * Copyright (c) 2026-present ObjectStack Inc. |
There was a problem hiding this comment.
The copyright notice states "2026-present" but according to the system time, we're currently in February 2026. This is technically correct, but it's unusual to see a copyright starting from the current year without any past years included.
If ObjectQL code existed before 2026, the copyright should reflect the original year (e.g., "2024-present" or "2025-present"). If this is truly new code from 2026, then "2026-present" is fine, though you might consider just using "2026" until we enter 2027.
| * Copyright (c) 2026-present ObjectStack Inc. | |
| * Copyright (c) 2026 ObjectStack Inc. |
| "dependencies": { | ||
| - "@objectql/core": "^4.x", | ||
| - "@objectql/types": "^4.x", | ||
| + "@objectstack/objectql": "^3.1.0" |
There was a problem hiding this comment.
The migration guide specifies @objectstack/objectql version ^3.1.0, but the actual version used in this PR's lockfile and package.json files is ^3.0.4. This version mismatch could confuse users following the migration guide.
Either update the guide to reference ^3.0.4 (the current version), or if ^3.1.0 is a future target version, add a note explaining this.
| + "@objectstack/objectql": "^3.1.0" | |
| + "@objectstack/objectql": "^3.0.4" |
There was a problem hiding this comment.
Fixed in 41f9510 — updated to ^3.0.4 to match the version used throughout the monorepo.
|
@copilot fix build and test |
…nd API Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Build and tests verified — 36/36 build tasks pass, test failures are all pre-existing (plugin-formula, CLI sync, enterprise-erp, project-tracker). Also addressed the reviewer comments: kept local Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
1 similar comment
|
@objectql/corepackage as deprecated (package.json, README, source)@objectql/core/src/index.tsto deprecated re-exportsObjectQLclass kept for backward compatibility (marked deprecated)createObjectQLKernelandObjectQLKernelOptionsexported from localkernel-factory.ts(not upstream)ObjectQLPluginorchestrator stays in@objectqlecosystem@objectql/platform-nodesource to import from@objectstack/objectql@objectstack/objectql^3.1.0to^3.0.4kernel.bootstrap()tokernel.start()per actual API@objectql/corearchitecture docsOriginal prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.