chore: bump electron 35 [INS-5154] (#8490)

* chore: bump electron 35 [no-ticket]

* fix: build.ts poiting to node 22

* fix: update types

* fix: comment out inso build.ts node version check

* fix: bump npx pkg

* skip flakey tests

* bump timeout

* use glob instead of regex

* fix windows inconsistency

* revert experiemental changes

* fix: revert timeout

---------

Co-authored-by: jackkav <jackkav@gmail.com>
This commit is contained in:
Filipe Freire
2025-03-20 09:53:34 +00:00
committed by GitHub
parent 2e4dc91ed9
commit 3f86211139
10 changed files with 35 additions and 37 deletions

View File

@@ -62,12 +62,13 @@ jobs:
run: sudo sysctl kernel/apparmor_restrict_unprivileged_userns=0
- name: Test critical path on packaged electron app
run: npm run test:package -w packages/insomnia-smoke-test -- --project=Critical
run: npm run test:crit:package
env:
INSOMNIA_UPDATES_URL: http://localhost:4010
- name: Upload smoke test traces
uses: actions/upload-artifact@v4
if: failure()
with:
if-no-files-found: ignore
name: ${{ matrix.os }}-package-critical-test-traces-${{ github.run_number }}

2
.npmrc
View File

@@ -1,5 +1,5 @@
runtime = electron
target = 33.3.1
target = 35.0.2
disturl = https://electronjs.org/headers
playwright_skip_browser_download=true
engine-strict=true

2
.nvmrc
View File

@@ -1 +1 @@
20.18.0
22.14.0

43
package-lock.json generated
View File

@@ -16,7 +16,7 @@
"packages/insomnia-sdk"
],
"dependencies": {
"@getinsomnia/node-libcurl": "^2.33.4",
"@getinsomnia/node-libcurl": "^2.35.0",
"@types/decompress": "^4.2.7",
"decompress": "^4.2.1"
},
@@ -25,7 +25,7 @@
"@types/eslint": "^8.56.7",
"@types/har-format": "^1.2.15",
"@types/mocha": "^10.0.6",
"@types/node": "^20.12.4",
"@types/node": "^22.13.10",
"@typescript-eslint/eslint-plugin": "^7.5.0",
"@typescript-eslint/parser": "^7.5.0",
"esbuild": "^0.24.0",
@@ -45,7 +45,7 @@
"vitest": "^2.0.4"
},
"engines": {
"node": ">=20.18.0 <22",
"node": ">=22.14.0",
"npm": ">=10"
}
},
@@ -1673,9 +1673,9 @@
}
},
"node_modules/@getinsomnia/node-libcurl": {
"version": "2.33.7",
"resolved": "https://registry.npmjs.org/@getinsomnia/node-libcurl/-/node-libcurl-2.33.7.tgz",
"integrity": "sha512-SBT0cUyFqb6vCV0sOGtTfp+hHQI4sNO4fS+omF1GOukV1mt3zTuN0+pSsawjjHOdZ2yqSOVhcC/wfQzgGMD80Q==",
"version": "2.35.0",
"resolved": "https://registry.npmjs.org/@getinsomnia/node-libcurl/-/node-libcurl-2.35.0.tgz",
"integrity": "sha512-mKhU8hnmB2+B0WwQvk7pEKC8JPirf6t2zgr6aZ8nJeBk1DVavOfUONrtNkwClI2A5e1vqtuFJTOuJhifiA0m/Q==",
"hasInstallScript": true,
"license": "MIT",
"dependencies": {
@@ -1688,7 +1688,7 @@
"tslib": "2.0.1"
},
"engines": {
"node": ">= 20.18.0"
"node": ">= 22.14.0"
}
},
"node_modules/@getinsomnia/srp-js": {
@@ -6514,12 +6514,12 @@
}
},
"node_modules/@types/node": {
"version": "20.16.10",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.16.10.tgz",
"integrity": "sha512-vQUKgWTjEIRFCvK6CyriPH3MZYiYlNy0fKiEYHWbcoWLEgs4opurGGKlebrTLqdSMIbXImH6XExNiIyNUv3WpA==",
"version": "22.13.10",
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.10.tgz",
"integrity": "sha512-I6LPUvlRH+O6VRUqYOcMudhaIdUVWfsjnZavnsraHvpBwaEyMN29ry+0UVJhImYL16xsscu0aske3yA+uPOWfw==",
"license": "MIT",
"dependencies": {
"undici-types": "~6.19.2"
"undici-types": "~6.20.0"
}
},
"node_modules/@types/node-forge": {
@@ -7518,9 +7518,6 @@
"swagger2openapi": "^7.0.0",
"xml2js": "^0.5.0",
"yauzl": "^2.10.0"
},
"engines": {
"node": ">=18.7.0 <21.0.0"
}
},
"node_modules/apiconnect-wsdl/node_modules/argparse": {
@@ -10670,15 +10667,15 @@
}
},
"node_modules/electron": {
"version": "33.3.1",
"resolved": "https://registry.npmjs.org/electron/-/electron-33.3.1.tgz",
"integrity": "sha512-Z7l2bVgpdKxHQMI4i0CirBX2n+iCYKOx5mbzNM3BpOyFELwlobEXKmzCmEnwP+3EcNeIhUQyIEBFQxN06QgdIw==",
"version": "35.0.2",
"resolved": "https://registry.npmjs.org/electron/-/electron-35.0.2.tgz",
"integrity": "sha512-jo8S4GfBpVIBDGitUrv+Vo/I/ZEEs6IvWprG2KJlxayYIKpufulbQaxDt78cC/79FwFo8MA0JOIwx/b9r5NRag==",
"dev": true,
"hasInstallScript": true,
"license": "MIT",
"dependencies": {
"@electron/get": "^2.0.0",
"@types/node": "^20.9.0",
"@types/node": "^22.7.7",
"extract-zip": "^2.0.1"
},
"bin": {
@@ -21201,9 +21198,9 @@
}
},
"node_modules/undici-types": {
"version": "6.19.8",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz",
"integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==",
"version": "6.20.0",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz",
"integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==",
"license": "MIT"
},
"node_modules/unique-filename": {
@@ -22790,7 +22787,7 @@
"@bufbuild/protobuf": "^1.8.0",
"@connectrpc/connect": "^1.4.0",
"@connectrpc/connect-node": "^1.4.0",
"@getinsomnia/node-libcurl": "^2.33.7",
"@getinsomnia/node-libcurl": "^2.35.0",
"@grpc/grpc-js": "^1.12.0",
"@grpc/proto-loader": "^0.7.13",
"@seald-io/nedb": "^4.0.4",
@@ -22900,7 +22897,7 @@
"cross-env": "^7.0.3",
"date-fns": "^3.6.0",
"deep-equal": "^1.0.1",
"electron": "33.3.1",
"electron": "35.0.2",
"electron-builder": "24.13.3",
"electron-builder-squirrel-windows": "24.13.3",
"electron-devtools-installer": "^3.2.0",

View File

@@ -11,7 +11,7 @@
},
"homepage": "https://github.com/kong/insomnia#readme",
"engines": {
"node": ">=20.18.0 <22",
"node": ">=22.14.0",
"npm": ">=10"
},
"workspaces": [
@@ -37,6 +37,7 @@
"test:smoke:dev": "npm run test:dev -w insomnia-smoke-test -- --project=Smoke",
"test:smoke:build": "npm run test:build -w insomnia-smoke-test -- --project=Smoke",
"test:smoke:package": "npm run test:package -w insomnia-smoke-test -- --project=Smoke",
"test:crit:package": "npm run test:package -w insomnia-smoke-test -- --project=Critical",
"changelog-image": "esr ./scripts/changelog-image/changelog-image.ts",
"download-all-npm-plugins": "esr ./scripts/download-all-npm-plugins.ts"
},
@@ -45,7 +46,7 @@
"@types/eslint": "^8.56.7",
"@types/har-format": "^1.2.15",
"@types/mocha": "^10.0.6",
"@types/node": "^20.12.4",
"@types/node": "^22.13.10",
"@typescript-eslint/eslint-plugin": "^7.5.0",
"@typescript-eslint/parser": "^7.5.0",
"esbuild": "^0.24.0",
@@ -65,7 +66,7 @@
"vitest": "^2.0.4"
},
"dependencies": {
"@getinsomnia/node-libcurl": "^2.33.4",
"@getinsomnia/node-libcurl": "^2.35.0",
"@types/decompress": "^4.2.7",
"decompress": "^4.2.1"
}

