Skip to content
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

Merge wp-now into @wp-playground/cli #2100

Open
adamziel opened this issue Dec 18, 2024 · 2 comments
Open

Merge wp-now into @wp-playground/cli #2100

adamziel opened this issue Dec 18, 2024 · 2 comments

Comments

@adamziel
Copy link
Collaborator

adamziel commented Dec 18, 2024

@wp-now is not actively maintained, new issues keep coming, and keeping wp-now in sync with the latest Playground libraries is a real challenge.

I propose we roll wp-now it into @wp-playground/cli and only maintain a single tool. Both npm packages could be the same code, or perhaps one would install the other as a dependency and passthrough all the calls.

Here's what we'll need to get there:

  • Update wp-now readme and binary to give users a notice like "hey, this tool isn't actively maintained, you may want to switch to @wp-playground/cli, here's a migration doc page"
  • Port the context detection logic, into @wp-playground/cli to enable the same neat developer experience wp-now has, as in just run it and it will do something sensible whether you're in a plugin directory, a theme directory, wp-content etc.
  • At the same time, also retain the existing fully manual mode where mounts must be explicitly specified
  • Identify the delta between CLI flags used by both tools and discuss whether harmonizing them makes sense. Overarching goal: Keep the CLI flags consistent with Query API params. Don't introduce opinionated choices but provide a flexible CLI tool.
  • Do a major version bump in wp-now to indicate a breaking release
@adamziel
Copy link
Collaborator Author

adamziel commented Dec 18, 2024

What do you think @sejas @wojtekn?

@sejas
Copy link
Collaborator

sejas commented Dec 18, 2024

It totally makes sense to me that wp-now uses @wp-playground/cli under the hood as a dependency. That way wp-now would benefit from the changes and updates done by the playground team.

Port the context detection logic, into @wp-playground/cli to enable the same neat developer experience wp-now has, as in just run it and it will do something sensible whether you're in a plugin directory, a theme directory, wp-content etc.

I'm not sure about this approach. If we port the detection logic into @wp-playground/cli then we could rename it to wp-now and start publishing both npm respositories from the same repository.
If it's an independent tool, the source code should live in https://github.com/WordPress/playground-tools instead of https://github.com/wordpress/wordpress-playground ? What do you think?

@adamziel , do we know how many active users we have in each CLI tool?

From weekly npm downloads, I can see that we have more usage in wp-now than in @wp-playground/cli.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

2 participants