From 00d6e034a08ca6bcb0e66c195f72498ad84b9ad9 Mon Sep 17 00:00:00 2001 From: Timo K Date: Tue, 21 Apr 2026 10:53:56 +0200 Subject: [PATCH] fixup some missing yarn -> pnpm transitions --- .githooks/post-commit | 5 ++--- .githooks/pre-commit | 3 +-- README.md | 14 +++++++------- WIDGET_TEST.md | 4 ++-- backend/dev_nginx.conf | 20 ++++++++++---------- docs/linking.md | 6 +++--- docs/self-hosting.md | 4 ++-- embedded/android/publish_android_package.sh | 8 ++++---- knip.ts | 8 +------- renovate.json | 4 ++-- sdk/README.md | 4 ++-- sdk/main.ts | 2 +- src/livekit/BlurBackgroundTransformer.ts | 2 +- 13 files changed, 38 insertions(+), 46 deletions(-) diff --git a/.githooks/post-commit b/.githooks/post-commit index 9054c0e1..243b4f51 100755 --- a/.githooks/post-commit +++ b/.githooks/post-commit @@ -4,9 +4,8 @@ FILE=.links.cjs FILE_DIS=.links.temp-disabled.cjs if test -f "$FILE_DIS"; then # Only do the post-commit hook if the file was temp-disabled by the pre-commit hook. - # Otherwise linking was actively (`yarn links:disable`) disabled and this hook should noop. + # Otherwise linking was actively (`pnpm links:disable`) disabled and this hook should noop. mv $FILE_DIS $FILE - yarnLog=$(yarn) - echo "[yarn-linker] The post-commit hook has re-enabled $FILE" + echo "[pnpm-linker] The post-commit hook has re-enabled $FILE" exit 1 fi diff --git a/.githooks/pre-commit b/.githooks/pre-commit index 6d8d26b0..f8ecfe4d 100755 --- a/.githooks/pre-commit +++ b/.githooks/pre-commit @@ -4,9 +4,8 @@ FILE=.links.cjs FILE_DIS=.links.temp-disabled.cjs if test -f "$FILE"; then mv $FILE .links.temp-disabled.cjs - # echo "running yarn" x=$(pnpm install) y=$(git add pnpm-lock.yaml) - echo "[yarn-linker] The pre-commit hook has disabled $FILE and MODIFIED the pnpm-lock.yaml file. Review the staged changes (the hook added pnpm-lock.yaml, was this desired?) and run \`git commit \` again if they look okay. The post-commit hook will re-enable your links." + echo "[pnpm-linker] The pre-commit hook has disabled $FILE and MODIFIED the pnpm-lock.yaml file. Review the staged changes (the hook added pnpm-lock.yaml, was this desired?) and run \`git commit \` again if they look okay. The post-commit hook will re-enable your links." exit 1 fi diff --git a/README.md b/README.md index 688a7a7f..3685e523 100644 --- a/README.md +++ b/README.md @@ -186,7 +186,7 @@ To get started clone and set up this project: git clone https://github.com/element-hq/element-call.git cd element-call corepack enable -yarn +pnpm install ``` To use it, create a local config by, e.g., @@ -197,7 +197,7 @@ environment as outlined in the next section out of box. You're now ready to launch the development server: ```sh -yarn dev +pnpm dev ``` See also: @@ -230,7 +230,7 @@ only for local development and **_never be exposed to the public Internet._** Run backend components: ```sh -yarn backend +pnpm backend # or for podman-compose # podman-compose -f dev-backend-docker-compose.yml up ``` @@ -260,13 +260,13 @@ on https://localhost:3000 (this is configured in `playwright.config.ts`) - this is what will be tested. The local backend environment should be running for the test to work: -`yarn backend` +`pnpm backend` There are a few different ways to run the tests yourself. The simplest is to run: ```shell -yarn run test:playwright +pnpm run test:playwright ``` This will run the Playwright tests once, non-interactively. @@ -274,7 +274,7 @@ This will run the Playwright tests once, non-interactively. There is a more user-friendly way to run the tests in interactive mode: ```shell -yarn run test:playwright:open +pnpm run test:playwright:open ``` The easiest way to develop new test is to use the codegen feature of Playwright: @@ -316,7 +316,7 @@ To add a new translation key you can do these steps: 1. Add the new key entry to the code where the new key is used: `t("some_new_key")` -1. Run `yarn i18n` to extract the new key and update the translation files. This +1. Run `pnpm i18n` to extract the new key and update the translation files. This will add a skeleton entry to the `locales/en/app.json` file: ```jsonc diff --git a/WIDGET_TEST.md b/WIDGET_TEST.md index 53e26a29..fbad026a 100644 --- a/WIDGET_TEST.md +++ b/WIDGET_TEST.md @@ -1,6 +1,6 @@ # Testing Element-Call in widget mode -When running `yarn backend` the latest element-web develop will be deployed and served on `http://localhost:8081`. +When running `pnpm backend` the latest element-web develop will be deployed and served on `http://localhost:8081`. In a development environment, you might prefer to just use the `element-web` repo directly, but this setup is useful for CI/CD testing. ## Setup @@ -18,7 +18,7 @@ that uses It is part of the existing backend setup. To start the backend, run: ```sh -yarn backend +pnpm backend ``` Then open `http://localhost:8081` in your browser. diff --git a/backend/dev_nginx.conf b/backend/dev_nginx.conf index d3ddbc53..bfd79fa2 100644 --- a/backend/dev_nginx.conf +++ b/backend/dev_nginx.conf @@ -28,11 +28,11 @@ server { # Reason: the lk-jwt-service uses the federation API for the openid token # verification, which requires TLS location ~ ^(/_matrix|/_synapse/client) { - proxy_pass "http://homeserver:8008"; + proxy_pass "http://homeserver:8008"; proxy_http_version 1.1; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-Proto $scheme; - proxy_set_header Host $host; + proxy_set_header Host $host; } error_page 500 502 503 504 /50x.html; @@ -73,7 +73,7 @@ server { proxy_http_version 1.1; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-Proto $scheme; - proxy_set_header Host $host; + proxy_set_header Host $host; } error_page 500 502 503 504 /50x.html; @@ -108,7 +108,7 @@ server { # JWT Service running at port 6080 proxy_pass http://jwt-auth-services/; - + } location ^~ /livekit/sfu/ { @@ -128,7 +128,7 @@ server { # LiveKit SFU websocket connection running at port 7880 proxy_pass http://livekit-sfu:7880/; } - + error_page 500 502 503 504 /50x.html; } @@ -156,7 +156,7 @@ server { # JWT Service running at port 16080 proxy_pass http://auth-service-1:16080/; - + } location ^~ /livekit/sfu/ { @@ -176,14 +176,14 @@ server { # LiveKit SFU websocket connection running at port 17880 proxy_pass http://livekit-sfu-1:17880/; } - + error_page 500 502 503 504 /50x.html; } # Convenience reverse proxy for the call.m.localhost domain to element call # running on the host either via -# - yarn dev --host or +# - pnpm dev --host or # - falling back to http (the element call docker container) server { listen 80; @@ -260,7 +260,7 @@ server { proxy_ssl_verify off; } - + error_page 500 502 503 504 /50x.html; } @@ -293,7 +293,7 @@ server { proxy_ssl_verify off; } - + error_page 500 502 503 504 /50x.html; } diff --git a/docs/linking.md b/docs/linking.md index 689a6f02..4ac6abf7 100644 --- a/docs/linking.md +++ b/docs/linking.md @@ -23,18 +23,18 @@ One always needs to run: ```bash mv .links.cjs .links.disabled.cjs -yarn +pnpm install ``` before committing a change. To make it more convenient to work with this linking system we added git hooks. -A `pre-commit` hook will run `mv .links.yaml .links.disabled.yaml`, `yarn` and `git add yarn.lock` if it detects +A `pre-commit` hook will run `mv .links.yaml .links.disabled.yaml`, `pnpm install` and `git add yarn.lock` if it detects a `.links.yaml` file and abort the commit. You will than need to check if the resulting changes are appropriate and commit again. A `post-commit` hook will setup the linking as it was -before if a `.links.disabled.yaml` is present. It runs `mv .links.disabled.yaml .links.yaml` and `yarn`. +before if a `.links.disabled.cjs` is present. It runs `mv .links.disabled.cjs .links.cjs` and `pnpm install`. To activate the hooks automatically configure git with diff --git a/docs/self-hosting.md b/docs/self-hosting.md index d6d46421..dc1dd687 100644 --- a/docs/self-hosting.md +++ b/docs/self-hosting.md @@ -237,8 +237,8 @@ source. First, clone and install the package: git clone https://github.com/element-hq/element-call.git cd element-call corepack enable -yarn -yarn build +pnpm install +pnpm build ``` If all went well, you can now find the build output under `dist` as a series of diff --git a/embedded/android/publish_android_package.sh b/embedded/android/publish_android_package.sh index 8c310c9b..31693317 100755 --- a/embedded/android/publish_android_package.sh +++ b/embedded/android/publish_android_package.sh @@ -11,7 +11,7 @@ pushd $CURRENT_DIR > /dev/null function build_assets() { echo "Generating Element Call assets..." pushd ../.. > /dev/null - yarn build + pnpm build popd > /dev/null } @@ -26,7 +26,7 @@ function copy_assets() { } getopts :sh opt -case $opt in +case $opt in s) SKIP=1 ;; @@ -41,7 +41,7 @@ if [ ! $SKIP ]; then echo "" if [[ $REPLY =~ ^[Yy]$ ]]; then build_assets - else + else echo "Using existing assets from ../../dist" fi copy_assets @@ -56,4 +56,4 @@ echo "Publishing the Android project" ./gradlew publishAndReleaseToMavenCentral --no-daemon -popd > /dev/null \ No newline at end of file +popd > /dev/null diff --git a/knip.ts b/knip.ts index 3be3e653..aa6aee79 100644 --- a/knip.ts +++ b/knip.ts @@ -30,16 +30,10 @@ export default { "@types/content-type", "@types/sdp-transform", "@types/uuid", - // We obviously use this, but if the package has been linked with yarn link, + // We obviously use this, but if the package has been linked with pnpm link, // then Knip will flag it as a false positive // https://github.com/webpro-nl/knip/issues/766 "@vector-im/compound-web", - // Yarn plugins are allowed to depend on packages provided by the Yarn - // runtime. These shouldn't be listed in package.json, because plugins - // should work before Yarn even installs dependencies for the first time. - // https://yarnpkg.com/advanced/plugin-tutorial#what-does-a-plugin-look-like - "@yarnpkg/core", - "@yarnpkg/parsers", "matrix-widget-api", ], ignoreExportsUsedInFile: true, diff --git a/renovate.json b/renovate.json index 612e6674..39fbf0c1 100644 --- a/renovate.json +++ b/renovate.json @@ -54,8 +54,8 @@ "matchFileNames": ["embedded/**/*"] }, { - "groupName": "Yarn", - "matchDepNames": ["yarn"] + "groupName": "Pnpm", + "matchDepNames": ["pnpm"] } ], "semanticCommits": "disabled", diff --git a/sdk/README.md b/sdk/README.md index ad8ff97e..7102ba29 100644 --- a/sdk/README.md +++ b/sdk/README.md @@ -13,8 +13,8 @@ This folder contains an example index.html file that showcases the sdk in use (h To get started run ``` -yarn -yarn build:sdk +pnpm install +pnpm build:sdk ``` in the repository root. diff --git a/sdk/main.ts b/sdk/main.ts index c65bf4a7..286c16ea 100644 --- a/sdk/main.ts +++ b/sdk/main.ts @@ -8,7 +8,7 @@ Please see LICENSE in the repository root for full details. /** * EXPERIMENTAL * - * This file is the entrypoint for the sdk build of element call: `yarn build:sdk` + * This file is the entrypoint for the sdk build of element call: `pnpm build:sdk` * use in widgets. * It exposes the `createMatrixRTCSdk` which creates the `MatrixRTCSdk` interface (see below) that * can be used to join a rtc session and exchange realtime data. diff --git a/src/livekit/BlurBackgroundTransformer.ts b/src/livekit/BlurBackgroundTransformer.ts index c3d885ba..7bec3cc4 100644 --- a/src/livekit/BlurBackgroundTransformer.ts +++ b/src/livekit/BlurBackgroundTransformer.ts @@ -29,7 +29,7 @@ interface WasmFileset { // MediaPipe and depend on node_modules having this specific structure. It's // easy to see this breaking if our dependencies changed and MediaPipe were // no longer hoisted, or if we switched to another dependency loader such as -// Yarn PnP. +// pnpm PnP. // https://github.com/google-ai-edge/mediapipe/issues/5961 const wasmFileset: WasmFileset = { wasmLoaderPath: new URL(