feat: add npm set-script#2237
feat: add npm set-script#2237ruyadorno merged 1 commit intonpm:release/v7.1.0from Yash-Singh1:latest
Conversation
|
What happens if a package uses |
Any suggestions on how to detect or identify if it is being called from |
Right, I've read through the original RFC discussion to find that there was no definitive stance on it so it didn't make it to the RFC itself - I'm ok with that extra check being there since it's unlikely to be an issue to 99% of users.
You can check for |
ruyadorno
left a comment
There was a problem hiding this comment.
Thank you so much @Yash-Singh1 for picking this up from the RFCs and turning it into actual code 😄 This is looking very good, I think it just needs to adjust some details I left in the review + addressing lifecycle check from @ljharb 😊
For tests and docs you can refer to other commands for examples but definitively let us know if you need help/guidance. Thanks again! 🎉
ljharb
left a comment
There was a problem hiding this comment.
This doesn't seem like it has actual tests?
ljharb
left a comment
There was a problem hiding this comment.
seems good to me, but i don't see any unit tests.
|
@ljharb @ruyadorno I am ready to merge from my end. |
Introduces the set-script command. It accepts two arguments, the script name and the command ref: https://github.com/npm/rfcs/blob/latest/accepted/0016-set-script-command.md PR-URL: #2237 Credit: @Yash-Singh1 Close: #2237 Reviewed-by: @ruyadorno
Summary
This PR introduces the
set-scriptcommand. It accepts two arguments, the script name and the command as said in RFC 0016References
Adds in RFC 0016: https://github.com/npm/rfcs/blob/latest/accepted/0016-set-script-command.md