Skip to content

Commit d265dfa

Browse files
committed
misc/ upgrade to Angular 11
1 parent e0fb539 commit d265dfa

13 files changed

+86
-97
lines changed

.eslintrc.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,14 @@
4242
}
4343
],
4444
"@typescript-eslint/no-empty-function": 0,
45-
"@typescript-eslint/no-var-requires": 0,
4645
"@typescript-eslint/no-explicit-any": 0,
46+
"@typescript-eslint/no-var-requires": 0,
4747
"@typescript-eslint/no-unsafe-call": 0,
4848
"@typescript-eslint/no-unsafe-member-access": 0,
4949
"@typescript-eslint/no-unsafe-assignment": 0,
5050
"@typescript-eslint/no-unsafe-return": 0,
5151
"@typescript-eslint/no-floating-promises": 0,
52+
"@typescript-eslint/semi": "error",
5253
"@angular-eslint/use-injectable-provided-in": "error",
5354
"@angular-eslint/no-attribute-decorator": "error"
5455
}

README.md

+6-5
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ Bootstrap and package your project with Angular 10 and Electron 9 (Typescript +
1515

1616
Currently runs with:
1717

18-
- Angular v10.0.14
19-
- Electron v9.3.0
20-
- Electron Builder v22.8.0
18+
- Angular v11.0.0
19+
- Electron v10.1.5
20+
- Electron Builder v22.9.1
2121

2222
With this sample, you can :
2323

@@ -27,7 +27,7 @@ With this sample, you can :
2727

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

30-
/!\ Angular 10.x CLI needs Node 10.13 or later to work correctly.
30+
/!\ Angular 11.x CLI needs Node 10.13 or later to work correctly.
3131

3232
## Getting Started
3333

@@ -106,7 +106,8 @@ Note: To make it work behind a proxy, you can add this proxy exception in your t
106106
- Angular 7 & Electron 3 : Branch [angular7](https://github.com/maximegris/angular-electron/tree/angular7)
107107
- Angular 8 & Electron 7 : Branch [angular8](https://github.com/maximegris/angular-electron/tree/angular8)
108108
- Angular 9 & Electron 7 : Branch [angular9](https://github.com/maximegris/angular-electron/tree/angular9)
109-
- Angular 10 & Electron 9 : (master)
109+
- Angular 10 & Electron 9 : Branch [angular10](https://github.com/maximegris/angular-electron/tree/angular9)
110+
- Angular 11 & Electron 10 : (master)
110111

111112
[build-badge]: https://travis-ci.org/maximegris/angular-electron.svg?branch=master&style=style=flat-square
112113
[build]: https://travis-ci.org/maximegris/angular-electron

e2e/tsconfig.e2e.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "../tsconfig.base.json",
2+
"extends": "../tsconfig.json",
33
"compilerOptions": {
44
"outDir": "../out-tsc/e2e",
55
"module": "commonjs",

package.json

+33-29
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
22
"name": "angular-electron",
3-
"version": "8.0.6",
4-
"description": "Angular 10 with Electron (Typescript + SASS + Hot Reload)",
3+
"version": "9.0.0",
4+
"description": "Angular 11 with Electron (Typescript + SASS + Hot Reload)",
55
"homepage": "https://github.com/maximegris/angular-electron",
66
"author": {
77
"name": "Maxime GRIS",
88
"email": "[email protected]"
99
},
1010
"keywords": [
1111
"angular",
12-
"angular 10",
12+
"angular 11",
1313
"electron",
1414
"nodejs",
1515
"typescript",
@@ -40,55 +40,59 @@
4040
"version": "conventional-changelog -i CHANGELOG.md -s -r 0 && git add CHANGELOG.md",
4141
"lint": "ng lint"
4242
},
43+
"dependencies": {},
4344
"devDependencies": {
4445
"@angular-builders/custom-webpack": "10.0.1",
45-
"@angular-devkit/build-angular": "0.1001.3",
46-
"@angular-eslint/builder": "0.4.0-beta.2",
47-
"@angular-eslint/eslint-plugin": "0.4.0-beta.2",
48-
"@angular-eslint/eslint-plugin-template": "0.4.0-beta.2",
49-
"@angular-eslint/template-parser": "0.4.0-beta.2",
50-
"@angular/cli": "10.1.3",
51-
"@angular/common": "10.1.3",
52-
"@angular/compiler": "10.1.3",
53-
"@angular/compiler-cli": "10.1.3",
54-
"@angular/core": "10.1.3",
55-
"@angular/forms": "10.1.3",
56-
"@angular/language-service": "10.1.3",
57-
"@angular/platform-browser": "10.1.3",
58-
"@angular/platform-browser-dynamic": "10.1.3",
59-
"@angular/router": "10.1.3",
46+
"@angular-devkit/build-angular": "0.1100.1",
47+
"@angular-eslint/builder": "0.8.0-beta.0",
48+
"@angular-eslint/eslint-plugin": "0.8.0-beta.0",
49+
"@angular-eslint/eslint-plugin-template": "0.8.0-beta.0",
50+
"@angular-eslint/schematics": "0.8.0-beta.0",
51+
"@angular-eslint/template-parser": "0.8.0-beta.0",
52+
"@angular/cli": "11.0.1",
53+
"@angular/common": "11.0.0",
54+
"@angular/compiler": "11.0.0",
55+
"@angular/compiler-cli": "11.0.0",
56+
"@angular/core": "11.0.0",
57+
"@angular/forms": "11.0.0",
58+
"@angular/language-service": "11.0.0",
59+
"@angular/platform-browser": "11.0.0",
60+
"@angular/platform-browser-dynamic": "11.0.0",
61+
"@angular/router": "11.0.0",
6062
"@ngx-translate/core": "13.0.0",
6163
"@ngx-translate/http-loader": "6.0.0",
62-
"@types/jasmine": "3.5.14",
64+
"@types/jasmine": "3.6.0",
6365
"@types/jasminewd2": "2.0.8",
6466
"@types/mocha": "8.0.3",
6567
"@types/node": "12.12.6",
66-
"@typescript-eslint/eslint-plugin": "4.2.0",
67-
"@typescript-eslint/eslint-plugin-tslint": "4.2.0",
68-
"@typescript-eslint/parser": "4.2.0",
68+
"@typescript-eslint/eslint-plugin": "4.3.0",
69+
"@typescript-eslint/eslint-plugin-tslint": "3.10.1",
70+
"@typescript-eslint/parser": "4.3.0",
6971
"chai": "4.2.0",
7072
"conventional-changelog-cli": "2.1.0",
7173
"core-js": "3.6.5",
7274
"cross-env": "7.0.2",
73-
"electron": "10.1.2",
74-
"electron-builder": "22.8.1",
75+
"electron": "10.1.5",
76+
"electron-builder": "22.9.1",
7577
"electron-reload": "1.5.0",
76-
"eslint": "7.10.0",
78+
"eslint": "7.13.0",
7779
"eslint-plugin-import": "2.22.1",
80+
"eslint-plugin-jsdoc": "30.7.6",
81+
"eslint-plugin-prefer-arrow": "1.2.2",
7882
"jasmine-core": "3.6.0",
7983
"jasmine-spec-reporter": "6.0.0",
8084
"karma": "5.2.3",
8185
"karma-coverage-istanbul-reporter": "3.0.3",
8286
"karma-electron": "6.3.1",
83-
"karma-jasmine": "4.0.1",
84-
"karma-jasmine-html-reporter": "1.5.4",
87+
"karma-jasmine": "4.0.0",
88+
"karma-jasmine-html-reporter": "1.5.0",
8589
"mocha": "8.1.3",
8690
"npm-run-all": "4.1.5",
8791
"rxjs": "6.6.3",
8892
"spectron": "12.0.0",
8993
"ts-node": "9.0.0",
90-
"tslib": "2.0.1",
91-
"typescript": "3.9.7",
94+
"tslib": "2.0.3",
95+
"typescript": "4.0.5",
9296
"wait-on": "5.0.1",
9397
"webdriver-manager": "12.1.7",
9498
"zone.js": "0.10.3"

src/app/app-routing.module.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const routes: Routes = [
1919

2020
@NgModule({
2121
imports: [
22-
RouterModule.forRoot(routes),
22+
RouterModule.forRoot(routes, { relativeLinkResolution: 'legacy' }),
2323
HomeRoutingModule,
2424
DetailRoutingModule
2525
],

src/app/app.component.spec.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
import { TestBed, async } from '@angular/core/testing';
1+
import { TestBed, waitForAsync } from '@angular/core/testing';
22
import { RouterTestingModule } from '@angular/router/testing';
33
import { AppComponent } from './app.component';
44
import { TranslateModule } from '@ngx-translate/core';
55
import { ElectronService } from './core/services';
66

77
describe('AppComponent', () => {
8-
beforeEach(async(() => {
8+
beforeEach(waitForAsync(() => {
99
TestBed.configureTestingModule({
1010
declarations: [AppComponent],
1111
providers: [ElectronService],
1212
imports: [RouterTestingModule, TranslateModule.forRoot()]
1313
}).compileComponents();
1414
}));
1515

16-
it('should create the app', async(() => {
16+
it('should create the app', waitForAsync(() => {
1717
const fixture = TestBed.createComponent(AppComponent);
1818
const app = fixture.debugElement.componentInstance;
1919
expect(app).toBeTruthy();

src/app/detail/detail.component.spec.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
1+
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
22

33
import { DetailComponent } from './detail.component';
44
import { TranslateModule } from '@ngx-translate/core';
@@ -9,7 +9,7 @@ describe('DetailComponent', () => {
99
let component: DetailComponent;
1010
let fixture: ComponentFixture<DetailComponent>;
1111

12-
beforeEach(async(() => {
12+
beforeEach(waitForAsync(() => {
1313
TestBed.configureTestingModule({
1414
declarations: [DetailComponent],
1515
imports: [TranslateModule.forRoot(), RouterTestingModule]
@@ -26,7 +26,7 @@ describe('DetailComponent', () => {
2626
expect(component).toBeTruthy();
2727
});
2828

29-
it('should render title in a h1 tag', async(() => {
29+
it('should render title in a h1 tag', waitForAsync(() => {
3030
const compiled = fixture.debugElement.nativeElement;
3131
expect(compiled.querySelector('h1').textContent).toContain(
3232
'PAGES.DETAIL.TITLE'

src/app/home/home.component.spec.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
1+
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
22

33
import { HomeComponent } from './home.component';
44
import { TranslateModule } from '@ngx-translate/core';
@@ -8,7 +8,7 @@ describe('HomeComponent', () => {
88
let component: HomeComponent;
99
let fixture: ComponentFixture<HomeComponent>;
1010

11-
beforeEach(async(() => {
11+
beforeEach(waitForAsync(() => {
1212
TestBed.configureTestingModule({
1313
declarations: [HomeComponent],
1414
imports: [TranslateModule.forRoot(), RouterTestingModule]
@@ -25,7 +25,7 @@ describe('HomeComponent', () => {
2525
expect(component).toBeTruthy();
2626
});
2727

28-
it('should render title in a h1 tag', async(() => {
28+
it('should render title in a h1 tag', waitForAsync(() => {
2929
const compiled = fixture.debugElement.nativeElement;
3030
expect(compiled.querySelector('h1').textContent).toContain(
3131
'PAGES.HOME.TITLE'

src/app/shared/components/page-not-found/page-not-found.component.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
1+
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
22

33
import { PageNotFoundComponent } from './page-not-found.component';
44

55
describe('PageNotFoundComponent', () => {
66
let component: PageNotFoundComponent;
77
let fixture: ComponentFixture<PageNotFoundComponent>;
88

9-
beforeEach(async(() => {
9+
beforeEach(waitForAsync(() => {
1010
TestBed.configureTestingModule({
1111
declarations: [PageNotFoundComponent]
1212
})

src/tsconfig.app.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "../tsconfig.base.json",
2+
"extends": "../tsconfig.json",
33
"compilerOptions": {
44
"outDir": "../out-tsc/app",
55
"module": "es2015",

src/tsconfig.spec.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "../tsconfig.base.json",
2+
"extends": "../tsconfig.json",
33
"compilerOptions": {
44
"outDir": "../out-tsc/spec",
55
"module": "commonjs",

tsconfig.base.json

-32
This file was deleted.

tsconfig.json

+30-15
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,32 @@
1-
/*
2-
This is a "Solution Style" tsconfig.json file, and is used by editors and TypeScript’s language server to improve development experience.
3-
It is not intended to be used to perform a compilation.
4-
5-
To learn more about this file see: https://angular.io/config/solution-tsconfig.
6-
*/
71
{
8-
"files": [],
9-
"references": [
10-
{
11-
"path": "./src/tsconfig.app.json"
12-
},
13-
{
14-
"path": "./src/tsconfig.spec.json"
15-
}
2+
"compileOnSave": false,
3+
"compilerOptions": {
4+
"module": "es2020",
5+
"outDir": "./dist/out-tsc",
6+
"sourceMap": true,
7+
"declaration": false,
8+
"moduleResolution": "node",
9+
"emitDecoratorMetadata": true,
10+
"experimentalDecorators": true,
11+
"target": "es5",
12+
"typeRoots": [
13+
"node_modules/@types"
14+
],
15+
"lib": [
16+
"es2017",
17+
"es2016",
18+
"es2015",
19+
"dom"
20+
]
21+
},
22+
"files": [
23+
"src/main.ts",
24+
"src/polyfills.ts"
25+
],
26+
"include": [
27+
"src/**/*.d.ts"
28+
],
29+
"exclude": [
30+
"node_modules"
1631
]
17-
}
32+
}

0 commit comments

Comments
 (0)