Skip to content

Deprecate @objectql/core per migration guide#390

Merged
hotlong merged 6 commits intomainfrom
copilot/remove-objectql-core
Feb 14, 2026
Merged

Deprecate @objectql/core per migration guide#390
hotlong merged 6 commits intomainfrom
copilot/remove-objectql-core

Conversation

Copy link
Contributor

Copilot AI commented Feb 14, 2026

  • Mark @objectql/core package as deprecated (package.json, README, source)
  • Convert @objectql/core/src/index.ts to deprecated re-exports
    • Bridge ObjectQL class kept for backward compatibility (marked deprecated)
    • createObjectQLKernel and ObjectQLKernelOptions exported from local kernel-factory.ts (not upstream)
    • ObjectQLPlugin orchestrator stays in @objectql ecosystem
  • Migrate @objectql/platform-node source to import from @objectstack/objectql
  • Migrate CLI source code to import from @objectstack/objectql
  • Add migration guide documentation
    • Fixed version reference from ^3.1.0 to ^3.0.4
    • Fixed kernel.bootstrap() to kernel.start() per actual API
  • Add deprecation callout to @objectql/core architecture docs
  • Build passes: 36/36 tasks successful
  • Tests: same pre-existing failures only (plugin-formula, CLI sync, enterprise-erp, project-tracker)
Original prompt

根据文档作废@objectql/core

https://github.com/objectstack-ai/spec/blob/main/content/docs/guides/objectql-migration.mdx


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@vercel
Copy link

vercel bot commented Feb 14, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
objectql Ready Ready Preview, Comment Feb 14, 2026 11:43am

Request Review

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
…s pass

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot AI and others added 2 commits February 14, 2026 11:17
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot AI changed the title [WIP] Remove objectql/core based on documentation Deprecate @objectql/core per migration guide Feb 14, 2026
Copilot AI requested a review from hotlong February 14, 2026 11:27
@hotlong hotlong marked this pull request as ready for review February 14, 2026 11:27
Copilot AI review requested due to automatic review settings February 14, 2026 11:27
@github-actions
Copy link
Contributor

⚠️ No Changeset Found

This PR does not include a changeset file.
If this PR includes user-facing changes, please add a changeset by running:

pnpm changeset

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/core package.json and all exports in index.ts
  • Updated CLI tools (repl, migrate, doctor) to import directly from @objectstack/objectql
  • Migrated @objectql/platform-node to 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

Comment on lines 20 to 24
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';
Copy link

Copilot AI Feb 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

  1. Removing the local kernel-factory.ts file entirely if it's no longer needed, or
  2. Documenting why the local version exists and ensuring it's not accidentally used
Suggested change
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';

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 41f9510createObjectQLKernel 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();
Copy link

Copilot AI Feb 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
await kernel.bootstrap();
await kernel.start();

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
Copy link

Copilot AI Feb 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
* Copyright (c) 2026-present ObjectStack Inc.
* Copyright (c) 2026 ObjectStack Inc.

Copilot uses AI. Check for mistakes.
"dependencies": {
- "@objectql/core": "^4.x",
- "@objectql/types": "^4.x",
+ "@objectstack/objectql": "^3.1.0"
Copy link

Copilot AI Feb 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
+ "@objectstack/objectql": "^3.1.0"
+ "@objectstack/objectql": "^3.0.4"

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 41f9510 — updated to ^3.0.4 to match the version used throughout the monorepo.

@hotlong
Copy link
Contributor

hotlong commented Feb 14, 2026

@copilot fix build and test

…nd API

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 14, 2026

@copilot fix build and test

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 kernel-factory.ts exports, fixed migration guide version (^3.0.4) and API (kernel.start()). See 41f9510.

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:

  • fastdl.mongodb.org
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/objectql/objectql/node_modules/.bin/../vitest/vitest.mjs run ions-REDACTED/cached/externals/node24/lib/node_modules/corepack/shims/pnpm tql/�� --exclude &#39;*&#39; src/ dist/ build (dns block)
  • fonts.googleapis.com
    • Triggering command: /opt/hostedtoolcache/node/24.13.0/x64/bin/node /opt/hostedtoolcache/node/24.13.0/x64/bin/node /home/REDACTED/work/objectql/objectql/node_modules/.pnpm/next@16.1.6_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/compiled/jest-worker/processChild.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@github-actions
Copy link
Contributor

⚠️ No Changeset Found

This PR does not include a changeset file.
If this PR includes user-facing changes, please add a changeset by running:

pnpm changeset

1 similar comment
@github-actions
Copy link
Contributor

⚠️ No Changeset Found

This PR does not include a changeset file.
If this PR includes user-facing changes, please add a changeset by running:

pnpm changeset

@hotlong hotlong merged commit 3a9d142 into main Feb 14, 2026
17 of 18 checks passed
@hotlong hotlong deleted the copilot/remove-objectql-core branch February 14, 2026 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants