Skip to content

revert(plugin-gateway): depend on @discordjs/structures again and drop the rest/ws subpaths - #134

Merged
kodiakhq[bot] merged 4 commits into
mainfrom
claude/issue-121-plugin-effects-41p1vw
Sep 27, 2026
Merged

kodiakhq[bot] merged 4 commits into
mainfrom
claude/issue-121-plugin-effects-41p1vw

Conversation

@RedStar071

Copy link
Copy Markdown
Member

🔗 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:

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

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

Commit Change
a5bd4a2 Revert #129 (./rest and ./ws subpaths)
f17f4ef Remove the README "Subpath exports" section
3716aed Revert #127 (back to @discordjs/structures)
6b574d6 patch changeset for the README fix

Type of Change

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation change
  • Workflow / CI change

The subpaths and the copied structures were never published, so for consumers this is not a breaking change.

Pre-flight Checklist

  • I have read the Contributing Guidelines (if applicable)
  • My code follows the code style of this project
  • I have added tests that prove my fix is effective or that my feature works (reverts only; the removed subpath test goes with its feature)
  • New and existing unit tests pass locally with my changes (45 files, 503 tests)
  • I have updated the documentation accordingly
  • I added a changeset with pnpm changeset

Also 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

`./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
@wolfstarbot wolfstarbot added the packages:plugin-gateway Changes in plugin-gateway label Sep 27, 2026
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​discordjs/​structures@​1.0.0-dev.1790035407-dbb749062991009398100

View full report

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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 / ./ws subpaths (#129): removes src/rest.ts, src/ws.ts, tests/subpaths.test.ts, their package.json exports entries, and their tsdown.config.ts entry/attwEntrypoints. ./register is 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/structures vendoring (#127): restores "@discordjs/structures": "1.0.0-dev.1790035407-dbb749062" as a dependency and engines.node >=24.17.0; Structure, BitField, PermissionsBitField, and the flags bitfields go back to thin wrappers over the upstream package; the local util/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 --noEmit on plugin-gateway (after building plugin-cache so its types resolve) — clean.
  • vitest run in plugin-gateway — 253/253 tests pass.
  • pnpm install --frozen-lockfile at the repo root — lockfile matches package.json.
  • pnpm build in plugin-gateway — tsdown, attw, and publint all clean.
  • Grepped for dangling references to the removed subpaths and the deleted local util/types.ts/vendored BitField — none found; Role.ts correctly re-points its Partialize import at @discordjs/structures.
  • Double-checked PermissionsBitField.ts's import type { PermissionFlagsBits } combined with keyof typeof PermissionFlagsBits against verbatimModuleSyntax: 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.

Pullfrog  | View workflow run | Using Claude Sonnet | 𝕏

@kodiakhq
kodiakhq Bot merged commit 7d78af1 into main Sep 27, 2026
16 of 17 checks passed
@kodiakhq
kodiakhq Bot deleted the claude/issue-121-plugin-effects-41p1vw branch September 27, 2026 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

packages:plugin-gateway Changes in plugin-gateway

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants