-
Notifications
You must be signed in to change notification settings - Fork 51
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 WordPress dependencies #1135
Conversation
Looping in the @Automattic/newspack-product team for additional testing and feedback. I was able to run As for the CI "build" job failing, we probably need to update something in the CircleCI config to use Node v15+. cc @adekbadek as he knows most about our CI config. |
@thomasguillot regarding this:
It seems to me like this package is only used in the Edit: Nevermind, I see it's used in the Campaigns analytics view. Here's another package that's maybe descended from the one we're using that is still maintained: https://github.com/wojtekmaj/react-daterange-picker I also still think it might be possible to use the core |
Yeah, it's always nice to use core components when we can! |
c819baa
to
2a097d1
Compare
I just checked, and it looks like the |
I experimented with a few approaches, but haven't found a solution yet. |
With the build problems resolved (#1142), we now can deal with JS tests & linting failing 🕵️♀️ |
I leave this up to @adekbadek 😊 |
ab4d6f3
to
e244e94
Compare
I updated jest and the eslint packages and added a mock for a missing window global. This solved the unit test problem. The issue with linting is because for some reason, |
Although tests are passing, I'm getting build errors with node According to The issue I'm having is |
Yeah, I was testing with Node 14 locally, which seems to work okay. Which version to we officially support? |
Oh, I didn't know that happened! We might have to do the same. My understanding is that we'd like |
Yeah, I think we'll ideally want to match Calypso's version. So that means deprecating |
hahaha, yeah, I've been updating loads of dependencies in calypso, and it seems like every update requires 5 other updates as well 🤦 |
Hi all, I've been playing with trying to update Node to v16.* and the related dependencies, but I haven't had luck getting a successful build so far. What do we think about an intermediate update to Node v14.* and merging this PR more or less as-is, so we can unblock @noahtallen and the WP.com team? |
@dkoo Yes. DM'd you a temp site |
… downgrade react-router-dom
}, | ||
"dependencies": { | ||
"@wordpress/base-styles": "^4.0.0", | ||
"@wordpress/components": "^17.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think new versions have come out in the meantime (v18 is available), so it might be worth updating again to avoid having to do it later
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like trying to hit a moving target! This PR implements Dependabot, so I might freeze the updates as they are right now since things are currently building and functional.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool, that also sounds like a good plan!
Like trying to hit a moving target
Yeah, it can be very difficult 😬
Couple of updates: this error is replicable on brand new sites and seems somehow related to webpack and the importing of SCSS files. For example, on the Plugins screen, if you disable importing Also, when testing Newspack Components as a package imported to another repo (Newspack Blocks), I ran into errors related to CommonJS ( |
Another update! I've found that if I include But this is frustrating: now I'm getting a new JS error that I haven't seen before when viewing the Campaigns wizard:
|
458beb8 fixes the The Campaigns wizard should be restored now and all other wizard pages should still be working as expected. However, I'm now getting failing phpunit tests in CI:
I think this is out-of-scope to fix in this PR, though, since it looks like it requires some migration on our part and seems unrelated to the changes in this branch. @Automattic/newspack-product please confirm. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed the PHPUnit thing in 145fd5e
Left one question about newspack-components
version, otherwise it works as expected.
🎉 This PR is included in version 2.0.0-alpha.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 2.0.0-alpha.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 1.66.0-alpha.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 1.66.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
All Submissions:
Changes proposed in this Pull Request:
Over at wp-calypso, we're updating to React 17. This means getting our peer dependencies updated to the right versions, and it turns out that
newspack-components
is a peer dep ofnewspack-blocks
, which we sync to WordPress.com via Calypso.This PR updates to React 17 and to the latest WordPress component packages.
Also updates most NPM packages to the latest compatible versions.
Also specifies Node version support as
v16.11.1
, matching Calypso's Node support.Also enables Dependabot to keep NPM and Composer packages up-to-date.
Bonus: Also fixes a minor pet peeve of mine, which is that this repo's
npm run release:archive
script previously built the plugin archive ZIP to theassets/release
directory, whereas every other Newspack plugin repo builds to./release
(in the root). Now this repo should also build to the root./release
directory.How to test the changes in this Pull Request:
npm ci
runsbuild
,dev
,lint
,test
)Possible issues/follow-up
DependencyThe package still works in the Campaigns Analytics page, so I don't think we need to update this immediately.react-daterange-picker
is stale and doesn't appear to be updated anymore. It doesn't list react 17 support, but I suppose it probably supports it anyways.Build doesn't work (possible incompatibility with the node version I'm using)Should now work with Node v16.11.1Other information: