mirror of
https://github.com/vector-im/element-call.git
synced 2026-04-28 09:44:37 +00:00
fixup some missing yarn -> pnpm transitions
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
14
README.md
14
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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
popd > /dev/null
|
||||
|
||||
8
knip.ts
8
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,
|
||||
|
||||
@@ -54,8 +54,8 @@
|
||||
"matchFileNames": ["embedded/**/*"]
|
||||
},
|
||||
{
|
||||
"groupName": "Yarn",
|
||||
"matchDepNames": ["yarn"]
|
||||
"groupName": "Pnpm",
|
||||
"matchDepNames": ["pnpm"]
|
||||
}
|
||||
],
|
||||
"semanticCommits": "disabled",
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user