View File

@@ -8,7 +8,7 @@ const config: BuildOptions = {
bundle: true,
platform: 'node',
minify: isProd,
target: 'node20',
target: 'node22',
sourcemap: true,
format: 'cjs',
tsconfig: 'tsconfig.json',

View File

@@ -29,7 +29,7 @@
"build:production": "cross-env NODE_ENV=production esr esbuild.ts",
"start": "ESBUILD_WATCH=true esr esbuild.ts",
"prepackage": "npm run build:production && rm -rf binaries/inso",
"package": "npx -y @yao-pkg/pkg@5.11.5 . --output binaries/inso --targets host",
"package": "npx -y @yao-pkg/pkg@6.3.2 . --output binaries/inso --targets host",
"postpackage": "node src/scripts/verify-pkg.js",
"artifacts": "esr src/scripts/artifacts.ts"
},

View File

@@ -106,7 +106,6 @@ test.describe('Check vault used in environment', async () => {
},
});
// skip the flaky test and fix it later
test('create global private sub environment to store vaults', async ({ page, app }) => {
// import request
const requestColText = await loadFixture('vault-collection.yaml');
@@ -115,7 +114,7 @@ test.describe('Check vault used in environment', async () => {
await page.locator('[data-test-id="import-from-clipboard"]').click();
await page.getByRole('button', { name: 'Scan' }).click();
await page.getByRole('dialog').getByRole('button', { name: 'Import' }).click();
// create global private environment
// create global private environment
await page.getByLabel('Create in project').click();
await page.getByLabel('Create', { exact: true }).getByText('Environment').click();
await page.getByPlaceholder('Enter a name for your Environment').fill('New Global Vault Environment');

View File

@@ -40,7 +40,7 @@
"@bufbuild/protobuf": "^1.8.0",
"@connectrpc/connect": "^1.4.0",
"@connectrpc/connect-node": "^1.4.0",
"@getinsomnia/node-libcurl": "^2.33.7",
"@getinsomnia/node-libcurl": "^2.35.0",
"@grpc/grpc-js": "^1.12.0",
"@grpc/proto-loader": "^0.7.13",
"@seald-io/nedb": "^4.0.4",
@@ -147,7 +147,7 @@
"cross-env": "^7.0.3",
"date-fns": "^3.6.0",
"deep-equal": "^1.0.1",
"electron": "33.3.1",
"electron": "35.0.2",
"electron-builder": "24.13.3",
"electron-builder-squirrel-windows": "24.13.3",
"electron-devtools-installer": "^3.2.0",

View File

@@ -27,8 +27,8 @@ export const start = async () => {
`[build] node: ${childProcess.spawnSync('node', ['--version']).stdout}`.trim()
);
if (process.version.indexOf('v20.') !== 0) {
console.log('[build] Node 20.x.x is required to build');
if (process.version.indexOf('v22.') !== 0) {
console.log('[build] Node 22.x.x is required to build');
process.exit(1);
}