-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Editor: Remove obsolete @wordpress/nux dependency #4702
Conversation
cc/ @ramonjd |
For what it's worth I tried removing this dependency before (See #3775 ) and @peterwilsoncc had disagreed about it because of backward compatibility concerns. So we might want to check that again, main the additional release make this feasible now. It's also worth clarifying that this is going to create issue for us every time we try to do a package update. |
Thank you @youknowriad! I guess one workaround -- to unblock the sync script -- would be to add the Otherwise, I guess we'll have to remove the dependency before running the sync script, and then add it back afterwards 😕 |
That's what I did the last time to generate the lock. It's a bit painful though. |
Would this work in wp-dev without the need to change wp-scripts? diff --git a/tools/release/sync-gutenberg-packages.js b/tools/release/sync-gutenberg-packages.js
index f5c8fbcdf7..c5c12b140f 100644
--- a/tools/release/sync-gutenberg-packages.js
+++ b/tools/release/sync-gutenberg-packages.js
@@ -10,6 +10,9 @@ const { zip, uniq, identity, groupBy } = require( 'lodash' );
* Constants
*/
const WORDPRESS_PACKAGES_PREFIX = '@wordpress/';
+const WORDPRESS_PACKAGES_DEPRECATED = [
+ '@wordpress/nux',
+];
const { getArgFromCLI } = require( `../../node_modules/@wordpress/scripts/utils` );
const distTag = getArgFromCLI( '--dist-tag' ) || 'latest';
@@ -167,6 +170,10 @@ function getWordPressPackages( { dependencies = {} } ) {
* @return {boolean} Is it a @wodpress package?
*/
function isWordPressPackage( packageName ) {
+ // Ignore @wordpress packages no longer receiving updates.
+ if ( WORDPRESS_PACKAGES_DEPRECATED.includes( packageName ) ) {
+ return false;
+ }
return packageName.startsWith( WORDPRESS_PACKAGES_PREFIX );
}
|
Closing. As Riad mentioned, there's #3775; plus the dependency was removed from Gutenberg in WordPress/gutenberg#46110, which is now being discussed to be reverted in WordPress/gutenberg#52444. |
Running
npm run sync-gutenberg-packages -- --dist-tag=wp-6.3
currently results in the following error:after which script execution resumed, thus typically hiding the error behind a lot of other output.
However, this results in
package.json
not being updated with the expected version bumps to@wordpress/*
packages.This PR seeks to remediate the issue by removing the dependency on
@wordpress/nux
. There seems to be some related discussion on@wordpress/nux
deprecation in https://core.trac.wordpress.org/ticket/57643.Testing instructions
trunk
, runnpm run sync-gutenberg-packages -- --dist-tag=wp-6.3
. Scroll up near the start of the resulting output and verify that the above warning is present. Furthermore, verify thatpackage.json
doesn't contain any changes to@wordpress/
packages.@wordpress/
package versions inpackage.json
are now indeed updated.Trac ticket: https://core.trac.wordpress.org/ticket/58633
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.