Skip to content

Use Node.js Polyfills in the Blueprints package#882

Merged
adamziel merged 1 commit into
trunkfrom
use-polyfills-in-blueprints
Dec 19, 2023
Merged

Use Node.js Polyfills in the Blueprints package#882
adamziel merged 1 commit into
trunkfrom
use-polyfills-in-blueprints

Conversation

@adamziel
Copy link
Copy Markdown
Collaborator

Makes Playground Blueprints compatible with Node.js v18 by using a set of polyfills shiped in #875.

Test plan

Confirm the CI checks passed

Makes Playground Blueprints compatible with Node.js v18 by using a
set of polyfills shiped in #875.

Test plan:

Confirm the CI checks passed
@adamziel adamziel self-assigned this Dec 19, 2023
@adamziel adamziel merged commit 2bb959a into trunk Dec 19, 2023
@adamziel adamziel deleted the use-polyfills-in-blueprints branch December 19, 2023 11:37
adamziel pushed a commit to WordPress/playground-tools that referenced this pull request Apr 3, 2024
Remove message that asks for Node v20 when`--blueprint` param is
present.

## Why?

<!-- Why is this PR necessary? What problem is it solving? Reference any
existing previous issue(s) or PR(s), but please add a short summary
here, too -->

Since the polyfills were implemented on
WordPress/wordpress-playground#882 , blueprints
can be executed on Node v18

## Testing Instructions

<!-- Please include step by step instructions on how to test this PR.
-->
<!-- 1. Check out the branch. -->
<!-- 2. Run a command. -->
<!-- 3. etc. -->

* Create a new blueprint file `b.json` with a valid blueprint like:
```
{
    "landingPage": "/wp-admin/",
    "features": {
        "networking": true
    },
    "steps": [
        {
            "step": "login",
            "username": "admin",
            "password": "password"
        }
    ]
}
```
* Run `nvm use && npm install && npx nx run wp-now:build` # nvm use will
set the node version 18.18.2
* Run `node dist/packages/wp-now/with-node-version.js start
--blueprint=b.json`
* Observe the blueprint runs as expected and there is no the following
error `This script is requires node version v20.0.0 or above when
--blueprint=<file> is used; found v18.18.2`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant