Skip to content

chore: move dev-only packages out of dependencies - #477

Open
josecarneiro wants to merge 5 commits into
mainfrom
claude/dev-dependency-cleanup
Open

chore: move dev-only packages out of dependencies#477
josecarneiro wants to merge 5 commits into
mainfrom
claude/dev-dependency-cleanup

Conversation

@josecarneiro

Copy link
Copy Markdown
Contributor

Summary

Cleans up misplaced npm dependencies so consumers stop pulling packages they never use:

  • @epilot/app-sdk: msw moved from dependencies to devDependencies. It is only imported by src/signature.test.ts, and only dist/ is published — so until now every app-sdk consumer installed the entire Mock Service Worker toolchain at runtime for nothing. tslib stays in dependencies (the tsconfig uses importHelpers).
  • journey-client and validation-rules-client: openapi-backend removed. It is referenced nowhere in either package (no imports in source, tests, or configs — verified by grep).
  • All 51 clients: removed buffer, https-browserify, stream-http, url, util from dependencies. These are webpack-4-era Node polyfills that no client imports and no browser field references — unused legacy carried along by the client template.
  • Regenerated pnpm-lock.yaml via pnpm install (no other dependency changes).

No scaffold/template for new clients references the polyfills, so regeneration won't reintroduce them.

Caveat: if a consumer's own webpack config relied on these polyfills being hoisted into node_modules (e.g. via resolve.fallback entries pointing at buffer, stream-http, etc.), they should now install those polyfills as their own dependencies.

Test plan

  • @epilot/app-sdk: pnpm run build passes, pnpm run test passes (4/4 tests incl. the msw-based signature.test.ts)
  • journey-client: full pnpm run build (openapi + typegen + tsc + webpack bundle) compiles successfully
  • git status clean after builds — no unintended generated-file drift

🤖 Generated with Claude Code

https://claude.ai/code/session_01CeCZHjvf7UPwexDX2zzLor


Generated by Claude Code

- @epilot/app-sdk: msw is only used by src/signature.test.ts, so move it
  from dependencies to devDependencies (only dist/ is published)
- journey-client, validation-rules-client: drop openapi-backend, which
  is referenced nowhere in either package
- all clients: remove unused webpack-4-era browser polyfills (buffer,
  https-browserify, stream-http, url, util) from dependencies
- regenerate pnpm-lock.yaml

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CeCZHjvf7UPwexDX2zzLor
src/client.ts imports openapi-client-axios at runtime, but it was declared only in devDependencies, so the published tarball could not resolve it on a clean consumer install. Pre-existing, but this PR empties the package's dependencies block, which is the natural moment to fix it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WjZz3GtituheczbU2FSyEA
Without a changeset, changesets publishes none of these 52 packages, and the dependency removal would instead ride along silently in whatever bump an unrelated PR chooses next - typically a patch. Consumers on caret ranges would then lose the polyfills on their next install with nothing in the changelog explaining the broken build. A minor with an explicit upgrade note makes the change visible.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WjZz3GtituheczbU2FSyEA
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants