Skip to content

fix(plugin-gateway,plugin-cache,plugin-sharder): add ./register subpath export - #122

Closed
pullfrog[bot] wants to merge 1 commit into
mainfrom
pullfrog/121-register-entrypoints
Closed

pullfrog[bot] wants to merge 1 commit into
mainfrom
pullfrog/121-register-entrypoints

Conversation

@pullfrog

@pullfrog pullfrog Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Item #1 from the plan on #121 — the blocking bug. Adds a no-op ./register subpath export to @wolfstar/plugin-gateway, @wolfstar/plugin-cache, and @wolfstar/plugin-sharder, matching the pattern already established by plugin-api, plugin-i18next, plugin-logger, and plugin-subcommands-advanced.

@wolfstar/cli's Stars build transform injects import "<name>/register" for every dependency matching /^@wolfstar\/plugin-[^/]+$/, unconditionally, regardless of whether the package actually declares that subpath. All three packages here match that name pattern but had no register.ts / exports["./register"], so any consuming project crashed at runtime with ERR_PACKAGE_PATH_NOT_EXPORTED.

Changes

For each of plugin-gateway, plugin-cache, and plugin-sharder:

  • src/register.ts (new) — a doc comment explaining why it's a no-op today (none of these three packages have any @wolfstar/http-framework Plugin lifecycle hook to register yet), plus import "./index.js"; to exercise the main module's side effects (currently none, but keeps the pattern consistent and future-proof).
  • package.json — sideEffects: false → sideEffects: ["./dist/esm/register.js"], plus an "./register" entry in exports.
  • tsdown.config.ts — entry gains "src/register.ts", attwEntrypoints gains "./register".
  • .changeset/add-register-entrypoints.md — patch bump for all three packages.

Not in this PR

Per the plan, this ships as its own PR; the rest of the plan's numbered items (member requests, session persistence, container.client typing, README subpath drift, dropping the @discordjs/structures dev dependency, peer-range CI guard, synchronous cache reads) are separate follow-ups — #121 should stay open until those land. The durable fix — making the Stars CLI transform only inject the import when ./register is actually declared — lives in @wolfstar/cli, a separate repo, and isn't something this repo's PR can carry; this PR is the immediate unblock.

Verification

  • pnpm --filter @wolfstar/<pkg> build for all three packages: build succeeds, attw (are-the-types-wrong) and publint both pass clean on the new ./register subpath.
  • npx tsc --noEmit -p packages/<pkg>/tsconfig.json passes for all three.
  • oxlint/oxfmt --check pass clean on all touched files.
  • Self-reviewed by a fresh-eyes pass comparing against the existing plugin-api/plugin-logger pattern — no defects found.

Addresses #121 (item #1 of the plan).

Pullfrog  | View workflow run | via Pullfrog | Using Claude Sonnet | 𝕏

…th export

Add a no-op ./register entrypoint to plugin-gateway, plugin-cache, and
plugin-sharder, matching the pattern already used by plugin-api,
plugin-i18next, plugin-logger, and plugin-subcommands-advanced.

@wolfstar/cli's Stars build transform injects `import "<name>/register"`
for every @wolfstar/plugin-* dependency unconditionally, regardless of
whether the package declares that subpath. Without it, consuming
projects crash at runtime with ERR_PACKAGE_PATH_NOT_EXPORTED.

Fixes #121
@pullfrog
pullfrog Bot requested a review from RedStar071 as a code owner September 26, 2026 21:34
@coldtea-pr-lens

Copy link
Copy Markdown

◈ PR Lens

Note

pullfrog[bot] opened this pull request, so PR Lens left it undrawn. Comment @pr-lens draw to draw it

github.comment.notice: false in .github/pr-lens.yml turns this note off

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

packages:plugin-cache Changes in plugin-cache packages:plugin-gateway Changes in plugin-gateway packages:plugin-sharder Changes in plugin-sharder

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants