-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
DataViews build-wp: don't bundle singleton WordPress packages #67590
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Size Change: 0 B Total Size: 1.83 MB ℹ️ View Unchanged
|
#66825 was part of 19.8, which was released just a few hours ago. Would we want to release a 19.8.1 with this fix or is it ok to wait until 19.9 (two weeks from now). I feel 19.8.1 would be better because, otherwise, we will be on xmas and people won't have time to send feedback until new year. But I'm not sure how severe the issue is. |
This Both PRs affect only what is regularly published to NPM. |
Ah, I see. So, how do we update the dataview package? Can we trigger a new npm release for a single package (dataviews)? |
@gziolo just did that a few minutes ago, under the |
Nice, thanks! I've updated the example plugin to use this approach at wptrainingteam/devblog-dataviews-plugin#3 I tested it on WordPress 6.6 and 6.7, with and without the latest Gutenberg plugin active. It worked in every scenario |
Co-authored-by: jsnajdr <[email protected]> Co-authored-by: youknowriad <[email protected]>
This patch excludes singleton-ish WordPress packages from the
dataviews/wp
bundle. A script that bundlesdata
,hooks
ori18n
can't really use them as intended because it has its own store/hooks/translations registry and can't use the data that other parts of WordPress put there.The bundle will now contain plain ES imports like:
which the build tool for the plugin that uses
@wordpress/dataviews/wp
is supposed to interpret and replace them withwp.i18n
references.I'm also inclined to bundle "trivial" WP packages like
deprecated
,warning
oris-shallow-equal
. There is not risk of missing backward compatibility. But that's not very important.Context: #66825 (comment)