From 27f137997fe206770b1fa22bd1f40381f8cae225 Mon Sep 17 00:00:00 2001 From: Systemcluster Date: Thu, 8 Aug 2024 05:25:00 +0200 Subject: [PATCH] Use corepack pnpm for building tests in CI --- .github/workflows/main.yml | 4 ++-- _package.json | 1 + crates/typescript-tests/package.json | 1 + examples/add/package.json | 1 + examples/canvas/package.json | 1 + examples/char/package.json | 1 + examples/closures/package.json | 1 + examples/console_log/package.json | 1 + examples/dom/package.json | 1 + examples/duck-typed-interfaces/package.json | 1 + examples/fetch/package.json | 1 + examples/guide-supported-types-examples/package.json | 1 + examples/hello_world/package.json | 1 + examples/import_js/package.json | 1 + examples/julia_set/package.json | 1 + examples/paint/package.json | 1 + examples/performance/package.json | 1 + examples/request-animation-frame/package.json | 1 + examples/todomvc/package.json | 1 + examples/wasm-in-wasm-imports/package.json | 1 + examples/wasm-in-wasm/package.json | 1 + examples/weather_report/package.json | 1 + examples/webaudio/package.json | 1 + examples/webgl/package.json | 1 + examples/webrtc_datachannel/package.json | 1 + examples/webxr/package.json | 1 + 26 files changed, 27 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b536a881c30f..abf123cc3365 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -363,11 +363,11 @@ jobs: - run: | cargo build -p wasm-bindgen-cli ln -snf `pwd`/target/debug/wasm-bindgen $(dirname `which cargo`)/wasm-bindgen - - run: mv _package.json package.json && npm install && rm package.json + - run: mv _package.json package.json && corepack pnpm install && rm package.json - run: | function build() { (cd examples/$1 && - (npm run build -- --output-path ../../exbuild/$1 || + (corepack pnpm run build -- --output-path ../../exbuild/$1 || (./build.sh && mkdir -p ../../exbuild/$1 && cp -r ./* ../../exbuild/$1 && rm ../../exbuild/$1/**/.gitignore)) ) || exit 1; } diff --git a/_package.json b/_package.json index d347502d91f2..e0ac5974434c 100644 --- a/_package.json +++ b/_package.json @@ -1,4 +1,5 @@ { + "packageManager": "pnpm@9.7.0", "scripts": { "build": "webpack", "serve": "webpack serve" diff --git a/crates/typescript-tests/package.json b/crates/typescript-tests/package.json index 21effd765755..f211f37a0aca 100644 --- a/crates/typescript-tests/package.json +++ b/crates/typescript-tests/package.json @@ -1,4 +1,5 @@ { + "packageManager": "pnpm@9.7.0", "scripts": { "tsc": "tsc", "test": "NODE_OPTIONS=--experimental-vm-modules jest --config ./jest.config.cjs" diff --git a/examples/add/package.json b/examples/add/package.json index 5dc619b4a6bd..9de5356b820a 100644 --- a/examples/add/package.json +++ b/examples/add/package.json @@ -1,4 +1,5 @@ { + "packageManager": "pnpm@9.7.0", "scripts": { "build": "webpack", "serve": "webpack serve" diff --git a/examples/canvas/package.json b/examples/canvas/package.json index 5dc619b4a6bd..9de5356b820a 100644 --- a/examples/canvas/package.json +++ b/examples/canvas/package.json @@ -1,4 +1,5 @@ { + "packageManager": "pnpm@9.7.0", "scripts": { "build": "webpack", "serve": "webpack serve" diff --git a/examples/char/package.json b/examples/char/package.json index 5dc619b4a6bd..9de5356b820a 100644 --- a/examples/char/package.json +++ b/examples/char/package.json @@ -1,4 +1,5 @@ { + "packageManager": "pnpm@9.7.0", "scripts": { "build": "webpack", "serve": "webpack serve" diff --git a/examples/closures/package.json b/examples/closures/package.json index 5dc619b4a6bd..9de5356b820a 100644 --- a/examples/closures/package.json +++ b/examples/closures/package.json @@ -1,4 +1,5 @@ { + "packageManager": "pnpm@9.7.0", "scripts": { "build": "webpack", "serve": "webpack serve" diff --git a/examples/console_log/package.json b/examples/console_log/package.json index 5dc619b4a6bd..9de5356b820a 100644 --- a/examples/console_log/package.json +++ b/examples/console_log/package.json @@ -1,4 +1,5 @@ { + "packageManager": "pnpm@9.7.0", "scripts": { "build": "webpack", "serve": "webpack serve" diff --git a/examples/dom/package.json b/examples/dom/package.json index 5dc619b4a6bd..9de5356b820a 100644 --- a/examples/dom/package.json +++ b/examples/dom/package.json @@ -1,4 +1,5 @@ { + "packageManager": "pnpm@9.7.0", "scripts": { "build": "webpack", "serve": "webpack serve" diff --git a/examples/duck-typed-interfaces/package.json b/examples/duck-typed-interfaces/package.json index 5dc619b4a6bd..9de5356b820a 100644 --- a/examples/duck-typed-interfaces/package.json +++ b/examples/duck-typed-interfaces/package.json @@ -1,4 +1,5 @@ { + "packageManager": "pnpm@9.7.0", "scripts": { "build": "webpack", "serve": "webpack serve" diff --git a/examples/fetch/package.json b/examples/fetch/package.json index 5dc619b4a6bd..9de5356b820a 100644 --- a/examples/fetch/package.json +++ b/examples/fetch/package.json @@ -1,4 +1,5 @@ { + "packageManager": "pnpm@9.7.0", "scripts": { "build": "webpack", "serve": "webpack serve" diff --git a/examples/guide-supported-types-examples/package.json b/examples/guide-supported-types-examples/package.json index 5dc619b4a6bd..9de5356b820a 100644 --- a/examples/guide-supported-types-examples/package.json +++ b/examples/guide-supported-types-examples/package.json @@ -1,4 +1,5 @@ { + "packageManager": "pnpm@9.7.0", "scripts": { "build": "webpack", "serve": "webpack serve" diff --git a/examples/hello_world/package.json b/examples/hello_world/package.json index 5dc619b4a6bd..9de5356b820a 100644 --- a/examples/hello_world/package.json +++ b/examples/hello_world/package.json @@ -1,4 +1,5 @@ { + "packageManager": "pnpm@9.7.0", "scripts": { "build": "webpack", "serve": "webpack serve" diff --git a/examples/import_js/package.json b/examples/import_js/package.json index 5dc619b4a6bd..9de5356b820a 100644 --- a/examples/import_js/package.json +++ b/examples/import_js/package.json @@ -1,4 +1,5 @@ { + "packageManager": "pnpm@9.7.0", "scripts": { "build": "webpack", "serve": "webpack serve" diff --git a/examples/julia_set/package.json b/examples/julia_set/package.json index 5dc619b4a6bd..9de5356b820a 100644 --- a/examples/julia_set/package.json +++ b/examples/julia_set/package.json @@ -1,4 +1,5 @@ { + "packageManager": "pnpm@9.7.0", "scripts": { "build": "webpack", "serve": "webpack serve" diff --git a/examples/paint/package.json b/examples/paint/package.json index 5dc619b4a6bd..9de5356b820a 100644 --- a/examples/paint/package.json +++ b/examples/paint/package.json @@ -1,4 +1,5 @@ { + "packageManager": "pnpm@9.7.0", "scripts": { "build": "webpack", "serve": "webpack serve" diff --git a/examples/performance/package.json b/examples/performance/package.json index 5dc619b4a6bd..9de5356b820a 100644 --- a/examples/performance/package.json +++ b/examples/performance/package.json @@ -1,4 +1,5 @@ { + "packageManager": "pnpm@9.7.0", "scripts": { "build": "webpack", "serve": "webpack serve" diff --git a/examples/request-animation-frame/package.json b/examples/request-animation-frame/package.json index e9feb6b10f8c..0e837ec69c4e 100644 --- a/examples/request-animation-frame/package.json +++ b/examples/request-animation-frame/package.json @@ -1,4 +1,5 @@ { + "packageManager": "pnpm@9.7.0", "scripts": { "build": "webpack", "serve": "webpack serve" diff --git a/examples/todomvc/package.json b/examples/todomvc/package.json index 889bc2b653f9..a7b177297fb8 100644 --- a/examples/todomvc/package.json +++ b/examples/todomvc/package.json @@ -1,4 +1,5 @@ { + "packageManager": "pnpm@9.7.0", "scripts": { "build": "webpack", "serve": "webpack serve" diff --git a/examples/wasm-in-wasm-imports/package.json b/examples/wasm-in-wasm-imports/package.json index 5dc619b4a6bd..9de5356b820a 100644 --- a/examples/wasm-in-wasm-imports/package.json +++ b/examples/wasm-in-wasm-imports/package.json @@ -1,4 +1,5 @@ { + "packageManager": "pnpm@9.7.0", "scripts": { "build": "webpack", "serve": "webpack serve" diff --git a/examples/wasm-in-wasm/package.json b/examples/wasm-in-wasm/package.json index 5dc619b4a6bd..9de5356b820a 100644 --- a/examples/wasm-in-wasm/package.json +++ b/examples/wasm-in-wasm/package.json @@ -1,4 +1,5 @@ { + "packageManager": "pnpm@9.7.0", "scripts": { "build": "webpack", "serve": "webpack serve" diff --git a/examples/weather_report/package.json b/examples/weather_report/package.json index 5dc619b4a6bd..9de5356b820a 100644 --- a/examples/weather_report/package.json +++ b/examples/weather_report/package.json @@ -1,4 +1,5 @@ { + "packageManager": "pnpm@9.7.0", "scripts": { "build": "webpack", "serve": "webpack serve" diff --git a/examples/webaudio/package.json b/examples/webaudio/package.json index 5dc619b4a6bd..9de5356b820a 100644 --- a/examples/webaudio/package.json +++ b/examples/webaudio/package.json @@ -1,4 +1,5 @@ { + "packageManager": "pnpm@9.7.0", "scripts": { "build": "webpack", "serve": "webpack serve" diff --git a/examples/webgl/package.json b/examples/webgl/package.json index 5dc619b4a6bd..9de5356b820a 100644 --- a/examples/webgl/package.json +++ b/examples/webgl/package.json @@ -1,4 +1,5 @@ { + "packageManager": "pnpm@9.7.0", "scripts": { "build": "webpack", "serve": "webpack serve" diff --git a/examples/webrtc_datachannel/package.json b/examples/webrtc_datachannel/package.json index 5dc619b4a6bd..9de5356b820a 100644 --- a/examples/webrtc_datachannel/package.json +++ b/examples/webrtc_datachannel/package.json @@ -1,4 +1,5 @@ { + "packageManager": "pnpm@9.7.0", "scripts": { "build": "webpack", "serve": "webpack serve" diff --git a/examples/webxr/package.json b/examples/webxr/package.json index ec5924d6f4f0..8826faeed101 100644 --- a/examples/webxr/package.json +++ b/examples/webxr/package.json @@ -1,4 +1,5 @@ { + "packageManager": "pnpm@9.7.0", "scripts": { "build": "webpack", "serve": "webpack serve"