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

Update to PostCSS 8 #5304

Merged
merged 7 commits into from Jun 7, 2021
Merged

Update to PostCSS 8 #5304

merged 7 commits into from Jun 7, 2021

Conversation

jeddy3
Copy link
Member

@jeddy3 jeddy3 commented May 15, 2021

Which issue, if any, is this issue related to?

Closes #4942
Closes #5276

Is there anything in the PR that needs further explanation?

This is the long-lived branch to be merged in v14.

@jeddy3 jeddy3 mentioned this pull request May 15, 2021
21 tasks
@hudochenkov
Copy link
Member

Here's how we can temporarily silence plugin warnings in Jest:

const originalWarn = console.warn.bind(console.warn);

beforeAll(() => {
  console.warn = (message?, ...optionalParams) => {
    if (message.toString().includes('postcss.plugin was deprecated. Migration guide')) {
      return;
    }

    originalWarn(message, ...optionalParams);
  };
});

afterAll(() => {
  console.warn = originalWarn;
});

We probably could put it js-file for setupFilesAfterEnv.

@jeddy3
Copy link
Member Author

jeddy3 commented May 15, 2021

Sounds good. It'll clean up the output while we work on fixing the failing tests.

Do you want to push a commit to this branch for it?

@hudochenkov
Copy link
Member

hudochenkov commented May 15, 2021

This code doesn't work ¯\_(ツ)_/¯ Neither in setupFilesAfterEnv or in test file itself. I think it's due jest-preset and testRule. Because I used this code in regular Jest setup to suppress warnings.

https://krasimirtsonev.com/blog/article/jest-mock-console-methods this method also doesn't work.

We could temporarily use https://www.npmjs.com/package/patch-package to remove this warning from PostCSS.

@jeddy3 jeddy3 marked this pull request as ready for review June 7, 2021 12:44
@jeddy3
Copy link
Member Author

jeddy3 commented Jun 7, 2021

I believe this is now ready for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants