Feature/upgrade to angular 12 (#169)

* Upgrade to Angular 12

* Update changelog
This commit is contained in:
Thomas 2021-06-15 21:03:55 +02:00 committed by GitHub
parent 5db90f1787
commit a35701fe24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 2077 additions and 1917 deletions

View File

@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Improved the error page of the sign in with fingerprint - Improved the error page of the sign in with fingerprint
- Disable the sign in with fingerprint selector for the demo user - Disable the sign in with fingerprint selector for the demo user
- Upgraded `angular` from version `11.2.4` to `12.0.4`
- Upgraded `chart.js` from version `3.2.1` to `3.3.2` - Upgraded `chart.js` from version `3.2.1` to `3.3.2`
- Upgraded `date-fns` from version `2.19.0` to `2.22.1` - Upgraded `date-fns` from version `2.19.0` to `2.22.1`
- Upgraded `eslint` and `prettier` dependencies - Upgraded `eslint` and `prettier` dependencies

View File

@ -86,7 +86,6 @@
"main": "apps/client/src/main.ts", "main": "apps/client/src/main.ts",
"polyfills": "apps/client/src/polyfills.ts", "polyfills": "apps/client/src/polyfills.ts",
"tsConfig": "apps/client/tsconfig.app.json", "tsConfig": "apps/client/tsconfig.app.json",
"aot": true,
"assets": [ "assets": [
"apps/client/src/assets", "apps/client/src/assets",
{ {
@ -121,7 +120,13 @@
} }
], ],
"styles": ["apps/client/src/styles.scss"], "styles": ["apps/client/src/styles.scss"],
"scripts": ["node_modules/marked/lib/marked.js"] "scripts": ["node_modules/marked/lib/marked.js"],
"vendorChunk": true,
"extractLicenses": false,
"buildOptimizer": false,
"sourceMap": true,
"optimization": false,
"namedChunks": true
}, },
"configurations": { "configurations": {
"production": { "production": {
@ -152,7 +157,8 @@
] ]
} }
}, },
"outputs": ["{options.outputPath}"] "outputs": ["{options.outputPath}"],
"defaultConfiguration": ""
}, },
"serve": { "serve": {
"builder": "@angular-devkit/build-angular:dev-server", "builder": "@angular-devkit/build-angular:dev-server",

View File

@ -16,8 +16,8 @@ module.exports = {
}, },
coverageDirectory: '../../coverage/apps/client', coverageDirectory: '../../coverage/apps/client',
snapshotSerializers: [ snapshotSerializers: [
'jest-preset-angular/build/AngularNoNgAttributesSnapshotSerializer.js', 'jest-preset-angular/build/serializers/no-ng-attributes',
'jest-preset-angular/build/AngularSnapshotSerializer.js', 'jest-preset-angular/build/serializers/ng-snapshot',
'jest-preset-angular/build/HTMLCommentSerializer.js' 'jest-preset-angular/build/serializers/html-comment'
] ]
}; };

View File

@ -16,7 +16,6 @@ import {
SettingsStorageService SettingsStorageService
} from '@ghostfolio/client/services/settings-storage.service'; } from '@ghostfolio/client/services/settings-storage.service';
import { TokenStorageService } from '@ghostfolio/client/services/token-storage.service'; import { TokenStorageService } from '@ghostfolio/client/services/token-storage.service';
import { WebAuthnService } from '@ghostfolio/client/services/web-authn.service';
import { InfoItem, User } from '@ghostfolio/common/interfaces'; import { InfoItem, User } from '@ghostfolio/common/interfaces';
import { hasPermission, permissions } from '@ghostfolio/common/permissions'; import { hasPermission, permissions } from '@ghostfolio/common/permissions';
import { EMPTY, Subject } from 'rxjs'; import { EMPTY, Subject } from 'rxjs';

View File

