Skip to content

Add script to update package-lock.json#66

Closed
imnasnainaec wants to merge 3 commits into
mainfrom
script-reinstall
Closed

Add script to update package-lock.json#66
imnasnainaec wants to merge 3 commits into
mainfrom
script-reinstall

Conversation

@imnasnainaec
Copy link
Copy Markdown
Contributor

@imnasnainaec imnasnainaec commented May 14, 2026

This change is Reviewable

Summary by CodeRabbit

  • Documentation

    • Added instructions to clear temporary cache files and regenerate project dependencies.
  • New Features

    • Cleanup tool now includes a new flag to remove npm package directories and lock files.

Review Change Stack

@imnasnainaec imnasnainaec self-assigned this May 14, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 14, 2026

Warning

Rate limit exceeded

@imnasnainaec has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 17 minutes and 15 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a7dc6409-4cb8-4099-afaf-6a343fff11f0

📥 Commits

Reviewing files that changed from the base of the PR and between 5559fec and 5791860.

📒 Files selected for processing (4)
  • README.md
  • package.json
  • scripts/delete-temp-dirs.cjs
  • scripts/delete-temp-files.cjs
📝 Walkthrough

Walkthrough

The PR enhances the cleanup script with npm-aware directory deletion and documents the post-template-update cleanup workflow. The script refactors CLI parsing to support --npm flag alongside existing --core and --ext flags, enabling users to remove npm artifacts during cleanup operations.

Changes

Cleanup Script Enhancement and Documentation

Layer / File(s) Summary
Cleanup script CLI parsing and npm paths
scripts/delete-temp-dirs.cjs
Command-line argument parsing is moved to the top level to support --core, --ext, and --npm flags. The electronParent directory is computed from platform-specific environment variables (with HOME fallback). NPM_PATHS array defines core/project node_modules and package-lock.json paths for cleanup.
Cleanup execution with npm support
scripts/delete-temp-dirs.cjs
Deletion logic uses the pre-parsed flags to conditionally remove CORE_DIRS, EXT_DIRS, and the new NPM_PATHS through the existing deleteDirectory helper.
Post-template-update cleanup documentation
README.md
README instructs users to clear temp/cache files and regenerate package-lock.json using npm run core:reinstall after template merge steps.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • jasonleenaylor

Poem

🐰 Hop along, the cleanup crew
With --npm flags, now shiny new!
Temp files and locks will disappear,
Template updates crystal clear! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Add script to update package-lock.json' is partially related to the changeset. While the PR does enable npm cleanup functionality, the main changes involve expanding the delete-temp-dirs.cjs script with multiple flags (--npm, --core, --ext) and adding README instructions.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch script-reinstall

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot]

This comment was marked as resolved.

@imnasnainaec
Copy link
Copy Markdown
Contributor Author

Merging into #65 via #67

@imnasnainaec imnasnainaec marked this pull request as draft May 14, 2026 14:41
@imnasnainaec imnasnainaec deleted the script-reinstall branch May 14, 2026 17:42
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.

1 participant