developmentseed / developmentseed/project-seed
CI: Enforce single lockfile standard
- Dominant language
- TypeScript
- Stars
- 25
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
Idea that came up in a chat with @ifsimicoded.
We could add a standardized check to the CI workflow in project-seed to ensure that only the correct lockfile exists (eg. package-lock.json, pnpm-lock.yaml etc).
The workflow will fail if:
1. The required lockfile is missing
2. Extra lockfiles (like package-lock.json or yarn.lock) are detected
Ideally, this script would be customizable (via variables like ALLOWED_LOCKFILE and KNOWN_LOCKFILES) so it adapts easily if a project changes package managers. I also tried implementing this as a local preinstall hook to catch it earlier, but in my case it didn't surface useful error messages when it failed, so I'll have to look into it more. But a CI check is the only guarantee that the repo stays clean and provides a clear remediation step if someone accidentally pushes a duplicate lockfile.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.