Skip to content

Commit

Permalink
Bump dependencies to latest
Browse files Browse the repository at this point in the history
Key changes:

- Upgrade npm dependencies to their latest
- Upgrade python dependencies to their latest
- Upgrade Node to 22 as 20 is end-of-life since October 2024

Other supporting changes:

- Refactor `assert` with `with` (see nodejs/node#51622)
- Centralize python setup via custom action for consistency
- Specify bash shell for correct argument handling on Windows using
  latest npm (npm/cli#6041)
  • Loading branch information
undergroundwires committed Dec 4, 2024
1 parent 5155f93 commit 2f8aaf4
Show file tree
Hide file tree
Showing 16 changed files with 5,079 additions and 3,594 deletions.
7 changes: 6 additions & 1 deletion .github/actions/npm-install-dependencies/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ runs:
using: composite
steps:
-
name: Run `npm ci` with retries
name: Update Browserslist DB
shell: bash
run: npx update-browserslist-db@latest
working-directory: ${{ inputs.working-directory }}
-
name: Run `npm ci` with retries
shell: bash # Required for correct argument passing (--)
run: npm run install-deps -- --ci
working-directory: ${{ inputs.working-directory }}
2 changes: 1 addition & 1 deletion .github/actions/setup-node/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ runs:
name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20.x
node-version: 22.x
# check-latest: true # Newest versions can potentially have undiscovered bugs or regressions
8 changes: 8 additions & 0 deletions .github/actions/setup-python/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
runs:
using: composite
steps:
-
name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
6 changes: 6 additions & 0 deletions .github/workflows/checks.build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@ jobs:
uses: ./.github/actions/npm-install-dependencies
-
name: Build web
shell: bash # Required for correct argument passing (--)
run: npm run build -- --mode ${{ matrix.mode }}
-
name: Verify web build artifacts
shell: bash # Required for correct argument passing (--)
run: npm run check:verify-build-artifacts -- --web

build-desktop:
Expand All @@ -58,15 +60,19 @@ jobs:
uses: ./.github/actions/npm-install-dependencies
-
name: Prebuild desktop
shell: bash # Required for correct argument passing (--)
run: npm run electron:prebuild -- --mode ${{ matrix.mode }}
-
name: Verify unbundled desktop build artifacts
shell: bash # Required for correct argument passing (--)
run: npm run check:verify-build-artifacts -- --electron-unbundled
-
name: Build (bundle and package) desktop application
shell: bash # Required for correct argument passing (--)
run: npm run electron:build -- --publish never
-
name: Verify bundled desktop build artifacts
shell: bash # Required for correct argument passing (--)
run: npm run check:verify-build-artifacts -- --electron-bundled

build-docker:
Expand Down
12 changes: 4 additions & 8 deletions .github/workflows/checks.quality.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,8 @@ jobs:
name: Setup node
uses: ./.github/actions/setup-node
-
name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
name: Setup node
uses: ./.github/actions/setup-python
-
name: Install dependencies
run: |
Expand All @@ -90,10 +88,8 @@ jobs:
name: Setup node
uses: ./.github/actions/setup-node
-
name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
name: Setup node
uses: ./.github/actions/setup-python
-
name: Install dependencies
run: python3 -m pip install -r ./scripts/validate-collections-yaml/requirements.txt
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/checks.scripts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ jobs:
uses: ./.github/actions/npm-install-dependencies
-
name: Run install-deps
shell: bash # Required for correct argument passing (--)
run: ${{ matrix.install-command }}

configure-vscode:
Expand All @@ -74,10 +75,8 @@ jobs:
name: Checkout
uses: actions/checkout@v4
-
name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
name: Setup node
uses: ./.github/actions/setup-python
-
name: Install VSCode
run: ${{ matrix.os.install-vscode-command }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.desktop.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:
-
name: Build and publish
run: npm run electron:build -- --publish always
shell: bash # Required for correct argument passing (--)
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
EP_GH_IGNORE_TIME: true # Otherwise publishing fails if GitHub release is more than 2 hours old https://github.com/electron-userland/electron-builder/issues/2074
1 change: 1 addition & 0 deletions .github/workflows/release.site.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ jobs:
-
name: "App: Verify web build artifacts"
run: npm run check:verify-build-artifacts -- --web
shell: bash # Required for correct argument passing (--)
working-directory: app
-
name: "App: Deploy to S3"
Expand Down
2 changes: 1 addition & 1 deletion cypress.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { defineConfig } from 'cypress';
import ViteConfig from './vite.config';
import cypressDirs from './cypress-dirs.json' assert { type: 'json' };
import cypressDirs from './cypress-dirs.json' with { type: 'json' };

export default defineConfig({
fixturesFolder: `${cypressDirs.base}/fixtures`,
Expand Down
2 changes: 1 addition & 1 deletion electron.vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { mergeConfig, type UserConfig } from 'vite';
import { defineConfig, externalizeDepsPlugin } from 'electron-vite';
import { getAliases, getClientEnvironmentVariables } from './vite-config-helper';
import { createVueConfig } from './vite.config';
import distDirs from './dist-dirs.json' assert { type: 'json' };
import distDirs from './dist-dirs.json' with { type: 'json' };

const MAIN_ENTRY_FILE = resolvePathFromProjectRoot('src/presentation/electron/main/index.ts');
const PRELOAD_ENTRY_FILE = resolvePathFromProjectRoot('src/presentation/electron/preload/index.ts');
Expand Down
Loading

0 comments on commit 2f8aaf4

Please sign in to comment.