mirror of
https://github.com/element-hq/element-desktop.git
synced 2025-12-24 08:11:03 -05:00
Compare commits
19 Commits
develop
...
renovate/e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
13157b6a72 | ||
|
|
1d236b691f | ||
|
|
3dbcc4233b | ||
|
|
0d800f9999 | ||
|
|
d7a95473df | ||
|
|
22b5cc730e | ||
|
|
62546482f7 | ||
|
|
e84aa49d86 | ||
|
|
e9547d1a83 | ||
|
|
ff44baaf96 | ||
|
|
a485adb121 | ||
|
|
ce5cb414a3 | ||
|
|
201a5005a8 | ||
|
|
639ac560ec | ||
|
|
360fddeac8 | ||
|
|
9bddd89d7d | ||
|
|
85b165069c | ||
|
|
48c771414d | ||
|
|
746f4aa30f |
1
.github/workflows/build_and_test.yaml
vendored
1
.github/workflows/build_and_test.yaml
vendored
@@ -55,6 +55,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6
|
||||
|
||||
- run: corepack enable
|
||||
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6
|
||||
with:
|
||||
cache: "yarn"
|
||||
|
||||
1
.github/workflows/build_linux.yaml
vendored
1
.github/workflows/build_linux.yaml
vendored
@@ -122,6 +122,7 @@ jobs:
|
||||
path: |
|
||||
./.hak
|
||||
|
||||
- run: corepack enable
|
||||
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6
|
||||
with:
|
||||
node-version-file: .node-version
|
||||
|
||||
1
.github/workflows/build_macos.yaml
vendored
1
.github/workflows/build_macos.yaml
vendored
@@ -105,6 +105,7 @@ jobs:
|
||||
with:
|
||||
python-version: "3.13"
|
||||
|
||||
- run: corepack enable
|
||||
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6
|
||||
with:
|
||||
node-version-file: .node-version
|
||||
|
||||
1
.github/workflows/build_prepare.yaml
vendored
1
.github/workflows/build_prepare.yaml
vendored
@@ -56,6 +56,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6
|
||||
|
||||
- run: corepack enable
|
||||
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6
|
||||
with:
|
||||
node-version-file: .node-version
|
||||
|
||||
4
.github/workflows/build_test.yaml
vendored
4
.github/workflows/build_test.yaml
vendored
@@ -40,6 +40,10 @@ jobs:
|
||||
with:
|
||||
repository: ${{ github.repository == 'element-hq/element-web-pro' && 'element-hq/element-desktop' || github.repository }}
|
||||
|
||||
# https://github.com/actions/setup-node/issues/480#issuecomment-2907867335
|
||||
- run: npm install -g corepack@0.34.5 --force
|
||||
if: runner.os == 'Windows'
|
||||
- run: corepack enable
|
||||
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6
|
||||
with:
|
||||
node-version-file: .node-version
|
||||
|
||||
3
.github/workflows/build_windows.yaml
vendored
3
.github/workflows/build_windows.yaml
vendored
@@ -148,6 +148,9 @@ jobs:
|
||||
rustup default stable
|
||||
rustup target add ${{ steps.config.outputs.target }}
|
||||
|
||||
# https://github.com/actions/setup-node/issues/480#issuecomment-2907867335
|
||||
- run: npm install -g corepack@0.34.5 --force
|
||||
- run: corepack enable
|
||||
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6
|
||||
with:
|
||||
node-version-file: .node-version
|
||||
|
||||
6
.github/workflows/static_analysis.yaml
vendored
6
.github/workflows/static_analysis.yaml
vendored
@@ -11,6 +11,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6
|
||||
|
||||
- run: corepack enable
|
||||
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6
|
||||
with:
|
||||
node-version-file: package.json
|
||||
@@ -25,7 +26,7 @@ jobs:
|
||||
|
||||
i18n_lint:
|
||||
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@t3chguy/corepack
|
||||
permissions:
|
||||
pull-requests: read
|
||||
with:
|
||||
@@ -37,6 +38,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6
|
||||
|
||||
- run: corepack enable
|
||||
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6
|
||||
with:
|
||||
node-version-file: package.json
|
||||
@@ -55,6 +57,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6
|
||||
|
||||
- run: corepack enable
|
||||
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6
|
||||
with:
|
||||
node-version-file: package.json
|
||||
@@ -73,6 +76,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6
|
||||
|
||||
- run: corepack enable
|
||||
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6
|
||||
with:
|
||||
node-version-file: package.json
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -19,3 +19,4 @@ yarn-error.log
|
||||
/scripts/hak/**/*.js
|
||||
.DS_Store
|
||||
/playwright-report
|
||||
/.yarn/install-state.gz
|
||||
|
||||
1
.yarnrc.yml
Normal file
1
.yarnrc.yml
Normal file
@@ -0,0 +1 @@
|
||||
nodeLinker: node-modules
|
||||
@@ -4,7 +4,6 @@ FROM rust:bullseye@sha256:4886b155a84b46ad61df6a2249905bea8c61fc1eaa903398713233
|
||||
|
||||
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 && \
|
||||
apt-get -y -qq install --no-install-recommends \
|
||||
# tclsh is required for building SQLite as part of SQLCipher
|
||||
@@ -16,6 +15,7 @@ RUN ln -s /usr/bin/python3 /usr/bin/python & ln -s /usr/bin/pip3 /usr/bin/pip
|
||||
|
||||
ENV DEBUG_COLORS=true
|
||||
ENV FORCE_COLOR=true
|
||||
ENV COREPACK_ENABLE_DOWNLOAD_PROMPT=0
|
||||
|
||||
WORKDIR /project
|
||||
|
||||
|
||||
@@ -9,3 +9,4 @@ ARCH="${archMap["$TARGETARCH"]}"
|
||||
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 && \
|
||||
unlink /usr/local/CHANGELOG.md && unlink /usr/local/LICENSE && unlink /usr/local/README.md
|
||||
corepack enable
|
||||
|
||||
@@ -17,7 +17,8 @@ export default async function (hakEnv: HakEnv, moduleInfo: DependencyInfo): Prom
|
||||
}
|
||||
|
||||
console.log("Running yarn install");
|
||||
await hakEnv.spawn("yarn", ["install"], {
|
||||
|
||||
await hakEnv.spawn("corepack", ["yarn@1.22.22", "install"], {
|
||||
cwd: moduleInfo.moduleBuildDir,
|
||||
env,
|
||||
shell: true,
|
||||
@@ -26,7 +27,7 @@ export default async function (hakEnv: HakEnv, moduleInfo: DependencyInfo): Prom
|
||||
const buildTarget = hakEnv.wantsStaticSqlCipher() ? "build-bundled" : "build";
|
||||
|
||||
console.log("Running yarn build");
|
||||
await hakEnv.spawn("yarn", ["run", buildTarget], {
|
||||
await hakEnv.spawn("corepack", ["yarn@1.22.22", "run", buildTarget], {
|
||||
cwd: moduleInfo.moduleBuildDir,
|
||||
env,
|
||||
shell: true,
|
||||
|
||||
@@ -85,12 +85,12 @@
|
||||
"@types/pacote": "^11.1.1",
|
||||
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
||||
"@typescript-eslint/parser": "^8.0.0",
|
||||
"app-builder-lib": "26.2.0",
|
||||
"app-builder-lib": "26.3.4",
|
||||
"chokidar": "^5.0.0",
|
||||
"detect-libc": "^2.0.0",
|
||||
"electron": "39.2.3",
|
||||
"electron-builder": "26.2.0",
|
||||
"electron-builder-squirrel-windows": "26.2.0",
|
||||
"electron-builder": "26.3.4",
|
||||
"electron-builder-squirrel-windows": "26.3.4",
|
||||
"electron-devtools-installer": "^4.0.0",
|
||||
"eslint": "^8.26.0",
|
||||
"eslint-config-google": "^0.14.0",
|
||||
@@ -121,5 +121,6 @@
|
||||
"@types/node": "18.19.130",
|
||||
"config-file-ts": "0.2.8-rc1",
|
||||
"node-abi": "4.24.0"
|
||||
}
|
||||
},
|
||||
"packageManager": "yarn@4.12.0"
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ the npm 'install' phase - modules that do this will typically end up with native
|
||||
targeted to the build platform and the node that npm/yarn is using, which is no good for an
|
||||
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 `--mode=skip-build` and then using `yarn link` to keep the
|
||||
dependency module separate so yarn doesn't try to run its install / postinstall script
|
||||
at other points (eg. whenever you `yarn add` a random other dependency).
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import fsProm from "node:fs/promises";
|
||||
import pacote from "pacote";
|
||||
import pacote, { type Packument } from "pacote";
|
||||
|
||||
import type HakEnv from "./hakEnv.js";
|
||||
import type { DependencyInfo } from "./dep.js";
|
||||
@@ -25,13 +25,13 @@ export default async function fetch(hakEnv: HakEnv, moduleInfo: DependencyInfo):
|
||||
|
||||
console.log("Fetching " + moduleInfo.name + "@" + moduleInfo.version);
|
||||
|
||||
const packumentCache = new Map();
|
||||
const packumentCache = new Map<string, Packument>();
|
||||
await pacote.extract(`${moduleInfo.name}@${moduleInfo.version}`, moduleInfo.moduleBuildDir, {
|
||||
packumentCache,
|
||||
});
|
||||
|
||||
console.log("Running yarn install in " + moduleInfo.moduleBuildDir);
|
||||
await hakEnv.spawn("yarn", ["install", "--ignore-scripts"], {
|
||||
await hakEnv.spawn("corepack", ["yarn@1.22.22", "install", "--mode=skip-build"], {
|
||||
cwd: moduleInfo.moduleBuildDir,
|
||||
});
|
||||
|
||||
@@ -45,6 +45,7 @@ export default async function fetch(hakEnv: HakEnv, moduleInfo: DependencyInfo):
|
||||
// actual runtime dependencies will have to be added to the main app's
|
||||
// dependencies. We can't tell what dependencies are real runtime deps
|
||||
// and which are just used for native module building.
|
||||
console.log("@@ Pacote2", moduleInfo.moduleOutDir);
|
||||
await pacote.extract(`${moduleInfo.name}@${moduleInfo.version}`, moduleInfo.moduleOutDir, {
|
||||
packumentCache,
|
||||
});
|
||||
|
||||
@@ -84,6 +84,7 @@ export default class HakEnv {
|
||||
npm_config_target: this.runtimeVersion,
|
||||
npm_config_build_from_source: "true",
|
||||
npm_config_devdir: path.join(os.homedir(), ".electron-gyp"),
|
||||
COREPACK_ENABLE_DOWNLOAD_PROMPT: "0",
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -38,10 +38,11 @@ export default async function link(hakEnv: HakEnv, moduleInfo: DependencyInfo):
|
||||
);
|
||||
}
|
||||
|
||||
await hakEnv.spawn("yarn", ["link"], {
|
||||
console.log("@@", moduleInfo.moduleOutDir);
|
||||
await hakEnv.spawn("corepack", ["yarn@1.22.22", "link"], {
|
||||
cwd: moduleInfo.moduleOutDir,
|
||||
});
|
||||
await hakEnv.spawn("yarn", ["link", moduleInfo.name], {
|
||||
await hakEnv.spawn("corepack", ["yarn@1.22.22", "link", moduleInfo.name], {
|
||||
cwd: hakEnv.projectRoot,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user