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

core: Bump package versions and fix related TS errors #294

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

brijeshb42
Copy link
Contributor

@brijeshb42 brijeshb42 commented Nov 1, 2024

There was one breaking change in Emotion. Some common types had been moved to @emotion/serialize.

There is also a small change in how we do conversion for !important. Currently, we do it by replacing ! with IMP and then reconverting back.
In this PR, I have changed that to just encode and decode to and from base64. So we don't need special handling for ! character.

I encountered these errors while setting up the Pigment CSS docs workspace.

@brijeshb42 brijeshb42 added the bug 🐛 Something doesn't work label Nov 1, 2024
There is also a small change in how we do conversion for !important.
Currently, we do it by replacing ! with __IMP__ and then reconverting
back.
In this PR, I have changed that to just encode and decode to and from
base64. So we don't need special handling for ! character
"@types/node": "^20.5.7",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.2.19",
"@types/node": "^18.19.63",
Copy link
Member

Choose a reason for hiding this comment

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

This's a downgrade. Is this correct?

Copy link
Member

@mnajdova mnajdova left a comment

Choose a reason for hiding this comment

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

Left few comments, please check them before merging.

@@ -1,7 +1,7 @@
/* eslint-env node */
// eslint-ignore-next-line import/no-unresolved
const { withPigment } = require('@pigment-css/nextjs-plugin');
const { experimental_extendTheme: extendTheme } = require('@mui/material/styles');
const { extendTheme } = require('@mui/material/styles');
Copy link
Member

Choose a reason for hiding this comment

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

For a next PR, we could just use createTheme with the css vars option.

"@mui/system": "next",
"@mui/icons-material": "next",
"clsx": "^2.1.0",
"@mui/utils": "6.1.6",
Copy link
Member

Choose a reason for hiding this comment

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

We should replace these to latest, no?

@@ -1,6 +1,6 @@
export const loader = function virtualFileLoader() {
const callback = this.async();
const resourceQuery = this.resourceQuery.slice(1);
const { source } = JSON.parse(decodeURIComponent(resourceQuery));
return callback(null, source.replaceAll('__IMP__', '!important'));
const { source } = JSON.parse(decodeURIComponent(decodeURI(atob(resourceQuery))));
Copy link
Member

Choose a reason for hiding this comment

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

👍

@@ -9,7 +9,7 @@ import type {
} from '@wyw-in-js/processor-utils';
import type { Replacements, Rules } from '@wyw-in-js/shared';
import { ValueType } from '@wyw-in-js/shared';
import type { CSSInterpolation } from '@emotion/css';
import type { CSSInterpolation } from '@emotion/serialize';
Copy link
Member

Choose a reason for hiding this comment

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

How did this breaking change land in an minor 😕

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants