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
Enhance npm run since
command to support standalone plugins
#1118
Comments
Here's some proposed content to update https://make.wordpress.org/performance/handbook/performance-lab/releasing-a-standalone-plugin/ with. Specifically, the following should replace the text after the first info notice (starts with "For any plugin to be released, ...") and before describing the release options (ends with "changelog section with all entries for the new version"). Here's a draft:
Let me know if that makes sense! |
@felixarntz Should we opt for managing this through Webpack rather than a custom command? Considering that Webpack now handles all the build steps and is easily adaptable for each scenario, it seems more efficient to leverage its capabilities. |
@thelovekesh Let's think about that separately. I would like for this issue to focus on the minimum work needed, without involving any refactoring. If we were to use Webpack for this, we would also need to update the other commands accordingly, all that warrants its own discussion. And if we decide to do it, it would also be a lot more engineering work. |
Given my experience with this plugin build system, I can assure you that implementing the necessary functionality to transform
I'll leave that decision up to you, but please be aware that implementing it in either scenario will involve a similar level of effort. This is because each plugin already has its own build system and commands in place, which will need to be considered and integrated accordingly. And I think it would be better to complete this in single run instead of working on the same thing twice. |
@thelovekesh I don't think this requires a similar level of effort. Even if the engineering execution itself is of similar amount, we would need to define what a Webpack based approach should look like, the API, how it would need to be used, modify the documentation etc. What I'm proposing here is merely expanding the functionality of the script that already exists, so those additional considerations don't apply for that. No changes required, we're only making an enhancement rather than refactoring. |
Agree with the refactoring rationale here, hence update the existing command in #1119 |
As a follow up to #1064 and #1075 which made the readme changelog NPM script reusable for the standalone plugins as well, this issue is about doing the same for the "since" NPM script, which replaces
n.e.x.t
placeholders with actual version numbers.So far the script only supports Performance Lab plugin and requires a
--release (-r)
argument. We should add a--plugin (-p)
argument to it so that a specific plugin slug can be provided. This would then instruct the command to make the replacements only for the specific plugin. For a smooth transition / BC we should useperformance-lab
as the default for that new argument.It's worth noting that this unlocks a slightly better workflow experience for publishing plugins. One of the current problems is that when you publish a Performance Lab release, you also publish any pending standalone plugin releases, and it's difficult to figure out whether all plugins that have bumped versions are actually ready because all of this is managed completely manually and intertwined with specific enhancement/bug PRs. While #1061 is the main issue about shaping the future goal, this is unrelated and merely improving the current status quo without actually changing the way we do releases. So it makes sense to be a standalone enhancement.
Here's what having standalone plugin support in our "readme" and "since" commands unlocks:
n.e.x.t
code placeholders with the correct version (via the "since" NPM script) and populates the readme changelog for that version/milestone (via the "readme" NPM script). This is very similar to what https://make.wordpress.org/performance/handbook/performance-lab/releasing-the-plugin/#preparing-the-release describes for the Performance Lab plugin.This workflow would notably simplify the current overhead as it would avoid:
Going forward, it should be straightforward to know whether a standalone plugin is ready for release by checking whether its latest milestone already has a version number, since the version bumps in the code happen at a similar time. And even if the latter PR is not merged yet, it wouldn't be a problem because the code simply wouldn't be deployed, and it could be done later by dispatching the workflow.
Once the Performance Lab 3.0.0 release has gone out next Monday, I propose we go with the above workflow improvement. It will make standalone plugin releases a more intentional action without changing any technical infrastructure (beyond the "since" script enhancement in this issue). We should then update the relevant documentation here and here to include those preparation steps.
cc @westonruter @mukeshpanchal27 @thelovekesh @joemcgill
The text was updated successfully, but these errors were encountered: