Skip to content

Upgrade devDependencies and implement kernel plugin demo#42

Open
Zuoqiu-Yingyi wants to merge 6 commits intosiyuan-note:mainfrom
Zuoqiu-Yingyi:feat/kernel-plugin
Open

Upgrade devDependencies and implement kernel plugin demo#42
Zuoqiu-Yingyi wants to merge 6 commits intosiyuan-note:mainfrom
Zuoqiu-Yingyi:feat/kernel-plugin

Conversation

@Zuoqiu-Yingyi
Copy link
Copy Markdown

This pull request introduces a kernel plugin demo to serve as a comprehensive TypeScript reference implementation for the SiYuan kernel plugin API. It includes a new design spec, a full implementation in src/kernel.ts, TypeScript definition updates, significant build and configuration changes to support kernel plugins, and dependency upgrades. The changes are grouped below by theme.

Kernel Plugin Demo & API Coverage

  • Added a detailed design spec (docs/superpowers/specs/2026-05-09-kernel-plugin-demo-design.md) outlining the goals, architecture, API coverage, TSDoc comment strategy, type usage, and file changes for the new kernel plugin demo, which serves as the living reference for kernel plugin development.
  • Updated plugin.json to declare supported kernel platforms under the new kernels field, enabling kernel plugin support for all major environments.

Build System & Configuration

  • Added a separate Webpack config (webpack.kernel.config.js) for building the kernel plugin, supporting both development and production modes, and outputting as an ECMAScript module.
  • Refactored build scripts in package.json to handle separate builds for app and kernel plugins, and updated major dev dependencies for improved compatibility and performance.
  • Updated the main Webpack config (webpack.config.js) to use a single production flag, improved entry/output logic, and ensured consistent source map and minimization behavior. [1] [2] [3]
  • Added pnpm-workspace.yaml restrictions to disallow building native dependencies for @parcel/watcher and esbuild, improving cross-platform reliability.

TypeScript & Import Cleanups

  • Updated imports in src/index.ts to use IMenuItem from the main siyuan package, removing a redundant import from siyuan/types.

These changes collectively lay the foundation for robust kernel plugin development, improve build separation and reliability, and ensure the codebase is up-to-date with the latest tooling.

REL: siyuan-note/siyuan#17487

Zuoqiu-Yingyi and others added 6 commits April 30, 2026 22:05
Bump multiple devDependencies in package.json (eslint -> ^10.2.1, @eslint/js -> ^10.0.1, @typescript-eslint/* -> ^8.59.1, typescript -> ^6.0.3, webpack -> ^5.106.2, sass -> ^1.99.0, tslib -> ^2.8.1, siyuan -> 1.2.2-alpha.0, globals -> ^17.5.0, and others). Regenerate pnpm-lock.yaml to match the upgraded packages — updates include resolved versions/integrity for eslint ecosystem, parcel-watcher binaries, ajv/acorn/other dependencies, and some added type packages. This keeps the build/lint toolchain up to date and syncs the lockfile with the new dependency set.
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Introduce a dedicated kernel build target and developer workflows: add webpack.kernel.config.js and pnpm-workspace.yaml, split dev/build scripts in package.json into kernel and app targets, and add a combined dev script. Expose supported kernels in plugin.json, ignore kernel.js in .gitignore, and make small code/import cleanup in src/index.ts. Update docs to clarify SSE/WS server handler signatures and handler typing. Dev dependencies were bumped accordingly.
Rename server request parameter types in src/kernel.ts from IServerWsRequest/IServerEsRequest to IServerWebSocketRequest/IServerEventSourceRequest to improve type clarity. Also apply minor spacing/style fix in webpack.config.js copy pattern for consistent formatting.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant