p5.js icon indicating copy to clipboard operation
p5.js copied to clipboard

npm run release preview actually does a (mostly) real release

Open outofambit opened this issue 4 years ago • 5 comments
trafficstars

I ran npm run release -- --preview today to do a test run of the 1.3.1 release, but it did a (mostly) real release. It did everything for an actual release except upload the new library version to bower. I was able to finish the release properly, so no actual harm except for the surprise of doing a release :)

The docs here say that the preview flag will not touch anything official, so we could remove that from the docs and/or fix whatever underlying logic has changed to make that no longer true.

outofambit avatar Mar 28 '21 19:03 outofambit

This line should have prevented the release from actually releasing. I'll have a look but if you have any inkling of what may have happened do let me know as well.

limzykenneth avatar Mar 28 '21 19:03 limzykenneth

Ok, I found the problem. The --preview flag for np is added in 6.2.0 of np (which was the lastest version when it was added) but it had issues with NPM 2FA so it was downgraded to 5.2.1 here which doesn't have the 2FA issue but also doesn't support the --preview flag.

The current latest version is 7.4.0. I'm not sure if the 2FA problem still persists, I'll test it out in a scoped release.

limzykenneth avatar Mar 28 '21 20:03 limzykenneth

I've tested out the latest version but is unable to publish to my namespace (got stuck at 2FA where it keeps asking for the token repeatedly). I'm not sure if it would be the same case for non-namespaced packages as well, I have a few projects published to NPM using np and 2FA without problems but I'm publishing to non-namespaced package and probably not using 7.4.0 yet.

@outofambit I wonder if it would be a good idea to move the publishing steps to Github Actions like we did for the website and to create a new release we just do npm version patch etc and git push && git push --tags?

limzykenneth avatar Mar 28 '21 21:03 limzykenneth

I wonder if it would be a good idea to move the publishing steps to Github Actions like we did for the website and to create a new release we just do npm version patch etc and git push && git push --tags?

gonna take a look at this soon! i hit the same scenario in publishing 1.4 because i forgot we hadn't fixed this yet.

outofambit avatar Jul 04 '21 00:07 outofambit

This is a larger change, but if the p5 team is interested in automating the process of version bumping, updating the changelog, and publishing the package to NPM, you might be interested in semantic-release or auto projects. A recent reference diff using auto inside a GitHub action is here:

https://github.com/nteract/data-explorer/pull/63

hydrosquall avatar Jul 04 '21 04:07 hydrosquall

I think we can close this issue now since we have updated the release process. What do you think, @outofambit and @limzykenneth?

Qianqianye avatar Oct 23 '22 20:10 Qianqianye

yeah i think so! no longer a problem thanks to @limzykenneth! 🙌

outofambit avatar Oct 24 '22 04:10 outofambit