fixup some missing yarn -> pnpm transitions

This commit is contained in:
Timo K
2026-04-21 10:53:56 +02:00
parent 4d09651fe1
commit 00d6e034a0
13 changed files with 38 additions and 46 deletions
+2 -3
View File
@@ -4,9 +4,8 @@ FILE=.links.cjs
FILE_DIS=.links.temp-disabled.cjs FILE_DIS=.links.temp-disabled.cjs
if test -f "$FILE_DIS"; then if test -f "$FILE_DIS"; then
# Only do the post-commit hook if the file was temp-disabled by the pre-commit hook. # 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 mv $FILE_DIS $FILE
yarnLog=$(yarn) echo "[pnpm-linker] The post-commit hook has re-enabled $FILE"
echo "[yarn-linker] The post-commit hook has re-enabled $FILE"
exit 1 exit 1
fi fi
+1 -2
View File
@@ -4,9 +4,8 @@ FILE=.links.cjs
FILE_DIS=.links.temp-disabled.cjs FILE_DIS=.links.temp-disabled.cjs
if test -f "$FILE"; then if test -f "$FILE"; then
mv $FILE .links.temp-disabled.cjs mv $FILE .links.temp-disabled.cjs
# echo "running yarn"
x=$(pnpm install) x=$(pnpm install)
y=$(git add pnpm-lock.yaml) 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 exit 1
fi fi
+7 -7
View File
@@ -186,7 +186,7 @@ To get started clone and set up this project:
git clone https://github.com/element-hq/element-call.git git clone https://github.com/element-hq/element-call.git
cd element-call cd element-call
corepack enable corepack enable
yarn pnpm install
``` ```
To use it, create a local config by, e.g., 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: You're now ready to launch the development server:
```sh ```sh
yarn dev pnpm dev
``` ```
See also: See also:
@@ -230,7 +230,7 @@ only for local development and **_never be exposed to the public Internet._**
Run backend components: Run backend components:
```sh ```sh
yarn backend pnpm backend
# or for podman-compose # or for podman-compose
# podman-compose -f dev-backend-docker-compose.yml up # 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. is what will be tested.
The local backend environment should be running for the test to work: 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 There are a few different ways to run the tests yourself. The simplest is to
run: run:
```shell ```shell
yarn run test:playwright pnpm run test:playwright
``` ```
This will run the Playwright tests once, non-interactively. 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: There is a more user-friendly way to run the tests in interactive mode:
```shell ```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: 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: 1. Add the new key entry to the code where the new key is used:
`t("some_new_key")` `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: will add a skeleton entry to the `locales/en/app.json` file:
```jsonc ```jsonc
+2 -2
View File
@@ -1,6 +1,6 @@
# Testing Element-Call in widget mode # 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. 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 ## Setup
@@ -18,7 +18,7 @@ that uses
It is part of the existing backend setup. To start the backend, run: It is part of the existing backend setup. To start the backend, run:
```sh ```sh
yarn backend pnpm backend
``` ```
Then open `http://localhost:8081` in your browser. Then open `http://localhost:8081` in your browser.
+10 -10
View File
@@ -28,11 +28,11 @@ server {
# Reason: the lk-jwt-service uses the federation API for the openid token # Reason: the lk-jwt-service uses the federation API for the openid token
# verification, which requires TLS # verification, which requires TLS
location ~ ^(/_matrix|/_synapse/client) { location ~ ^(/_matrix|/_synapse/client) {
proxy_pass "http://homeserver:8008"; proxy_pass "http://homeserver:8008";
proxy_http_version 1.1; proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme; 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; error_page 500 502 503 504 /50x.html;
@@ -73,7 +73,7 @@ server {
proxy_http_version 1.1; proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme; 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; error_page 500 502 503 504 /50x.html;
@@ -108,7 +108,7 @@ server {
# JWT Service running at port 6080 # JWT Service running at port 6080
proxy_pass http://jwt-auth-services/; proxy_pass http://jwt-auth-services/;
} }
location ^~ /livekit/sfu/ { location ^~ /livekit/sfu/ {
@@ -128,7 +128,7 @@ server {
# LiveKit SFU websocket connection running at port 7880 # LiveKit SFU websocket connection running at port 7880
proxy_pass http://livekit-sfu:7880/; proxy_pass http://livekit-sfu:7880/;
} }
error_page 500 502 503 504 /50x.html; error_page 500 502 503 504 /50x.html;
} }
@@ -156,7 +156,7 @@ server {
# JWT Service running at port 16080 # JWT Service running at port 16080
proxy_pass http://auth-service-1:16080/; proxy_pass http://auth-service-1:16080/;
} }
location ^~ /livekit/sfu/ { location ^~ /livekit/sfu/ {
@@ -176,14 +176,14 @@ server {
# LiveKit SFU websocket connection running at port 17880 # LiveKit SFU websocket connection running at port 17880
proxy_pass http://livekit-sfu-1:17880/; proxy_pass http://livekit-sfu-1:17880/;
} }
error_page 500 502 503 504 /50x.html; error_page 500 502 503 504 /50x.html;
} }
# Convenience reverse proxy for the call.m.localhost domain to element call # Convenience reverse proxy for the call.m.localhost domain to element call
# running on the host either via # running on the host either via
# - yarn dev --host or # - pnpm dev --host or
# - falling back to http (the element call docker container) # - falling back to http (the element call docker container)
server { server {
listen 80; listen 80;
@@ -260,7 +260,7 @@ server {
proxy_ssl_verify off; proxy_ssl_verify off;
} }
error_page 500 502 503 504 /50x.html; error_page 500 502 503 504 /50x.html;
} }
@@ -293,7 +293,7 @@ server {
proxy_ssl_verify off; proxy_ssl_verify off;
} }
error_page 500 502 503 504 /50x.html; error_page 500 502 503 504 /50x.html;
} }
+3 -3
View File
@@ -23,18 +23,18 @@ One always needs to run:
```bash ```bash
mv .links.cjs .links.disabled.cjs mv .links.cjs .links.disabled.cjs
yarn pnpm install
``` ```
before committing a change. before committing a change.
To make it more convenient to work with this linking system we added git hooks. 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. a `.links.yaml` file and abort the commit.
You will than need to check if the resulting changes are appropriate and commit again. 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 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 To activate the hooks automatically configure git with
+2 -2
View File
@@ -237,8 +237,8 @@ source. First, clone and install the package:
git clone https://github.com/element-hq/element-call.git git clone https://github.com/element-hq/element-call.git
cd element-call cd element-call
corepack enable corepack enable
yarn pnpm install
yarn build pnpm build
``` ```
If all went well, you can now find the build output under `dist` as a series of If all went well, you can now find the build output under `dist` as a series of
+4 -4
View File
@@ -11,7 +11,7 @@ pushd $CURRENT_DIR > /dev/null
function build_assets() { function build_assets() {
echo "Generating Element Call assets..." echo "Generating Element Call assets..."
pushd ../.. > /dev/null pushd ../.. > /dev/null
yarn build pnpm build
popd > /dev/null popd > /dev/null
} }
@@ -26,7 +26,7 @@ function copy_assets() {
} }
getopts :sh opt getopts :sh opt
case $opt in case $opt in
s) s)
SKIP=1 SKIP=1
;; ;;
@@ -41,7 +41,7 @@ if [ ! $SKIP ]; then
echo "" echo ""
if [[ $REPLY =~ ^[Yy]$ ]]; then if [[ $REPLY =~ ^[Yy]$ ]]; then
build_assets build_assets
else else
echo "Using existing assets from ../../dist" echo "Using existing assets from ../../dist"
fi fi
copy_assets copy_assets
@@ -56,4 +56,4 @@ echo "Publishing the Android project"
./gradlew publishAndReleaseToMavenCentral --no-daemon ./gradlew publishAndReleaseToMavenCentral --no-daemon
popd > /dev/null popd > /dev/null
+1 -7
View File
@@ -30,16 +30,10 @@ export default {
"@types/content-type", "@types/content-type",
"@types/sdp-transform", "@types/sdp-transform",
"@types/uuid", "@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 // then Knip will flag it as a false positive
// https://github.com/webpro-nl/knip/issues/766 // https://github.com/webpro-nl/knip/issues/766
"@vector-im/compound-web", "@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", "matrix-widget-api",
], ],
ignoreExportsUsedInFile: true, ignoreExportsUsedInFile: true,
+2 -2
View File
@@ -54,8 +54,8 @@
"matchFileNames": ["embedded/**/*"] "matchFileNames": ["embedded/**/*"]
}, },
{ {
"groupName": "Yarn", "groupName": "Pnpm",
"matchDepNames": ["yarn"] "matchDepNames": ["pnpm"]
} }
], ],
"semanticCommits": "disabled", "semanticCommits": "disabled",
+2 -2
View File
@@ -13,8 +13,8 @@ This folder contains an example index.html file that showcases the sdk in use (h
To get started run To get started run
``` ```
yarn pnpm install
yarn build:sdk pnpm build:sdk
``` ```
in the repository root. in the repository root.
+1 -1
View File
@@ -8,7 +8,7 @@ Please see LICENSE in the repository root for full details.
/** /**
* EXPERIMENTAL * 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. * use in widgets.
* It exposes the `createMatrixRTCSdk` which creates the `MatrixRTCSdk` interface (see below) that * It exposes the `createMatrixRTCSdk` which creates the `MatrixRTCSdk` interface (see below) that
* can be used to join a rtc session and exchange realtime data. * can be used to join a rtc session and exchange realtime data.
+1 -1
View File
@@ -29,7 +29,7 @@ interface WasmFileset {
// MediaPipe and depend on node_modules having this specific structure. It's // MediaPipe and depend on node_modules having this specific structure. It's
// easy to see this breaking if our dependencies changed and MediaPipe were // 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 // 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 // https://github.com/google-ai-edge/mediapipe/issues/5961
const wasmFileset: WasmFileset = { const wasmFileset: WasmFileset = {
wasmLoaderPath: new URL( wasmLoaderPath: new URL(