1.4 KiB
1.4 KiB
bare-discord-js Production Implementation Plan
This file mirrors the approved execution plan and is tracked in-repo as the implementation contract.
Goal
- Provide
require('bare-discord-js')andimport ... from 'bare-discord-js'parity with officialdiscord.js14.27+ inside Bare. - Ensure end users install only one package and do not configure aliases/import maps manually.
- Gate releases on strict parity verification.
Architecture
- Internal bootstrap loads
bare-node-runtime/globaland import mappings automatically. - Dual entrypoints (
src/index.js[CJS],src/index.mjs[ESM]) re-export officialdiscord.js. - Compatibility adapters isolate runtime differences (WebSocket, TLS/HTTPS, zlib, crypto).
- Patch manifest and automation scripts track upstream drift and compatibility work.
Delivery Phases
- Baseline inventory scripts for dependency and builtin mapping.
- Bootstrap loader and import-map encapsulation.
- Adapter and patch infrastructure.
- Build/packaging workflow (npm + optional bare-pack).
- Parity test harness (Node vs Bare behavior checks).
- Release verification and upstream sync automation.
Repro Command Set
npm install
npm run analyze
npm run verify-bootstrap-load
npm run generate-patches
npm run apply-patches
npm run test:parity
npm run release:verify
Strict Parity Policy
- Any observed runtime incompatibility blocks GA.
- Voice/gateway/rest paths are all required unless explicitly re-scoped.