From be3c804b8da40403282f4ce6a2e0427f39961256 Mon Sep 17 00:00:00 2001 From: Michael Novotny Date: Wed, 13 Apr 2022 19:04:41 -0500 Subject: [PATCH] Fixes scripts in Electron examples. (#36133) There were a few issues with the scripts in the Electron examples: * `dist` and `pack-app` would fail without a `name` and `version` in `package.json`. * `type-check` didn't work because there isn't a `tsconfig.json` at the root. It needs to look in the `electron-src` and `renderer` folders respectively. `electron-builder` also needed to be updated in order to run on macOS 12.3+ (see https://github.com/electron-userland/electron-builder/issues/6606). ## Documentation / Examples - [x] Make sure the linting passes by running `yarn lint` Co-authored-by: Lee Robinson <9113740+leerob@users.noreply.github.com> --- examples/with-electron-typescript/package.json | 4 ++-- examples/with-electron/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/with-electron-typescript/package.json b/examples/with-electron-typescript/package.json index 9b9f0613648b..a99378a514e9 100644 --- a/examples/with-electron-typescript/package.json +++ b/examples/with-electron-typescript/package.json @@ -10,7 +10,7 @@ "build": "npm run build-renderer && npm run build-electron", "pack-app": "npm run build && electron-builder --dir", "dist": "npm run build && electron-builder", - "type-check": "tsc" + "type-check": "tsc -p ./renderer/tsconfig.json && tsc -p ./electron-src/tsconfig.json" }, "dependencies": { "electron-is-dev": "^1.1.0", @@ -23,7 +23,7 @@ "@types/react": "^16.9.9", "@types/react-dom": "^16.9.9", "electron": "^13", - "electron-builder": "^22.9.1", + "electron-builder": "^23.0.3", "next": "latest", "rimraf": "^3.0.0", "typescript": "^4.0.5" diff --git a/examples/with-electron/package.json b/examples/with-electron/package.json index e38d7e6f46a2..0a1f7b496821 100644 --- a/examples/with-electron/package.json +++ b/examples/with-electron/package.json @@ -18,7 +18,7 @@ }, "devDependencies": { "electron": "^12.0.2", - "electron-builder": "^22.10.5", + "electron-builder": "^23.0.3", "next": "latest", "react": "^17.0.2", "react-dom": "^17.0.2"