Skip to content

Commit

Permalink
build: update to Angular 16
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Angular 14 is no more supported
  • Loading branch information
jeremy-eychenne committed Dec 16, 2024
1 parent 4f84a25 commit a64e18a
Show file tree
Hide file tree
Showing 14 changed files with 2,333 additions and 1,475 deletions.
13 changes: 9 additions & 4 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
"createDefaultProgram": true
},
"extends": [
"plugin:@angular-eslint/ng-cli-compat",
"plugin:@angular-eslint/ng-cli-compat--formatting-add-on",
"plugin:@angular-eslint/template/process-inline-templates"
"plugin:@angular-eslint/recommended",
"plugin:@angular-eslint/template/process-inline-templates",
"plugin:@typescript-eslint/recommended"
],
"rules": {
"jsdoc/newline-after-description": "off",
Expand Down Expand Up @@ -49,7 +49,12 @@
{
"selector": "objectLiteralProperty",
"leadingUnderscore": "allow",
"format": ["camelCase", "PascalCase", "snake_case", "UPPER_CASE"]
"format": [
"camelCase",
"PascalCase",
"snake_case",
"UPPER_CASE"
]
}
],
"arrow-parens": [
Expand Down
46 changes: 23 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,39 +15,39 @@
},
"private": true,
"dependencies": {
"@angular/animations": "^15.2.10",
"@angular/common": "^15.2.10",
"@angular/compiler": "^15.2.10",
"@angular/core": "^15.2.10",
"@angular/forms": "^15.2.10",
"@angular/platform-browser": "^15.2.10",
"@angular/platform-browser-dynamic": "^15.2.10",
"@angular/router": "^15.2.10",
"@angular/animations": "^16.2.12",
"@angular/common": "^16.2.12",
"@angular/compiler": "^16.2.12",
"@angular/core": "^16.2.12",
"@angular/forms": "^16.2.12",
"@angular/platform-browser": "^16.2.12",
"@angular/platform-browser-dynamic": "^16.2.12",
"@angular/router": "^16.2.12",
"hammerjs": "^2.0.8",
"ol": "~7.5.2",
"rxjs": "~7.5.0",
"tslib": "^2.5.0",
"zone.js": "~0.11.4"
"zone.js": "~0.13.3"
},
"devDependencies": {
"@angular-devkit/build-angular": "^15.2.11",
"@angular-eslint/builder": "15.2.1",
"@angular-eslint/eslint-plugin": "15.2.1",
"@angular-eslint/eslint-plugin-template": "15.2.1",
"@angular-eslint/schematics": "15.2.1",
"@angular-eslint/template-parser": "15.2.1",
"@angular/cli": "^15.2.11",
"@angular/compiler-cli": "^15.2.10",
"@angular/language-service": "^15.2.10",
"@angular-devkit/build-angular": "^16.2.16",
"@angular-eslint/builder": "16.3.1",
"@angular-eslint/eslint-plugin": "16.3.1",
"@angular-eslint/eslint-plugin-template": "16.3.1",
"@angular-eslint/schematics": "16.3.1",
"@angular-eslint/template-parser": "16.3.1",
"@angular/cli": "^16.2.16",
"@angular/compiler-cli": "^16.2.12",
"@angular/language-service": "^16.2.12",
"@types/arcgis-rest-api": "^10.4.5",
"@types/hammerjs": "^2.0.41",
"@types/jasmine": "~5.1.5",
"@types/node": "^12.11.1",
"@types/topojson-specification": "^1.0.2",
"@typescript-eslint/eslint-plugin": "^5.43.0",
"@typescript-eslint/parser": "^5.43.0",
"@typescript-eslint/eslint-plugin": "^5.59.2",
"@typescript-eslint/parser": "^5.59.2",
"commit-and-tag-version": "^11.3.0",
"eslint": "^8.28.0",
"eslint": "^8.39.0",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-jsdoc": "^47.0.2",
"eslint-plugin-prefer-arrow": "latest",
Expand All @@ -59,11 +59,11 @@
"karma-coverage": "~2.2.0",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.1.0",
"ng-packagr": "~15.2.2",
"ng-packagr": "~16.2.3",
"prettier": "^3.4.2",
"protractor": "~7.0.0",
"ts-node": "~8.3.0",
"typescript": "~4.8.4"
"typescript": "~5.1.6"
},
"volta": {
"node": "18.20.5"
Expand Down
4 changes: 2 additions & 2 deletions projects/ngx-openlayers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"release": "commit-and-tag-version -m \"chore(release): version %s\" -t \"\" --prerelease next"
},
"peerDependencies": {
"@angular/common": ">=14.0.0 <=15.x.x",
"@angular/core": ">=14.0.0 <=15.x.x",
"@angular/common": ">=15.0.0 <=16.x.x",
"@angular/core": ">=15.0.0 <=16.x.x",
"ol": "~7.5.2"
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, Input, OnChanges, OnInit, Optional, SimpleChanges } from '@angular/core';
import { Component, Input, OnChanges, OnInit, Optional } from '@angular/core';
import { Coordinate } from 'ol/coordinate';
import { transform } from 'ol/proj';
import { GeometryLinestringComponent } from './geom/geometrylinestring.component';
Expand Down Expand Up @@ -50,7 +50,7 @@ export class CollectionCoordinatesComponent implements OnChanges, OnInit {
this.transformCoordinates();
}

