Skip to content

fix: don't interfere with repo package.json#43

Merged
DariuszPorowski merged 1 commit intoraven-actions:mainfrom
allejo:fix/dont-mess-with-npm-project
Oct 7, 2025
Merged

fix: don't interfere with repo package.json#43
DariuszPorowski merged 1 commit intoraven-actions:mainfrom
allejo:fix/dont-mess-with-npm-project

Conversation

@allejo
Copy link
Contributor

@allejo allejo commented Oct 6, 2025

💌 Description

This action will do an npm install @actions/tool-cache, by default in the current working directory. There is a configurable inputs.working-directory, but I haven't tested to see if using that will change the behavior I'm seeing.

Regardless of the configurable working directory, running npm install <package> in a JavaScript repository will modify package.json, its lockfile, and run lifecycle scripts. This can cause side effects because a GitHub action is unintentionally modifying the cloned code.

🔗 Related issue

Fixes: N/A

📚 Type of change

  • 📝 Examples / docs / tutorials
  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • 🥂 Improvement (non-breaking change which improves an existing feature)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to change)
  • 🚨 Security fix
  • ⬆️ Dependencies update

✔️ Checklist

@allejo allejo requested a review from a team as a code owner October 6, 2025 22:48
@DariuszPorowski DariuszPorowski changed the title Don't interfere with repo package.json fix: don't interfere with repo package.json Oct 7, 2025
@DariuszPorowski
Copy link
Collaborator

DariuszPorowski commented Oct 7, 2025

@allejo good catch, thanks!

Going to release this week new version.

@DariuszPorowski DariuszPorowski merged commit fd1b743 into raven-actions:main Oct 7, 2025
4 of 5 checks passed
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.

2 participants