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: Update browserlist package to fix test errors #13395

Merged
merged 2 commits into from Jan 21, 2019

Conversation

@gziolo
Copy link
Member

gziolo commented Jan 21, 2019

Description

Fixes issue with the failing unit tests caused by one of the dependencies being out of date. As explained in detail by @afercia in #13385 (comment):

Note: locally, I get 2 tests failures:

  • babel-plugin › .getTranslatorComment() › should not return translator comment on same line but after call expression
  • Babel preset default › transpilation works properly

both seem related to:

    Expected mock function not to be called but it was called with:
    ["Browserslist: caniuse-lite is outdated ...

they happen also on master and seem completely unrelated to the changes in this PR.

In addition, I updated the following dependencies which also were using the outdated browserlist and caniuse-lite packages:

  • "autoprefixer": "^9.4.5"
  • "postcss": "^7.0.13"
  • "stylelint": "^9.10.1"

First two dependencies had breaking changes so it causes some differences in the generated CSS code. In theory, it should be safe as they claim it should have the only impact on the code, because they claim to provide backward compatibility for IE:

We removed Node.js 4 and Node.js 9 support since it doesn’t have security updates anymore.

We removed IE and “dead” browsers (without security updates) from Babel’s targets. Don't worry, Autoprefixer still generate IE-compatible code. These changes affect websites which run Autoprefixer on client-side like CodePen.

There is a similar note for PostCSS.

How has this been tested?

npm test
npm run build

@gziolo gziolo self-assigned this Jan 21, 2019

@gziolo gziolo requested review from ntwb and afercia Jan 21, 2019

@afercia
Copy link
Contributor

afercia left a comment

Thanks, all tests pass 👍

@gziolo gziolo requested review from jasmussen and karmatosed Jan 21, 2019

@gziolo

This comment has been minimized.

Copy link
Member Author

gziolo commented Jan 21, 2019

@karmatosed, @jasmussen or @mapk - can you spot any visual differences in the editor with these changes applied? In theory, there should be no change, it should only contain some optimizations in the generated CSS.

I can't spot any issues on Chrome. I only can see some very small tweaks in the produced CSS when comparing old and new CSS.

@gziolo gziolo requested a review from mapk Jan 21, 2019

@gziolo

This comment has been minimized.

Copy link
Member Author

gziolo commented Jan 21, 2019

@afercia, I know you use IE, can you double check it doesn't regress with the additional commit applied?

@jasmussen

This comment has been minimized.

Copy link
Contributor

jasmussen commented Jan 21, 2019

Took this for a quick spin and did not see any regressions 👍 👍

@afercia

This comment has been minimized.

Copy link
Contributor

afercia commented Jan 21, 2019

I know you use IE,

I do, but only for testing purposes on a second laptop. I'll try to test it as soon as I have some spare time.

@youknowriad youknowriad merged commit 4560d7b into master Jan 21, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@youknowriad youknowriad deleted the fix/caniuse-error branch Jan 21, 2019

@youknowriad

This comment has been minimized.

Copy link
Contributor

youknowriad commented Jan 21, 2019

I don't really expect breakage and we have time to merge and test properly before 5.0

@gziolo gziolo added this to the 5.0 (Gutenberg) milestone Jan 21, 2019

@gziolo

This comment has been minimized.

Copy link
Member Author

gziolo commented Jan 21, 2019

Thanks for help everyone 🥇

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