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

chore: bump mdxjs dependencies #1351

Merged
merged 5 commits into from Dec 21, 2020

Conversation

atanasster
Copy link
Collaborator

issue: #1345

Bump versions @mdx-js/mdx and @mdx-js/react to "^1.6.22", gatsby-plugin-mdx to "^1.6.0"

@vercel
Copy link

vercel bot commented Dec 9, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/systemui/theme-ui/dqo47q036
✅ Preview: https://theme-ui-git-fork-atanasster-mdx-bump-dependencies.systemui.vercel.app

@maiertech
Copy link

See #1345 (comment).

@hasparus
Copy link
Member

hasparus commented Dec 12, 2020

Pasting @454de6e's comment.

When using theme-ui in an MDX project (which of course is optional because theme-ui can be used without any MDX), I would expect you would already bring your own @mdx-js/react as peer dependency of whatever framework you use, e.g. gatsby-plugin-mdx. In that case the hard-wired dependency is in the way.

But I also see your point that you want theme-ui usable without the hassle of having to install peer dependencies. So I wonder if maybe Theme UI should also have an official way of using it modularly, where rather than installing theme-ui you reach for specific packages like @theme-ui/components or @theme-ui/mdx (complemented by @theme-ui/core) depending on your specific styling needs. Then @theme-ui/mdx can have @mdx-js/react as peer dependency and whoever wants the complete experience can install theme-ui which comes with @mdx-js/react as dependency.

Let's merge this, but let's make @mdx-js/react a peer dep in theme-ui and @theme-ui/mdx, and align the docs with it.

  1. We minimize our surface our surface a bit. Right now Theme UI seems like a huge colossus which does everything. If it's a dependency, people don't have to read its docs, right? And then we have problems.
  2. It exports a context provider. Any version mismatch here is breaking the provider-consumer link, so the entire thing stops working.

I have mdx-js versions locked in resolutions in all of my Theme UI + MDX projects. It works but it isn't an experience we'd like the users to have, especially since you can't do it with npm AFAIK.

CHANGELOG.md Outdated
@@ -2,6 +2,7 @@

## v0.6.0 UNRELEASED

- Bump versions @mdx-js/mdx and @mdx-js/react to "^1.6.22", gatsby-plugin-mdx to "^1.6.0"
Copy link
Member

@lachlanjc lachlanjc Dec 12, 2020

Choose a reason for hiding this comment

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

Suggested change
- Bump versions @mdx-js/mdx and @mdx-js/react to "^1.6.22", gatsby-plugin-mdx to "^1.6.0"
- Bump versions `@mdx-js/mdx` and `@mdx-js/react` to `^1.6.22`, gatsby-plugin-mdx to `^1.6.0`. PR #1351

@atanasster
Copy link
Collaborator Author

Pasting @454de6e's comment.

When using theme-ui in an MDX project (which of course is optional because theme-ui can be used without any MDX), I would expect you would already bring your own @mdx-js/react as peer dependency of whatever framework you use, e.g. gatsby-plugin-mdx. In that case the hard-wired dependency is in the way.
But I also see your point that you want theme-ui usable without the hassle of having to install peer dependencies. So I wonder if maybe Theme UI should also have an official way of using it modularly, where rather than installing theme-ui you reach for specific packages like @theme-ui/components or @theme-ui/mdx (complemented by @theme-ui/core) depending on your specific styling needs. Then @theme-ui/mdx can have @mdx-js/react as peer dependency and whoever wants the complete experience can install theme-ui which comes with @mdx-js/react as dependency.

Let's merge this, but let's make @mdx-js/react a peer dep in theme-ui and @theme-ui/mdx, and align the docs with it.

  1. We minimize our surface our surface a bit. Right now Theme UI seems like a huge colossus which does everything. If it's a dependency, people don't have to read its docs, right? And then we have problems.
  2. It exports a context provider. Any version mismatch here is breaking the provider-consumer link, so the entire thing stops working.

I have mdx-js versions locked in resolutions in all of my Theme UI + MDX projects. It works but it isn't an experience we'd like the users to have, especially since you can't do it with npm AFAIK.

I believe also just installing a newer version of mdxjs should solve, not just using resolutions. Can you pls confirm?

@hasparus
Copy link
Member

I believe also just installing a newer version of mdxjs should solve, not just using resolutions. Can you pls confirm?

Yup, it's still a problem for me. Regardless of the version, we can still get conflicts.

@hasparus
Copy link
Member

Let's follow up in #1388.

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

4 participants