Compare commits

...

12 Commits

Author SHA1 Message Date
Michael Telatynski
725c85bd16 Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2026-02-06 12:58:58 +00:00
Michael Telatynski
18dc19d2f5 Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2026-02-06 12:53:15 +00:00
Michael Telatynski
b3ad0f288b Debug
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2026-02-06 12:47:51 +00:00
Michael Telatynski
5087d062ac Test matrix-web-i18n
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2026-02-06 12:46:40 +00:00
Michael Telatynski
fe885db94f Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2026-02-06 12:36:30 +00:00
Michael Telatynski
3cd0a75052 hak workaround
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2026-02-06 11:59:39 +00:00
Michael Telatynski
184f991b54 matrix-seshat still uses yarn
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2026-02-06 10:49:34 +00:00
Michael Telatynski
9732286591 matrix-seshat still uses yarn
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2026-02-06 10:46:28 +00:00
Michael Telatynski
b09abe0d7a Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2026-02-06 10:43:11 +00:00
Michael Telatynski
09af7c0634 Set -ex
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2026-02-06 10:37:33 +00:00
Michael Telatynski
cc1e3945ba Merge branch 'develop' of ssh://github.com/vector-im/element-desktop into t3chguy/pnpm
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

# Conflicts:
#	yarn.lock
2026-02-06 10:32:16 +00:00
Michael Telatynski
b750882136 Switch element-desktop from yarn classic to pnpm
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2026-02-06 10:27:29 +00:00
27 changed files with 9583 additions and 7577 deletions

2
.github/CODEOWNERS vendored
View File

