Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix electron builds #2745

Merged
merged 13 commits into from
Dec 30, 2024
18 changes: 15 additions & 3 deletions .github/workflows/_publish-electron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,18 @@ jobs:
timeout_minutes: 20
max_attempts: 3
command: pnpm build:ci
# Update .npmrc file to support electron builder
# https://www.electron.build/#note-for-pnpm
- uses: nodef/[email protected]
with:
path: .npmrc # Path to the .npmrc file
reset: false
entries: |- # Entries to add
node-linker = hoisted
# install node_modules again with new configuration
- run: pnpm i --frozen-lockfile
# Create deploy ready source files for electron
- run: pnpm deploy --filter=altair out/elx-files
- name: Install Snapcraft
uses: samuelmeuli/action-snapcraft@v2
if: startsWith(matrix.os, 'ubuntu')
Expand All @@ -95,7 +107,7 @@ jobs:
uses: paneron/[email protected]
with:
github_token: ${{ secrets.github_token }}
package_root: packages/altair-electron/
package_root: out/elx-files/
skip_build: true
skip_package_manager_install: true
mac_certs: ${{ secrets.mac_certs }}
Expand Down Expand Up @@ -162,7 +174,7 @@ jobs:
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
with:
environment: ${{ inputs.publish && 'production' || '' }}
sourcemaps: packages/altair-electron/dist/
sourcemaps: out/elx-files/dist/
version: ${{ inputs.publish && steps.getversion.outputs.version || '' }}
url_prefix: 'app:///dist'

