Skip to content

chore: gitignore lockfiles from other package managers - #53

Open
sidgaikwad wants to merge 1 commit into
unlayer:mainfrom
sidgaikwad:chore/ignore-foreign-lockfiles
Open

chore: gitignore lockfiles from other package managers#53
sidgaikwad wants to merge 1 commit into
unlayer:mainfrom
sidgaikwad:chore/ignore-foreign-lockfiles

Conversation

@sidgaikwad

Copy link
Copy Markdown

Fixes #45.

npm is clearly the intended package manager — both package-lock.json files are committed, CI runs npm ci, and CONTRIBUTING documents npm install throughout. But .gitignore didn't mention any other lockfile.

I hit this on a fresh clone: running bun install left bun.lock and demo/bun.lock untracked and rewrote demo/package-lock.json in place, with nothing in the repo signalling that was wrong. One git add . and the repo has two lockfiles — the state that makes npm ci fail confusingly for whoever clones next.

Change

  • Ignore bun.lock, bun.lockb, pnpm-lock.yaml, yarn.lock.
  • State in CONTRIBUTING that npm is the supported package manager and why.

Verification

$ touch bun.lock demo/bun.lock
$ git status --porcelain --untracked-files=all | grep -c bun.lock
0

Deliberately not included

The issue also floated a packageManager field (Corepack) or an engines.npm constraint to make the wrong tool fail loudly rather than quietly. That's a stronger guarantee but a bigger behavioural change for contributors, so I left it as a separate call for you — happy to add it if you want it.

npm is clearly the intended package manager — both package-lock.json files
are committed and CI runs `npm ci` — but nothing stopped a stray lockfile
from another resolver being committed.

Running `bun install` on a fresh clone leaves bun.lock and demo/bun.lock
untracked and rewrites demo/package-lock.json in place, with nothing in the
repo signalling that is wrong. Two lockfiles in the tree is exactly the
state that makes `npm ci` fail confusingly for the next person.

Ignore bun/pnpm/yarn lockfiles and state the supported package manager in
CONTRIBUTING.
@vercel

vercel Bot commented Sep 4, 2026

Copy link
Copy Markdown

@sidgaikwad is attempting to deploy a commit to the Unlayer Team on Vercel.

A member of the Team first needs to authorize it.

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.

Lockfile hygiene: nothing ignores or rejects non-npm lockfiles

1 participant