Skip to content

[BUG] Scaffold .gitignore is Python-only: blanket dist/ breaks JS Action repos, Node ignores dropped, not upgrade-persistent #1024

Closed

Description

@c-vigo

Description

Surfaced by the commit-action direnv pilot (1.1.0). The scaffolded .gitignore
is the stock Python github/gitignore template, which is wrong for Node /
GitHub Action consumers on two counts:

  1. Blanket dist/ ignore breaks JS Action repos. A JS GitHub Action commits
    its bundled entrypoint (dist/index.js, referenced by action.yml
    runs.main). The scaffold's dist/ line ignores that committed bundle, so
    git add dist/… silently no-ops on new bundle files.
  2. Node ignores are dropped. No node_modules/, *.tsbuildinfo,
    coverage/, .nyc_output/ — so a fresh npm ci leaves node_modules/
    untracked-but-not-ignored, easy to commit by accident.

Compounding both: .gitignore is a managed/overwritten scaffold file, so a
consumer's hand-fix does not survive the next install.sh/upgrade.

Impact

Any Node/TS consumer (commit-action, sync-issues-action, …) must hand-edit
.gitignore after every devkit upgrade, and risks either ignoring a committed
artifact (dist/) or committing node_modules/.

Repro

Deploy any mode to a Node repo and inspect .gitignore:

git check-ignore node_modules   # -> not ignored
git check-ignore dist/index.js  # -> IGNORED (should be tracked for a JS action)

Options

  • Make the scaffold .gitignore language-aware (detect package.json /
    Cargo.toml and emit the matching ignore set), or ship a small language-neutral
    base + language fragments.
  • Or provide a preserved .gitignore.project companion (same
    scaffold-once/never-overwrite guarantee as justfile.project /
    docker-compose.project.yaml) that consumers own.
  • At minimum, do not blanket-ignore dist/ (scope it to Python build output),
    and document the Node/Action ignore additions.

Notes

Non-blocking for 1.1.0; found during the pilot rollout. Workaround applied in
commit-action: removed dist/, restored the Node/Action ignore section.

Activity

  1. added this to the Backlog milestone on Jul 13, 2026
  2. added
    bug
    priority:medium
    area:workspace
    effort:medium
    semver:minor
    on Jul 13, 2026
  3. c-vigo commented on Jul 14, 2026

    @c-vigo
    ContributorAuthor

    Fixed in #1035 (merged to dev): language-neutral base + per-language fragments assembled by init-workspace.sh on every (re)scaffold — Node consumers get Node ignores and no blanket dist/; upgrade-persistent.

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

    area:workspacebugeffort:mediumpriority:mediumsemver:minor

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions