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

Merged
merged 2 commits into from
Jan 21, 2019

Conversation

gziolo
Copy link
Member

@gziolo 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 January 21, 2019 08:07
@gziolo gziolo added [Type] Build Tooling Issues or PRs related to build tooling [Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests. labels Jan 21, 2019
Copy link
Contributor

@afercia afercia left a comment

Choose a reason for hiding this comment

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

Thanks, all tests pass 👍

@gziolo
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 January 21, 2019 08:50
@gziolo
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
Copy link
Contributor

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

@afercia
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
@youknowriad youknowriad deleted the fix/caniuse-error branch January 21, 2019 09:34
@youknowriad
Copy link
Contributor

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
Copy link
Member Author

gziolo commented Jan 21, 2019

Thanks for help everyone 🥇

youknowriad pushed a commit that referenced this pull request Mar 6, 2019
* Chore: Update browserlist package to fix test errors

* Update more dependencies to ensure that browserslit uses the latest version
youknowriad pushed a commit that referenced this pull request Mar 6, 2019
* Chore: Update browserlist package to fix test errors

* Update more dependencies to ensure that browserslit uses the latest version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests. [Type] Build Tooling Issues or PRs related to build tooling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants