This document tracks the migration of @objectql/types to delegate general types to @objectstack/spec and @objectstack/runtime packages.
- @objectql/types:
3.0.1→4.0.0-beta.1 - Dependency Model: Changed from
dependenciestopeerDependencies+devDependencies(workspace)
| Type Name | Source (Before) | Source (After) | Re-exported | Deprecated |
|---|---|---|---|---|
Field |
Local definition | @objectstack/spec |
Yes (as SpecField) |
Yes |
FieldType |
Local definition | @objectstack/spec |
Yes (as ProtocolFieldType) |
Yes |
SelectOption |
Local definition | @objectstack/spec |
Yes (as SpecSelectOption) |
Yes |
ServiceObject |
Local definition | @objectstack/spec |
Yes (as SpecObject) |
Yes |
IndexSchema |
Local definition | @objectstack/spec |
Yes | Yes |
Action |
Local definition | @objectstack/spec |
Yes (as SpecAction) |
Yes |
FilterCondition |
Local definition | @objectstack/spec |
Direct import | No |
QueryAST |
N/A | @objectstack/spec |
Via imports | No |
FilterNode |
N/A | @objectstack/spec |
Via imports | No |
SortNode |
N/A | @objectstack/spec |
Via imports | No |
| Type Name | Source (Before) | Source (After) | Re-exported | Deprecated |
|---|---|---|---|---|
RuntimePlugin |
N/A | @objectstack/runtime |
Direct import | No |
RuntimeContext |
N/A | @objectstack/runtime |
Direct import | No |
ObjectStackKernel |
N/A | @objectstack/runtime |
Direct import | No |
ObjectStackRuntimeProtocol |
N/A | @objectstack/runtime |
Direct import | No |
The following types remain fully defined in @objectql/types as they are ObjectQL-specific extensions:
FieldConfig- Extends protocol Field with runtime propertiesFieldType- Extends protocol FieldType with runtime types (vector,grid,location,object)FieldOption- Extends SelectOption to allow number valuesAttachmentData- File metadata structureImageAttachmentData- Image-specific metadata
ObjectConfig- Extends ServiceObject with runtime propertiesIndexConfig- Simplified alias for IndexSchemaAiSearchConfig- AI/semantic search configurationObjectAiConfig- Object-level AI configurationObjectDoc- Document instance interface
UnifiedQuery- ObjectQL's unified query interfaceAggregateFunction- Aggregation function typesAggregateOption- Aggregation configuration
ObjectQLContext(src/context.ts) - ObjectQL execution contextObjectQLContextOptions(src/context.ts) - Context optionsDriver(src/driver.ts) - ObjectQL driver interfaceIntrospectedColumn,IntrospectedTable,IntrospectedSchema(src/driver.ts) - Schema introspection
packages/objectstack/
├── spec/ # @objectstack/spec stub
│ ├── src/index.ts
│ ├── package.json
│ ├── tsconfig.json
│ └── README.md
└── runtime/ # @objectstack/runtime stub
├── src/index.ts
├── package.json
├── tsconfig.json
└── README.md
Updated pnpm-workspace.yaml to include:
packages:
- packages/objectstack/*- No breaking changes for typical usage (backward compatible re-exports)
- Advanced users importing protocol types should prefer importing directly from
@objectstack/spec - All re-exported types are marked
@deprecatedwith migration hints
@objectstack/specand@objectstack/runtimeare now peerDependencies- Consumers must ensure these packages are available in their project
import { Field, FieldType, ServiceObject } from '@objectql/types';// Option 1: Continue using re-exports (deprecated but works)
import { SpecField, ProtocolFieldType, SpecObject } from '@objectql/types';
// Option 2: Import directly from protocol (recommended)
import { Field, FieldType, ServiceObject } from '@objectstack/spec';
// Option 3: Use ObjectQL runtime extensions
import { FieldConfig, ObjectConfig } from '@objectql/types';@objectstack/spec- All protocol types compile@objectstack/runtime- All runtime types compile@objectql/types- All types compile, 32 tests passing
- External package
@objectstack/objectql@0.2.0in node_modules has compatibility issues - Some type mismatches in
@objectql/corerepository.ts (FilterNode usage) - These are expected during migration and will be resolved in subsequent phases
- Phase 2: Update
@objectql/coreto properly use new type structure - Phase 3: Update driver packages to use delegated types
- Phase 4: Publish updated packages with proper semver
- Phase 5: Update documentation and migration guides
- This is a preparation phase for the full ObjectStack v4.0 migration
- Stub packages created in workspace will be replaced by published npm packages
- All changes maintain backward compatibility through re-exports
- Types are properly marked with deprecation notices