Skip to content

Commit 4908b85

Browse files
chore: migrate to angular 14
1 parent 9226a8f commit 4908b85

File tree

8 files changed

+1544
-1946
lines changed

8 files changed

+1544
-1946
lines changed

angular.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,9 @@
170170
}
171171
}
172172
},
173-
"defaultProject": "demo-ngx-openlayers",
174173
"cli": {
175-
"defaultCollection": "@angular-eslint/schematics"
174+
"schematicCollections": [
175+
"@angular-eslint/schematics"
176+
]
176177
}
177178
}

package.json

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -15,50 +15,50 @@
1515
},
1616
"private": true,
1717
"dependencies": {
18-
"@angular/animations": "~13.4.0",
19-
"@angular/common": "~13.4.0",
20-
"@angular/compiler": "~13.4.0",
21-
"@angular/core": "~13.4.0",
22-
"@angular/forms": "~13.4.0",
23-
"@angular/platform-browser": "~13.4.0",
24-
"@angular/platform-browser-dynamic": "~13.4.0",
25-
"@angular/router": "~13.4.0",
18+
"@angular/animations": "^14.3.0",
19+
"@angular/common": "^14.3.0",
20+
"@angular/compiler": "^14.3.0",
21+
"@angular/core": "^14.3.0",
22+
"@angular/forms": "^14.3.0",
23+
"@angular/platform-browser": "^14.3.0",
24+
"@angular/platform-browser-dynamic": "^14.3.0",
25+
"@angular/router": "^14.3.0",
2626
"hammerjs": "^2.0.8",
2727
"ol": "~6.3.1",
2828
"rxjs": "~7.5.0",
2929
"tslib": "^2.5.0",
3030
"zone.js": "~0.11.4"
3131
},
3232
"devDependencies": {
33-
"@angular-devkit/build-angular": "~13.3.11",
34-
"@angular-eslint/builder": "13.5.0",
35-
"@angular-eslint/eslint-plugin": "13.5.0",
36-
"@angular-eslint/eslint-plugin-template": "13.5.0",
37-
"@angular-eslint/schematics": "13.5.0",
38-
"@angular-eslint/template-parser": "13.5.0",
39-
"@angular/cli": "~13.3.11",
40-
"@angular/compiler-cli": "~13.4.0",
41-
"@angular/language-service": "~13.4.0",
42-
"@types/jasmine": "~3.8.0",
33+
"@angular-devkit/build-angular": "^14.2.11",
34+
"@angular-eslint/builder": "14.4.0",
35+
"@angular-eslint/eslint-plugin": "14.4.0",
36+
"@angular-eslint/eslint-plugin-template": "14.4.0",
37+
"@angular-eslint/schematics": "14.4.0",
38+
"@angular-eslint/template-parser": "14.4.0",
39+
"@angular/cli": "^14.2.11",
40+
"@angular/compiler-cli": "^14.3.0",
41+
"@angular/language-service": "^14.3.0",
42+
"@types/jasmine": "~4.3.1",
4343
"@types/node": "^12.11.1",
44-
"@typescript-eslint/eslint-plugin": "5.27.1",
45-
"@typescript-eslint/parser": "5.27.1",
46-
"eslint": "^8.17.0",
44+
"@typescript-eslint/eslint-plugin": "^5.36.2",
45+
"@typescript-eslint/parser": "^5.36.2",
46+
"eslint": "^8.23.0",
4747
"eslint-plugin-import": "latest",
4848
"eslint-plugin-jsdoc": "latest",
4949
"eslint-plugin-prefer-arrow": "latest",
50-
"jasmine-core": "~4.0.0",
50+
"jasmine-core": "~4.3.0",
5151
"jasmine-spec-reporter": "~5.0.0",
5252
"karma": "~6.4.1",
5353
"karma-chrome-launcher": "~3.1.0",
54-
"karma-coverage": "~2.1.0",
55-
"karma-jasmine": "~4.0.0",
56-
"karma-jasmine-html-reporter": "~1.7.0",
57-
"ng-packagr": "^13.3.1",
54+
"karma-coverage": "~2.2.0",
55+
"karma-jasmine": "~5.1.0",
56+
"karma-jasmine-html-reporter": "~2.0.0",
57+
"ng-packagr": "^14.2.2",
5858
"prettier": "^2.0.3",
5959
"protractor": "~7.0.0",
6060
"standard-version": "^7.1.0",
6161
"ts-node": "~8.3.0",
62-
"typescript": "~4.6.4"
62+
"typescript": "~4.7.2"
6363
}
64-
}
64+
}

projects/ngx-openlayers/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"postchangelog": "cp projects/ngx-openlayers/CHANGELOG.md dist/ngx-openlayers/CHANGELOG.md"
99
},
1010
"peerDependencies": {
11-
"@angular/common": ">=6.0.0 <=13.x.x",
12-
"@angular/core": ">=6.0.0 <=13.x.x",
11+
"@angular/common": ">=6.0.0 <=14.x.x",
12+
"@angular/core": ">=6.0.0 <=14.x.x",
1313
"ol": "^6.0.0"
1414
}
1515
}

projects/ngx-openlayers/tsconfig.lib.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"compilerOptions": {
44
"outDir": "../../out-tsc/lib",
55
"declarationMap": true,
6-
"target": "es2018",
6+
"target": "es2020",
77
"declaration": true,
88
"inlineSources": true,
99
"types": [],

src/app/examples-list/examples-list.component.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
import { Component, OnInit } from '@angular/core';
2-
import { FormBuilder, FormGroup } from '@angular/forms';
2+
import { FormBuilder, FormControl, FormGroup } from '@angular/forms';
33
import { examplesList } from '../example-list';
44

5+
interface ExamplesListForm {
6+
term: FormControl<string>;
7+
}
58
@Component({
69
selector: 'app-examples-list',
710
template: `
@@ -73,7 +76,7 @@ import { examplesList } from '../example-list';
7376
],
7477
})
7578
export class ExamplesListComponent implements OnInit {
76-
form: FormGroup;
79+
form: FormGroup<ExamplesListForm>;
7780
list = examplesList;
7881

7982
constructor(private fb: FormBuilder) {}

src/app/map-position/map-position.component.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
import { Component, OnInit, ViewChild } from '@angular/core';
2+
import { FormBuilder, FormControl, FormGroup } from '@angular/forms';
23
import { MapComponent, ViewComponent } from 'ngx-openlayers';
3-
import { FormBuilder, FormGroup } from '@angular/forms';
44
import { transform } from 'ol/proj';
55
import Projection from 'ol/proj/Projection';
66

7+
interface MapPositionForm {
8+
x: FormControl<number>;
9+
y: FormControl<number>;
10+
zoom: FormControl<number>;
11+
}
712
@Component({
813
selector: 'app-map-position',
914
template: `
@@ -93,7 +98,7 @@ export class MapPositionComponent implements OnInit {
9398
currentLon = 0;
9499
currentLat = 0;
95100

96-
form: FormGroup;
101+
form: FormGroup<MapPositionForm>;
97102

98103
constructor(private fb: FormBuilder) {}
99104

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"module": "es2020",
1414
"moduleResolution": "node",
1515
"importHelpers": true,
16-
"target": "es2017",
16+
"target": "es2020",
1717
"typeRoots": [
1818
"node_modules/@types"
1919
],

0 commit comments

Comments
 (0)