diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 21f4b3323637d..acf2787087346 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -26,15 +26,6 @@ // Monorepo packages are excluded in renovate-config.js, where we can read // the list of them in code. - // Not a real package. - { - matchDatasources: [ 'packagist' ], - matchPackageNames: [ - 'wordpress/classic-editor-plugin', - ], - enabled: false, - }, - // Widen PHP dev deps to maintain support for old PHP versions we still support. // When we drop an old PHP version we'll manually go through and narrow any ranges. // (non-dev deps are handled in renovate-config.js where we can read the correct value for `constraints.php`) @@ -115,7 +106,29 @@ depNameTemplate: 'renovate', packageNameTemplate: 'ghcr.io/renovatebot/renovate', }, + + // wpcomsh's wordpress/classic-editor-plugin plugin. + { + customType: 'regex', + fileMatch: [ '^projects/plugins/wpcomsh/composer\\.json$' ], + matchStrings: [ + '"name": "wordpress/classic-editor-plugin",\\s+"version": "(?[0-9.]+)",', + '"url": "https://downloads\\.wordpress\\.org/plugin/classic-editor\\.(?[0-9.]+)\\.zip",', + '"url": "https://plugins\\.svn\\.wordpress\\.org/classic-editor/",\s+"type": "svn",\s+"reference": "tags/(?[0-9.]+)/"', + ], + depNameTemplate: 'wordpress/classic-editor-plugin', + packageNameTemplate: 'wordpress/classic-editor-plugin', + datasourceTemplate: 'custom.wordpress/classic-editor-plugin', + }, ], + customDatasources: { + 'custom.wordpress/classic-editor-plugin': { + defaultRegistryUrlTemplate: 'https://api.wordpress.org/plugins/info/1.0/classic-editor.json', + transformTemplates: [ + '{ "releases": $each( versions, function($v, $k) { $match( $k, /^[0-9.]+$/ ) ? { "version": $k } } ) }', + ], + }, + }, lockFileMaintenance: { enabled: true,