Repository navigation
revert(plugin-gateway): depend on @discordjs/structures again and drop the rest/ws subpaths - #134
Conversation
`./rest` and `./ws` are no longer exported, so bots depend on `@discordjs/rest` and `@discordjs/ws` directly. Refs #121 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RBWEHLtNzWNykJMPqeqqbB
Reverts #127 (3df6468): drops the in-package copy of `Structure`, `BitField`, `PermissionsBitField` and the flags bitfields, and goes back to the `@discordjs/structures` dependency (and its `engines.node >= 24.17.0`). Its pending changeset is removed with it, so nothing about it gets released. `@discordjs/rest` keeps the `^2.6.3` range from #132. Refs #121 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RBWEHLtNzWNykJMPqeqqbB
Refs #121 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RBWEHLtNzWNykJMPqeqqbB
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Reviewed the full diff: a clean, self-contained revert of two unreleased PRs, plus a new changeset for a real README fix.
- Revert
./rest/./wssubpaths (#129): removessrc/rest.ts,src/ws.ts,tests/subpaths.test.ts, theirpackage.jsonexportsentries, and theirtsdown.config.tsentry/attwEntrypoints../registeris untouched. - README: drops the "Subpath exports" section and adds a new patch changeset noting these subpaths never worked in the last published release (
ERR_PACKAGE_PATH_NOT_EXPORTED). - Revert
@discordjs/structuresvendoring (#127): restores"@discordjs/structures": "1.0.0-dev.1790035407-dbb749062"as a dependency andengines.node >=24.17.0;Structure,BitField,PermissionsBitField, and the flags bitfields go back to thin wrappers over the upstream package; the localutil/types.ts(Partialize) is removed in favor of the upstream export. - Changesets: deletes the two changesets for the reverted (never-released) PRs, keeps a single new patch changeset for the README fix.
Ran local verification beyond reading the diff, since this touches the package's dependency graph and its core Structure/BitField base classes:
tsc --noEmitonplugin-gateway(after buildingplugin-cacheso its types resolve) — clean.vitest runinplugin-gateway— 253/253 tests pass.pnpm install --frozen-lockfileat the repo root — lockfile matchespackage.json.pnpm buildinplugin-gateway— tsdown,attw, andpublintall clean.- Grepped for dangling references to the removed subpaths and the deleted local
util/types.ts/vendoredBitField— none found;Role.tscorrectly re-points itsPartializeimport at@discordjs/structures. - Double-checked
PermissionsBitField.ts'simport type { PermissionFlagsBits }combined withkeyof typeof PermissionFlagsBitsagainstverbatimModuleSyntax: true— this is a type query, not a value usage, so it's valid and compiles cleanly.
No correctness issues. One thing worth flagging for awareness rather than as a defect: this reinstates a hard dependency on a 1.0.0-dev pre-release snapshot of @discordjs/structures, pinned exact — the exact fragility #127 removed. The PR body states this was requested explicitly, so I'm treating it as an intentional, informed tradeoff rather than something to push back on.
Claude Sonnet | 𝕏

🔗 Linked issue
Follow-up to #121 (items 4 and 6). Reverts #127 and #129.
🧭 Context
Two of the fixes merged for #121 are being changed on request:
@discordjs/structuresdev-snapshot dependency with an in-package copy. The package goes back to depending on@discordjs/structures../restand./wssubpaths #129) added the./restand./wssubpaths that the README advertised. Those subpaths are now removed, and the README section that listed them is removed too. Bots depend on@discordjs/restand@discordjs/wsdirectly.No release happened after #127 and #129. Their changesets were still pending, and this PR deletes them together with the code. The next release therefore ships none of the reverted changes.
📚 Description
Revert fix(plugin-gateway): export the documented
./restand./wssubpaths #129:src/rest.ts,src/ws.tsandtests/subpaths.test.ts;./rest/./wsentries inexports;src/rest.tsandsrc/ws.tsfrom the tsdownentryandattwEntrypoints;./registerfrom fix(plugin-gateway,plugin-cache,plugin-sharder): add a no-op./registersubpath export #123 is kept.README: the "Subpath exports" section is removed.
Revert fix(plugin-gateway): drop the @discordjs/structures dev snapshot dependency #127:
"@discordjs/structures": "1.0.0-dev.1790035407-dbb749062"andengines.node >=24.17.0;Structure/BitField/PermissionsBitField/flags wrappers over upstream;/*!notices, andsrc/util/types.ts;The only conflict was in
package.json. I kept@discordjs/restat^2.6.3from fix(deps): update all non-major dependencies #132 and put the@discordjs/structuresline back. The lockfile matches afterpnpm install, andpnpm install --frozen-lockfilepasses.Changeset: a
patchfor@wolfstar/plugin-gatewayrecords the README fix. 0.1.1's README advertised subpaths that were never exported.The PRs merged after #127 were written against the copied base: #130, #131 (synchronous
_hydrate/whenAll), #126 and #128. They still build and pass against upstream@discordjs/structures.Key changes
a5bd4a2./restand./wssubpaths)f17f4ef3716aed@discordjs/structures)6b574d6patchchangeset for the README fixType of Change
The subpaths and the copied structures were never published, so for consumers this is not a breaking change.
Pre-flight Checklist
pnpm changesetAlso run:
pnpm lint,pnpm typecheck, and the plugin-cache and plugin-gateway builds (attw and publint clean on.and./register).🤖 Generated with Claude Code
https://claude.ai/code/session_01RBWEHLtNzWNykJMPqeqqbB
Generated by Claude Code