Skip to content

Commit 1385984

Browse files
Update Nx, Vite, and ESLint dependencies (#35)
## Motivation for the change, related issues When I am learning about Nx or Vite or troubleshooting potential issues with them, I find that our versions are old enough that I am not sure whether docs and merged bug fixes apply the versions we're using. This is a PR to explore updating and dispelling that uncertainty and doubt. **UPDATE (2025-04-16)** This PR is also required in order to use the [eslint-plugin-erasable-syntax-only](https://www.npmjs.com/package/eslint-plugin-erasable-syntax-only) package. That package depends on a newer ESLint version than we're using today, and we cannot update that separately because our older version of Nx depends on an older ESLint. ## Implementation details - Use `nx migrate` to migrate to latest feasible version. - Update Vite dependencies to latest versions compatible with the nx packages. - Fix any issues ## Testing Instructions (or ideally a Blueprint) - CI
1 parent d304149 commit 1385984

File tree

90 files changed

+34260
-24603
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+34260
-24603
lines changed

package-lock.json

Lines changed: 33925 additions & 24327 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 59 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,15 @@
6565
"private": true,
6666
"dependencies": {
6767
"@preact/signals-react": "1.3.6",
68-
"@reduxjs/toolkit": "2.2.5",
68+
"@reduxjs/toolkit": "2.6.1",
6969
"@types/ini": "4.1.0",
7070
"@types/react-transition-group": "4.4.11",
7171
"@types/wicg-file-system-access": "2023.10.5",
7272
"@wordpress/dataviews": "4.5.0",
7373
"@zip.js/zip.js": "2.7.57",
7474
"ajv": "8.12.0",
7575
"async-lock": "1.4.1",
76-
"axios": "1.6.1",
76+
"axios": "1.7.9",
7777
"classnames": "^2.3.2",
7878
"comlink": "^4.4.1",
7979
"crc-32": "1.2.2",
@@ -85,66 +85,64 @@
8585
"octokit": "3.1.1",
8686
"octokit-plugin-create-pull-request": "5.1.1",
8787
"pako": "1.0.10",
88-
"react": "^18.2.25",
89-
"react-dom": "^18.2.25",
88+
"react": "18.3.1",
89+
"react-dom": "18.3.1",
9090
"react-hook-form": "7.53.0",
9191
"react-modal": "^3.16.1",
9292
"react-redux": "8.1.3",
9393
"react-transition-group": "4.4.5",
9494
"sha.js": "2.4.11",
9595
"sha1": "1.1.1",
9696
"unzipper": "0.10.11",
97-
"vite-plugin-api": "1.0.4",
9897
"wasm-feature-detect": "1.8.0",
9998
"wouter": "3.3.5",
10099
"xterm": "5.3.0",
101100
"xterm-addon-fit": "0.8.0",
102101
"yargs": "17.7.2"
103102
},
104103
"devDependencies": {
105-
"@docusaurus/core": "2.4.1",
106-
"@docusaurus/module-type-aliases": "2.4.1",
107-
"@docusaurus/plugin-client-redirects": "2.4.1",
108-
"@docusaurus/plugin-ideal-image": "^2.4.1",
109-
"@docusaurus/preset-classic": "2.4.1",
110-
"@docusaurus/theme-live-codeblock": "^2.4.1",
111-
"@mdx-js/react": "^1.6.22",
112-
"@nx/cypress": "16.9.0",
113-
"@nx/devkit": "16.9.0",
114-
"@nx/esbuild": "16.9.0",
115-
"@nx/eslint-plugin": "16.9.0",
116-
"@nx/jest": "16.9.0",
117-
"@nx/js": "16.9.0",
118-
"@nx/linter": "16.9.0",
119-
"@nx/node": "16.9.0",
120-
"@nx/plugin": "16.9.0",
121-
"@nx/react": "16.9.0",
122-
"@nx/rollup": "16.9.0",
123-
"@nx/vite": "16.9.0",
124-
"@nx/web": "16.9.0",
125-
"@nx/webpack": "16.9.0",
126-
"@nx/workspace": "16.9.0",
104+
"@docusaurus/core": "3.7.0",
105+
"@docusaurus/module-type-aliases": "3.7.0",
106+
"@docusaurus/plugin-client-redirects": "3.7.0",
107+
"@docusaurus/plugin-ideal-image": "^3.7.0",
108+
"@docusaurus/preset-classic": "3.7.0",
109+
"@docusaurus/theme-live-codeblock": "^3.7.0",
110+
"@docusaurus/tsconfig": "^3.7.0",
111+
"@mdx-js/react": "^3.1.0",
112+
"@nx/cypress": "19.8.4",
113+
"@nx/devkit": "19.8.4",
114+
"@nx/esbuild": "19.8.4",
115+
"@nx/eslint-plugin": "19.8.4",
116+
"@nx/jest": "19.8.4",
117+
"@nx/js": "19.8.4",
118+
"@nx/linter": "19.8.4",
119+
"@nx/node": "19.8.4",
120+
"@nx/plugin": "19.8.4",
121+
"@nx/react": "19.8.4",
122+
"@nx/rollup": "19.8.4",
123+
"@nx/vite": "19.8.4",
124+
"@nx/web": "19.8.4",
125+
"@nx/webpack": "19.8.4",
126+
"@nx/workspace": "19.8.4",
127127
"@playwright/test": "1.47.1",
128-
"@rollup/plugin-url": "^8.0.1",
129-
"@swc-node/register": "~1.6.7",
130-
"@swc/core": "~1.3.85",
131-
"@testing-library/react": "14.0.0",
132-
"@tsconfig/docusaurus": "^1.0.5",
128+
"@rollup/plugin-url": "8.0.2",
129+
"@swc-node/register": "1.9.2",
130+
"@swc/core": "1.5.7",
131+
"@testing-library/react": "15.0.6",
133132
"@types/ajv": "1.0.0",
134133
"@types/file-saver": "^2.0.5",
135-
"@types/jest": "^29.4.0",
136-
"@types/node": "20.9.0",
137-
"@types/react": "18.3.3",
134+
"@types/jest": "29.5.14",
135+
"@types/node": "20.14.8",
136+
"@types/react": "18.3.1",
138137
"@types/react-dom": "18.3.0",
139138
"@types/react-modal": "3.16.3",
140139
"@types/tar-fs": "2.0.4",
141140
"@types/wordpress__block-editor": "11.5.15",
142141
"@types/wordpress__blocks": "12.5.14",
143-
"@typescript-eslint/eslint-plugin": "5.62.0",
144-
"@typescript-eslint/parser": "5.62.0",
145-
"@vitejs/plugin-react": "4.2.0",
146-
"@vitest/coverage-c8": "0.32.4",
147-
"@vitest/ui": "0.32.4",
142+
"@typescript-eslint/eslint-plugin": "8.30.1",
143+
"@typescript-eslint/parser": "8.30.1",
144+
"@vitejs/plugin-react": "4.3.4",
145+
"@vitest/ui": "2.1.9",
148146
"@wordpress/block-editor": "13.4.0",
149147
"@wordpress/blocks": "13.4.0",
150148
"@wordpress/components": "28.4.0",
@@ -154,39 +152,39 @@
154152
"@wordpress/notices": "5.4.0",
155153
"chalk": "5.2.0",
156154
"clsx": "^1.2.1",
157-
"cypress": "^13.0.0",
158-
"docusaurus-plugin-typedoc-api": "^3.0.0",
155+
"cypress": "13.17.0",
156+
"docusaurus-plugin-typedoc-api": "^4.4.0",
159157
"dts-bundle-generator": "^7.2.0",
160-
"esbuild": "0.19.7",
158+
"esbuild": "0.19.9",
161159
"esbuild-node-externals": "1.13.1",
162160
"esbuild-plugin-copy": "^2.1.0",
163161
"esbuild-plugin-ignore": "1.1.1",
164-
"eslint": "8.46.0",
165-
"eslint-config-prettier": "8.1.0",
166-
"eslint-plugin-comment-length": "1.7.3",
167-
"eslint-plugin-cypress": "^2.13.4",
168-
"eslint-plugin-import": "2.27.5",
169-
"eslint-plugin-jsx-a11y": "6.7.1",
162+
"eslint": "9.24.0",
163+
"eslint-config-prettier": "9.1.0",
164+
"eslint-plugin-comment-length": "2.2.1",
165+
"eslint-plugin-cypress": "^4.2.1",
166+
"eslint-plugin-import": "2.31.0",
167+
"eslint-plugin-jsx-a11y": "6.10.2",
170168
"eslint-plugin-playground-dev": "file:packages/meta/src/eslint-plugin-playground-dev",
171-
"eslint-plugin-react": "7.32.2",
172-
"eslint-plugin-react-hooks": "4.6.0",
169+
"eslint-plugin-react": "7.37.5",
170+
"eslint-plugin-react-hooks": "5.2.0",
173171
"gh-pages": "5.0.0",
174172
"glob": "^9.3.0",
175173
"husky": "8.0.3",
176-
"jest": "^29.4.1",
177-
"jest-environment-jsdom": "^29.4.1",
174+
"jest": "29.7.0",
175+
"jest-environment-jsdom": "29.7.0",
178176
"jest-environment-node": "^29.4.1",
179177
"jsdom": "22.1.0",
180178
"jsonc-eslint-parser": "^2.1.0",
181179
"lerna": "6.6.2",
182-
"nx": "16.9.0",
180+
"nx": "19.8.4",
183181
"ora": "6.3.0",
184182
"prettier": "^2.6.2",
185183
"prism-react-renderer": "^1.3.5",
186184
"raw-loader": "^4.0.2",
187185
"react-markdown": "^8.0.7",
188186
"rimraf": "^4.4.0",
189-
"rollup": "^3.2.0",
187+
"rollup": "^4.34.6",
190188
"rollup-plugin-dts": "^5.2.0",
191189
"rollup-plugin-external-globals": "0.7.3",
192190
"rollup-plugin-ts": "^3.2.0",
@@ -197,22 +195,21 @@
197195
"tslib": "^2.3.0",
198196
"typedoc": "0.23.27",
199197
"typescript": "5.4.5",
200-
"vite": "4.5.0",
198+
"vite": "^5.0.0",
201199
"vite-plugin-dts": "3.6.3",
202200
"vite-plugin-eslint": "^1.8.1",
203201
"vite-plugin-external": "1.2.8",
204-
"vite-plugin-static-copy": "0.13.1",
202+
"vite-plugin-static-copy": "2.2.0",
205203
"vite-plugin-wasm": "^3.2.2",
206204
"vite-tsconfig-paths": "4.2.0",
207205
"vitepress": "1.0.0-alpha.60",
208-
"vitest": "0.32.4",
206+
"vitest": "2.1.9",
209207
"webpack-node-externals": "^3.0.0"
210208
},
211209
"overrides": {
212-
"nx": "16.9.0",
213-
"rollup": "^3.2.0",
214-
"react": "^18.2.25",
215-
"react-dom": "^18.2.25",
210+
"rollup": "^4.34.6",
211+
"react": "18.3.1",
212+
"react-dom": "18.3.1",
216213
"typescript": "5.4.5",
217214
"typedoc": "0.23.27",
218215
"ws": "^8.18.0"

packages/docs/site/docs/blueprints/01-index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ Blueprints fetch any resources you declare for you. You don't have to worry abou
4747

4848
Because Blueprints can be pasted in the URL, you can embed or link to a Playground with a specific configuration. For example, clicking this button will open a Playground with PHP 7.4 and a pendant theme installed:
4949

50+
import BlueprintExample from '@site/src/components/Blueprints/BlueprintExample.mdx';
51+
5052
<BlueprintExample justButton={true} blueprint={{
5153
"preferredVersions": {
5254
"php": "7.4",

packages/docs/site/docs/developers/23-architecture/03-wasm-php-compiling.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ nx recompile-php php-wasm-web
5050

5151
**Supported build options:**
5252

53-
- `PHP_VERSION` – The PHP version to build, default: `8.0.24`. This value must point to an existing branch of the <https://github.com/php/php-src.git> repository when prefixed with `PHP-`. For example, `7.4.0` is valid because the branch `PHP-7.4.0` exists, but just `7` is invalid because there's no branch `PHP-7`. The PHP versions that are known to work are `7.4.*` and `8.0.*`. Others likely work as well but they haven't been tried.
53+
- `PHP_VERSION` – The PHP version to build, default: `8.0.24`. This value must point to an existing branch of the https://github.com/php/php-src.git repository when prefixed with `PHP-`. For example, `7.4.0` is valid because the branch `PHP-7.4.0` exists, but just `7` is invalid because there's no branch `PHP-7`. The PHP versions that are known to work are `7.4.*` and `8.0.*`. Others likely work as well but they haven't been tried.
5454
- `EMSCRIPTEN_ENVIRONMENT``web` or `node`, default: `web`. The platform to build for. When building for `web`, two JavaScript loaders will be created: `php-web.js` and `php-webworker.js`. When building for Node.js, only one loader called `php-node.js` will be created.
5555
- `WITH_LIBXML``yes` or `no`, default: `no`. Whether to build with `libxml2` and the `dom`, `xml`, and `simplexml` PHP extensions (`DOMDocument`, `SimpleXML`, ..).
5656
- `WITH_LIBZIP``yes` or `no`, default: `yes`. Whether to build with `zlib`, `libzip`, and the `zip` PHP extension (`ZipArchive`).

packages/docs/site/docs/developers/23-architecture/16-wordpress-database.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: How does it work?
33
---
44

5-
## Database is supported via MySQL<->SQLite translation layer
5+
## Database is supported via MySQL\<\-\>SQLite translation layer
66

77
WordPress requires MySQL. However, there isn't a WebAssembly version of MySQL you could run in the browser. WordPress Playground therefore ships PHP with the [native SQLite driver](https://www.php.net/manual/en/ref.pdo-sqlite.php) and leans on SQLite.
88

packages/docs/site/docs/developers/24-limitations/01-index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Also, JavaScript popups originating in the `iframe` may not always display.
2727

2828
### Run WordPress PHP functions
2929

30-
Playground supports running PHP code in Blueprints using the [`runPHP` step](blueprints/steps#RunPHPStep). To run WordPress-specific PHP functions, you’d need to first require [wp-load.php](https://github.com/WordPress/WordPress/blob/master/wp-load.php):
30+
Playground supports running PHP code in Blueprints using the [`runPHP` step](/blueprints/steps#RunPHPStep). To run WordPress-specific PHP functions, you’d need to first require [wp-load.php](https://github.com/WordPress/WordPress/blob/master/wp-load.php):
3131

3232
```json
3333
{

0 commit comments

Comments
 (0)