This repository contains external dependencies for MU plugins. Currently this is limited to Jetpack and WP-Parsely.
The idea behind this repo is to automate external dependency management while still maintaining back-compat.
Jetpack is a hard dependency on VIP. Unfortunately, Jetpack release cadence (every month) creates burden/toil for us, so we're rebundling Jetpack here in the repo.
WP-Parsely is another first-party versioned dependency.
VIP-created plugins bundled for easier customer usage.
The VIP Block Data API is a REST API for retrieving block editor posts structured as JSON data.
VIP Governance is a plugin that adds additional governance capabilities to the block editor.
...profit?
Before running the script for the first time, you need to install its npm dependencies:
cd ci/
npm install
The update-deps script can be run in two modes:
-
Normal mode: Updates and commits changes to the repository. It would be run in this mode in the update-deps github action.
node ci/update-deps.js
-
Dry run mode: Shows what would happen without making any changes - useful during development
node ci/update-deps.js --dry-run
When running in dry run mode, the script will:
- Log all git commands instead of executing them
- Log Slack notifications instead of sending them
- Log WordPress post creations instead of publishing them
- Still check for version information and report what would be updated
This is useful for testing changes to the update process or previewing updates before applying them.
Hopefully the only upkeep we need to do is to change config. And only to remove or skip a version. Additions and updates should happen on its own.
Each entry in config.json should follow the following format:
{
"plugin": {
"repo": "https://github.com/Automattic/awesome-plugin",
"folderPrefix": "awesome-plugin-",
"lowestVersion": "3.1",
"versionPrefix": "",
"skip": [
"3.4"
],
"ignore": [],
"current": {
"3.1": "3.1.3",
"3.2": "3.2.1",
"3.5": "3.5.2",
}
}
}
The version to start scanning dependency tags from. Updater will delete versions lower than lowestVersion
.
List of versions to be excluded from the updater. This is used for higher versions than lowestVersion
that we don't need. Updater will delete this version if present.
List of versions that should be fully ignored by upgrader. That means not update, add or remove them. This is useful if we for some reason want to diverge from the upstream (a hotfix, VIP-specific patch, etc.
Optional string prefix used in version numbers. For example, if a plugin uses "v1.2.3" rather than "1.2.3", set this to "v". The updater will handle stripping and adding this prefix when comparing versions.
- 11.9 - Fix Publicize bug + backported Automattic/jetpack#31072
- 11.3, 11.6, 11.9, 12.0, 12.3 - To prevent undoing of https://github.com/Automattic/vip-go-mu-plugins-ext/commit/82b8a5e608825ba7dd2395f7210e3a010c18e2c8