-
Notifications
You must be signed in to change notification settings - Fork 0
Conversation
As far as I understand it, this is meant to be run from your repo directory on an up-to-date version of the |
you run it locally, so it will bump package.json and add a tag too, and push that. so that's a good point, you'd need someone with write permission to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM 👍
(And thanks for the reminder that I've been meaning to give np a try on another project).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! We've recently added np
to the cdk project and it's excellent. There's a slight caveat when you have branch protection enabled, as described here. We've not properly solved it yet; would be good to get your thoughts.
Update: If you run tsc
in a prepublish
script, I think you can remove prepare
as the tarball will have the compiled code. I've found running npm pack
locally to be useful to understand what will get published.
@@ -44,5 +46,8 @@ | |||
"dist" | |||
], | |||
"preset": "ts-jest" | |||
}, | |||
"np": { | |||
"yarn": false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if you want to be explicit about the branch too to enforce only main
being used for publishing?
"yarn": false | |
"yarn": false, | |
"branch": "main" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
main
or master
are the defaults
there no easy solution if your main branch is protected, because making sure given this repo has no CD setup, what is the value of protecting |
Removing
Preventing developers from accidentally pushing to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we?
@sndrs any objections to me merging this one? np seems like a great lib and I'm keen to try it out! |
What does this change?
release
script, so that new releases can be managed by runningnpm run release