Add a --reset-baseline flag
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- javascript
- Domain
- cli
Research direction
Start in bin/lockcheck.js and trace the existing argument handling and snapshot-path resolution. Verify the --reset-baseline path checks for .lockcheck-snapshot.json, deletes it when present, prints the specified success message, and exits immediately with code 0.
Written by the indexing model from the issue text.
Description
Currently, lockcheck saves the initial scan of dependencies to a .lockcheck-snapshot.json file to use as a baseline for future diffs. If developers want to reset this baseline (say, after a massive version upgrade), they have to manually delete the file using rm .lockcheck-snapshot.json.
We should add a quick CLI flag to do this automatically.
Acceptance Criteria:
- Add
--reset-baselineas an allowed argument inbin/lockcheck.js. - If the flag is passed, check if
resolve(dir, '.lockcheck-snapshot.json')exists usingfs.existsSync. - If it exists, delete it using
fs.unlinkSync(). - Print a beautiful green success message
Baseline snapshot deleted. The next run will create a new baseline.and immediatelyprocess.exit(0).
- Dominant language
- JavaScript
- Stars
- 11
- Forks
- 4
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 3
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from DhanushNehru/lockcheck
-
good first issue
Difficulty 1/5 1-3 hours Newbie friendliness 76/100
DhanushNehru/lockcheck#15 ·
-
enhancement good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
DhanushNehru/lockcheck#10 ·
-
good first issue testing
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
documentation enhancement help wanted testing
Difficulty 4/5 3-5 days Newbie friendliness 68/100
All issues in DhanushNehru/lockcheck
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
[Block] Latest Posts [Type] Bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
sugarlabs/musicblocks#8847 ·