-
Notifications
You must be signed in to change notification settings - Fork 2k
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 Newspack blocks to v1.37.1 #56121
Conversation
Link to Calypso live: https://calypso.live?image=registry.a8c.com/calypso/app:build-14537 |
This PR modifies the release build for editing-toolkit To test your changes on WordPress.com, run To deploy your changes after merging, see the documentation: PCYsg-mMA-p2 |
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: App Entrypoints (~17 bytes removed 📉 [gzipped])
Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used. Async-loaded Components (~15 bytes removed 📉 [gzipped])
React components that are loaded lazily, when a certain part of UI is displayed for the first time. Legend What is parsed and gzip size?Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory. Generated by performance advisor bot at iscalypsofastyet.com. |
react: '*' | ||
'@wordpress/[email protected]': | ||
peerDependencies: | ||
react-native: '*' | ||
'@wordpress/[email protected]': | ||
peerDependencies: | ||
react-native: '*' | ||
'@wordpress/[email protected]': | ||
peerDependencies: | ||
react-native: '*' |
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.
Hmm, do you know why api-fetch
peer-depends on react-native
? 🤔
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.
Yes, there is one wp package which has react-native
as a peer dependency, and that causes everything else which uses that package to show a warning. Since a lot of wp packages depend on that package but do not include react-native, yarn says that the peer dependency requirements are not met. Adding it to the peer dependencies in this file basically indicates to yarn that we (the calypso repo) will provide that peer dependency, thus resolving the peer dep requirement.
That said, I think this issue doesn't exist with newer versions of WP packages, so it's possible we can remove it
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've just double checked. It hasn't been published yet, but WordPress/gutenberg#34687 will resolve this issue. The exact problem is:
react-native-url-polyfill
is added by@wordpress/url
react-native-url-polyfill
has a peer dep onreact-native
, which isn't provided by@wordpress/url
- Everything else including
@wordpress/url
(such as@wordpress/api-fetch
) now has an invalid peer dependency requirement. - These are fulfilled by adding
react-native
as a peer dep to each package depending on@wordpress/url
, and then providingreact-native
at the top level ourselves
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.
Tested well from the sandbox. Some unrelated tests are failing and I re-triggered them just in case.
0360168
to
e806ea1
Compare
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.
Smoke test looks good! 👍
Changes proposed in this Pull Request
Bump newspack blocks to v1.37.1 and resolve peer dependency warnings via .yarnrc.yml.
Releasing to npm
Here's how I did the release to npm:
package.json
to include@automattic/
as a prefixprivate: true
field in package.json.Testing instructions
install-plugin.sh etk update/newspack-blocks-1.37
)