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

Re-introduce VERSION in @turnkey/http #191

Merged
merged 5 commits into from
Dec 26, 2023
Merged

Conversation

r-n-o
Copy link
Contributor

@r-n-o r-n-o commented Dec 26, 2023

Summary & Motivation

This re-introduces the changes from #186 and #187 after they were reverted in #190.

I'm very, very disappointed in Changesets, a tool we're using for releases. npm itself has plenty of lifecycle hooks to handle custom scripts pre and post version (see this). But these lifecycle hooks aren't called by changeset version! Wut. People are complaining about this...

...but no responses from the maintainers.

I tried instrumenting preversion, prepublish, version, etc...nothing seems to work because changeset doesn't call any of these. In the end I settled for a custom "version" script. This has the advantage to be explicit but it's one more script to call during releases. The problem: what if we forget to call it when we publish new versions? For this I've got a CI check which should catch any oversight.

How I Tested These Changes

  • Ran version script locally to make sure it works
  • Broke things on purpose with this commit to trigger the CI check
    image

Did you add a changeset?

Yes! ✅

Copy link

codesandbox-ci bot commented Dec 26, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Copy link
Contributor

@emostov emostov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice - we can include running the pnpm version command in release instructions

@r-n-o
Copy link
Contributor Author

r-n-o commented Dec 26, 2023

Nice - we can include running the pnpm version command in release instructions

Yep! That's my next PR once this one is merged! 🙏

@r-n-o r-n-o merged commit 547da14 into main Dec 26, 2023
5 checks passed
@r-n-o r-n-o deleted the rno/re-introduce-client-version branch December 26, 2023 21:43
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