Repository navigation
Upgrade getting-started to Wechaty 2 & WinterTC best practices - #330
Conversation
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: 05f2f040-c36f-4290-9c04-abf9162a6d4b) |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 94e98303ba
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| process.off('unhandledRejection', onUnhandledRejection) | ||
| await bot.stop().catch(() => undefined) |
There was a problem hiding this comment.
Handle Neo's background login rejection before stopping
When this smoke test runs without anyone scanning the QR code, Neo rejects its background login promise during shutdown, as documented by the existing workaround. Removing the rejection listener before bot.stop() leaves that rejection unhandled; catching the promise returned by bot.stop() does not catch a separate background promise. Even retaining a logging-only listener would not prevent node:test from reporting the unhandled rejection as a failure. Consequently, the unattended Neo smoke test can emit its scan event and pass its assertion yet still fail npm test and the Node.js CI matrix. Handle the background login rejection itself, or isolate the expected cancellation from the test runner, before removing the previous workaround.
Useful? React with 👍 / 👎.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Closes #329
Summary
experimentalDecorators/emitDecoratorMetadatafromtsconfig.json, removedcheck-node-version/postinstall(relying onengines), added cross-platformcleanscript, alignedbiome.jsonschema to2.6.9, and addedmarkdownlint-cli+.markdownlint.json.tests/wechaty-puppet-mock.test.tsandtests/wechaty-puppet-neo.test.tsto uset.after()cleanup andnode:testtimeouts, removed--test-force-exit, and scoped Deno permissions intest:unit:deno.examples/advanced/,examples/professional/,examples/basic/contact-bot.ts,examples/ambient-modules.d.ts) while keepingexamples/cqrs/for future upgrade; updatedexamples/ding-dong-bot.tsandexamples/basic/ding-dong-bot.tsto usehelpers.typeName(ScanStatus, status)and Wechaty 2 types.permissions: contents: readto thebuildjob in.github/workflows/node.js.yml, addedAGENTS.md, and updatedDEVELOPMENT.md,README.md, andexamples/README.md.Verification
npm test(lint:biome,lint:ts,lint:md,test:smoke): 2 passed, 0 failednpm run test:unit:deno: 2 passed, 0 failednpm run build && npm run clean: passedNote
Medium Risk
Large removal of public example code and a Wechaty 2 dependency shift can break users on old tutorials; runtime/test changes are lower risk for the core starter bot.
Overview
This PR realigns the repo as a Wechaty 2 / Node 26 / TypeScript 7 starter: docs now target
wechaty>=2.0.0-0 <3, drops decorator-relatedtsconfigoptions for erasable-only TS, and addsAGENTS.md, markdownlint (lint:md), acleanscript, and replacescheck-node-version/postinstallwithenginesonly.Examples are heavily trimmed: legacy v1 samples under
examples/advanced/,examples/professional/, and most ofbasic/are removed, along withambient-modules.d.ts;examples/cqrs/stays but stays excluded from roottsconfig. The remaining ding-dong bots usehelpers.typeName(ScanStatus, status)and type casts where puppet packages still ship v1 puppet types.Tests and CI: smoke tests use
t.after()cleanup, drop--test-force-exit, and tighten Deno sandbox flags; CI addspermissions: contents: readon the build job.Reviewed by Cursor Bugbot for commit 94e9830. Bugbot is set up for automated code reviews on this repo. Configure here.