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: Remove @react-hookz/web peer dependency #861

Merged
merged 1 commit into from
Aug 2, 2024

Conversation

rfgamaral
Copy link
Member

Overview

The @react-hookz/web peer dependency might cause issues upgrading Typist to a newer version (especially when running an older version, such is the case for Twist), and the fact of the matter is that we are only using one hook from the whole library, a hook that we can easily copy/paste into Typist code base.

That one hook, useRerender, was mostly being used by the useEditor hook (and also a Storybook component, but we can easily refactor that with a different technique), a fork of the official useEditor from Tiptap to cater to our needs. However, the latest Tiptap versions come with a much better useEditor implementation, making our version redundant. Soon we'll move back to the official useEditor hook, removing the need for @react-hookz/web.

There's no point in keeping the @react-hookz/web library around (especially as a peer dependency), and this PR prepares the code base useEditor hook upgrade by removing the library altogether.

Important

Although this removes a peer dependency, this is not a breaking change, and consumer apps don't need any changes.

PR Checklist

Test plan

  • If the editor loads and works as expected, there's nothing else to test.

@rfgamaral rfgamaral added the ⛴ Ship PR Used for PRs that don't need a review and can be merged when CI is green. label Aug 2, 2024
@rfgamaral rfgamaral self-assigned this Aug 2, 2024
Copy link

netlify bot commented Aug 2, 2024

Deploy Preview for doist-typist ready!

Name Link
🔨 Latest commit ff38c2c
🔍 Latest deploy log https://app.netlify.com/sites/doist-typist/deploys/66ac23b7e882460008396bc9
😎 Deploy Preview https://deploy-preview-861--doist-typist.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@rfgamaral rfgamaral enabled auto-merge (squash) August 2, 2024 00:10
@rfgamaral rfgamaral merged commit ad7644d into main Aug 2, 2024
9 checks passed
@rfgamaral rfgamaral deleted the ricardo/remove-react-hookz-peer-dependency branch August 2, 2024 00:15
doistbot added a commit that referenced this pull request Aug 2, 2024
## [6.0.4](v6.0.3...v6.0.4) (2024-08-02)

### Bug Fixes

* Remove `@react-hookz/web` peer dependency ([#861](#861)) ([ad7644d](ad7644d))
@doistbot
Copy link
Member

doistbot commented Aug 2, 2024

🎉 This PR is included in version 6.0.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

@doistbot doistbot added the released Pull requests that have been released to production label Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released Pull requests that have been released to production ⛴ Ship PR Used for PRs that don't need a review and can be merged when CI is green.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants