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

Update Playground dependencies in package.json #139

Merged
merged 3 commits into from
Jan 11, 2024

Conversation

adamziel
Copy link
Collaborator

@adamziel adamziel commented Jan 11, 2024

What?

Updates the versions of WordPress Playground packages and makes the necessary adjustments to make the tests work with these new version. WordPress Playground 0.5.4 is compatible with Node.js v18 via polyfills, which means wp-now will now be able to use Blueprint steps like installPlugin.

Testing Instructions

Confirm the CI checks pass

cc @sejas @danielbachhuber @wojtekn

@adamziel adamziel added Enhancement New feature or request wp-now labels Jan 11, 2024
@@ -50,19 +50,6 @@ export default async function startWPNow(
requestHandler: {
documentRoot,
absoluteUrl: options.absoluteUrl,
isStaticFilePath: (path) => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is now handled by Playground core.

@sejas
Copy link
Collaborator

sejas commented Jan 11, 2024

Awesome! Thanks for creating the PR 🙏 .
The code looks good. I'm testing it locally right now.
Can we update also https://github.com/WordPress/playground-tools/blob/trunk/.nvmrc ?

- v18.13.0
+ v18.18.2

When trying to install the dependencies I got this error:

❯ nvm use                                                                                                                                      8s 14:29:18
Found '/Users/macbookpro/proyectos/a8c/playground-tools/.nvmrc' with version <v18.13.0>
Now using node v18.13.0 (npm v8.19.3)
❯ npm install                                                                                                                                     14:29:22
npm ERR! code EBADENGINE
npm ERR! engine Unsupported engine
npm ERR! engine Not compatible with your version of node/npm: @php-wasm/node@0.5.4
npm ERR! notsup Not compatible with your version of node/npm: @php-wasm/node@0.5.4
npm ERR! notsup Required: {"node":">=18.18.2","npm":">=8.11.0"}
npm ERR! notsup Actual:   {"npm":"8.19.3","node":"v18.13.0"}

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/macbookpro/.npm/_logs/2024-01-11T14_29_25_331Z-debug-0.log

Copy link
Collaborator

@sejas sejas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested it locally and it works great.

  • I think we can follow Github's recommendation to delete seemsLikeAPHPFile function.
  • Let's update .nvmrc to use the same @php-wasm/node node version requirement:v18.18.2.

Testing steps:

  • Update .nvmrc to use v18.18.2
  • Run:
nvm use
npm install
npx nx build wp-now
node dist/packages/wp-now/cli.js start 
  • Observe wp-now successfully started.

@sejas
Copy link
Collaborator

sejas commented Jan 11, 2024

@adamziel, I applied these changes to this PR:

I think we can follow Github's recommendation to delete seemsLikeAPHPFile function.

068db66

Let's update .nvmrc to use the same @php-wasm/node node version requirement:v18.18.2.

39161f6

@adamziel
Copy link
Collaborator Author

Awesome, thank you so much @sejas! Let's ship! 🚢 🚢 🚢

@adamziel adamziel merged commit 82c2969 into trunk Jan 11, 2024
2 checks passed
@adamziel adamziel deleted the update-playground-deps branch January 11, 2024 15:01
johnhooks pushed a commit to johnhooks/playground-tools that referenced this pull request Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request wp-now
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants