Core: Integrate ObjectStackKernel with plugin architecture#155
Core: Integrate ObjectStackKernel with plugin architecture#155huangyiirene merged 8 commits intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…l plugin architecture Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
| name = '@objectql/core'; | ||
| version = '4.0.0'; | ||
|
|
||
| constructor(private config: ObjectQLPluginConfig = {}) { |
… integration Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
…d cleanup Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
|
@copilot 不需要考虑兼容现有的代码 |
|
Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
|
There was a problem hiding this comment.
Pull request overview
This PR implements Phase 3 of the Core Engine Refactoring by integrating ObjectStackKernel from @objectstack/runtime to enable a plugin-based architecture. This is a breaking change that removes backward compatibility with legacy plugins.
Changes:
- Introduced
ObjectQLPluginthat implements theRuntimePlugininterface with configurable feature flags - Refactored
ObjectQLclass to wrapObjectStackKernelwith lazy initialization and removed legacy plugin support - Updated dependencies to
@objectstack/runtimeand@objectstack/objectqlversion^0.2.0
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/foundation/core/src/plugin.ts | New plugin implementation with RuntimePlugin interface and placeholder component registration |
| packages/foundation/core/src/app.ts | Core refactoring to wrap kernel, lazy initialization, and removal of legacy plugin compatibility layer |
| packages/foundation/core/src/index.ts | Export addition for the new plugin module |
| packages/foundation/core/package.json | Dependency version bumps for ObjectStack packages |
| packages/foundation/core/jest.config.js | Jest configuration updates for ESM compatibility and runtime mocking |
| packages/foundation/core/test/mocks/@objectstack/runtime.ts | Mock implementation of ObjectStack runtime for testing |
| packages/foundation/core/test/app.test.ts | Test updates to use RuntimePlugin pattern instead of legacy onEnable |
| packages/foundation/core/RUNTIME_INTEGRATION.md | Documentation updates explaining plugin architecture and migration guide |
| packages/foundation/core/README.md | README updates reflecting kernel integration and new features |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
| use(plugin: PluginDefinition) { | ||
| this.pluginsList.push(plugin); | ||
|
|
||
| use(plugin: any) { |
There was a problem hiding this comment.
The parameter type any should be replaced with a more specific type. Based on the context, this should be RuntimePlugin from @objectstack/runtime to ensure type safety.
There was a problem hiding this comment.
Fixed. Changed use(plugin: any) to use(plugin: RuntimePlugin) and updated related types. Commit: 2e92746
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
1 similar comment
|
|
@copilot fix build test typecheck |
…onfig types Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
Fixed all build, test, and typecheck issues. Commit: 2e92746 Changes:
All 235 tests passing ✅ |
|
|
@copilot fix build test typecheck |
use(plugin: any)touse(plugin: RuntimePlugin)kernelPlugins: any[]tokernelPlugins: RuntimePlugin[]ObjectQLConfig.pluginsto useRuntimePlugininstead ofPluginDefinition@objectstack/runtimedependency to types packageOriginal 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.