Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/cli/src/commands/serve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ export const serveCommand = new Command('serve')
console.log(chalk.green(`✓ Configuration loaded`));

// Import ObjectStack runtime
const { ObjectStackKernel } = await import('@objectstack/core');
const { ObjectKernel } = await import('@objectstack/core');

// Create kernel instance
console.log(chalk.yellow(`🔧 Initializing ObjectStack kernel...`));
const kernel = new ObjectStackKernel({
const kernel = new ObjectKernel({
metadata: config.metadata || {},
objects: config.objects || {},
});
Expand Down
4 changes: 2 additions & 2 deletions packages/objectql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"name": "@objectstack/objectql",
"version": "0.7.2",
"description": "Isomorphic ObjectQL Engine for ObjectStack",
"main": "src/index.ts",
"types": "src/index.ts",
"main": "dist/index.js",
Copy link

Copilot AI Feb 1, 2026

Choose a reason for hiding this comment

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

The package.json is missing the "type": "module" field. Since this package now uses ES module imports with .js extensions and points to compiled dist/ files, it should declare itself as an ES module. Without this field, Node.js will treat .js files as CommonJS, which will cause module resolution failures. Other packages in the monorepo (@objectstack/core and @objectstack/runtime) already have this field set.

Suggested change
"main": "dist/index.js",
"main": "dist/index.js",
"type": "module",

Copilot uses AI. Check for mistakes.
"types": "dist/index.d.ts",
"scripts": {
"build": "tsc",
"test": "echo no tests"
Expand Down
2 changes: 1 addition & 1 deletion packages/objectql/src/engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
DataEngineCountOptions
} from '@objectstack/spec/data';
import { DriverInterface, IDataEngine, Logger, createLogger } from '@objectstack/core';
import { SchemaRegistry } from './registry';
import { SchemaRegistry } from './registry.js';

export type HookHandler = (context: HookContext) => Promise<void> | void;

Expand Down
10 changes: 5 additions & 5 deletions packages/objectql/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// Export Registry
export { SchemaRegistry } from './registry';
export { SchemaRegistry } from './registry.js';

// Export Protocol Implementation
export { ObjectStackProtocolImplementation } from './protocol';
export { ObjectStackProtocolImplementation } from './protocol.js';

// Export Engine
export { ObjectQL } from './engine';
export type { ObjectQLHostContext, HookHandler } from './engine';
export { ObjectQL } from './engine.js';
export type { ObjectQLHostContext, HookHandler } from './engine.js';

// Export Plugin Shim
export { ObjectQLPlugin } from './plugin';
export { ObjectQLPlugin } from './plugin.js';

// Moved logic to engine.ts
4 changes: 2 additions & 2 deletions packages/objectql/src/plugin.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ObjectQL } from './engine';
import { ObjectStackProtocolImplementation } from './protocol';
import { ObjectQL } from './engine.js';
import { ObjectStackProtocolImplementation } from './protocol.js';
import { Plugin, PluginContext } from '@objectstack/core';

export type { Plugin, PluginContext };
Expand Down
2 changes: 1 addition & 1 deletion packages/objectql/src/protocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import type {
} from '@objectstack/spec/api';

// We import SchemaRegistry directly since this class lives in the same package
import { SchemaRegistry } from './registry';
import { SchemaRegistry } from './registry.js';

/**
* Simple hash function for ETag generation (browser-compatible)
Expand Down
2 changes: 1 addition & 1 deletion packages/runtime/src/rest-server.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { IHttpServer } from '@objectstack/core';
import { RouteManager } from './route-manager';
import { RouteManager } from './route-manager.js';
import { RestServerConfig, CrudOperation, RestApiConfig, CrudEndpointsConfig, MetadataEndpointsConfig, BatchEndpointsConfig, RouteGenerationConfig } from '@objectstack/spec/api';
import { ObjectStackProtocol } from '@objectstack/spec/api';

Expand Down
Loading