Update Playground and PHP-wasm packages to 1.0.27 - #959
Conversation
|
TODO:
|
|
I tested Total and free size of filesystem reported in sites doesn't match actual values and it won't be fixed by this update. @wojtekn would you prefer for me to focus on Total and free size of filesystem or WebAssembly.instantiate(): Out of memory? |
Does it mean that the Emscripten fix didn't help? Or that it's not included in 1.0.27?
Sounds like a good next issue 👍 |
The fix didn't work, but I don't know exactly why. The patch we added to Emscripten was used to build Playground. |
wojtekn
left a comment
There was a problem hiding this comment.
Looks good, I couldn't find any issues. I checked, among other things:
- Studio site working through Ngrok tunnel
- WP Admin auto-login
- Signing in to multiple Studio sites at once
- Switching PHP versions for Studio site
| // Polyfill for DNS features which are not currently supported by @php-wasm/node. | ||
| // See https://github.com/WordPress/wordpress-playground/issues/1042 | ||
| // These specific features are polyfilled so the Jetpack plugin loads correctly, but others should be added as needed. | ||
| if ( ! defined( 'DNS_NS' ) ) { |
There was a problem hiding this comment.
It was added in Playground, correct?
There was a problem hiding this comment.
Yes, we added it in Playground. I also tested it locally to make sure.
| @@ -1,10 +0,0 @@ | |||
| diff --git a/node_modules/@php-wasm/universal/index.cjs b/node_modules/@php-wasm/universal/index.cjs | |||
There was a problem hiding this comment.
We are removing the patch that was added in #532 and setting the cookieStore to false as we don't want to use Playground cookie store for Playground running from CLI. This allows the browser to manage the cookies.
|
I have manually tested the changes and haven't found any regressions. 👌🏼 Tested the following:
|
sejas
left a comment
There was a problem hiding this comment.
I tested core Studio features and confirmed that the start, stop, auto-login, image upload, permalinks, and site creation functions are all working as expected.
Thanks for upgrading the Playground dependencies and using the A8C repo.
| Object.defineProperty( global.crypto, 'subtle', { | ||
| value: { generateKey: jest.fn() }, | ||
| } ); |
There was a problem hiding this comment.
Here is another solution mentioned on jsdom/jsdom#1612, and I can confirm that it works correctly and all tests pass.
import { webcrypto } from 'node:crypto';
...
Object.defineProperty( globalThis, 'crypto', {
value: webcrypto,
} );
Related issues
Proposed Changes
crypto.subtle.generateKeyTesting Instructions
Manual testing
npm install && npm startPre-merge Checklist