Expand All @@ -171,4 +183,4 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: electron-builds-${{ matrix.os }}
path: packages/altair-electron/out/**
path: out/elx-files/out/**
2 changes: 1 addition & 1 deletion libs/eslint-config-altair/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"eslint-plugin-no-unsanitized": "^4.0.2",
"eslint-plugin-prettier": "^5.1.3",
"prettier": "^3.2.5",
"typescript": "5.2.2"
"typescript": "catalog:"
},
"license": "MIT",
"main": "index.js",
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "altair",
"name": "@altairgraphql/root",
"description": "The best graphQL client you will ever need",
"version": "8.1.1",
"author": "Samuel Imolorhe <[email protected]> (https://sirmuel.design/)",
Expand All @@ -15,6 +15,7 @@
"@types/prettier": "^3.0.0",
"chalk": "^4.1.0",
"compare-versions": "^6.1.1",
"cross-env": "^7.0.3",
"cwex": "^1.0.4",
"dotenv-cli": "^7.2.1",
"eslint": "8.18.0",
Expand All @@ -37,7 +38,7 @@
"typedoc": "^0.25.13",
"typedoc-plugin-markdown": "^4.0.3",
"typedoc-vitepress-theme": "^1.0.0",
"typescript": "5.2.2",
"typescript": "catalog:",
"web-ext": "^6.5.0",
"wrangler": "^2.0.27"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/altair-api-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"devDependencies": {
"@types/node": "^22.7.4",
"typescript": "5.2.2"
"typescript": "catalog:"
},
"license": "MIT",
"main": "build/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/altair-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"ts-loader": "^9.5.1",
"ts-node": "^10.9.2",
"tsconfig-paths": "^4.2.0",
"typescript": "5.2.2"
"typescript": "catalog:"
},
"license": "UNLICENSED",
"private": true,
Expand Down
6 changes: 3 additions & 3 deletions packages/altair-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
"babel-preset-react": "6.24.1",
"chai": "4.2.0",
"chai-as-promised": "7.1.1",
"electron": "^27.1.0",
"electron": "catalog:",
"eslint": "^8.57.0",
"eslint-config-altair": "workspace:*",
"eslint-config-prettier": "^9.1.0",
Expand All @@ -170,7 +170,7 @@
"ts-jest": "29.0.5",
"ts-mocks": "2.6.1",
"ts-node": "9.1.1",
"typescript": "5.5.4"
"typescript": "catalog:"
},
"homepage": "https://altair-graphql.github.io/altair/",
"license": "MIT",
Expand All @@ -185,7 +185,7 @@
"scripts": {
"analyze": "ng build --stats-json && npx webpack-bundle-analyzer dist/stats.json",
"analyze:prod": "ng build --aot --stats-json && npx webpack-bundle-analyzer dist/stats.json",
"ng:build": "node --max_old_space_size=8000 ./node_modules/@angular/cli/bin/ng build --aot --stats-json --output-hashing=none",
"ng:build": "cross-env NODE_OPTIONS=--max-old-space-size=8192 pnpm ng build --aot --stats-json --output-hashing=none",
"build": "node scripts/build.js",
"lint": "ng lint",
"new:component": "ng g component modules/altair/components/",
Expand Down
2 changes: 1 addition & 1 deletion packages/altair-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"shx": "^0.3.4",
"ts-jest": "^29.1.2",
"ts-node": "9.1.1",
"typescript": "5.2.2",
"typescript": "catalog:",
"typescript-json-schema": "0.50.1",
"undici": "^6.19.1"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/altair-db/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"devDependencies": {
"@types/node": "^22.7.4",
"ts-node": "^10.0.0",
"typescript": "5.2.2"
"typescript": "catalog:"
},
"license": "MIT",
"main": "build/index.js",
Expand Down
4 changes: 2 additions & 2 deletions packages/altair-electron-interop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
},
"devDependencies": {
"@types/node": "^22.7.4",
"electron": "^27.1.0",
"typescript": "5.2.2"
"electron": "catalog:",
"typescript": "catalog:"
},
"license": "MIT",
"main": "build/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/altair-electron-settings-static/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"dts-bundle-generator": "^6.11.0",
"esbuild": "^0.14.43",
"ncp": "2.0.0",
"typescript": "5.2.2"
"typescript": "catalog:"
},
"license": "MIT",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions packages/altair-electron-settings/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@
"@typescript-eslint/parser": "^6.19.0",
"@vitejs/plugin-react": "^4.2.1",
"autoprefixer": "^10.4.17",
"electron": "^27.1.0",
"electron": "catalog:",
"eslint": "^8.56.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.5",
"postcss": "^8.4.33",
"tailwindcss": "^3.4.1",
"typescript": "^5.2.2",
"typescript": "catalog:",
"vite": "^5.2.0"
}
}
2 changes: 1 addition & 1 deletion packages/altair-electron/electron-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ mac:
hardenedRuntime: true
entitlements: resources/entitlements.mac.plist
entitlementsInherit: resources/entitlements.mac.plist
strictVerify: false
strictVerify: true
# gatekeeperAssess: false
dmg:
icon: resources/icon.png
Expand Down
5 changes: 3 additions & 2 deletions packages/altair-electron/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"altair-graphql-core": "workspace:*",
"devtron": "^1.4.0",
"dotenv": "^8.1.0",
"electron": "^33.2.1",
"electron": "catalog:",
"electron-builder": "^23.6.0",
"electron-builder-notarize": "^1.2.0",
"electron-chromedriver": "^14.0.0",
Expand All @@ -57,7 +57,7 @@
"playwright": "^1.18.1",
"spectron": "^15.0.0",
"ts-jest": "29.0.5",
"typescript": "5.2.2",
"typescript": "catalog:",
"webdriverio": "^8.18.2"
},
"funding": {
Expand All @@ -75,6 +75,7 @@
"compile": "tsc && pnpm sentry:sourcemaps:inject",
"dev": "pnpm compile && electron ./dist/",
"bootstrap": "pnpm compile",
"postinstall": "electron-builder install-app-deps",
"test": "pnpm test:unit",
"test:e2e": "([[ -n $RUNNER_OS ]] && [[ $RUNNER_OS != 'Linux' ]]) && exit 0 || playwright test e2e",
"test:e2e:old": "jest -c jest.config.e2e.js --runInBand",
Expand Down
2 changes: 1 addition & 1 deletion packages/altair-electron/src/app/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export class ElectronApp {
/**
* @type Electron.Config
*/
const proxyConfig: Electron.Config = {
const proxyConfig: Electron.ProxyConfig = {
mode: 'direct',
};

Expand Down
2 changes: 1 addition & 1 deletion packages/altair-express-middleware/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"eslint-config-altair": "workspace:*",
"nodemon": "^2.0.2",
"ts-node": "^8.5.4",
"typescript": "5.2.2"
"typescript": "catalog:"
},
"engines": {
"node": ">= 12"
Expand Down
2 changes: 1 addition & 1 deletion packages/altair-fastify-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"fastify": "^5.0.0",
"mercurius": "^11.5.0",
"ts-node": "^9.0.0",
"typescript": "5.2.2"
"typescript": "catalog:"
},
"files": [
"dist",
Expand Down
2 changes: 1 addition & 1 deletion packages/altair-iframe-sandbox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"altair-graphql-core": "workspace:*"
},
"devDependencies": {
"typescript": "5.2.2",
"typescript": "catalog:",
"vite": "^5.2.0"
}
}
2 changes: 1 addition & 1 deletion packages/altair-koa-middleware/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"supertest": "^7.0.0",
"ts-jest": "29.0.5",
"ts-node": "^10.2.1",
"typescript": "5.2.2"
"typescript": "catalog:"
},
"peerDependencies": {
"@koa/router": ">= 11"
Expand Down
2 changes: 1 addition & 1 deletion packages/altair-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"devDependencies": {
"@types/node": "^14.14.41",
"ts-node": "^8.5.4",
"typescript": "5.2.2"
"typescript": "catalog:"
},
"engines": {
"node": ">= 12"
Expand Down
2 changes: 1 addition & 1 deletion packages/altair-static/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"jest": "29.4.1",
"ncp": "2.0.0",
"ts-jest": "29.0.5",
"typescript": "5.2.2"
"typescript": "catalog:"
},
"engines": {
"node": ">= 6.9.1"
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby-plugin-altair-graphql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"@types/express": "^4.17.13",
"@types/node": "^22.7.4",
"express": "^4.19.2",
"typescript": "5.2.2"
"typescript": "catalog:"
},
"funding": {
"type": "opencollective",
Expand Down
2 changes: 1 addition & 1 deletion packages/login-redirect/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"devDependencies": {
"rimraf": "^5.0.5",
"typescript": "5.2.2",
"typescript": "catalog:",
"vite": "^5.2.0"
},
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/transactional/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@types/prismjs": "^1.26.5",
"@types/react": "^18.3.12",
"react-email": "^3.0.1",
"typescript": "5.2.2"
"typescript": "catalog:"
},
"scripts": {
"build": "tsc",
Expand Down
2 changes: 1 addition & 1 deletion plugins/ai/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"eslint": "^8.57.0",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-react-refresh": "^0.4.7",
"typescript": "^5.2.2",
"typescript": "catalog:",
"vite": "^5.3.4"
},
"files": [
Expand Down
Loading
Loading