Repository navigation
chore(dist): untrack the gitignored dist/src byproducts - #135
Merged
Merged
Conversation
The TypeScript declaration byproducts under dist/src/ have been gitignored since #70, but the v0.3.0 finalize commit re-added them (vig-os/devkit#1159: the release step walked a bare `dist` path and force-added every file it found without consulting .gitignore). devkit fixed that upstream; the tracked residue survived here. Each .d.ts.map embeds an absolute sourceRoot pointing at the CI runner's checkout path, so a rebuild anywhere else reports six modified files. The "deterministic across checkout locations" property that dist-check.yml and release-extension.yml both document held only because CI happens to rebuild at the same path that was committed. Verified against the release gates: release-core.yml derives DIST_PATHS from `git ls-files -co --exclude-standard -- dist`, which now yields exactly dist/index.js,dist/package.json — non-empty, so its no-files guard still holds and the finalize commit stops writing runner paths into each tag. dist-check.yml's `git status --porcelain -- dist/` does not report untracked-and-ignored files, so it stays clean in CI and becomes honest everywhere else. No consumer-visible change: action.yml runs dist/index.js, which stays tracked. The declarations are build byproducts with no runtime role. Refs: #134
Closed
3 tasks
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.
Closes #134.
What
git rm -r --cached dist/src— 12 declaration byproducts stop being tracked. They stay on disk, stay gitignored (.gitignoreline 51), and are regenerated byjust bundle, as #70 intended.Why
dist-check.ymlandrelease-extension.ymlboth document, in their headers, thatdist/src/is gitignored anddist/index.jsis the only tracked path underdist/— which is what makes their tree-widegit status -- dist/check "deterministic across checkout locations".That invariant was false. The v0.3.0 finalize commit (
1260b1d) re-added the byproducts via vig-os/devkit#1159, in which the release step walked a baredistdirectory path and force-added every file it found without consulting.gitignore. devkit fixed that upstream —release-core.ymlnow derives its paths fromgit ls-files -co --exclude-standard— but the residue here was never cleaned up.Each
.d.ts.mapembeds an absolutesourceRoot:So the check passed only because CI happens to rebuild at the same absolute path that was committed. Any other checkout location reported six modified files. That is what forced the hand-staging of
dist/index.jsin #132 — committing a locally built tree would have written developer-machine paths into the repo.Verified
git ls-files dist/dist/index.js,dist/package.jsononlyjust sync && just bundlethengit status --porcelain -- dist/release-core.ymlDIST_PATHS(git ls-files -co --exclude-standard -- dist)dist/index.js,dist/package.json— non-empty, no-files guard still holdsprek run --all-filesBoth release gates get stronger, not weaker:
dist-check.yml'sgit status --porcelaindoes not report untracked-and-ignored files, so it stays clean in CI and becomes honest everywhere else, and the finalize commit stops writing runner paths into every release tag.Consumer impact
None.
action.ymlrunsdist/index.js, which stays tracked. The.d.tsdeclarations are build byproducts with no runtime role.Sequenced deliberately before the v0.3.2 release: deferring means the finalize commit re-commits the
/home/runnerpaths into the v0.3.2 tag.