@ -15,4 +15,4 @@ export const environment = {
* This import should be commented out in production mode because it will have a negative impact * This import should be commented out in production mode because it will have a negative impact
* on performance if an error is thrown. * on performance if an error is thrown.
*/ */
// import 'zone.js/dist/zone-error'; // Included with Angular CLI. // import 'zone.js/plugins/zone-error'; // Included with Angular CLI.

View File

@ -55,7 +55,7 @@
/*************************************************************************************************** /***************************************************************************************************
* Zone JS is required by default for Angular itself. * Zone JS is required by default for Angular itself.
*/ */
import 'zone.js/dist/zone'; // Included with Angular CLI. import 'zone.js'; // Included with Angular CLI.
/*************************************************************************************************** /***************************************************************************************************
* APPLICATION IMPORTS * APPLICATION IMPORTS

View File

@ -1 +1 @@
import 'jest-preset-angular'; import 'jest-preset-angular/setup-jest';

View File

@ -2,9 +2,7 @@ module.exports = {
displayName: 'common', displayName: 'common',
preset: '../../jest.preset.js', preset: '../../jest.preset.js',
globals: { globals: {
'ts-jest': { 'ts-jest': { tsconfig: '<rootDir>/tsconfig.spec.json' }
tsConfig: '<rootDir>/tsconfig.spec.json'
}
}, },
transform: { transform: {
'^.+\\.[tj]sx?$': 'ts-jest' '^.+\\.[tj]sx?$': 'ts-jest'

25
nx.json
View File

@ -1,26 +1,39 @@
{ {
"implicitDependencies": { "implicitDependencies": {
"angular.json": "*", "angular.json": "*",
"package.json": { "dependencies": "*", "devDependencies": "*" }, "package.json": {
"dependencies": "*",
"devDependencies": "*"
},
"tsconfig.base.json": "*", "tsconfig.base.json": "*",
".eslintrc.json": "*", ".eslintrc.json": "*",
"nx.json": "*" "nx.json": "*"
}, },
"affected": { "defaultBase": "origin/main" }, "affected": {
"defaultBase": "origin/main"
},
"npmScope": "ghostfolio", "npmScope": "ghostfolio",
"tasksRunnerOptions": { "tasksRunnerOptions": {
"default": { "default": {
"runner": "@nrwl/workspace/tasks-runners/default", "runner": "@nrwl/workspace/tasks-runners/default",
"options": { "cacheableOperations": ["build", "lint", "test", "e2e"] } "options": {
"cacheableOperations": ["build", "lint", "test", "e2e"]
}
} }
}, },
"projects": { "projects": {
"api": { "tags": [] }, "api": {
"client": { "tags": [] }, "tags": []
},
"client": {
"tags": []
},
"client-e2e": { "client-e2e": {
"tags": [], "tags": [],
"implicitDependencies": ["client"] "implicitDependencies": ["client"]
}, },
"common": { "tags": [] } "common": {
"tags": []
}
} }
} }

View File

@ -45,16 +45,16 @@
"workspace-generator": "nx workspace-generator" "workspace-generator": "nx workspace-generator"
}, },
"dependencies": { "dependencies": {
"@angular/animations": "11.2.4", "@angular/animations": "12.0.4",
"@angular/cdk": "11.0.4", "@angular/cdk": "11.0.4",
"@angular/common": "11.2.4", "@angular/common": "12.0.4",
"@angular/compiler": "11.2.4", "@angular/compiler": "12.0.4",
"@angular/core": "11.2.4", "@angular/core": "12.0.4",
"@angular/forms": "11.2.4", "@angular/forms": "12.0.4",
"@angular/material": "11.0.4", "@angular/material": "11.0.4",
"@angular/platform-browser": "11.2.4", "@angular/platform-browser": "12.0.4",
"@angular/platform-browser-dynamic": "11.2.4", "@angular/platform-browser-dynamic": "12.0.4",
"@angular/router": "11.2.4", "@angular/router": "12.0.4",
"@codewithdan/observable-store": "2.2.11", "@codewithdan/observable-store": "2.2.11",
"@nestjs/common": "7.6.5", "@nestjs/common": "7.6.5",
"@nestjs/config": "0.6.1", "@nestjs/config": "0.6.1",
@ -64,7 +64,7 @@
"@nestjs/platform-express": "7.6.5", "@nestjs/platform-express": "7.6.5",
"@nestjs/schedule": "0.4.1", "@nestjs/schedule": "0.4.1",
"@nestjs/serve-static": "2.1.4", "@nestjs/serve-static": "2.1.4",
"@nrwl/angular": "12.0.0", "@nrwl/angular": "12.3.6",
"@prisma/client": "2.24.1", "@prisma/client": "2.24.1",
"@simplewebauthn/browser": "3.0.0", "@simplewebauthn/browser": "3.0.0",
"@simplewebauthn/server": "3.0.0", "@simplewebauthn/server": "3.0.0",
@ -102,25 +102,25 @@
"svgmap": "2.1.1", "svgmap": "2.1.1",
"uuid": "8.3.2", "uuid": "8.3.2",
"yahoo-finance": "0.3.6", "yahoo-finance": "0.3.6",
"zone.js": "0.11.4" "zone.js": "~0.11.4"
}, },
"devDependencies": { "devDependencies": {
"@angular-devkit/build-angular": "0.1102.3", "@angular-devkit/build-angular": "12.0.4",
"@angular-eslint/eslint-plugin": "2.0.2", "@angular-eslint/eslint-plugin": "12.0.0",
"@angular/cli": "11.2.3", "@angular/cli": "12.0.4",
"@angular/compiler-cli": "11.2.4", "@angular/compiler-cli": "12.0.4",
"@angular/language-service": "11.2.4", "@angular/language-service": "12.0.4",
"@angular/localize": "11.0.9", "@angular/localize": "11.0.9",
"@nestjs/schematics": "7.2.6", "@nestjs/schematics": "7.2.6",
"@nestjs/testing": "7.6.5", "@nestjs/testing": "7.6.5",
"@nrwl/cli": "12.0.0", "@nrwl/cli": "12.3.6",
"@nrwl/cypress": "12.0.0", "@nrwl/cypress": "12.3.6",
"@nrwl/eslint-plugin-nx": "12.0.0", "@nrwl/eslint-plugin-nx": "12.3.6",
"@nrwl/jest": "12.0.0", "@nrwl/jest": "12.3.6",
"@nrwl/nest": "12.0.0", "@nrwl/nest": "12.3.6",
"@nrwl/node": "12.0.0", "@nrwl/node": "12.3.6",
"@nrwl/tao": "12.0.0", "@nrwl/tao": "12.3.6",
"@nrwl/workspace": "12.0.0", "@nrwl/workspace": "12.3.6",
"@types/cache-manager": "3.4.0", "@types/cache-manager": "3.4.0",
"@types/jest": "26.0.20", "@types/jest": "26.0.20",
"@types/node": "14.14.33", "@types/node": "14.14.33",
@ -136,13 +136,13 @@
"import-sort-parser-typescript": "6.0.0", "import-sort-parser-typescript": "6.0.0",
"import-sort-style-module": "6.0.0", "import-sort-style-module": "6.0.0",
"jest": "26.6.3", "jest": "26.6.3",
"jest-preset-angular": "8.3.2", "jest-preset-angular": "8.4.0",
"prettier": "2.3.1", "prettier": "2.3.1",
"replace-in-file": "6.2.0", "replace-in-file": "6.2.0",
"rimraf": "3.0.2", "rimraf": "3.0.2",
"ts-jest": "26.4.4", "ts-jest": "26.5.5",
"ts-node": "9.1.1", "ts-node": "9.1.1",
"typescript": "4.1.4" "typescript": "4.2.4"
}, },
"engines": { "engines": {
"node": "14.x" "node": "14.x"

3887
yarn.lock

File diff suppressed because it is too large Load Diff