@@ -1,5 +1,5 @@
* @element-hq/element-web-reviewers * @element-hq/element-web-reviewers
/.github/workflows/** @element-hq/element-web-team /.github/workflows/** @element-hq/element-web-team
/package.json @element-hq/element-web-team /package.json @element-hq/element-web-team
/yarn.lock @element-hq/element-web-team /pnpm-lock.yaml @element-hq/element-web-team
/src/i18n/strings /src/i18n/strings

View File

@@ -55,13 +55,14 @@ jobs:
steps: steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6 - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6
with: with:
cache: "yarn" cache: "pnpm"
node-version: "lts/*" node-version: "lts/*"
- name: Install dependencies - name: Install dependencies
run: yarn install --frozen-lockfile run: pnpm install --frozen-lockfile
- name: Download blob reports from GitHub Actions Artifacts - name: Download blob reports from GitHub Actions Artifacts
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7 uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7
@@ -71,7 +72,7 @@ jobs:
merge-multiple: true merge-multiple: true
- name: Merge into HTML Report - name: Merge into HTML Report
run: yarn playwright merge-reports -c ./playwright.config.ts --reporter=html ./all-blob-reports run: pnpm playwright merge-reports -c ./playwright.config.ts --reporter=html ./all-blob-reports
- name: Upload HTML report - name: Upload HTML report
if: always() if: always()

View File

@@ -122,16 +122,17 @@ jobs:
path: | path: |
./.hak ./.hak
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6 - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6
with: with:
node-version-file: .node-version node-version-file: .node-version
cache: "yarn" cache: "pnpm"
env: env:
# Workaround for https://github.com/actions/setup-node/issues/317 # Workaround for https://github.com/actions/setup-node/issues/317
FORCE_COLOR: 0 FORCE_COLOR: 0
- name: Install Deps - name: Install Deps
run: "yarn install --frozen-lockfile" run: pnpm install --frozen-lockfile
- name: "Get modified files" - name: "Get modified files"
id: changed_files id: changed_files
@@ -157,11 +158,18 @@ jobs:
docker run \ docker run \
-v ${{ github.workspace }}:/work -w /work \ -v ${{ github.workspace }}:/work -w /work \
-e SQLCIPHER_BUNDLED \ -e SQLCIPHER_BUNDLED \
-e CI=1 \
$HAK_DOCKER_IMAGE \ $HAK_DOCKER_IMAGE \
yarn build:native pnpm build:native
- name: Fix permissions on .hak - name: Fix permissions
run: sudo chown -R $USER:$USER .hak run: |
# For .hak
sudo chown -R $USER:$USER .hak
# DEBUG
ls -lah node_modules/7zip-bin/linux/*/7za
# For node_modules pnpm strict security
sudo chmod +x node_modules/7zip-bin/linux/*/7za
- name: Check native libraries in hak dependencies - name: Check native libraries in hak dependencies
run: | run: |
@@ -178,7 +186,7 @@ jobs:
fi fi
- name: Build App - name: Build App
run: yarn build --publish never ${{ steps.config.outputs.build-args }} -l ${{ inputs.targets }} run: pnpm build --publish never ${{ steps.config.outputs.build-args }} -l ${{ inputs.targets }}
env: env:
VARIANT_PATH: variant.json VARIANT_PATH: variant.json
# Only set for Nightly builds # Only set for Nightly builds

View File

@@ -113,23 +113,24 @@ jobs:
# https://github.com/electron-userland/electron-builder/issues/9511#issuecomment-3774092888 # https://github.com/electron-userland/electron-builder/issues/9511#issuecomment-3774092888
- run: sudo pip3 install pyobjc-framework-Quartz - run: sudo pip3 install pyobjc-framework-Quartz
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6 - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6
with: with:
node-version-file: .node-version node-version-file: .node-version
cache: "yarn" cache: "pnpm"
- name: Install Deps - name: Install Deps
run: "yarn install --frozen-lockfile" run: "pnpm install --frozen-lockfile"
- name: Build Natives - name: Build Natives
if: steps.cache.outputs.cache-hit != 'true' if: steps.cache.outputs.cache-hit != 'true'
run: yarn build:native:universal run: pnpm build:native:universal
# We split these because electron-builder gets upset if we set CSC_LINK even to an empty string # We split these because electron-builder gets upset if we set CSC_LINK even to an empty string
- name: "[Signed] Build App" - name: "[Signed] Build App"
if: inputs.sign != '' if: inputs.sign != ''
run: | run: |
yarn build:universal --publish never -m ${{ inputs.targets }} pnpm build:universal --publish never -m ${{ inputs.targets }}
env: env:
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
APPLE_ID: ${{ secrets.APPLE_ID }} APPLE_ID: ${{ secrets.APPLE_ID }}
@@ -151,7 +152,7 @@ jobs:
- name: "[Unsigned] Build App" - name: "[Unsigned] Build App"
if: inputs.sign == '' if: inputs.sign == ''
run: | run: |
yarn build:universal --publish never -m ${{ inputs.targets }} pnpm build:universal --publish never -m ${{ inputs.targets }}
env: env:
CSC_IDENTITY_AUTO_DISCOVERY: false CSC_IDENTITY_AUTO_DISCOVERY: false
VARIANT_PATH: variant.json VARIANT_PATH: variant.json

View File

@@ -56,13 +56,14 @@ jobs:
steps: steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6 - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6
with: with:
node-version-file: .node-version node-version-file: .node-version
cache: "yarn" cache: "pnpm"
- name: Install Deps - name: Install Deps
run: "yarn install --frozen-lockfile" run: "pnpm install --frozen-lockfile"
- name: Fetch Element Web (matching branch) - name: Fetch Element Web (matching branch)
id: branch-matching id: branch-matching
@@ -71,10 +72,10 @@ jobs:
run: | run: |
scripts/branch-match.sh scripts/branch-match.sh
cp "$CONFIG_DIR/config.json" element-web/ cp "$CONFIG_DIR/config.json" element-web/
yarn --cwd element-web install --frozen-lockfile pnpm --cwd element-web install --frozen-lockfile
yarn --cwd element-web run build pnpm --cwd element-web run build
mv element-web/webapp . mv element-web/webapp .
yarn asar-webapp pnpm asar-webapp
env: env:
# These must be set for branch-match.sh to get the right branch # These must be set for branch-match.sh to get the right branch
REPOSITORY: ${{ github.repository }} REPOSITORY: ${{ github.repository }}
@@ -83,7 +84,7 @@ jobs:
- name: Fetch Element Web (${{ inputs.version }}) - name: Fetch Element Web (${{ inputs.version }})
if: steps.branch-matching.outcome == 'failure' || steps.branch-matching.outcome == 'skipped' if: steps.branch-matching.outcome == 'failure' || steps.branch-matching.outcome == 'skipped'
run: yarn run fetch --noverify -d ${{ inputs.config }} ${{ inputs.version }} run: pnpm run fetch --noverify -d ${{ inputs.config }} ${{ inputs.version }}
- name: Copy variant config - name: Copy variant config
run: cp "$CONFIG_DIR/build.json" variant.json run: cp "$CONFIG_DIR/build.json" variant.json
@@ -93,8 +94,9 @@ jobs:
# We split this out to save the build_* scripts having to do it to make use of `hashFiles` in the cache action # We split this out to save the build_* scripts having to do it to make use of `hashFiles` in the cache action
- name: Generate cache hash files - name: Generate cache hash files
run: | run: |
set -ex
# Add --no-sandbox as otherwise it fails because the helper isn't setuid root. It's only getting the version. # Add --no-sandbox as otherwise it fails because the helper isn't setuid root. It's only getting the version.
yarn run --silent electron --no-sandbox --version > electronVersion pnpm --silent electron --no-sandbox --version > electronVersion
cat package.json | jq -c .hakDependencies | sha1sum > hakHash cat package.json | jq -c .hakDependencies | sha1sum > hakHash
find hak -type f -print0 | xargs -0 sha1sum >> hakHash find hak -type f -print0 | xargs -0 sha1sum >> hakHash
find scripts/hak -type f -print0 | xargs -0 sha1sum >> hakHash find scripts/hak -type f -print0 | xargs -0 sha1sum >> hakHash

View File

@@ -40,13 +40,14 @@ jobs:
with: with:
repository: ${{ github.repository == 'element-hq/element-web-pro' && 'element-hq/element-desktop' || github.repository }} repository: ${{ github.repository == 'element-hq/element-web-pro' && 'element-hq/element-desktop' || github.repository }}
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6 - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6
with: with:
node-version-file: .node-version node-version-file: .node-version
cache: "yarn" cache: "pnpm"
- name: Install Deps - name: Install Deps
run: "yarn install --frozen-lockfile" run: "pnpm install --frozen-lockfile"
- uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7 - uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7
with: with:
@@ -80,7 +81,7 @@ jobs:
uses: coactions/setup-xvfb@6b00cf1889f4e1d5a48635647013c0508128ee1a uses: coactions/setup-xvfb@6b00cf1889f4e1d5a48635647013c0508128ee1a
timeout-minutes: 20 timeout-minutes: 20
with: with:
run: yarn test --project=${{ inputs.project }} ${{ runner.os != 'Linux' && '--ignore-snapshots' || '' }} ${{ inputs.blob_report == false && '--reporter=html' || '' }} ${{ inputs.args }} run: pnpm test --project=${{ inputs.project }} ${{ runner.os != 'Linux' && '--ignore-snapshots' || '' }} ${{ inputs.blob_report == false && '--reporter=html' || '' }} ${{ inputs.args }}
env: env:
ELEMENT_DESKTOP_EXECUTABLE: ${{ steps.executable.outputs.path }} ELEMENT_DESKTOP_EXECUTABLE: ${{ steps.executable.outputs.path }}

View File

@@ -148,27 +148,28 @@ jobs:
rustup default stable rustup default stable
rustup target add ${{ steps.config.outputs.target }} rustup target add ${{ steps.config.outputs.target }}
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6 - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6
with: with:
node-version-file: .node-version node-version-file: .node-version
cache: "yarn" cache: "pnpm"
- name: Install Deps - name: Install Deps
run: "yarn install --frozen-lockfile" run: "pnpm install --frozen-lockfile"
- name: Insert config snippet - name: Insert config snippet
if: steps.config.outputs.extra_config != '' if: steps.config.outputs.extra_config != ''
shell: bash shell: bash
run: | run: |
mkdir config-edit mkdir config-edit
yarn asar extract webapp.asar config-edit pnpm asar extract webapp.asar config-edit
cd config-edit cd config-edit
mv config.json old-config.json mv config.json old-config.json
echo '${{ steps.config.outputs.extra_config }}' | jq -s '.[0] * .[1]' old-config.json - > config.json echo '${{ steps.config.outputs.extra_config }}' | jq -s '.[0] * .[1]' old-config.json - > config.json
rm old-config.json rm old-config.json
cd .. cd ..
rm webapp.asar rm webapp.asar
yarn asar pack config-edit/ webapp.asar pnpm asar pack config-edit/ webapp.asar
- name: Set up sqlcipher macros - name: Set up sqlcipher macros
if: steps.cache.outputs.cache-hit != 'true' && contains(inputs.arch, 'arm') if: steps.cache.outputs.cache-hit != 'true' && contains(inputs.arch, 'arm')
@@ -186,7 +187,7 @@ jobs:
if: steps.cache.outputs.cache-hit != 'true' if: steps.cache.outputs.cache-hit != 'true'
run: | run: |
refreshenv refreshenv
yarn build:native --target ${{ steps.config.outputs.target }} pnpm build:native --target ${{ steps.config.outputs.target }}
- name: Install and configure eSigner CKA - name: Install and configure eSigner CKA
run: | run: |
@@ -232,7 +233,7 @@ jobs:
MASTER_KEY_FILE: C:\Users\runneradmin\eSignerCKA\master.key MASTER_KEY_FILE: C:\Users\runneradmin\eSignerCKA\master.key
- name: Build App - name: Build App
run: yarn build --publish never ${{ steps.config.outputs.build-args }} -w ${{ inputs.targets }} run: pnpm build --publish never ${{ steps.config.outputs.build-args }} -w ${{ inputs.targets }}
env: env:
VARIANT_PATH: variant.json VARIANT_PATH: variant.json
# Only set for Nightly builds # Only set for Nightly builds

View File

@@ -39,7 +39,7 @@ jobs:
platforms: linux/amd64 platforms: linux/amd64
- name: Test image - name: Test image
run: docker run -v $PWD:/project element-desktop-dockerbuild yarn install run: docker run -v $PWD:/project element-desktop-dockerbuild pnpm install
- name: Log in to the Container registry - name: Log in to the Container registry
uses: docker/login-action@3227f5311cb93ffd14d13e65d8cc400d30f4dd8a uses: docker/login-action@3227f5311cb93ffd14d13e65d8cc400d30f4dd8a

View File

@@ -11,25 +11,27 @@ jobs:
steps: steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6 - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6
with: with:
node-version-file: package.json node-version-file: package.json
cache: "yarn" cache: "pnpm"
# Does not need branch matching as only analyses this layer # Does not need branch matching as only analyses this layer
- name: Install Deps - name: Install Deps
run: "yarn install --frozen-lockfile" run: "pnpm install --frozen-lockfile"
- name: Typecheck - name: Typecheck
run: "yarn run lint:types" run: "pnpm run lint:types"
i18n_lint: i18n_lint:
name: "i18n Check" name: "i18n Check"
uses: matrix-org/matrix-web-i18n/.github/workflows/i18n_check.yml@main uses: matrix-org/matrix-web-i18n/.github/workflows/i18n_check.yml@3673fd3abbf8dfae1de849c6cd3e69e24ed7a766
permissions: permissions:
pull-requests: read pull-requests: read
with: with:
hardcoded-words: "Element" hardcoded-words: "Element"
packageManager: pnpm
js_lint: js_lint:
name: "ESLint" name: "ESLint"
@@ -37,17 +39,18 @@ jobs:
steps: steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6 - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6
with: with:
node-version-file: package.json node-version-file: package.json
cache: "yarn" cache: "pnpm"
# Does not need branch matching as only analyses this layer # Does not need branch matching as only analyses this layer
- name: Install Deps - name: Install Deps
run: "yarn install --frozen-lockfile" run: "pnpm install --frozen-lockfile"
- name: Run Linter - name: Run Linter
run: "yarn run lint:js" run: "pnpm run lint:js"
workflow_lint: workflow_lint:
name: "Workflow Lint" name: "Workflow Lint"
@@ -55,17 +58,18 @@ jobs:
steps: steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6 - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6
with: with:
node-version-file: package.json node-version-file: package.json
cache: "yarn" cache: "pnpm"
# Does not need branch matching as only analyses this layer # Does not need branch matching as only analyses this layer
- name: Install Deps - name: Install Deps
run: "yarn install --frozen-lockfile" run: "pnpm install --frozen-lockfile"
- name: Run Linter - name: Run Linter
run: "yarn lint:workflows" run: "pnpm lint:workflows"
analyse_dead_code: analyse_dead_code:
name: "Analyse Dead Code" name: "Analyse Dead Code"
@@ -73,13 +77,14 @@ jobs:
steps: steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6 - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6
with: with:
node-version-file: package.json node-version-file: package.json
cache: "yarn" cache: "pnpm"
- name: Install Deps - name: Install Deps
run: "yarn install --frozen-lockfile" run: "pnpm install --frozen-lockfile"
- name: Run linter - name: Run linter
run: "yarn run lint:knip" run: "pnpm run lint:knip"

View File

@@ -7,7 +7,7 @@
/src/i18n/strings /src/i18n/strings
/CHANGELOG.md /CHANGELOG.md
/package-lock.json /package-lock.json
/yarn.lock /pnpm-lock.yaml
/playwright/html-report /playwright/html-report
/playwright/test-results /playwright/test-results

View File

@@ -14,7 +14,7 @@ Element Desktop is a Matrix client for desktop platforms with Element Web at its
Before you do anything else, fetch the dependencies: Before you do anything else, fetch the dependencies:
``` ```
yarn install pnpm install
``` ```
# Fetching Element # Fetching Element
@@ -26,7 +26,7 @@ so the first step is to get a working copy of Element Web. There are a few ways
# Fetch the prebuilt release Element package from the element-web GitHub releases page. The version # Fetch the prebuilt release Element package from the element-web GitHub releases page. The version
# fetched will be the same as the local element-desktop package. # fetched will be the same as the local element-desktop package.
# We're explicitly asking for no config, so the packaged Element will have no config.json. # We're explicitly asking for no config, so the packaged Element will have no config.json.
yarn run fetch --noverify --cfgdir "" pnpm run fetch --noverify --cfgdir ""
``` ```
...or if you'd like to use GPG to verify the downloaded package: ...or if you'd like to use GPG to verify the downloaded package:
@@ -35,9 +35,9 @@ yarn run fetch --noverify --cfgdir ""
# Fetch the Element public key from the element.io web server over a secure connection and import # Fetch the Element public key from the element.io web server over a secure connection and import
# it into your local GPG keychain (you'll need GPG installed). You only need to to do this # it into your local GPG keychain (you'll need GPG installed). You only need to to do this
# once. # once.
yarn run fetch --importkey pnpm run fetch --importkey
# Fetch the package and verify the signature # Fetch the package and verify the signature
yarn run fetch --cfgdir "" pnpm run fetch --cfgdir ""
``` ```
...or either of the above, but fetching a specific version of Element: ...or either of the above, but fetching a specific version of Element:
@@ -45,7 +45,7 @@ yarn run fetch --cfgdir ""
``` ```
# Fetch the prebuilt release Element package from the element-web GitHub releases page. The version # Fetch the prebuilt release Element package from the element-web GitHub releases page. The version
# fetched will be the same as the local element-desktop package. # fetched will be the same as the local element-desktop package.
yarn run fetch --noverify --cfgdir "" v1.5.6 pnpm run fetch --noverify --cfgdir "" v1.5.6
``` ```
If you only want to run the app locally and don't need to build packages, you can If you only want to run the app locally and don't need to build packages, you can
@@ -53,7 +53,7 @@ provide the `webapp` directory directly:
``` ```
# Assuming you've checked out and built a copy of element-web in ../element-web. # Assuming you've checked out and built a copy of element-web in ../element-web.
# Note that you will not be able to `yarn build` after this, but `yarn start` # Note that you will not be able to `pnpm build` after this, but `pnpm start`
# will work fine. # will work fine.
ln -s ../element-web/webapp ./ ln -s ../element-web/webapp ./
``` ```
@@ -72,7 +72,7 @@ which include support for searching in encrypted rooms and secure storage. Skipp
Then, run Then, run
``` ```
yarn run build pnpm run build
``` ```
This will do a couple of things: This will do a couple of things:
@@ -88,12 +88,12 @@ Alternatively, you can also build using docker, which will always produce the li
``` ```
# Run this once to make the docker image # Run this once to make the docker image
yarn run docker:setup pnpm run docker:setup
yarn run docker:install pnpm run docker:install
# if you want to build the native modules (this will take a while) # if you want to build the native modules (this will take a while)
yarn run docker:build:native pnpm run docker:build:native
yarn run docker:build pnpm run docker:build
``` ```
After running, the packages should be in `dist/`. After running, the packages should be in `dist/`.
@@ -103,19 +103,19 @@ After running, the packages should be in `dist/`.
If you'd just like to run the electron app locally for development: If you'd just like to run the electron app locally for development:
``` ```
yarn start pnpm start
``` ```
# Config # Config
If you'd like the packaged Element to have a configuration file, you can create a If you'd like the packaged Element to have a configuration file, you can create a
config directory and place `config.json` in there, then specify this directory config directory and place `config.json` in there, then specify this directory
with the `--cfgdir` option to `yarn run fetch`, eg: with the `--cfgdir` option to `pnpm run fetch`, eg:
``` ```
mkdir myconfig mkdir myconfig
cp /path/to/my/config.json myconfig/ cp /path/to/my/config.json myconfig/
yarn run fetch --cfgdir myconfig pnpm run fetch --cfgdir myconfig
``` ```
The config dir for the official Element app is in `element.io`. If you use this, The config dir for the official Element app is in `element.io`. If you use this,

View File

@@ -4,7 +4,6 @@ FROM rust:bullseye@sha256:3ebcc2d6d71fb93a2967e35723902c51dd87dbb36f66f795a58d79
ENV DEBIAN_FRONTEND=noninteractive ENV DEBIAN_FRONTEND=noninteractive
RUN curl --proto "=https" -L https://yarnpkg.com/latest.tar.gz | tar xvz && mv yarn-* /yarn && ln -s /yarn/bin/yarn /usr/bin/yarn
RUN apt-get -qq update && apt-get -y -qq dist-upgrade && \ RUN apt-get -qq update && apt-get -y -qq dist-upgrade && \
apt-get -y -qq install --no-install-recommends \ apt-get -y -qq install --no-install-recommends \
# tclsh is required for building SQLite as part of SQLCipher # tclsh is required for building SQLite as part of SQLCipher

View File

@@ -9,3 +9,4 @@ ARCH="${archMap["$TARGETARCH"]}"
NODE_VERSION=$(cat /.node-version | sed -e 's/^v//') NODE_VERSION=$(cat /.node-version | sed -e 's/^v//')
curl --proto "=https" -L "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-$TARGETOS-$ARCH.tar.gz" | tar xz -C /usr/local --strip-components=1 && \ curl --proto "=https" -L "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-$TARGETOS-$ARCH.tar.gz" | tar xz -C /usr/local --strip-components=1 && \
unlink /usr/local/CHANGELOG.md && unlink /usr/local/LICENSE && unlink /usr/local/README.md unlink /usr/local/CHANGELOG.md && unlink /usr/local/LICENSE && unlink /usr/local/README.md
corepack enable

View File

@@ -13,10 +13,9 @@ you will need debug symbols.
2. Figure out which version of Electron your Element-Desktop is based on. The 2. Figure out which version of Electron your Element-Desktop is based on. The
best way to do this is to figure out the version of Element-Desktop, then best way to do this is to figure out the version of Element-Desktop, then
look at look at
[`yarn.lock`](https://github.com/element-hq/element-desktop/blob/develop/yarn.lock) [`package.json`](https://github.com/element-hq/element-desktop/blob/develop/package.json)
for the corresponding version. There should be an entry starting for the corresponding version. There will be an entry within `dependencies` of
`electron@`, and under it a `version` line: this will tell you the version `electron`: the value will tell you the version of Electron that was used for that version of Element-Desktop.
of Electron that was used for that version of Element-Desktop.
3. Go to [Electron's releases page](https://github.com/electron/electron/releases/) 3. Go to [Electron's releases page](https://github.com/electron/electron/releases/)
and find the version you just identified. Under "Assets", download and find the version you just identified. Under "Assets", download

View File

@@ -18,21 +18,20 @@ when releasing.
If you are building for Linux, you can build the native modules with: If you are building for Linux, you can build the native modules with:
``` ```
yarn docker:setup pnpm docker:setup
yarn docker:install pnpm docker:install
INDOCKER_SQLCIPHER_BUNDLED=1 yarn docker:build:native INDOCKER_SQLCIPHER_BUNDLED=1 pnpm docker:build:native
``` ```
The above will build `matrix-seshat` in The above will build `matrix-seshat` in
`docker/node_modules/matrix-seshat`. You can then either run `yarn docker:build` `docker/node_modules/matrix-seshat`. You can then either run `pnpm docker:build`
to build the app inside docker, or: to build the app inside docker, or:
``` ```
yarn --cwd docker/node_modules/matrix-seshat link pnpm link docker/node_modules/matrix-seshat
yarn link matrix-seshat
``` ```
... and build the app with `yarn build` or run it with `yarn start`. ... and build the app with `pnpm build` or run it with `pnpm start`.
(See also https://github.com/element-hq/element-desktop#docker.) (See also https://github.com/element-hq/element-desktop#docker.)
@@ -49,7 +48,7 @@ Then optionally, [add seshat and dependencies to support search in E2E rooms](#a
Then, to build for an architecture selected automatically based on your system (recommended), run: Then, to build for an architecture selected automatically based on your system (recommended), run:
``` ```
yarn run build:native pnpm run build:native
``` ```
If you need to build for a specific architecture, see [here](#compiling-for-specific-architectures). If you need to build for a specific architecture, see [here](#compiling-for-specific-architectures).
@@ -67,20 +66,20 @@ Seshat also depends on the SQLCipher library to store its data in encrypted form
on disk. You'll need to install it via your OS package manager. on disk. You'll need to install it via your OS package manager.
After installing the Rust compiler and SQLCipher, Seshat support can be added After installing the Rust compiler and SQLCipher, Seshat support can be added
using yarn at the root of this project: using pnpm at the root of this project:
yarn add matrix-seshat pnpm add matrix-seshat
You will have to rebuild the native libraries against electron's version You will have to rebuild the native libraries against electron's version
of node rather than your system node, using the `electron-build-env` tool. of node rather than your system node, using the `electron-build-env` tool.
This is also needed to when pulling in changes to Seshat using `yarn link`. This is also needed to when pulling in changes to Seshat using `pnpm link`.
yarn add electron-build-env pnpm add electron-build-env
Recompiling Seshat itself can be done like so: Recompiling Seshat itself can be done like so:
ELECTRON_VERSION=$(electron --version) ELECTRON_VERSION=$(electron --version)
yarn run electron-build-env -- --electron ${ELECTRON_VERSION#v} -- neon build matrix-seshat --release pnpm electron-build-env -- --electron ${ELECTRON_VERSION#v} -- neon build matrix-seshat --release
Please make sure to include all the `--` as well as the `--release` command line Please make sure to include all the `--` as well as the `--release` command line
switch at the end. Modify your electron version accordingly depending on the switch at the end. Modify your electron version accordingly depending on the
@@ -89,7 +88,7 @@ version that is installed on your system.
After this is done the Electron version of Element can be run from the main folder After this is done the Electron version of Element can be run from the main folder
as usual using: as usual using:
yarn start pnpm start
### Statically linking libsqlcipher ### Statically linking libsqlcipher
@@ -109,26 +108,26 @@ and https://github.com/vector-im/element-web/issues/20926.
On macOS, you can build universal native modules too: On macOS, you can build universal native modules too:
``` ```
yarn run build:native:universal pnpm run build:native:universal
``` ```
...or you can build for a specific architecture: ...or you can build for a specific architecture:
``` ```
yarn run build:native --target x86_64-apple-darwin pnpm run build:native --target x86_64-apple-darwin
``` ```
or or
``` ```
yarn run build:native --target aarch64-apple-darwin pnpm run build:native --target aarch64-apple-darwin
``` ```
You'll then need to create a built bundle with the same architecture. You'll then need to create a built bundle with the same architecture.
To bundle a universal build for macOS, run: To bundle a universal build for macOS, run:
``` ```
yarn run build:universal pnpm run build:universal
``` ```
### Windows ### Windows
@@ -136,13 +135,13 @@ yarn run build:universal
If you're on Windows, you can choose to build specifically for 32 or 64 bit: If you're on Windows, you can choose to build specifically for 32 or 64 bit:
``` ```
yarn run build:32 pnpm run build:32
``` ```
or or
``` ```
yarn run build:64 pnpm run build:64
``` ```
### Cross compiling ### Cross compiling
@@ -156,19 +155,19 @@ at this time.
The native module build system keeps the different architectures The native module build system keeps the different architectures
separate, so you can keep native modules for several architectures at the same separate, so you can keep native modules for several architectures at the same
time and switch which are active using a `yarn run hak copy` command, passing time and switch which are active using a `pnpm run hak copy` command, passing
the appropriate architectures. This will error if you haven't yet built those the appropriate architectures. This will error if you haven't yet built those
architectures. eg: architectures. eg:
``` ```
yarn run build:native --target x86_64-apple-darwin pnpm run build:native --target x86_64-apple-darwin
# We've now built & linked into place native modules for Intel # We've now built & linked into place native modules for Intel
yarn run build:native --target aarch64-apple-darwin pnpm run build:native --target aarch64-apple-darwin
# We've now built Apple Silicon modules too, and linked them into place as the active ones # We've now built Apple Silicon modules too, and linked them into place as the active ones
yarn run hak copy --target x86_64-apple-darwin pnpm run hak copy --target x86_64-apple-darwin
# We've now switched back to our Intel modules # We've now switched back to our Intel modules
yarn run hak copy --target x86_64-apple-darwin --target aarch64-apple-darwin pnpm run hak copy --target x86_64-apple-darwin --target aarch64-apple-darwin
# Now our native modules are universal x86_64+aarch64 binaries # Now our native modules are universal x86_64+aarch64 binaries
``` ```

View File

@@ -16,7 +16,7 @@ If you want to build native modules, make sure that the following tools are inst
You can install the above tools using [Chocolatey](https://chocolatey.org/install): You can install the above tools using [Chocolatey](https://chocolatey.org/install):
```cmd ```cmd
choco install --no-progress -y git nodejs-lts yarn python StrawberryPerl rustup.install nasm magicsplat-tcl-tk choco install --no-progress -y git nodejs-lts pnpm python StrawberryPerl rustup.install nasm magicsplat-tcl-tk
``` ```
- [Build Tools for Visual Studio 2019](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019) with the following configuration: - [Build Tools for Visual Studio 2019](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019) with the following configuration:

View File

@@ -21,43 +21,43 @@
"node": ">=18.0.0" "node": ">=18.0.0"
}, },
"scripts": { "scripts": {
"i18n": "matrix-gen-i18n && yarn i18n:sort && yarn i18n:lint", "i18n": "matrix-gen-i18n && pnpm i18n:sort && pnpm i18n:lint",
"i18n:sort": "matrix-sort-i18n src/i18n/strings/en_EN.json", "i18n:sort": "matrix-sort-i18n src/i18n/strings/en_EN.json",
"i18n:lint": "prettier --log-level=silent --write src/i18n/strings/ --ignore-path /dev/null", "i18n:lint": "prettier --log-level=silent --write src/i18n/strings/ --ignore-path /dev/null",
"i18n:diff": "cp src/i18n/strings/en_EN.json src/i18n/strings/en_EN_orig.json && yarn i18n && matrix-compare-i18n-files src/i18n/strings/en_EN_orig.json src/i18n/strings/en_EN.json", "i18n:diff": "cp src/i18n/strings/en_EN.json src/i18n/strings/en_EN_orig.json && pnpm i18n && matrix-compare-i18n-files src/i18n/strings/en_EN_orig.json src/i18n/strings/en_EN.json",
"mkdirs": "mkdirp packages deploys", "mkdirs": "mkdirp packages deploys",
"fetch": "yarn run mkdirs && tsx scripts/fetch-package.ts", "fetch": "pnpm run mkdirs && tsx scripts/fetch-package.ts",
"asar-webapp": "asar p webapp webapp.asar", "asar-webapp": "asar p webapp webapp.asar",
"start": "yarn run build:ts && yarn run build:res && electron .", "start": "pnpm run build:ts && pnpm run build:res && electron .",
"lint": "yarn lint:types && yarn lint:js && yarn lint:workflows", "lint": "pnpm lint:types && pnpm lint:js && pnpm lint:workflows",
"lint:js": "eslint --max-warnings 0 src hak playwright scripts && prettier --check .", "lint:js": "eslint --max-warnings 0 src hak playwright scripts && prettier --check .",
"lint:js-fix": "eslint --fix --max-warnings 0 src hak playwright scripts && prettier --log-level=warn --write .", "lint:js-fix": "eslint --fix --max-warnings 0 src hak playwright scripts && prettier --log-level=warn --write .",
"lint:types": "yarn lint:types:src && yarn lint:types:test && yarn lint:types:scripts && yarn lint:types:hak", "lint:types": "pnpm lint:types:src && pnpm lint:types:test && pnpm lint:types:scripts && pnpm lint:types:hak",
"lint:types:src": "tsc --noEmit", "lint:types:src": "tsc --noEmit",
"lint:types:test": "tsc --noEmit -p playwright/tsconfig.json", "lint:types:test": "tsc --noEmit -p playwright/tsconfig.json",
"lint:types:scripts": "tsc --noEmit -p scripts/tsconfig.json", "lint:types:scripts": "tsc --noEmit -p scripts/tsconfig.json",
"lint:types:hak": "tsc --noEmit -p hak/tsconfig.json", "lint:types:hak": "tsc --noEmit -p hak/tsconfig.json",
"lint:workflows": "find .github/workflows -type f \\( -iname '*.yaml' -o -iname '*.yml' \\) | xargs -I {} sh -c 'echo \"Linting {}\"; action-validator \"{}\"'", "lint:workflows": "find .github/workflows -type f \\( -iname '*.yaml' -o -iname '*.yml' \\) | xargs -I {} sh -c 'echo \"Linting {}\"; action-validator \"{}\"'",
"lint:knip": "knip", "lint:knip": "knip",
"build:native": "yarn run hak", "build:native": "pnpm run hak",
"build:native:universal": "yarn run hak --target x86_64-apple-darwin fetchandbuild && yarn run hak --target aarch64-apple-darwin fetchandbuild && yarn run hak --target x86_64-apple-darwin --target aarch64-apple-darwin copyandlink", "build:native:universal": "pnpm run hak --target x86_64-apple-darwin fetchandbuild && pnpm run hak --target aarch64-apple-darwin fetchandbuild && pnpm run hak --target x86_64-apple-darwin --target aarch64-apple-darwin copyandlink",
"build:32": "yarn run build:ts && yarn run build:res && electron-builder --ia32", "build:32": "pnpm run build:ts && pnpm run build:res && electron-builder --ia32",
"build:64": "yarn run build:ts && yarn run build:res && electron-builder --x64", "build:64": "pnpm run build:ts && pnpm run build:res && electron-builder --x64",
"build:universal": "yarn run build:ts && yarn run build:res && electron-builder --universal", "build:universal": "pnpm run build:ts && pnpm run build:res && electron-builder --universal",
"build": "yarn run build:ts && yarn run build:res && electron-builder", "build": "pnpm run build:ts && pnpm run build:res && electron-builder",
"build:ts": "tsc", "build:ts": "tsc",
"build:res": "tsx scripts/copy-res.ts", "build:res": "tsx scripts/copy-res.ts",
"docker:setup": "docker build --platform linux/amd64 -t element-desktop-dockerbuild -f dockerbuild/Dockerfile .", "docker:setup": "docker build --platform linux/amd64 -t element-desktop-dockerbuild -f dockerbuild/Dockerfile .",
"docker:build:native": "scripts/in-docker.sh yarn run hak", "docker:build:native": "scripts/in-docker.sh pnpm run hak",
"docker:build": "scripts/in-docker.sh yarn run build", "docker:build": "scripts/in-docker.sh pnpm run build",
"docker:install": "scripts/in-docker.sh yarn install", "docker:install": "scripts/in-docker.sh pnpm install",
"clean": "rimraf webapp.asar dist packages deploys lib", "clean": "rimraf webapp.asar dist packages deploys lib",
"hak": "tsx scripts/hak/index.ts", "hak": "tsx scripts/hak/index.ts",
"test": "playwright test", "test": "playwright test",
"test:open": "yarn test --ui", "test:open": "pnpm test --ui",
"test:screenshots:build": "docker build playwright -t element-desktop-playwright --platform linux/amd64", "test:screenshots:build": "docker build playwright -t element-desktop-playwright --platform linux/amd64",
"test:screenshots:run": "docker run --rm --network host -v $(pwd):/work/element-desktop -v element-desktop-playwright:/work/element-desktop/node_modules -v /var/run/docker.sock:/var/run/docker.sock --platform linux/amd64 -it element-desktop-playwright", "test:screenshots:run": "docker run --rm --network host -v $(pwd):/work/element-desktop -v element-desktop-playwright:/work/element-desktop/node_modules -v /var/run/docker.sock:/var/run/docker.sock --platform linux/amd64 -it element-desktop-playwright",
"postinstall": "patch-package && electron-builder install-app-deps" "postinstall": "electron-builder install-app-deps"
}, },
"dependencies": { "dependencies": {
"@sentry/electron": "^7.0.0", "@sentry/electron": "^7.0.0",
@@ -107,8 +107,6 @@
"matrix-web-i18n": "3.6.0", "matrix-web-i18n": "3.6.0",
"mkdirp": "^3.0.0", "mkdirp": "^3.0.0",
"pacote": "^21.0.0", "pacote": "^21.0.0",
"patch-package": "^8.0.1",
"postinstall-postinstall": "^2.1.0",
"prettier": "^3.0.0", "prettier": "^3.0.0",
"rimraf": "^6.0.0", "rimraf": "^6.0.0",
"tar": "^7.0.0", "tar": "^7.0.0",
@@ -124,5 +122,22 @@
"config-file-ts": "0.2.8-rc1", "config-file-ts": "0.2.8-rc1",
"node-abi": "4.26.0", "node-abi": "4.26.0",
"@types/pg-pool": "2.0.7" "@types/pg-pool": "2.0.7"
} },
"pnpm": {
"onlyBuiltDependencies": [
"electron"
],
"patchedDependencies": {
"@types/auto-launch": "patches/@types__auto-launch.patch"
},
"peerDependencyRules": {
"allowedVersions": {
"eslint": "8"
}
},
"allowedDeprecatedVersions": {
"eslint": "8"
}
},
"packageManager": "pnpm@10.28.2+sha512.41872f037ad22f7348e3b1debbaf7e867cfd448f2726d9cf74c08f19507c31d2c8e7a11525b983febc2df640b5438dee6023ebb1f84ed43cc2d654d2bc326264"
} }

View File

@@ -1,7 +1,7 @@
diff --git a/node_modules/@types/auto-launch/index.d.ts b/node_modules/@types/auto-launch/index.d.ts diff --git a/index.d.ts b/index.d.ts
index a30a77c..e512ce1 100644 index a30a77c..e512ce1 100644
--- a/node_modules/@types/auto-launch/index.d.ts --- a/index.d.ts
+++ b/node_modules/@types/auto-launch/index.d.ts +++ b/index.d.ts
@@ -25,6 +25,13 @@ interface AutoLaunchOptions { @@ -25,6 +25,13 @@ interface AutoLaunchOptions {
declare class AutoLaunch { declare class AutoLaunch {
constructor(options: AutoLaunchOptions); constructor(options: AutoLaunchOptions);

View File

@@ -8,8 +8,8 @@ sleep 2
export DISPLAY=:99 export DISPLAY=:99
yarn install --frozen-lockfile pnpm install --frozen-lockfile
yarn build -l --dir pnpm build -l --dir
PLAYWRIGHT_HTML_OPEN=never ELEMENT_DESKTOP_EXECUTABLE="./dist/linux-unpacked/element-desktop" \ PLAYWRIGHT_HTML_OPEN=never ELEMENT_DESKTOP_EXECUTABLE="./dist/linux-unpacked/element-desktop" \
npx playwright test --update-snapshots --reporter line,html "$1" npx playwright test --update-snapshots --reporter line,html "$1"

9416
pnpm-lock.yaml generated Normal file
View File

File diff suppressed because it is too large Load Diff

1
pnpm-workspace.yaml Normal file
View File

@@ -0,0 +1 @@
nodeLinker: hoisted

View File

@@ -18,7 +18,7 @@ but should work equally well for building modules for normal node.
# Running # Running
Hak is invoked with a command and a dependency, eg. `yarn run hak fetch matrix-seshat`. Hak is invoked with a command and a dependency, eg. `pnpm run hak fetch matrix-seshat`.
If no dependencies are given, hak runs the command on all dependencies. If no dependencies are given, hak runs the command on all dependencies.
# Files # Files
@@ -37,15 +37,15 @@ There are a lot of files involved:
Hak works around native node modules that try to fetch or build their native component in Hak works around native node modules that try to fetch or build their native component in
the npm 'install' phase - modules that do this will typically end up with native components the npm 'install' phase - modules that do this will typically end up with native components
targeted to the build platform and the node that npm/yarn is using, which is no good for an targeted to the build platform and the node that npm/pnpm is using, which is no good for an
electron app. electron app.
It does this by installing it with `--ignore-scripts` and then using `yarn link` to keep the It does this by installing it with `--ignore-scripts` and then using `pnpm link` to keep the
dependency module separate so yarn doesn't try to run its install / postinstall script dependency module separate so pnpm doesn't try to run its install / postinstall script
at other points (eg. whenever you `yarn add` a random other dependency). at other points (eg. whenever you `pnpm add` a random other dependency).
This also means that the dependencies cannot be listed in `dependencies` or This also means that the dependencies cannot be listed in `dependencies` or
`devDependencies` in the project, since this would cause npm / yarn to install them and `devDependencies` in the project, since this would cause pnpm to install them and
try to fetch their native parts. Instead, they are listed in `hakDependencies` which try to fetch their native parts. Instead, they are listed in `hakDependencies` which
hak reads to install them for you. hak reads to install them for you.
@@ -53,9 +53,6 @@ Hak will _not_ install dependencies for the copy of the module it links into you
project, so if your native module has javascript dependencies that are actually needed at project, so if your native module has javascript dependencies that are actually needed at
runtime (and not just to fetch / build the native parts), it won't work. runtime (and not just to fetch / build the native parts), it won't work.
Hak will generate a `.yarnrc` in the project directory to set the link directory to its
own in the .hak directory (unless one already exists, in which case this is your problem).
# Lifecycle # Lifecycle
Hak is divided into lifecycle stages, in order: Hak is divided into lifecycle stages, in order:

View File

@@ -8,6 +8,7 @@ Please see LICENSE files in the repository root for full details.
import fsProm from "node:fs/promises"; import fsProm from "node:fs/promises";
import pacote from "pacote"; import pacote from "pacote";
import path from "node:path";
import type HakEnv from "./hakEnv.js"; import type HakEnv from "./hakEnv.js";
import type { DependencyInfo } from "./dep.js"; import type { DependencyInfo } from "./dep.js";
@@ -30,6 +31,13 @@ export default async function fetch(hakEnv: HakEnv, moduleInfo: DependencyInfo):
packumentCache, packumentCache,
}); });
// Workaround for us switching to pnpm but matrix-seshat still using yarn classic
const packageJsonPath = path.join(moduleInfo.moduleBuildDir, "package.json");
const packageJson = await fsProm.readFile(packageJsonPath, "utf-8");
const packageJsonData = JSON.parse(packageJson);
packageJsonData["packageManager"] = "yarn@1.22.22";
await fsProm.writeFile(packageJsonPath, JSON.stringify(packageJsonData, null, 2), "utf-8");
console.log("Running yarn install in " + moduleInfo.moduleBuildDir); console.log("Running yarn install in " + moduleInfo.moduleBuildDir);
await hakEnv.spawn("yarn", ["install", "--ignore-scripts"], { await hakEnv.spawn("yarn", ["install", "--ignore-scripts"], {
cwd: moduleInfo.moduleBuildDir, cwd: moduleInfo.moduleBuildDir,

View File

@@ -6,18 +6,11 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Com
Please see LICENSE files in the repository root for full details. Please see LICENSE files in the repository root for full details.
*/ */
import path from "node:path";
import type HakEnv from "./hakEnv.js"; import type HakEnv from "./hakEnv.js";
import { type DependencyInfo } from "./dep.js"; import { type DependencyInfo } from "./dep.js";
export default async function link(hakEnv: HakEnv, moduleInfo: DependencyInfo): Promise<void> { export default async function link(hakEnv: HakEnv, moduleInfo: DependencyInfo): Promise<void> {
const linkFolder = path.join(hakEnv.dotHakDir, "links"); await hakEnv.spawn("pnpm", ["link", moduleInfo.moduleOutDir], {
await hakEnv.spawn("yarn", ["link", "--link-folder", linkFolder], {
cwd: moduleInfo.moduleOutDir,
});
await hakEnv.spawn("yarn", ["link", "--link-folder", linkFolder, moduleInfo.name], {
cwd: hakEnv.projectRoot, cwd: hakEnv.projectRoot,
}); });
} }

