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: upgrade all package dependencies. #1356

Closed
adamsilverstein opened this issue Apr 7, 2020 · 14 comments
Closed

Chore: upgrade all package dependencies. #1356

adamsilverstein opened this issue Apr 7, 2020 · 14 comments
Labels
Good First Issue Good first issue for new engineers P2 Low priority QA: Eng Requires specialized QA by an engineer Type: Enhancement Improvement of an existing feature
Milestone

Comments

@adamsilverstein
Copy link
Collaborator

adamsilverstein commented Apr 7, 2020

Task Description

  • Update dependencies in package.json.
  • Update dependencies in composer.json.
  • Verify build and codebase works correctly.

Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

  • All our Composer and NPM packages should be updated to their latest versions.
  • Functionality should not be affected.
  • If there are certain packages that we cannot update without breakage or making severe changes, they should be discussed on a case-by-case basis.

Implementation Brief

  • All packages within composer.json and package.json should be updated to their latest versions as long as doing so does not result in site breakages - in which case this needs to be discussed.
  • composer.json - run composer outdated - gives a list of packages which have updates. Incrementally update versions. Checking for breakages.
  • package.json - run npm outdated - - gives a list of dependency packages which have updates. Incrementally update versions. Checking for breakages .

QA Brief

Changelog entry

  • Update the majority of 3P dependencies to their latest versions.
@adamsilverstein adamsilverstein added the Type: Enhancement Improvement of an existing feature label Apr 7, 2020
@felixarntz felixarntz added Good First Issue Good first issue for new engineers P2 Low priority labels May 4, 2020
@felixarntz felixarntz assigned felixarntz and unassigned felixarntz May 4, 2020
@eclarke1 eclarke1 added this to the Sprint 25 milestone Jun 2, 2020
@aaemnnosttv
Copy link
Collaborator

IB ✅

@eugene-manuilov
Copy link
Collaborator

After working on npm dependencies I stuck with a weird issue that blocked everything. I can't troubleshoot it too much because the error message is very vague and it looks like the issue happens inside of @wordpress/data package.

I would be grateful if @tofumatt or anyone from the team can look at it too. The latest commint in my branch (enhancement/1356-upgrade-dependencies) that works for me is 5daf1d4. The next two commits are develop branch merging and updating a few php dependencies. So my guess is that something in the develop branch started causing this issue in conjunctions with npm updates.

Here is the screenshot of the issue that I see in my browser:

Screenshot from 2020-06-15 16-16-15

@eugene-manuilov
Copy link
Collaborator

@felixarntz @aaemnnosttv @tofumatt i have prepared a few separate PRs to upgrade dependencies in chunks. Could you please review it and merge if possible? I need it to be merged to unblock another updates.

@eclarke1 eclarke1 modified the milestones: Sprint 26, Sprint 27 Jul 7, 2020
@eugene-manuilov eugene-manuilov removed their assignment Jul 7, 2020
@felixarntz
Copy link
Member

@eugene-manuilov I've approved and merged all 4 PRs. What's left here now? Would be great if you could provide an update, and then we can decide whether we're gonna invest the time or create separate follow-up issues for later.

@eugene-manuilov
Copy link
Collaborator

Here is a PR #1762 to upgrade all WordPress dependencies except @wordpress/data and @wordpress/script which can't be upgraded to the latest versions yet. It also includes a few additional changes to address deprecation warnings which have appeared after testing library upgrade.

@felixarntz
Copy link
Member

felixarntz commented Jul 13, 2020

With #1762 merged, we can consider this one completed for now. I've opened #1769, #1770 and #1771 for the remaining updates, we don't need to get to those right away though, especially since figuring them out will likely require some more time investment.

Overall, in the future let's approach dependency updates more granularly. We should also think about putting a regular routine in place where we update dependencies so that they don't get as outdated over time again. Maybe we should force the versions where we know updating causes breakage in package.json.

@felixarntz felixarntz removed their assignment Jul 13, 2020
@felixarntz felixarntz added the QA: Eng Requires specialized QA by an engineer label Jul 13, 2020
@felixarntz felixarntz self-assigned this Jul 13, 2020
@felixarntz
Copy link
Member

Actually we'll still need to update PHP dependencies.

@felixarntz felixarntz assigned aaemnnosttv and unassigned felixarntz Jul 13, 2020
@aaemnnosttv aaemnnosttv removed their assignment Jul 14, 2020
@aaemnnosttv aaemnnosttv mentioned this issue Jul 14, 2020
6 tasks
@aaemnnosttv aaemnnosttv self-assigned this Jul 15, 2020
@aaemnnosttv
Copy link
Collaborator

QA 🆗 needs :octocat:

Due to the size of this issue and changes I'll review the remaining outdated packages; all other behavioral changes will be covered by general QA for release and other issues now (some things have already been caught and addressed before this).

