Skip to content

Commit

Permalink
chore: update to Angular 13 and TypeScript 4.4
Browse files Browse the repository at this point in the history
  • Loading branch information
xidedix committed Dec 3, 2021
1 parent 70a74c6 commit ac36cc6
Show file tree
Hide file tree
Showing 44 changed files with 143 additions and 132 deletions.
5 changes: 3 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Editor configuration, see https://editorconfig.org

root = true

[*]
Expand All @@ -10,7 +9,9 @@ indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.ts]
quote_type = single

[*.md]
max_line_length = off
trim_trailing_whitespace = false

4 changes: 2 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@
"error",
{
"type": "attribute",
"prefix": "app",
"prefix": "c",
"style": "camelCase"
}
],
"@angular-eslint/component-selector": [
"error",
{
"type": "element",
"prefix": "app",
"prefix": "c",
"style": "kebab-case"
}
],
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/daily-project-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

strategy:
matrix:
node-version: [14.x]
node-version: [16.x]
os: [ubuntu-latest, windows-latest, macOS-latest]

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/project-chartjs-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

strategy:
matrix:
node-version: [14.x]
node-version: [16.x]
os: [ubuntu-latest, windows-latest, macOS-latest]

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/project-lib-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

strategy:
matrix:
node-version: [14.x]
node-version: [16.x]
os: [ubuntu-latest, windows-latest, macOS-latest]