View File

@@ -8,7 +8,7 @@ IMAGE=${DOCKER_IMAGE_NAME:-"element-desktop-dockerbuild"}
docker inspect "$IMAGE" 2> /dev/null > /dev/null docker inspect "$IMAGE" 2> /dev/null > /dev/null
if [ $? != 0 ]; then if [ $? != 0 ]; then
echo "Docker image $IMAGE not found. Have you run yarn run docker:setup?" echo "Docker image $IMAGE not found. Have you run pnpm run docker:setup?"
exit 1 exit 1
fi fi

View File

@@ -14,7 +14,7 @@ export async function versionFromAsar(): Promise<string> {
try { try {
await fs.stat("webapp.asar"); await fs.stat("webapp.asar");
} catch { } catch {
throw new Error("No 'webapp.asar' found. Run 'yarn run fetch'"); throw new Error("No 'webapp.asar' found. Run 'pnpm run fetch'");
} }
return asar.extractFile("webapp.asar", "version").toString().trim(); return asar.extractFile("webapp.asar", "version").toString().trim();
@@ -25,7 +25,7 @@ export async function setPackageVersion(ver: string): Promise<void> {
// all the various version fields // all the various version fields
await new Promise<void>((resolve, reject) => { await new Promise<void>((resolve, reject) => {
childProcess.execFile( childProcess.execFile(
process.platform === "win32" ? "yarn.cmd" : "yarn", process.platform === "win32" ? "pnpm.cmd" : "pnpm",
[ [
"version", "version",
"-s", "-s",

7441
yarn.lock
View File

File diff suppressed because it is too large Load Diff