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

Icons: fix having to import from /dist #417

Conversation

christianvuerings
Copy link
Contributor

@christianvuerings christianvuerings commented May 14, 2024

Why is this a breaking change?

Previous imports including /dist will no longer work, example change when this lands:

- import ChevronRight from "@cambly/syntax-icons/dist/ChevronRight";
+ import ChevronRight from "@cambly/syntax-icons/ChevronRight";

Why is this no longer an issue in Cambly-Frontend

Since we now use a new module resolution: https://github.com/Cambly/Cambly-Frontend/pull/9878

Notes

Copy link

changeset-bot bot commented May 14, 2024

🦋 Changeset detected

Latest commit: 39ec05b

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

This PR includes changesets to release 3 packages
Name Type
@cambly/syntax-icons Major
@cambly/syntax-core Major
@syntax/storybook 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 May 14, 2024

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

Name Status Preview Comments Updated (UTC)
syntax ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 14, 2024 6:06am

@@ -1,7 +1,7 @@
import { type StoryObj, type Meta } from "@storybook/react";
import Badge from "./Badge";
import RepeatIcon from "@mui/icons-material/Repeat";
import Refresh from "../../../syntax-icons/src/Refresh";
import Refresh from "../../../syntax-icons/src/icons/Refresh";
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@somethiiing moved these into icons to be able to quickly get a list of all the different icons (excluding tests / stories or other files)

Copy link
Collaborator

Choose a reason for hiding this comment

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

oh man, i wanted to do this before, but i remember you wanted to keep it flatter in core so i kept it this way

import path from "node:path";

describe("package.json: exports", () => {
it("contains correct exports", async () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@somethiiing added a test to ensure we use have the correct exports field

Copy link
Contributor

@zprong zprong left a comment

Choose a reason for hiding this comment

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

LG thanks for following up on this!

Copy link
Collaborator

@somethiiing somethiiing left a comment

Choose a reason for hiding this comment

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

thanks for doing this, i was going to do it yesterday, but got pulled into some meetings. great job though!

@christianvuerings christianvuerings merged commit 1b97183 into Cambly:main May 14, 2024
10 checks passed
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

3 participants