$ composer outdated
dealerdirect/phpcodesniffer-composer-installer v0.5.0             v0.7.0             PHP_CodeSniffer Standards Composer Installer ...
guzzlehttp/guzzle                              5.3.4              6.5.5              Guzzle is a PHP HTTP client library and frame...
guzzlehttp/ringphp                             1.1.1              1.1.1              Provides a simple API and specification that ...
Package guzzlehttp/ringphp is abandoned, you should avoid using it. No replacement was suggested.
guzzlehttp/streams                             3.0.0              3.0.0              Provides a simple abstraction over streams of...
Package guzzlehttp/streams is abandoned, you should avoid using it. No replacement was suggested.
phpunit/phpunit-mock-objects                   3.4.4              3.4.4              Mock Object library for PHPUnit
Package phpunit/phpunit-mock-objects is abandoned, you should avoid using it. No replacement was suggested.
roave/security-advisories                      dev-master 881b9e4 dev-master 9f386db Prevents installation of composer packages wi...
symfony/polyfill-ctype                         v1.17.1            v1.18.0            Symfony polyfill for ctype functions
  • ⚠️ dealerdirect/phpcodesniffer-composer-installer probably could have been upgraded but are locked at minor version
    Needs issue for upgrading in the future
  • Abandoned packages are required by:
    • google/apiclient
    • phpunit/phpunit-mock-objects (we can't upgrade phpunit due to minimum PHP version compatibility)
  • roave/security-advisories and symfony/polyfill-ctype are very recent minor/patch releases
$ npm outdated
Package                          Current   Wanted   Latest  Location
@babel/plugin-transform-runtime   7.10.4   7.10.5   7.10.5  googlesitekit
@material/button                   2.3.0    2.3.0    7.0.0  googlesitekit
@material/checkbox                 2.3.0    2.3.0    7.0.0  googlesitekit
@material/dialog                   2.3.0    2.3.0    7.0.0  googlesitekit
@material/form-field               2.3.0    2.3.0    7.0.0  googlesitekit
@material/layout-grid             0.41.0   0.41.0    7.0.0  googlesitekit
@material/linear-progress          1.1.0    1.1.0    7.0.0  googlesitekit
@material/list                     2.3.0    2.3.0    7.0.0  googlesitekit
@material/menu                     2.3.0    2.3.0    7.0.0  googlesitekit
@material/radio                    2.3.0    2.3.0    7.0.0  googlesitekit
@material/ripple                   2.3.0    2.3.0    7.0.0  googlesitekit
@material/select                   2.3.1    2.3.1    7.0.0  googlesitekit
@material/switch                   2.3.0    2.3.0    7.0.0  googlesitekit
@material/textfield                2.3.1    2.3.1    7.0.0  googlesitekit
@material/theme                    1.1.0    1.1.0    7.0.0  googlesitekit
@testing-library/jest-dom         5.11.0   5.11.1   5.11.1  googlesitekit
@testing-library/react            10.4.5   10.4.7   10.4.7  googlesitekit
@wordpress/data                   4.12.0   4.22.1   4.22.1  googlesitekit
@wordpress/scripts                 3.4.0    3.4.0   12.1.1  googlesitekit
backstopjs                         3.8.8    3.8.8    5.0.1  googlesitekit
eslint                             6.8.0    6.8.0    7.4.0  googlesitekit
eslint-plugin-jest               22.21.0  22.21.0  23.18.0  googlesitekit
focus-trap-react                   6.0.0    6.0.0    7.0.1  googlesitekit
puppeteer                         1.20.0   1.20.0    5.1.0  googlesitekit
react                            16.12.0  16.13.1  16.13.1  googlesitekit
react-dom                        16.12.0  16.13.1  16.13.1  googlesitekit

Overall, nothing blocking here but a few issues should be created for handling the remaining upgrades that do not have one yet.

@eugene-manuilov would you please create the remaining issues here (or link me to them if any of these are already covered and I just missed them? 😄 ) for packages that still need to be upgraded?

@aaemnnosttv
Copy link
Collaborator

Also I just noticed that Husky hooks are not working anymore when committing via an app and we should probably downgrade it to v3. See typicode/husky#639

@eugene-manuilov
Copy link
Collaborator

@eugene-manuilov
Copy link
Collaborator

@aaemnnosttv new issues are created. Please, let me know if you want me to add something to it.

@aaemnnosttv
Copy link
Collaborator

Thanks @eugene-manuilov

I think we could use issues for upgrading dealerdirect/phpcodesniffer-composer-installer and downgrading husky but those don't need to block this. I'll create them tomorrow unless someone beats me to it 😄

QA ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good First Issue Good first issue for new engineers P2 Low priority QA: Eng Requires specialized QA by an engineer Type: Enhancement Improvement of an existing feature
Projects
None yet
Development

No branches or pull requests

6 participants