steps:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ speed-measure-plugin*.json
.history/*

# misc
/.angular/cache
/.sass-cache
/connect.lock
/coverage
Expand Down
12 changes: 0 additions & 12 deletions .prettierrc

This file was deleted.

2 changes: 1 addition & 1 deletion CLI.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# @coreui/angular v4

This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 12.2.0.
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 13.0.4.

## Development server

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
Before you begin, make sure your development environment includes `Node.js®` and `npm` package manager.

###### Node.js
Angular 12 requires `Node.js` version `^12.20` or `^14`.
[**Angular 13**](https://angular.io/guide/what-is-angular) requires `Node.js` LTS version `^12.20`, `^14` or `^16`.

- To check your version, run `node -v` in a terminal/console window.
- To get `Node.js`, go to [nodejs.org](https://nodejs.org/).
Expand Down Expand Up @@ -91,7 +91,7 @@ npm install bootstrap

[![npm-coreui-angular-next][npm-coreui-angular-badge-next]][npm-coreui-angular]
[![NPM downloads][npm-coreui-angular-download]][npm-coreui-angular]
![angular](https://img.shields.io/badge/angular-^12.2.0-lightgrey.svg?style=flat-square&logo=angular)
![angular](https://img.shields.io/badge/angular-^13.0.0-lightgrey.svg?style=flat-square&logo=angular)

[npm-coreui-angular-badge-next]: https://img.shields.io/npm/v/@coreui/angular/next?style=flat-square&color=red
[npm-coreui-angular]: https://www.npmjs.com/package/@coreui/angular
Expand Down
73 changes: 36 additions & 37 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,50 +26,49 @@
},
"private": true,
"dependencies": {
"@angular/animations": "~12.2.13",
"@angular/cdk": "~12.2.13",
"@angular/common": "~12.2.13",
"@angular/compiler": "~12.2.13",
"@angular/core": "~12.2.13",
"@angular/forms": "~12.2.13",
"@angular/localize": "~12.2.13",
"@angular/platform-browser": "~12.2.13",
"@angular/platform-browser-dynamic": "~12.2.13",
"@angular/router": "~12.2.13",
"@angular/animations": "~13.0.0",
"@angular/cdk": "~13.0.0",
"@angular/common": "~13.0.0",
"@angular/compiler": "~13.0.0",
"@angular/core": "~13.0.0",
"@angular/forms": "~13.0.0",
"@angular/localize": "~13.0.0",
"@angular/platform-browser": "~13.0.0",
"@angular/platform-browser-dynamic": "~13.0.0",
"@angular/router": "~13.0.0",
"@coreui/chartjs": "^3.0.0",
"@coreui/icons-angular": "^3.0.0-alpha.3",
"@popperjs/core": "^2.10.2",
"@coreui/icons-angular": "^3.0.0-alpha.4",
"@popperjs/core": "^2.11.0",
"chart.js": "^3.6.0",
"rxjs": "~6.6.7",
"tslib": "^2.3.1",
"rxjs": "~7.4.0",
"tslib": "^2.3.0",
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "~12.2.13",
"@angular-eslint/builder": "~12.6.1",
"@angular-eslint/eslint-plugin": "~12.6.1",
"@angular-eslint/eslint-plugin-template": "~12.6.1",
"@angular-eslint/schematics": "~12.6.1",
"@angular-eslint/template-parser": "~12.6.1",
"@angular/cli": "~12.2.13",
"@angular/compiler-cli": "~12.2.13",
"@angular/language-service": "~12.2.13",
"@types/jasmine": "~3.8.2",
"@angular-devkit/build-angular": "~13.0.4",
"@angular-eslint/builder": "~13.0.1",
"@angular-eslint/eslint-plugin": "~13.0.1",
"@angular-eslint/eslint-plugin-template": "~13.0.1",
"@angular-eslint/schematics": "~13.0.1",
"@angular-eslint/template-parser": "~13.0.1",
"@angular/cli": "~13.0.4",
"@angular/compiler-cli": "~13.0.0",
"@angular/language-service": "~13.0.0",
"@types/jasmine": "~3.10.0",
"@types/lodash-es": "^4.17.5",
"@types/node": "^16.11.9",
"@typescript-eslint/eslint-plugin": "~4.33.0",
"@typescript-eslint/parser": "~4.33.0",
"eslint": "^7.32.0",
"jasmine-core": "~3.8.0",
"karma": "~6.3.9",
"@types/node": "^16.11.11",
"@typescript-eslint/eslint-plugin": "~5.3.0",
"@typescript-eslint/parser": "~5.3.0",
"eslint": "^8.2.0",
"jasmine-core": "~3.10.0",
"karma": "~6.3.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.0.3",
"karma-jasmine": "~4.0.1",
"karma-jasmine-html-reporter": "^1.7.0",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "~1.7.0",
"lodash-es": "^4.17.21",
"ng-packagr": "~12.2.5",
"prettier": "^2.4.1",
"typescript": "~4.3.5"
"ng-packagr": "^13.0.0",
"typescript": "~4.4.3"
},
"keywords": [
"angular",
Expand All @@ -95,7 +94,7 @@
"version_short": "4.0"
},
"engines": {
"node": ">= 12.20",
"npm": ">= 6"
"node": "^12.20.0 || ^14.15.0 || >=16.10.0",
"npm": ">=6"
}
}
16 changes: 16 additions & 0 deletions projects/coreui-angular-chartjs/.browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries

# For the full list of supported browsers by the Angular framework, please see:
# https://angular.io/guide/browser-support

# You can see what browsers were selected by your queries by running:
# npx browserslist

last 1 Chrome version
last 1 Firefox version
last 2 Edge major versions
last 2 Safari major versions
last 2 iOS major versions
Firefox ESR
4 changes: 2 additions & 2 deletions projects/coreui-angular-chartjs/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
],
"parserOptions": {
"project": [
"./projects/coreui-angular-chartjs/tsconfig.lib.json",
"./projects/coreui-angular-chartjs/tsconfig.spec.json"
"projects/coreui-angular-chartjs/tsconfig.lib.json",
"projects/coreui-angular-chartjs/tsconfig.spec.json"
],
"createDefaultProgram": true
},
Expand Down
2 changes: 2 additions & 0 deletions projects/coreui-angular-chartjs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,12 @@

[![npm package][npm-badge]][npm]
[![NPM downloads][npm-download]][npm]
![angular][angular-badge]

[npm-badge]: https://img.shields.io/npm/v/@coreui/angular-chartjs/latest?style=flat-square
[npm]: https://www.npmjs.com/package/@coreui/angular-chartjs
[npm-download]: https://img.shields.io/npm/dm/@coreui/angular-chartjs.svg?style=flat-square
[angular-badge]: https://img.shields.io/badge/angular-^13.0.0-lightgrey.svg?style=flat-square&logo=angular

##### install:

Expand Down
5 changes: 0 additions & 5 deletions projects/coreui-angular-chartjs/ng-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@
"dest": "../../dist/coreui-angular-chartjs",
"lib": {
"entryFile": "src/public-api.ts",
"umdModuleIds": {
"@coreui/chartjs": "coreui.chartjs",
"chart.js": "chart.js",
"lodash": "lodash"
}
},
"allowedNonPeerDependencies": [
"@coreui/chartjs",
Expand Down
10 changes: 5 additions & 5 deletions projects/coreui-angular-chartjs/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@coreui/angular-chartjs",
"description": "Angular wrapper component for Chart.js",
"version": "2.0.0-alpha.5",
"version": "2.0.0-alpha.6",
"homepage": "https://coreui.io/angular/docs/",
"bugs": {
"url": "https://github.com/coreui/coreui-angular/issues"
Expand All @@ -13,14 +13,14 @@
"license": "MIT",
"author": "The CoreUI Team (https://github.com/orgs/coreui/people)",
"peerDependencies": {
"@angular/cdk": "^12.2.0",
"@angular/common": "^12.2.0",
"@angular/core": "^12.2.0",
"@angular/cdk": "^13.0.0",
"@angular/common": "^13.0.0",
"@angular/core": "^13.0.0",
"@coreui/chartjs": "^3.0.0",
"chart.js": "^3.6.0"
},
"dependencies": {
"lodash-es": "^4.17.15",
"lodash-es": "^4.17.21",
"tslib": "^2.3.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,11 @@ describe('ChartjsComponent', () => {

await TestBed.configureTestingModule({
declarations: [ChartjsComponent]
}).compileComponents();
})
.compileComponents();
});

beforeEach(() => {
// @ts-ignore
fixture = TestBed.createComponent(ChartjsComponent);
component = fixture.componentInstance;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export class ChartjsComponent<TType extends ChartType = ChartType, TData = Defau
}

ngOnChanges(changes: SimpleChanges): void {
if (changes.data && !changes.data.firstChange) {
if (changes['data'] && !changes['data'].firstChange) {
this.chartUpdate();
}
}
Expand Down
2 changes: 1 addition & 1 deletion projects/coreui-angular-chartjs/src/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import {

declare const require: {
context(path: string, deep?: boolean, filter?: RegExp): {
keys(): string[];
<T>(id: string): T;
keys(): string[];
};
};

Expand Down
8 changes: 1 addition & 7 deletions projects/coreui-angular-chartjs/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,10 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "../../out-tsc/lib",
"target": "es2015",
"declaration": true,
"declarationMap": true,
"inlineSources": true,
"types": [],
"lib": [
"dom",
"es2018"
],
"allowSyntheticDefaultImports": true
"types": []
},
"exclude": [
"src/test.ts",
Expand Down
16 changes: 16 additions & 0 deletions projects/coreui-angular/.browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries

# For the full list of supported browsers by the Angular framework, please see:
# https://angular.io/guide/browser-support

# You can see what browsers were selected by your queries by running:
# npx browserslist

last 1 Chrome version
last 1 Firefox version
last 2 Edge major versions
last 2 Safari major versions
last 2 iOS major versions
Firefox ESR
4 changes: 2 additions & 2 deletions projects/coreui-angular/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
],
"parserOptions": {
"project": [
"./projects/coreui-angular/tsconfig.lib.json",
"./projects/coreui-angular/tsconfig.spec.json"
"projects/coreui-angular/tsconfig.lib.json",
"projects/coreui-angular/tsconfig.spec.json"
],
"createDefaultProgram": true
},
Expand Down
4 changes: 2 additions & 2 deletions projects/coreui-angular/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
Before you begin, make sure your development environment includes `Node.js®` and `npm` package manager.

###### Node.js
Angular 12 requires `Node.js` version `^12.20` or `^14`.
[**Angular 13**](https://angular.io/guide/what-is-angular) requires `Node.js` LTS version `^12.20`, `^14` or `^16`.

- To check your version, run `node -v` in a terminal/console window.
- To get `Node.js`, go to [nodejs.org](https://nodejs.org/).
Expand Down Expand Up @@ -91,7 +91,7 @@ npm install bootstrap

[![npm-coreui-angular-next][npm-coreui-angular-badge-next]][npm-coreui-angular]
[![NPM downloads][npm-coreui-angular-download]][npm-coreui-angular]
![angular](https://img.shields.io/badge/angular-^12.2.0-lightgrey.svg?style=flat-square&logo=angular)
![angular](https://img.shields.io/badge/angular-^13.0.0-lightgrey.svg?style=flat-square&logo=angular)

[npm-coreui-angular-badge-next]: https://img.shields.io/npm/v/@coreui/angular/next?style=flat-square&color=red
[npm-coreui-angular]: https://www.npmjs.com/package/@coreui/angular
Expand Down
6 changes: 1 addition & 5 deletions projects/coreui-angular/ng-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../dist/coreui-angular",
"lib": {
"entryFile": "src/public-api.ts",
"umdModuleIds": {
"@coreui/icons-angular": "coreui.icons-angular",
"@popperjs/core": "popperjs.core"
}
"entryFile": "src/public-api.ts"
},
"allowedNonPeerDependencies": [
"@popperjs/core"
Expand Down
Loading

0 comments on commit ac36cc6

Please sign in to comment.