feat: bumped up to node 24 and electron 40 (#15119)

Signed-off-by: Evzen Gasta <evzen.ml@seznam.cz>
This commit is contained in:
Evžen Gasta 2025-12-23 10:32:13 +01:00 committed by GitHub
parent 0d6bff1677
commit 2b83c13578
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 232 additions and 223 deletions

View file

@ -1,4 +1,4 @@
{
"chrome": "98",
"node": "22"
"node": "24"
}

View file

@ -57,7 +57,7 @@ jobs:
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version: 22
node-version: 24
cache: 'pnpm'
- name: Execute pnpm

View file

@ -42,7 +42,7 @@ jobs:
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version: 22
node-version: 24
cache: 'pnpm'
- name: Execute pnpm

View file

@ -129,7 +129,7 @@ jobs:
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version: 22
node-version: 24
cache: 'pnpm'
- name: Execute pnpm

View file

@ -89,7 +89,7 @@ jobs:
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version: 22
node-version: 24
cache: 'pnpm'
- name: Execute pnpm

View file

@ -121,7 +121,7 @@ jobs:
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version: 22
node-version: 24
cache: 'pnpm'
- name: Execute pnpm
@ -205,7 +205,7 @@ jobs:
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version: 22
node-version: 24
cache: 'pnpm'
- name: Execute pnpm
@ -317,7 +317,7 @@ jobs:
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version: 22
node-version: 24
cache: 'pnpm'
- name: Execute pnpm

View file

@ -110,7 +110,7 @@ jobs:
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version: 22
node-version: 24
cache: 'pnpm'
- uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0

View file

@ -47,7 +47,7 @@ jobs:
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version: 22
node-version: 24
cache: 'pnpm'
- name: Execute pnpm
@ -97,7 +97,7 @@ jobs:
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version: 22
node-version: 24
cache: 'pnpm'
- name: Execute pnpm
@ -146,7 +146,7 @@ jobs:
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version: 22
node-version: 24
cache: 'pnpm'
- name: Execute pnpm
@ -185,7 +185,7 @@ jobs:
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version: 22
node-version: 24
cache: 'pnpm'
- name: Execute pnpm
@ -222,7 +222,7 @@ jobs:
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version: 22
node-version: 24
cache: 'pnpm'
- name: Execute pnpm
@ -256,7 +256,7 @@ jobs:
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version: 22
node-version: 24
cache: 'pnpm'
- name: Execute pnpm
@ -283,7 +283,7 @@ jobs:
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version: 22
node-version: 24
cache: 'pnpm'
- name: Execute pnpm
@ -332,7 +332,7 @@ jobs:
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version: 22
node-version: 24
cache: 'pnpm'
- name: Execute pnpm
@ -388,7 +388,7 @@ jobs:
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version: 22
node-version: 24
cache: 'pnpm'
- name: Execute pnpm
@ -445,7 +445,7 @@ jobs:
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version: 22
node-version: 24
cache: 'pnpm'
- name: Execute pnpm
@ -521,7 +521,7 @@ jobs:
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version: 22
node-version: 24
cache: 'pnpm'
- name: Execute pnpm
@ -599,7 +599,7 @@ jobs:
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version: 22
node-version: 24
cache: 'pnpm'
- name: Execute pnpm

View file

@ -157,7 +157,7 @@ jobs:
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version: 22
node-version: 24
cache: 'pnpm'
- uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
@ -242,7 +242,7 @@ jobs:
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0
- name: create the pnpm store from the dependencies
run: |
podman run --platform linux/${{ matrix.arch }} -v $(pwd):/project --rm -it --entrypoint=sh node:22 -c "cd /project && npm install -g corepack@latest && corepack enable pnpm && COREPACK_ENABLE_DOWNLOAD_PROMPT=0 pnpm install --frozen-lockfile --store-dir pnpm-store"
podman run --platform linux/${{ matrix.arch }} -v $(pwd):/project --rm -it --entrypoint=sh node:24 -c "cd /project && npm install -g corepack@latest && corepack enable pnpm && COREPACK_ENABLE_DOWNLOAD_PROMPT=0 pnpm install --frozen-lockfile --store-dir pnpm-store"
# now the store is in the pnpm-store directory
# create a tarball of the store
echo "Creating the archive store-cache-pnpm-${{ matrix.arch }}.tgz"

View file

@ -47,7 +47,7 @@ jobs:
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version: 22
node-version: 24
- name: Compare version numbers using semver
id: compare_version_numbers

View file

@ -55,7 +55,7 @@ jobs:
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version: 22
node-version: 24
cache: 'pnpm'
- name: Execute pnpm

2
.nvmrc
View file

@ -1 +1 @@
22
24

View file

@ -71,7 +71,7 @@ You can develop on either: `Windows`, `macOS` or `Linux`.
Requirements:
- [Node.js 22+](https://nodejs.org/en/)
- [Node.js 24+](https://nodejs.org/en/)
- [pnpm v10.x](https://pnpm.io/installation) (`corepack enable pnpm`)
Optional Linux requirements:

View file

@ -48,7 +48,6 @@ function createMockDirent(overrides: Partial<Dirent>): Dirent {
isFile: (): boolean => false,
isSymbolicLink: (): boolean => false,
name: '',
path: '',
parentPath: '',
...overrides,
};
@ -61,7 +60,6 @@ describe('CertificateDetectionService', () => {
const mockDirent = createMockDirent({
name: registryName,
isDirectory: (): boolean => true,
path: registryName,
parentPath: '/etc/containers/certs.d',
});
@ -143,13 +141,11 @@ describe('CertificateDetectionService', () => {
const mockDirent = createMockDirent({
name: 'registry.example.com',
isDirectory: (): boolean => true,
path: 'registry.example.com',
parentPath: '/etc/containers/certs.d',
});
const mockCertFile = createMockDirent({
name: 'ca.crt',
isFile: (): boolean => true,
path: 'ca.crt',
parentPath: '/etc/containers/certs.d/registry.example.com',
});
@ -191,13 +187,11 @@ describe('CertificateDetectionService', () => {
const mockDirent = createMockDirent({
name: 'localhost:5000',
isDirectory: (): boolean => true,
path: 'localhost:5000',
parentPath: '/home/user/.config/containers/certs.d',
});
const mockCertFile = createMockDirent({
name: 'server.cert',
isFile: (): boolean => true,
path: 'server.cert',
parentPath: '/home/user/.config/containers/certs.d/localhost:5000',
});
@ -404,19 +398,16 @@ describe('CertificateDetectionService', () => {
createMockDirent({
name: 'ca.crt',
isFile: (): boolean => true,
path: 'ca.crt',
parentPath: '/etc/containers/certs.d/registry.example.com',
}),
createMockDirent({
name: 'server.cert',
isFile: (): boolean => true,
path: 'server.cert',
parentPath: '/etc/containers/certs.d/registry.example.com',
}),
createMockDirent({
name: 'client.key',
isFile: (): boolean => true,
path: 'client.key',
parentPath: '/etc/containers/certs.d/registry.example.com',
}),
];
@ -433,19 +424,16 @@ describe('CertificateDetectionService', () => {
createMockDirent({
name: 'ca.crt',
isFile: (): boolean => true,
path: 'ca.crt',
parentPath: '/etc/containers/certs.d/registry.example.com',
}),
createMockDirent({
name: 'excluded.pem',
isFile: (): boolean => true,
path: 'excluded.pem',
parentPath: '/etc/containers/certs.d/registry.example.com',
}),
createMockDirent({
name: 'excluded.cer',
isFile: (): boolean => true,
path: 'excluded.cer',
parentPath: '/etc/containers/certs.d/registry.example.com',
}),
];
@ -462,13 +450,11 @@ describe('CertificateDetectionService', () => {
createMockDirent({
name: 'ca.crt',
isFile: (): boolean => true,
path: 'ca.crt',
parentPath: '/etc/containers/certs.d',
}),
createMockDirent({
name: 'registry.example.com',
isDirectory: (): boolean => true,
path: 'registry.example.com',
parentPath: '/etc/containers/certs.d',
}),
];
@ -497,19 +483,16 @@ describe('CertificateDetectionService', () => {
createMockDirent({
name: 'registry.example.com',
isDirectory: (): boolean => true,
path: 'registry.example.com',
parentPath: '/etc/containers/certs.d',
}),
createMockDirent({
name: 'localhost',
isDirectory: (): boolean => true,
path: 'localhost',
parentPath: '/etc/containers/certs.d',
}),
createMockDirent({
name: 'example.com',
isDirectory: (): boolean => true,
path: 'example.com',
parentPath: '/etc/containers/certs.d',
}),
];
@ -535,13 +518,11 @@ describe('CertificateDetectionService', () => {
createMockDirent({
name: 'registry.example.com:5000',
isDirectory: (): boolean => true,
path: 'registry.example.com:5000',
parentPath: '/etc/containers/certs.d',
}),
createMockDirent({
name: 'localhost:8080',
isDirectory: (): boolean => true,
path: 'localhost:8080',
parentPath: '/etc/containers/certs.d',
}),
];
@ -566,19 +547,16 @@ describe('CertificateDetectionService', () => {
createMockDirent({
name: '.hidden',
isDirectory: (): boolean => true,
path: '.hidden',
parentPath: '/etc/containers/certs.d',
}),
createMockDirent({
name: '-invalid',
isDirectory: (): boolean => true,
path: '-invalid',
parentPath: '/etc/containers/certs.d',
}),
createMockDirent({
name: 'invalid_name',
isDirectory: (): boolean => true,
path: 'invalid_name',
parentPath: '/etc/containers/certs.d',
}),
];
@ -605,13 +583,11 @@ describe('CertificateDetectionService', () => {
name: 'registry.example.com',
isDirectory: (): boolean => true,
isSymbolicLink: (): boolean => true,
path: 'registry.example.com',
parentPath: '/etc/containers/certs.d',
}),
createMockDirent({
name: 'localhost',
isDirectory: (): boolean => true,
path: 'localhost',
parentPath: '/etc/containers/certs.d',
}),
];
@ -640,13 +616,11 @@ describe('CertificateDetectionService', () => {
const mockDirent = createMockDirent({
name: 'registry.example.com',
isDirectory: (): boolean => true,
path: 'registry.example.com',
parentPath: '/etc/containers/certs.d',
});
const mockSymlinkFile = createMockDirent({
name: 'symlink.crt',
isSymbolicLink: (): boolean => true,
path: 'symlink.crt',
parentPath: '/etc/containers/certs.d/registry.example.com',
});
@ -673,7 +647,6 @@ describe('CertificateDetectionService', () => {
const mockDirent = createMockDirent({
name: 'registry.example.com',
isDirectory: (): boolean => true,
path: 'registry.example.com',
parentPath: '/etc/containers/certs.d',
});
@ -701,20 +674,17 @@ describe('CertificateDetectionService', () => {
createMockDirent({
name: 'registry.example.com',
isDirectory: (): boolean => true,
path: 'registry.example.com',
parentPath: '/etc/containers/certs.d',
}),
createMockDirent({
name: 'localhost',
isDirectory: (): boolean => true,
path: 'localhost',
parentPath: '/etc/containers/certs.d',
}),
];
const mockCertFile = createMockDirent({
name: 'ca.crt',
isFile: (): boolean => true,
path: 'ca.crt',
parentPath: '/etc/containers/certs.d/localhost',
});
@ -757,7 +727,6 @@ describe('CertificateDetectionService', () => {
const mockDirent = createMockDirent({
name: 'registry.example.com',
isDirectory: (): boolean => true,
path: 'registry.example.com',
parentPath: '/etc/containers/certs.d',
});
@ -790,13 +759,11 @@ describe('CertificateDetectionService', () => {
createMockDirent({
name: 'registry1.example.com',
isDirectory: (): boolean => true,
path: 'registry1.example.com',
parentPath: '/etc/containers/certs.d',
}),
createMockDirent({
name: 'registry2.example.com',
isDirectory: (): boolean => true,
path: 'registry2.example.com',
parentPath: '/etc/containers/certs.d',
}),
];

View file

@ -706,7 +706,7 @@ test.each([
{ architecture: 'x64', expectedProvider: VMTYPE.APPLEHV },
])('verify create on mac from settings on %s', async ({ architecture, expectedProvider }) => {
vi.mocked(extensionApi.env).isMac = true;
vi.mocked(arch).mockReturnValue(architecture);
vi.mocked(arch).mockReturnValue(architecture as NodeJS.Architecture);
vi.mocked(PODMAN_BINARY_MOCK.getBinaryInfo).mockResolvedValue({
version: '5.4.0',
});
@ -748,7 +748,7 @@ test.each([
{ architecture: 'x64', expectedProvider: VMTYPE.APPLEHV },
])('verify create on mac from dashboard on %s', async ({ architecture, expectedProvider }) => {
vi.mocked(extensionApi.env).isMac = true;
vi.mocked(arch).mockReturnValue(architecture);
vi.mocked(arch).mockReturnValue(architecture as NodeJS.Architecture);
vi.mocked(PODMAN_BINARY_MOCK.getBinaryInfo).mockResolvedValue({
version: '5.4.0',
});
@ -2648,7 +2648,7 @@ describe('isPlaybookMachineInitSupported', () => {
});
test('isPlaybookMachineInitSupported should return true with 5.4.0 version on Windows/amd', async () => {
vi.mocked(arch).mockReturnValue('amd64');
vi.mocked(arch).mockReturnValue('amd64' as NodeJS.Architecture);
vi.mocked(extensionApi.env).isWindows = true;
const enabled = extension.isPlaybookMachineInitSupported('5.4.0');
expect(enabled).toBeTruthy();

View file

@ -8,7 +8,7 @@
"type": "module",
"private": true,
"engines": {
"node": ">=22.0.0",
"node": ">=24.0.0",
"npm": ">=10.2.3"
},
"main": "packages/main/dist/index.cjs",
@ -149,7 +149,7 @@
"@types/getos": "^3.0.4",
"@types/hosted-git-info": "^3.0.5",
"@types/js-yaml": "^4.0.9",
"@types/node": "^22",
"@types/node": "^24",
"@types/minimist": "^1.2.5",
"@types/tar": "^6.1.13",
"@types/tar-fs": "^2.0.4",
@ -160,7 +160,7 @@
"@vitest/eslint-plugin": "^1.6.1",
"cross-env": "10.1.0",
"dts-for-context-bridge": "0.7.1",
"electron": "39.2.7",
"electron": "40.0.0-beta.4",
"electron-builder": "26.0.12",
"electron-builder-notarize": "^1.5.2",
"eslint": "^9.39.2",

View file

@ -6,7 +6,7 @@
"private": true,
"devDependencies": {
"@podman-desktop/webview-api": "workspace:*",
"electron": "39.2.7",
"electron": "40.0.0-beta.4",
"vitest": "^4.0.10"
}
}

File diff suppressed because it is too large Load diff

View file

@ -23,8 +23,8 @@
},
"devDependencies": {
"@playwright/test": "1.57.0",
"@types/node": "^22",
"electron": "39.2.7",
"@types/node": "^24",
"electron": "40.0.0-beta.4",
"typescript": "^5.9.3",
"unplugin-dts": "1.0.0-beta.6",
"vitest": "^4.0.10"