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: Update styled-components #707

Merged

Conversation

pixel-toys-chris-evans
Copy link
Contributor

@pixel-toys-chris-evans pixel-toys-chris-evans commented Oct 16, 2024

Fixes: #698

What?

Why?

Anyone working with a newer version of StyledComponents is unable to run CraftJS Layers in production due to the errors raised by breaking changes introduced in "styled-components": ">= 6".

We faced this while attempting to use CraftJS within Sanity CMS.

The latest API requires non-DOM related props to be passed as "transient props" via the specified API https://styled-components.com/docs/api#transient-props. Doing so removes the warning found in #698

Copy link

changeset-bot bot commented Oct 16, 2024

🦋 Changeset detected

Latest commit: c9ad7e8

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@craftjs/layers Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Oct 16, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
craftjs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 22, 2024 8:59am

Copy link
Owner

@prevwong prevwong left a comment

Choose a reason for hiding this comment

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

Thanks, looks good! Just left a note on the changeset

Comment on lines 1 to 4
---
'@craftjs/layers': minor
'@craftjs/core': patch
---
Copy link
Owner

Choose a reason for hiding this comment

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

  1. I don't think the core package needs an update since the changes here only affect the layers package?
  2. Can you change the @craftjs/layers as a patch update instead? It's not ideal but the reason being we're still in major version 0 and we use the minor version to indicate a breaking change in Craft

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have made these changes, just fighting with the test-suite. It's suddenly stopped recognising react-hooks when ran through @testing-library/react

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done and pushed 😄

Copy link
Owner

@prevwong prevwong left a comment

Choose a reason for hiding this comment

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

Thank you! 🚀

@prevwong prevwong merged commit 48cb5cb into prevwong:main Oct 23, 2024
3 checks passed
@github-actions github-actions bot mentioned this pull request Oct 23, 2024
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