Skip to content

Commit 5f8e817

Browse files
committed
misc/ Upgrade to Angular 16.1.3 & Electron 2
1 parent 9b22567 commit 5f8e817

15 files changed

+5441
-3750
lines changed

Diff for: .eslintrc.json

+9-2
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,18 @@
2020
"createDefaultProgram": true
2121
},
2222
"extends": [
23-
"plugin:@angular-eslint/ng-cli-compat",
24-
"plugin:@angular-eslint/ng-cli-compat--formatting-add-on",
23+
"plugin:@angular-eslint/recommended",
24+
"eslint:recommended",
25+
"plugin:@typescript-eslint/recommended",
26+
"plugin:@typescript-eslint/recommended-requiring-type-checking",
2527
"plugin:@angular-eslint/template/process-inline-templates"
2628
],
2729
"rules": {
30+
"@typescript-eslint/no-empty-function": 0,
31+
"@typescript-eslint/no-explicit-any": 0,
32+
"@typescript-eslint/no-unsafe-assignment": 0,
33+
"@typescript-eslint/no-unsafe-call": 0,
34+
"@typescript-eslint/no-unsafe-member-access": 0,
2835
"prefer-arrow/prefer-arrow-functions": 0,
2936
"@angular-eslint/directive-selector": 0,
3037
"@angular-eslint/component-selector": [

Diff for: README.md

+7-6
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414

1515
# Introduction
1616

17-
Bootstrap and package your project with Angular 15 and Electron 24 (Typescript + SASS + Hot Reload) for creating Desktop applications.
17+
Bootstrap and package your project with Angular 16 and Electron 25 (Typescript + SASS + Hot Reload) for creating Desktop applications.
1818

1919
Currently runs with:
2020

21-
- Angular v15.2.9
22-
- Electron v24.3.0
21+
- Angular v16.1.3
22+
- Electron v25.2.0
2323

2424
With this sample, you can:
2525

@@ -29,7 +29,7 @@ With this sample, you can:
2929

3030
/!\ Hot reload only pertains to the renderer process. The main electron process is not able to be hot reloaded, only restarted.
3131

32-
/!\ Angular CLI & Electron Builder needs Node 14 or later to work correctly.
32+
/!\ Angular CLI & Electron Builder needs Node 18.10 or later to work correctly.
3333

3434
## Getting Started
3535

@@ -157,8 +157,9 @@ Please refer to [HOW_TO file](./HOW_TO.md)
157157
- Angular 12 & Electron 16 : Branch [angular12](https://github.com/maximegris/angular-electron/tree/angular12)
158158
- Angular 13 & Electron 18 : Branch [angular13](https://github.com/maximegris/angular-electron/tree/angular13)
159159
- Angular 14 & Electron 21 : Branch [angular14](https://github.com/maximegris/angular-electron/tree/angular14)
160-
- Angular 15 & Electron 24 : (main)
161-
160+
- Angular 15 & Electron 24 : Branch [angular15](https://github.com/maximegris/angular-electron/tree/angular15)
161+
- Angular 16 & Electron 25 : (main)
162+
-
162163
[maintained-badge]: https://img.shields.io/badge/maintained-yes-brightgreen
163164
[license-badge]: https://img.shields.io/badge/license-MIT-blue.svg
164165
[license]: https://github.com/maximegris/angular-electron/blob/main/LICENSE.md

Diff for: angular.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
{
22
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
33
"cli": {
4-
"defaultCollection": "@angular-eslint/schematics"
4+
"schematicCollections": [
5+
"@angular-eslint/schematics"
6+
]
57
},
68
"version": 1,
79
"newProjectRoot": "projects",
@@ -183,7 +185,6 @@
183185
}
184186
}
185187
},
186-
"defaultProject": "angular-electron",
187188
"schematics": {
188189
"@angular-eslint/schematics:application": {
189190
"setParserOptionsProject": true

Diff for: app/main.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {app, BrowserWindow, screen} from 'electron';
22
import * as path from 'path';
33
import * as fs from 'fs';
44

5-
let win: BrowserWindow = null;
5+
let win: BrowserWindow | null = null;
66
const args = process.argv.slice(1),
77
serve = args.some(val => val === '--serve');
88

@@ -19,7 +19,7 @@ function createWindow(): BrowserWindow {
1919
webPreferences: {
2020
nodeIntegration: true,
2121
allowRunningInsecureContent: (serve),
22-
contextIsolation: false, // false if you want to run e2e test with Spectron
22+
contextIsolation: false,
2323
},
2424
});
2525

Diff for: app/package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: app/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"name": "Maxime GRIS",
66
"email": "[email protected]"
77
},
8-
"version": "12.0.1",
8+
"version": "13.0.0",
99
"main": "main.js",
1010
"private": true,
1111
"dependencies": {

Diff for: e2e/main.spec.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { BrowserContext, ElectronApplication, Page, _electron as electron } from 'playwright';
22
import { test, expect } from '@playwright/test';
3-
const PATH = require('path');
3+
import * as PATH from 'path';
44

5-
test.describe('Check Home Page', async () => {
5+
test.describe('Check Home Page', () => {
66
let app: ElectronApplication;
77
let firstWindow: Page;
88
let context: BrowserContext;
@@ -48,7 +48,7 @@ test.describe('Check Home Page', async () => {
4848

4949
test('Check title', async () => {
5050
const elem = await firstWindow.$('app-home h1');
51-
const text = await elem.innerText();
51+
const text = elem ? await elem.innerText() : null;
5252
expect(text).toBe('App works !');
5353
});
5454

Diff for: e2e/playwright.config.ts

+1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@ const config = {
1616
},
1717
};
1818

19+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
1920
module.exports = config;

0 commit comments

Comments
 (0)