WordPress / playground-tools

GNU General Public License v2.0
127 stars 38 forks source link

Add express to dependencies; Update follow-redirects to newest version #225

Closed eliot-akira closed 2 months ago

eliot-akira commented 2 months ago

What?

This is the second part of solving:

The first part is WordPress/wordpress-playground#1218. (php-wasm/node: Update express to newest version, and move it to devDependencies)

Why?

The first part of the solution is in the Playground project, which updates express and moves it to devDependencies since it's only used for tests in that project.

As a result, express will no longer be installed when @php-wasm/node is installed. So wp-now needs to declare express as a dependency.

How?

These together with WordPress/wordpress-playground#1218 will resolve the original issue #224, which should eliminate all npm audit warnings.

Testing Instructions

Currently npm run test fails with an unrelated issue, as can be seen in another PR's CI test run. https://github.com/WordPress/playground-tools/actions/runs/8616282863/job/23614052137?pr=223#step:4:49 ("RuntimeError: memory access out of bounds") That seems have been caused by commit 133029c.

sejas commented 2 months ago

@eliot-akira , thanks for this PR.

If you pull the latest changes from trunk, the tests should pass.

eliot-akira commented 2 months ago

OK, merged from trunk, ran npm install, and now the tests pass locally and in the CI.

I suppose this PR can be merged before the other one (WordPress/wordpress-playground#1218), since that removes the express dependency from @php-wasm/node.

As an aside, recently I'm integrating wp-now in a team project setup, to make onboarding new members simpler by replacing wp-env and Docker. So far it's working great, much faster to get started.

adamziel commented 2 months ago

As an aside, recently I'm integrating wp-now in a team project setup, to make onboarding new members simpler by replacing wp-env and Docker. So far it's working great, much faster to get started.

@eliot-akira YAY! I'm so glad to hear that! Personally I've ran into some rough edges with modes and auto-mounting things and would love to make that optional and configurable via CLI options. But other than it did the trick on my end, too. I think you'd like Studio – @sejas could give you early access.

eliot-akira commented 2 months ago

Studio looks cool! From the screenshot I imagine a desktop app for managing local WordPress sites powered by Playground. Curious to try it, I signed up for the waitlist.

I'm still solving a few things to completely replace wp-env with wp-now.

adamziel commented 2 months ago

@eliot-akira for mapping, let's explore that in Blueprints v2:

https://github.com/WordPress/blueprints-library/issues/46