build: replace cosmiconfig with lilconfig - #219
Open
stianjensen wants to merge 2 commits into
Open
Conversation
Swaps cosmiconfig (26 transitive packages, ~1.1MB) for lilconfig + yaml (2 zero-dependency packages, ~714KB) in the lockfile-lint CLI. Config file loading behavior is preserved: YAML loaders are wired up for .lockfile-lintrc.yaml/.yml and the extension-less .lockfile-lintrc, and stopDir pins the search to the starting directory, matching cosmiconfig@9's default of not traversing up the directory tree. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #219 +/- ##
=======================================
Coverage 98.01% 98.02%
=======================================
Files 13 13
Lines 404 406 +2
Branches 96 96
=======================================
+ Hits 396 398 +2
Misses 8 8 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
lirantal
self-requested a review
July 23, 2026 16:50
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.
Description
Swaps cosmiconfig (26 transitive packages, ~1.1MB) for lilconfig + yaml (2 zero-dependency packages, ~714KB) in the lockfile-lint CLI.
Config file loading behavior is preserved: YAML loaders are wired up for .lockfile-lintrc.yaml/.yml and the extension-less .lockfile-lintrc, and stopDir pins the search to the starting directory, matching cosmiconfig@9's default of not traversing up the directory tree.
Types of changes
Related Issue
Motivation and Context
Helps reduce supply chain risk and high dependency count of installing this package by using slimmer, more modern dependencies.
How Has This Been Tested?
Ran test suite locally, and verified config with both json and yaml-based config.
Screenshots (if appropriate):
Checklist:
I hope it's okay I just opened this PR without no issue / prior discussion! I may want to look into a few of the other dependencies as well, if there's interest.
Summary by cubic
Replaced
cosmiconfigwithlilconfig+yamlin the CLI to cut dependencies without changing config behavior. Search is pinned to the start directory, and.lockfile-lintrc,.lockfile-lintrc.yaml/.yml, and extension-less configs are parsed as YAML.cosmiconfig; addedlilconfigandyaml.Written for commit 64c225f. Summary will update on new commits.