Skip to content

[TASK] Remove accidentally committed tsc byproducts under dist/src/ and fix the .gitignore rule #70

Closed

Description

@c-vigo

Found while implementing #59: dist/ tracks 32 tsc declaration byproducts under dist/src/** in addition to the real artifact dist/index.js. The .gitignore rule dist/__tests__ never matched the actual dist/src/__tests__ path (the tree's own comment says only dist/index.js is meant to be committed).

The .d.ts.map files embed absolute file:// source paths, so just bundle regenerates them differently at every checkout location — which is why the #59 freshness gate is scoped to dist/index.js instead of dist/.

Work:

  1. git rm -r the dist/src/** byproducts.
  2. Fix the .gitignore rule (dist/__tests__ → dist/src, or ignore dist/* and un-ignore dist/index.js).
  3. Then broaden both freshness gates (dist-check.yml, release-extension.yml) from dist/index.js to dist/ for full-tree determinism.

Activity

  1. added
    task
    on Jul 14, 2026
  2. added 2 commits that reference this issue on Jul 14, 2026
    3b288b1
    a624eb2
  3. c-vigo commented on Jul 14, 2026

    @c-vigo
    ContributorAuthor

    Done — shipped to dev in #73 (3b288b1).

    • ✅ 1. git rm -r dist/src — the 32 byproducts are untracked; git ls-files dist/ is now just the real artifacts.
    • ✅ 2. .gitignore rule fixed: dead dist/__tests__ → dist/* with !dist/index.js re-admitted (and !dist/package.json added in build(esm): migrate action and test suite to ESM #74, once ncc began emitting it for the ESM bundle).
    • ✅ 3. Both gates (dist-check.yml, release-extension.yml) broadened from dist/index.js to the whole dist/ tree.

    Two corrections to the issue's premises, for the record:

    • The byproducts are not only a tsc artifact — ncc emits them too, honoring the same tsconfig outDir/declaration settings. A plain just bundle regenerates all 17 of them, so the ignore rule had to cover the bundle path, not just npm run build.
    • The gates now test git status --porcelain -- dist/ rather than git diff --exit-code. git diff only sees tracked files, so build output that ncc starts emitting but nobody commits would slip through silently — which is exactly what happened in build(esm): migrate action and test suite to ESM #74, when ncc began emitting dist/package.json.

    Verified in a clean clone: no false positive after a rebuild, still fails on real source drift, and now catches the emitted-but-untracked case.

    Closing (merged to dev, so it will not auto-close until release).

  4. added a commit that references this issue on Jul 15, 2026
  5. added a commit that references this issue on Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    task

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions