diff --git a/.gitignore b/.gitignore index f4f46a5..574ca98 100644 --- a/.gitignore +++ b/.gitignore @@ -32,6 +32,7 @@ speed-measure-plugin.json .history/* # misc +/.angular/cache /.sass-cache /connect.lock /coverage diff --git a/angular.json b/angular.json index b55483d..e620017 100644 --- a/angular.json +++ b/angular.json @@ -17,7 +17,6 @@ "build": { "builder": "@angular-devkit/build-angular:browser", "options": { - "aot": true, "outputPath": "dist/angular-introduction3", "index": "src/index.html", "main": "src/main.ts", @@ -30,7 +29,13 @@ "styles": [ "src/styles.scss" ], - "scripts": [] + "scripts": [], + "vendorChunk": true, + "extractLicenses": false, + "buildOptimizer": false, + "sourceMap": true, + "optimization": false, + "namedChunks": true }, "configurations": { "production": { @@ -44,7 +49,6 @@ "outputHashing": "all", "sourceMap": false, "namedChunks": false, - "aot": true, "extractLicenses": true, "vendorChunk": false, "buildOptimizer": true, @@ -60,7 +64,8 @@ } ] } - } + }, + "defaultConfiguration": "" }, "serve": { "builder": "@angular-devkit/build-angular:dev-server", @@ -95,18 +100,6 @@ "src/assets" ] } - }, - "lint": { - "builder": "@angular-devkit/build-angular:tslint", - "options": { - "tsConfig": [ - "src/tsconfig.app.json", - "src/tsconfig.spec.json" - ], - "exclude": [ - "**/node_modules/**" - ] - } } } }, @@ -126,15 +119,6 @@ "devServerTarget": "angular-introduction3:serve:production" } } - }, - "lint": { - "builder": "@angular-devkit/build-angular:tslint", - "options": { - "tsConfig": "e2e/tsconfig.e2e.json", - "exclude": [ - "**/node_modules/**" - ] - } } } } diff --git a/package.json b/package.json index 991533d..776c283 100644 --- a/package.json +++ b/package.json @@ -11,41 +11,41 @@ }, "private": true, "dependencies": { - "@angular/animations": "^11.1.2", - "@angular/cdk": "^11.1.2", - "@angular/common": "~11.1.2", - "@angular/compiler": "~11.1.2", - "@angular/core": "~11.1.2", - "@angular/flex-layout": "^11.0.0-beta.33", - "@angular/forms": "~11.1.2", - "@angular/material": "^11.1.2", - "@angular/platform-browser": "~11.1.2", - "@angular/platform-browser-dynamic": "~11.1.2", - "@angular/router": "~11.1.2", - "core-js": "^3.8.3", + "@angular/animations": "^13.2.3", + "@angular/cdk": "^13.2.3", + "@angular/common": "~13.2.3", + "@angular/compiler": "~13.2.3", + "@angular/core": "~13.2.3", + "@angular/flex-layout": "^13.0.0-beta.38", + "@angular/forms": "~13.2.3", + "@angular/material": "^13.2.3", + "@angular/platform-browser": "~13.2.3", + "@angular/platform-browser-dynamic": "~13.2.3", + "@angular/router": "~13.2.3", + "core-js": "^2.5.4", "rxjs": "~6.6.3", - "tslib": "^2.1.0", - "zone.js": "~0.11.3" + "tslib": "^2.0.0", + "zone.js": "~0.11.4" }, "devDependencies": { - "@angular-devkit/build-angular": "~0.1101.4", - "@angular/cli": "~11.1.4", - "@angular/compiler-cli": "~11.1.2", - "@angular/language-service": "~11.1.2", - "@types/jasmine": "~3.6.3", - "@types/jasminewd2": "~2.0.8", - "@types/node": "^14.14.25", + "@angular-devkit/build-angular": "~13.2.4", + "@angular/cli": "~13.2.4", + "@angular/compiler-cli": "~13.2.3", + "@angular/language-service": "~13.2.3", + "@types/jasmine": "~2.8.8", + "@types/jasminewd2": "~2.0.3", + "@types/node": "^12.11.1", "codelyzer": "^6.0.1", - "jasmine-core": "~3.6.0", - "jasmine-spec-reporter": "~6.0.0", - "karma": "~6.1.0", + "jasmine-core": "~3.5.0", + "jasmine-spec-reporter": "~5.0.0", + "karma": "~6.3.16", "karma-chrome-launcher": "~3.1.0", - "karma-coverage-istanbul-reporter": "~3.0.3", - "karma-jasmine": "~4.0.1", - "karma-jasmine-html-reporter": "^1.5.4", + "karma-coverage-istanbul-reporter": "~3.0.2", + "karma-jasmine": "~4.0.0", + "karma-jasmine-html-reporter": "^1.5.0", "protractor": "~7.0.0", - "ts-node": "~9.1.1", + "ts-node": "~7.0.0", "tslint": "~6.1.0", - "typescript": "~4.1.3" + "typescript": "~4.5.5" } } diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 1b385c8..ee955c3 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -1,21 +1,20 @@ -import {BrowserModule} from '@angular/platform-browser'; -import {NgModule} from '@angular/core'; - -import {AppRoutingModule} from './app-routing.module'; -import {AppComponent} from './app.component'; -import {BrowserAnimationsModule} from '@angular/platform-browser/animations'; -import {FlexModule} from '@angular/flex-layout'; -import {HTTP_INTERCEPTORS, HttpClientModule} from '@angular/common/http'; -import {AuthInterceptorService} from './core/auth-interceptor.service'; -import {MatFormFieldModule} from '@angular/material/form-field'; -import {MatIconModule} from '@angular/material/icon'; -import {MatInputModule} from '@angular/material/input'; -import {MatButtonModule} from '@angular/material/button'; -import {LoginComponent} from './login/login.component'; -import {HomeComponent} from './home/home.component'; -import {PageNotFoundComponent} from './core/page-not-found/page-not-found.component'; -import {FormsModule} from '@angular/forms'; -import {MatProgressSpinnerModule} from '@angular/material/progress-spinner'; +import { BrowserModule } from '@angular/platform-browser'; +import { NgModule } from '@angular/core'; +import { AppRoutingModule } from './app-routing.module'; +import { AppComponent } from './app.component'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; +import { FlexModule } from '@angular/flex-layout'; +import { HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http'; +import { AuthInterceptorService } from './core/auth-interceptor.service'; +import { LoginComponent } from './login/login.component'; +import { HomeComponent } from './home/home.component'; +import { MatFormFieldModule } from '@angular/material/form-field'; +import { MatIconModule } from '@angular/material/icon'; +import { MatInputModule } from '@angular/material/input'; +import { MatButtonModule } from '@angular/material/button'; +import { PageNotFoundComponent } from './core/page-not-found/page-not-found.component'; +import { FormsModule } from '@angular/forms'; +import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; @NgModule({ declarations: [ diff --git a/src/app/flight/flight.module.ts b/src/app/flight/flight.module.ts index 9d81bf8..3a82a29 100644 --- a/src/app/flight/flight.module.ts +++ b/src/app/flight/flight.module.ts @@ -2,8 +2,8 @@ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { FlightComponent } from './flight.component'; import { FligthsListComponent } from './fligths-list/fligths-list.component'; -import {FlightRoutingModule} from './flight-routing.module'; -import {MatTableModule} from '@angular/material/table'; +import { MatTableModule } from '@angular/material/table'; +import { FlightRoutingModule } from './flight-routing.module'; @NgModule({ declarations: [FlightComponent, FligthsListComponent], diff --git a/src/environments/environment.ts b/src/environments/environment.ts index 828b730..61140af 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -17,4 +17,4 @@ export const environment = { * This import should be commented out in production mode because it will have a negative impact * 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. diff --git a/src/polyfills.ts b/src/polyfills.ts index 03711e5..dcd18ea 100644 --- a/src/polyfills.ts +++ b/src/polyfills.ts @@ -18,16 +18,6 @@ * BROWSER POLYFILLS */ -/** IE10 and IE11 requires the following for NgClass support on SVG elements */ -// import 'classlist.js'; // Run `npm install --save classlist.js`. - -/** - * Web Animations `@angular/platform-browser/animations` - * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari. - * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0). - */ -// import 'web-animations-js'; // Run `npm install --save web-animations-js`. - /** * By default, zone.js will patch all possible macroTask and DomEvents * user can disable parts of macroTask/DomEvents patch by setting following flags @@ -55,7 +45,7 @@ /*************************************************************************************************** * 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. /*************************************************************************************************** diff --git a/src/styles.scss b/src/styles.scss index 5f69d4f..9bfa71b 100644 --- a/src/styles.scss +++ b/src/styles.scss @@ -1,2 +1,2 @@ /* You can add global styles to this file, and also import other style files */ -@import "~@angular/material/prebuilt-themes/indigo-pink.css"; +@import "@angular/material/prebuilt-themes/indigo-pink.css"; diff --git a/src/test.ts b/src/test.ts index 1631789..6b03dbe 100644 --- a/src/test.ts +++ b/src/test.ts @@ -1,6 +1,6 @@ // This file is required by karma.conf.js and loads recursively all the .spec and framework files -import 'zone.js/dist/zone-testing'; +import 'zone.js/testing'; import { getTestBed } from '@angular/core/testing'; import { BrowserDynamicTestingModule, @@ -12,7 +12,9 @@ declare const require: any; // First, initialize the Angular testing environment. getTestBed().initTestEnvironment( BrowserDynamicTestingModule, - platformBrowserDynamicTesting() + platformBrowserDynamicTesting(), { + teardown: { destroyAfterEach: false } +} ); // Then we find all the tests. const context = require.context('./', true, /\.spec\.ts$/); diff --git a/tsconfig.json b/tsconfig.json index 8c693a2..85001d5 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,7 +8,6 @@ "declaration": false, "module": "es2020", "moduleResolution": "node", - "emitDecoratorMetadata": true, "experimentalDecorators": true, "importHelpers": true, "target": "es2015",