Contributing
尚未翻译
本页尚无中文翻译,以下为英文原文。
This repository is the community-maintained distribution of Tencent/openclaw-weixin. Contributions should preserve the openclaw-weixin plugin/channel id and its existing config and state paths unless a separately planned breaking migration is approved.
Prerequisites
- Node.js 24.15.0
- npm
Use the Node.js version in .nvmrc for the recommended development environment. The published package follows OpenClaw's supported Node.js ranges: >=22.22.3 <23, >=24.15.0 <25, or >=25.9.0. CI validates the exact Node.js 22.22.3 and 24.15.0 lower bounds. The lockfile uses OpenClaw 2026.7.1 for normal development, while a dedicated CI job builds and tests against the minimum supported host, OpenClaw 2026.6.1.
Development
Install the exact dependency versions recorded in the lockfile:
npm ciRead AGENTS.md for repository invariants and the architecture guide for lifecycle and data flow. These rules apply whether a change is written manually or with coding-agent assistance.
Run one affected suite while iterating:
npm run test:unit -- src/path/to/file.test.tsRun the fast type, style, and unit-test gate:
npm run check:fastRun the same formatting, linting, type checking, coverage tests, and build used by CI:
npm run checkAudit the production dependencies shipped with the plugin at the same severity used by CI and releases. Development tools and the host-provided OpenClaw peer dependency are omitted:
npm run audit:depsApply repository formatting with:
npm run formatInspect the npm package contents when changing entry points, build output, or package metadata:
npm pack --dry-run --ignore-scriptsThe repository's stricter package contract check is:
npm run pack:checkBuild the documentation website into docs/site/dist/ (the same command GitHub Pages runs) after editing Markdown documents or the files in docs/site/. The site is a VitePress project that keeps its own dependencies so that the published package manifest stays untouched, and its tests run with Node.js instead of the root Vitest project:
npm ci --prefix docs/site
npm test --prefix docs/site
npm run build --prefix docs/sitePreview the site with hot reload using npm run dev --prefix docs/site, or serve docs/site/dist/ with any static file server. Both commands first copy the repository Markdown into docs/site/content/, so always edit the original documents. The generated content/ and dist/ directories are ignored by Git; only the sources in docs/site/ are committed.
Pull requests
- Keep changes focused and include tests for behavior changes.
- Update
README.mdandREADME_EN.mdfor user-facing documentation. - Update both changelogs when a change affects users.
- Remove credentials, account identifiers, QR codes, and private message content from tests, logs, screenshots, and issue descriptions.
- Review and take responsibility for all submitted changes, including AI-assisted changes.