ngOnChanges(changes: SimpleChanges): void {
ngOnChanges(): void {
this.transformCoordinates();
}

Expand Down
4 changes: 2 additions & 2 deletions projects/ngx-openlayers/src/lib/coordinate.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, Input, OnChanges, OnInit, Optional, SimpleChanges } from '@angular/core';
import { Component, Input, OnChanges, OnInit, Optional } from '@angular/core';
import { transform } from 'ol/proj';
import { GeometryCircleComponent } from './geom/geometrycircle.component';
import { GeometryPointComponent } from './geom/geometrypoint.component';
Expand Down Expand Up @@ -46,7 +46,7 @@ export class CoordinateComponent implements OnChanges, OnInit {
this.transformCoordinates();
}

ngOnChanges(changes: SimpleChanges): void {
ngOnChanges(): void {
this.transformCoordinates();
}

Expand Down
4 changes: 2 additions & 2 deletions projects/ngx-openlayers/src/lib/feature.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, Input, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
import { Component, Input, OnChanges, OnDestroy, OnInit } from '@angular/core';
import { Feature } from 'ol';
import { SourceVectorComponent } from './sources/vector.component';

Expand Down Expand Up @@ -27,7 +27,7 @@ export class FeatureComponent implements OnInit, OnDestroy, OnChanges {
this.host.instance.removeFeature(this.instance);
}

ngOnChanges(changes: SimpleChanges): void {
ngOnChanges(): void {
if (this.instance) {
this.instance.setId(this.id);
}
Expand Down
2 changes: 1 addition & 1 deletion projects/ngx-openlayers/src/lib/graticule.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export class GraticuleComponent implements AfterContentInit, OnChanges, OnDestro
@Input()
latLabelPosition: number;

instance: any;
instance: Graticule;
componentType = 'graticule';

constructor(private map: MapComponent) {}
Expand Down
3 changes: 2 additions & 1 deletion projects/ngx-openlayers/src/lib/sources/source.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ import { Directive, Input, OnDestroy } from '@angular/core';

import { Source } from 'ol/source';
import { LayerComponent } from '../layers/layer.component';
import { AttributionLike } from 'ol/source/Source';

@Directive()
export abstract class SourceComponent implements OnDestroy {
@Input()
attributions: any;
attributions: AttributionLike;

public instance: Source;
public componentType = 'source';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import { LayerTileComponent } from '../layers/layertile.component';
import { TileGridWMTSComponent } from '../tilegridwmts.component';
import { SourceComponent } from './source.component';
import { RequestEncoding } from 'ol/source/WMTS';
import { ImageTile } from 'ol';

@Component({
selector: 'aol-source-tilewmts',
Expand All @@ -43,7 +44,7 @@ export class SourceTileWMTSComponent extends SourceComponent implements AfterCon
@Input()
style: string;
@Input()
tileClass?: any;
tileClass?: typeof ImageTile;
@Input()
tilePixelRatio?: number;
@Input()
Expand Down
4 changes: 2 additions & 2 deletions projects/ngx-openlayers/src/lib/tilegrid.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core';
import { Component, Input, OnChanges, OnInit } from '@angular/core';
import { createXYZ } from 'ol/tilegrid';
import TileGrid from 'ol/tilegrid/TileGrid';
import { Extent } from 'ol/extent';
Expand Down Expand Up @@ -33,7 +33,7 @@ export class TileGridComponent implements OnInit, OnChanges {
}
}

ngOnChanges(changes: SimpleChanges): void {
ngOnChanges(): void {
if (!this.resolutions) {
this.instance = createXYZ(this);
} else {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, OnInit } from '@angular/core';
import { Component } from '@angular/core';

@Component({
selector: 'app-display-geojson-source',
Expand Down
2 changes: 1 addition & 1 deletion src/app/swipe/swipe.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export class SwipeComponent implements OnInit {
paddingSize = 16;

@HostListener('window:resize', ['$event'])
onWindowResize(event): void {
onWindowResize(): void {
this.resetSwipeValues();
}

Expand Down
4 changes: 1 addition & 3 deletions src/app/tile-json/tile-json.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,4 @@ import { Component } from '@angular/core';
</aol-map>
`,
})
export class TileJsonComponent {
constructor() {}
}
export class TileJsonComponent {}
Loading

0 comments on commit a64e18a

Please sign in to comment.