Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/rollback tag #1059

Merged
merged 2 commits into from Nov 11, 2023
Merged

Fix/rollback tag #1059

merged 2 commits into from Nov 11, 2023

Conversation

cakeinpanic
Copy link
Contributor

Hi!
Fixing issue described in #1058

I tried to use standard rollback method, but because pushing to remote is async, it does not work on the exit hook

If it's crucial to have all rollback in one method, there are few options I have found

  1. Don't call exit explicitly and then get ability to use beforeExit hook
  2. Export rollback method and explicitly call it before exiting
  3. Give a try to https://www.npmjs.com/package/async-kit (did not experiment with it yet)

WDYT?

@cakeinpanic
Copy link
Contributor Author

@webpro please take a look, this thing is blocking us from using the tool :(

@webpro webpro merged commit da0e93a into release-it:main Nov 11, 2023
11 checks passed
@webpro
Copy link
Collaborator

webpro commented Nov 11, 2023

Thanks @cakeinpanic! It's an interesting feature, complete with a good test, let's try it out!

@webpro
Copy link
Collaborator

webpro commented Nov 11, 2023

🚀 This pull request is included in v17.0.0. See Release 17.0.0 for release notes.

@cakeinpanic
Copy link
Contributor Author

@webpro hi! altogether with this fix you have released node 16 deprecation altogether with dependency packages updates.

we are using node 14.20 and can not upgrade to node 17 at the moment

and started getting

> release-it --ci
node_modules/release-it/node_modules/update-notifier/update-notifier.js:148
                options.boxenOptions ??= {

is there a way to release also next minor on v16 with this fix only?

@webpro
Copy link
Collaborator

webpro commented Nov 29, 2023

🚀 This pull request is included in v16.3.0. See Release 16.3.0 for release notes.

@webpro
Copy link
Collaborator

webpro commented Nov 29, 2023

Alright then, although release-it v16 also required Node.js v16

@webpro
Copy link
Collaborator

webpro commented Nov 29, 2023

I don't fancy going to back to supporting Node.js v14 or earlier, but I'll happily accept fixes against the v16 branch.

@cakeinpanic
Copy link
Contributor Author

@webpro thank you for fast response! release v 16 actually works fine with node 14 🫠
but with a warning

UnhandledPromiseRejectionWarning: TypeError: Intl.Segmenter is not a constructor
    at stringWidth (file:///node_modules/release-it/node_modules/ora/node_modules/string-width/index.js:27:37)

but i have made a mistake, we are using version 15 in our repos...

I have actually found an uuuugly workaround using hooks, since revert of published tag is not our only issue – we dont want to publish an npm package at all if we ar enot able to push, so with my hook workaround this fix is not even needed :)

@webpro
Copy link
Collaborator

webpro commented Nov 30, 2023

lol

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.

None yet

2 participants