Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/neat-rivers-itch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"app-builder-lib": patch
---

chore: updating pnpm and setting minimumReleaseAge to 1 week
20 changes: 6 additions & 14 deletions .github/actions/pnpm/action.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
name: 'pnpm installation'
description: 'Install and audit dependencies via pnpm'
inputs:
version: # id of input
description: 'The pnpm version to use'
required: false
default: 9.4.0
description: 'Enable via corepack and install dependencies'

runs:
using: 'composite'
steps:
- name: Setup pnpm
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
with:
version: ${{ inputs.version }}
- name: Enable Corepack for pnpm
run: corepack enable
shell: bash

- name: Setup node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
Expand All @@ -25,7 +19,5 @@ runs:
shell: bash

## Usage
# - name: install and audit
# uses: ./.github/actions/pnpm
# with:
# version: ${{ env.PNPM_VERSION }}
# - name: corepack and install dependencies
# uses: ./.github/actions/pnpm
13 changes: 4 additions & 9 deletions .github/actions/pretest/action.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,19 @@
name: 'Setup Tests'
description: 'Set up pnpm, node w/ pnpm cache, install and audit deps, compile, and restore electron cache'
description: 'Set up pnpm, node w/ pnpm cache, install deps, compile, and restore electron cache'
inputs:
cache-key:
description: 'The key to the electron cache'
required: true
cache-path:
description: 'The path to the electron cache'
required: true
version:
description: 'The pnpm version to use'
required: false
default: 9.4.0

runs:
using: 'composite'
steps:
- name: Setup pnpm
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
with:
version: ${{ inputs.version }}
- name: Enable Corepack for pnpm
run: corepack enable
shell: bash

- name: Setup python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
Expand Down
22 changes: 18 additions & 4 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ jobs:
# Need to separate from other tests because logic is specific to when TOKEN env vars are set
test-updater:
runs-on: ubuntu-22.04
timeout-minutes: 30
timeout-minutes: 20
needs: [check-if-docker-build, run-docker-build]
# Wonky if-conditional to allow this step to run AFTER docker images are rebuilt OR if the build stage skipped and we want to use dockerhub registry for images
if: |
Expand Down Expand Up @@ -160,13 +160,27 @@ jobs:
FORCE_COLOR: 1
TEST_RUNNER_IMAGE_TAG: electronuserland/builder:${{ env.TEST_IMAGE_NODE_MAJOR_VERSION }}-wine-mono

- name: Test Linux Updater
run: |
sh test/src/updater/test-specific-platforms.sh
# must be it's own build node due to docker library/images size limit on github hosted runners
test-e2e:
runs-on: ubuntu-22.04
timeout-minutes: 30
steps:
- name: Checkout code repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

- name: Setup Tests
uses: ./.github/actions/pretest
with:
cache-path: ~/.cache/electron
cache-key: v-23.3.10-update-electron

- name: Verify Docs Generation
run: pnpm generate-all

- name: e2e Linux Updater tests (install, auto-update, uninstall)
run: |
sh test/src/updater/test-specific-platforms.sh

test-windows:
runs-on: windows-2022
timeout-minutes: 20
Expand Down
13 changes: 8 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,17 @@ This repository has a mono-repo structure consisting of multiple packages. Try t

## Prerequisites

> All prerequisites could be installed via script at the end of the chapter
- [pnpm](https://pnpm.js.org) is required.

- [pnpm](https://pnpm.js.org) is required because NPM is not reliable and Yarn 2 is not as good as PNPM.
Use `corepack` to activate the correct version of pnpm for this project.

Currently we use the following version of PNPM in the Github CI's action config, please use the same version to ensure that lockfiles are compatible.
https://github.com/electron-userland/electron-builder/blob/master/.github/actions/pnpm/action.yml
For local development:
### New dev route
https://pnpm.io/cli/link

- For local development, you can use [yalc](https://github.com/whitecolor/yalc) in order to apply changes made to
### Legacy dev Route

You can use [yalc](https://github.com/whitecolor/yalc) in order to apply changes made to
electron-builder for your other projects to leverage and test with.

```
Expand Down
2 changes: 1 addition & 1 deletion docker/node/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ RUN curl -L https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64
unlink /usr/local/CHANGELOG.md && unlink /usr/local/LICENSE && unlink /usr/local/README.md && \
# https://github.com/npm/npm/issues/4531
echo "unsafe-perm true" > .npmrc
RUN npm i -g pnpm@9.4.0
RUN npm i -g pnpm@10.18.0
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@
"@babel/plugin-transform-modules-commonjs": "7.24.8",
"@changesets/changelog-github": "0.4.7",
"@changesets/cli": "2.29.7",
"@eslint/eslintrc": "^3.3.1",
"@eslint/js": "^9.37.0",
"@stylistic/eslint-plugin": "^2.8.0",
"@types/node": "^22.7.4",
"@typescript-eslint/eslint-plugin": "8.17.0",
Expand All @@ -74,9 +76,9 @@
},
"engines": {
"node": ">=14.14",
"pnpm": ">=9"
"pnpm": ">=10"
},
"packageManager": "pnpm@9.4.0",
"packageManager": "pnpm@10.18.0+sha512.e804f889f1cecc40d572db084eec3e4881739f8dec69c0ff10d2d1beff9a4e309383ba27b5b750059d7f4c149535b6cd0d2cb1ed3aeb739239a4284a68f40cfa",
"pnpm": {
"patchedDependencies": {
"@changesets/[email protected]": "patches/@[email protected]",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,13 @@ export function detectPackageManagerByLockfile(cwd: string): PM | null {
}

export function detectYarnBerry() {
// yarn --version
const version = execSync("yarn --version").toString().trim()
if (parseInt(version.split(".")[0]) > 1) return PM.YARN_BERRY
try {
const version = execSync("yarn --version").toString().trim()
if (parseInt(version.split(".")[0]) > 1) {
return PM.YARN_BERRY
}
} catch (_e) {
// If `yarn` is not found or another error occurs, fallback to the regular Yarn
}
return PM.YARN
}
60 changes: 36 additions & 24 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading