Stop committing dist/ to the repo#17
Open
ejntaylor wants to merge 1 commit into
Open
Conversation
The dist/ exception predates publishing to npm. Now that consumers install @patchstack/connect from the registry, the prepare script builds dist/ on install and the publish workflow builds it before packing — so there is no need to track build output in git. - Untrack dist/ and drop the .gitignore exception - Remove the "Verify committed dist is current" check from CI and publish workflows Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
Well-scoped cleanup removing generated dist files and updating workflows and .gitignore. 🎯 Quality: 75% Good · 📦 Size: Oversized — strongly consider breaking this down 📈 This month: Your 56th PR — above team average · Averaging Good |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
dist/and drop the.gitignoreexception that kept it in version controlVerify committed dist is currentstep from both the CI and publish workflowsWhy
The committed
dist/predates publishing to npm — it existed so thatnpm install github:patchstack/connectwould work in sandboxed environments (WebContainer/StackBlitz/Bolt/Lovable) that can't run thepreparescript. Now that consumers install@patchstack/connectfrom the npm registry, that workaround is dead weight: every PR has to re-commit a ~180 KB build, and thegit diff --exit-code -- distgate breaks any PR that forgets to.The
preparescript (tsup) still buildsdist/onnpm install, and the publish workflow runsnpm run buildbeforenpm pack/npm publish, so the published tarball is unchanged.What this breaks
Only
npm install github:patchstack/connectin sandboxes that block lifecycle scripts. Anyone on npm is unaffected.Test plan
npm ci && npm run buildproducesdist/locallynpm pack --dry-runlists all expecteddist/*files in the tarballgit statusshowsdist/as ignored after rebuild🤖 Generated with Claude Code