1
0

Automated upgrade to Angular 11.0

This commit is contained in:
Tim Donohue
2021-11-22 11:01:54 -06:00
parent 890731e3e2
commit 9f1a017b56
12 changed files with 1769 additions and 625 deletions

View File

@@ -63,17 +63,17 @@
"webdriver-manager": "^12.1.8" "webdriver-manager": "^12.1.8"
}, },
"dependencies": { "dependencies": {
"@angular/animations": "~10.2.3", "@angular/animations": "~11.2.14",
"@angular/cdk": "^10.2.6", "@angular/cdk": "^10.2.6",
"@angular/common": "~10.2.3", "@angular/common": "~11.2.14",
"@angular/compiler": "~10.2.3", "@angular/compiler": "~11.2.14",
"@angular/core": "~10.2.3", "@angular/core": "~11.2.14",
"@angular/forms": "~10.2.3", "@angular/forms": "~11.2.14",
"@angular/localize": "10.2.3", "@angular/localize": "11.2.14",
"@angular/platform-browser": "~10.2.3", "@angular/platform-browser": "~11.2.14",
"@angular/platform-browser-dynamic": "~10.2.3", "@angular/platform-browser-dynamic": "~11.2.14",
"@angular/platform-server": "~10.2.3", "@angular/platform-server": "~11.2.14",
"@angular/router": "~10.2.3", "@angular/router": "~11.2.14",
"@angularclass/bootloader": "1.0.1", "@angularclass/bootloader": "1.0.1",
"@kolkov/ngx-gallery": "^1.2.3", "@kolkov/ngx-gallery": "^1.2.3",
"@ng-bootstrap/ng-bootstrap": "7.0.0", "@ng-bootstrap/ng-bootstrap": "7.0.0",
@@ -138,10 +138,10 @@
}, },
"devDependencies": { "devDependencies": {
"@angular-builders/custom-webpack": "10.0.1", "@angular-builders/custom-webpack": "10.0.1",
"@angular-devkit/build-angular": "~0.1002.3", "@angular-devkit/build-angular": "~0.1102.15",
"@angular/cli": "~10.2.0", "@angular/cli": "~11.2.15",
"@angular/compiler-cli": "~10.2.3", "@angular/compiler-cli": "~11.2.14",
"@angular/language-service": "~10.2.3", "@angular/language-service": "~11.2.14",
"@cypress/schematic": "^1.5.0", "@cypress/schematic": "^1.5.0",
"@fortawesome/fontawesome-free": "^5.5.0", "@fortawesome/fontawesome-free": "^5.5.0",
"@ngrx/store-devtools": "^10.0.1", "@ngrx/store-devtools": "^10.0.1",
@@ -150,13 +150,13 @@
"@types/deep-freeze": "0.1.2", "@types/deep-freeze": "0.1.2",
"@types/express": "^4.17.9", "@types/express": "^4.17.9",
"@types/file-saver": "^2.0.1", "@types/file-saver": "^2.0.1",
"@types/jasmine": "^3.6.2", "@types/jasmine": "~3.6.0",
"@types/jasminewd2": "~2.0.8", "@types/jasminewd2": "~2.0.8",
"@types/js-cookie": "2.2.6", "@types/js-cookie": "2.2.6",
"@types/lodash": "^4.14.165", "@types/lodash": "^4.14.165",
"@types/node": "^14.14.9", "@types/node": "^14.14.9",
"axe-core": "^4.3.3", "axe-core": "^4.3.3",
"codelyzer": "^6.0.1", "codelyzer": "^6.0.0",
"compression-webpack-plugin": "^3.0.1", "compression-webpack-plugin": "^3.0.1",
"copy-webpack-plugin": "^6.4.1", "copy-webpack-plugin": "^6.4.1",
"css-loader": "3.4.0", "css-loader": "3.4.0",
@@ -169,14 +169,14 @@
"fork-ts-checker-webpack-plugin": "^6.0.3", "fork-ts-checker-webpack-plugin": "^6.0.3",
"html-loader": "^1.3.2", "html-loader": "^1.3.2",
"html-webpack-plugin": "^4.5.0", "html-webpack-plugin": "^4.5.0",
"jasmine-core": "^3.6.0", "jasmine-core": "~3.6.0",
"jasmine-marbles": "0.6.0", "jasmine-marbles": "0.6.0",
"jasmine-spec-reporter": "^6.0.0", "jasmine-spec-reporter": "~5.0.0",
"karma": "^5.2.3", "karma": "^5.2.3",
"karma-chrome-launcher": "^3.1.0", "karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~3.0.2", "karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "^4.0.1", "karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.5.4", "karma-jasmine-html-reporter": "^1.5.0",
"karma-mocha-reporter": "2.2.5", "karma-mocha-reporter": "2.2.5",
"nodemon": "^2.0.2", "nodemon": "^2.0.2",
"npm-run-all": "^4.1.5", "npm-run-all": "^4.1.5",
@@ -204,4 +204,4 @@
"webpack-cli": "^4.2.0", "webpack-cli": "^4.2.0",
"webpack-dev-server": "^4.5.0" "webpack-dev-server": "^4.5.0"
} }
} }

View File

@@ -202,8 +202,9 @@ import { GroupAdministratorGuard } from './core/data/feature-authorization/featu
{ path: '**', pathMatch: 'full', component: ThemedPageNotFoundComponent }, { path: '**', pathMatch: 'full', component: ThemedPageNotFoundComponent },
]} ]}
],{ ],{
onSameUrlNavigation: 'reload', onSameUrlNavigation: 'reload',
}) relativeLinkResolution: 'legacy'
})
], ],
exports: [RouterModule], exports: [RouterModule],
}) })

View File

@@ -1,5 +1,5 @@
import { NO_ERRORS_SCHEMA } from '@angular/core'; import { NO_ERRORS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { NgxGalleryOptions } from '@kolkov/ngx-gallery'; import { NgxGalleryOptions } from '@kolkov/ngx-gallery';
import { Bitstream } from '../../../core/shared/bitstream.model'; import { Bitstream } from '../../../core/shared/bitstream.model';
import { MediaViewerItem } from '../../../core/shared/media-viewer-item.model'; import { MediaViewerItem } from '../../../core/shared/media-viewer-item.model';
@@ -55,7 +55,7 @@ describe('MediaViewerImageComponent', () => {
] ]
); );
beforeEach(async(() => { beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({ TestBed.configureTestingModule({
imports:[], imports:[],
declarations: [MediaViewerImageComponent], declarations: [MediaViewerImageComponent],

View File

@@ -1,5 +1,5 @@
import { NO_ERRORS_SCHEMA } from '@angular/core'; import { NO_ERRORS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { TranslateLoader, TranslateModule } from '@ngx-translate/core'; import { TranslateLoader, TranslateModule } from '@ngx-translate/core';
import { of as observableOf } from 'rxjs'; import { of as observableOf } from 'rxjs';
@@ -17,7 +17,7 @@ describe('MediaViewerVideoComponent', () => {
let component: MediaViewerVideoComponent; let component: MediaViewerVideoComponent;
let fixture: ComponentFixture<MediaViewerVideoComponent>; let fixture: ComponentFixture<MediaViewerVideoComponent>;
beforeEach(async(() => { beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({ TestBed.configureTestingModule({
imports: [ imports: [
TranslateModule.forRoot({ TranslateModule.forRoot({

View File

@@ -1,4 +1,4 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { Bitstream } from '../../core/shared/bitstream.model'; import { Bitstream } from '../../core/shared/bitstream.model';
import { createSuccessfulRemoteDataObject$ } from '../../shared/remote-data.utils'; import { createSuccessfulRemoteDataObject$ } from '../../shared/remote-data.utils';
import { createPaginatedList } from '../../shared/testing/utils.test'; import { createPaginatedList } from '../../shared/testing/utils.test';
@@ -60,7 +60,7 @@ describe('MediaViewerComponent', () => {
{ bitstream: mockBitstream, format: 'image', thumbnail: null } { bitstream: mockBitstream, format: 'image', thumbnail: null }
); );
beforeEach(async(() => { beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({ TestBed.configureTestingModule({
imports: [ imports: [
TranslateModule.forRoot({ TranslateModule.forRoot({

View File

@@ -1,5 +1,5 @@
import { Component, DebugElement, NO_ERRORS_SCHEMA } from '@angular/core'; import { Component, DebugElement, NO_ERRORS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, inject, TestBed } from '@angular/core/testing'; import { ComponentFixture, inject, TestBed, waitForAsync } from '@angular/core/testing';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { By } from '@angular/platform-browser'; import { By } from '@angular/platform-browser';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
@@ -75,7 +75,7 @@ describe('MyDSpaceNewExternalDropdownComponent test', () => {
}; };
describe('With only one Entity', () => { describe('With only one Entity', () => {
beforeEach(async(() => { beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({ TestBed.configureTestingModule({
imports: [ imports: [
CommonModule, CommonModule,
@@ -126,7 +126,7 @@ describe('MyDSpaceNewExternalDropdownComponent test', () => {
}); });
describe('With more than one Entity', () => { describe('With more than one Entity', () => {
beforeEach(async(() => { beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({ TestBed.configureTestingModule({
imports: [ imports: [
CommonModule, CommonModule,

View File

@@ -1,5 +1,5 @@
import { Component, DebugElement, NO_ERRORS_SCHEMA } from '@angular/core'; import { Component, DebugElement, NO_ERRORS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, inject, TestBed } from '@angular/core/testing'; import { ComponentFixture, inject, TestBed, waitForAsync } from '@angular/core/testing';
import { By } from '@angular/platform-browser'; import { By } from '@angular/platform-browser';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { TranslateModule } from '@ngx-translate/core'; import { TranslateModule } from '@ngx-translate/core';
@@ -79,7 +79,7 @@ describe('MyDSpaceNewSubmissionDropdownComponent test', () => {
}; };
describe('With only one Entity', () => { describe('With only one Entity', () => {
beforeEach(async(() => { beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({ TestBed.configureTestingModule({
imports: [ imports: [
CommonModule, CommonModule,
@@ -130,7 +130,7 @@ describe('MyDSpaceNewSubmissionDropdownComponent test', () => {
}); });
describe('With more than one Entity', () => { describe('With more than one Entity', () => {
beforeEach(async(() => { beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({ TestBed.configureTestingModule({
imports: [ imports: [
CommonModule, CommonModule,

View File

@@ -1,4 +1,4 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { AuthService } from '../../core/auth/auth.service'; import { AuthService } from '../../core/auth/auth.service';
import { FileService } from '../../core/shared/file.service'; import { FileService } from '../../core/shared/file.service';
import { of as observableOf } from 'rxjs'; import { of as observableOf } from 'rxjs';
@@ -77,7 +77,7 @@ describe('BitstreamDownloadPageComponent', () => {
} }
describe('init', () => { describe('init', () => {
beforeEach(async(() => { beforeEach(waitForAsync(() => {
init(); init();
initTestbed(); initTestbed();
})); }));
@@ -93,7 +93,7 @@ describe('BitstreamDownloadPageComponent', () => {
describe('bitstream retrieval', () => { describe('bitstream retrieval', () => {
describe('when the user is authorized and not logged in', () => { describe('when the user is authorized and not logged in', () => {
beforeEach(async(() => { beforeEach(waitForAsync(() => {
init(); init();
(authService.isAuthenticated as jasmine.Spy).and.returnValue(observableOf(false)); (authService.isAuthenticated as jasmine.Spy).and.returnValue(observableOf(false));
@@ -109,7 +109,7 @@ describe('BitstreamDownloadPageComponent', () => {
}); });
}); });
describe('when the user is authorized and logged in', () => { describe('when the user is authorized and logged in', () => {
beforeEach(async(() => { beforeEach(waitForAsync(() => {
init(); init();
initTestbed(); initTestbed();
})); }));
@@ -123,7 +123,7 @@ describe('BitstreamDownloadPageComponent', () => {
}); });
}); });
describe('when the user is not authorized and logged in', () => { describe('when the user is not authorized and logged in', () => {
beforeEach(async(() => { beforeEach(waitForAsync(() => {
init(); init();
(authorizationService.isAuthorized as jasmine.Spy).and.returnValue(observableOf(false)); (authorizationService.isAuthorized as jasmine.Spy).and.returnValue(observableOf(false));
initTestbed(); initTestbed();
@@ -138,7 +138,7 @@ describe('BitstreamDownloadPageComponent', () => {
}); });
}); });
describe('when the user is not authorized and not logged in', () => { describe('when the user is not authorized and not logged in', () => {
beforeEach(async(() => { beforeEach(waitForAsync(() => {
init(); init();
(authService.isAuthenticated as jasmine.Spy).and.returnValue(observableOf(false)); (authService.isAuthenticated as jasmine.Spy).and.returnValue(observableOf(false));
(authorizationService.isAuthorized as jasmine.Spy).and.returnValue(observableOf(false)); (authorizationService.isAuthorized as jasmine.Spy).and.returnValue(observableOf(false));

View File

@@ -1,5 +1,5 @@
import { ChangeDetectionStrategy, NO_ERRORS_SCHEMA } from '@angular/core'; import { ChangeDetectionStrategy, NO_ERRORS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { NoopAnimationsModule } from '@angular/platform-browser/animations'; import { NoopAnimationsModule } from '@angular/platform-browser/animations';
import { of as observableOf } from 'rxjs'; import { of as observableOf } from 'rxjs';
@@ -60,7 +60,7 @@ mockResultObject.indexableObject = Object.assign(new ClaimedTask(), { workflowit
const linkService = getMockLinkService(); const linkService = getMockLinkService();
describe('ClaimedApprovedSearchResultListElementComponent', () => { describe('ClaimedApprovedSearchResultListElementComponent', () => {
beforeEach(async(() => { beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({ TestBed.configureTestingModule({
imports: [NoopAnimationsModule], imports: [NoopAnimationsModule],
declarations: [ClaimedApprovedSearchResultListElementComponent, VarDirective], declarations: [ClaimedApprovedSearchResultListElementComponent, VarDirective],
@@ -75,7 +75,7 @@ describe('ClaimedApprovedSearchResultListElementComponent', () => {
}).compileComponents(); }).compileComponents();
})); }));
beforeEach(async(() => { beforeEach(waitForAsync(() => {
fixture = TestBed.createComponent(ClaimedApprovedSearchResultListElementComponent); fixture = TestBed.createComponent(ClaimedApprovedSearchResultListElementComponent);
component = fixture.componentInstance; component = fixture.componentInstance;
})); }));

View File

@@ -1,5 +1,5 @@
import { ChangeDetectionStrategy, NO_ERRORS_SCHEMA } from '@angular/core'; import { ChangeDetectionStrategy, NO_ERRORS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { NoopAnimationsModule } from '@angular/platform-browser/animations'; import { NoopAnimationsModule } from '@angular/platform-browser/animations';
import { of as observableOf } from 'rxjs'; import { of as observableOf } from 'rxjs';
@@ -60,7 +60,7 @@ mockResultObject.indexableObject = Object.assign(new ClaimedTask(), { workflowit
const linkService = getMockLinkService(); const linkService = getMockLinkService();
describe('ClaimedDeclinedSearchResultListElementComponent', () => { describe('ClaimedDeclinedSearchResultListElementComponent', () => {
beforeEach(async(() => { beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({ TestBed.configureTestingModule({
imports: [NoopAnimationsModule], imports: [NoopAnimationsModule],
declarations: [ClaimedDeclinedSearchResultListElementComponent, VarDirective], declarations: [ClaimedDeclinedSearchResultListElementComponent, VarDirective],
@@ -75,7 +75,7 @@ describe('ClaimedDeclinedSearchResultListElementComponent', () => {
}).compileComponents(); }).compileComponents();
})); }));
beforeEach(async(() => { beforeEach(waitForAsync(() => {
fixture = TestBed.createComponent(ClaimedDeclinedSearchResultListElementComponent); fixture = TestBed.createComponent(ClaimedDeclinedSearchResultListElementComponent);
component = fixture.componentInstance; component = fixture.componentInstance;
})); }));

View File

@@ -54,12 +54,13 @@ export function getRequest(transferState: TransferState): any {
// forRoot ensures the providers are only created once // forRoot ensures the providers are only created once
IdlePreloadModule.forRoot(), IdlePreloadModule.forRoot(),
RouterModule.forRoot([], { RouterModule.forRoot([], {
// enableTracing: true, // enableTracing: true,
useHash: false, useHash: false,
scrollPositionRestoration: 'enabled', scrollPositionRestoration: 'enabled',
anchorScrolling: 'enabled', anchorScrolling: 'enabled',
preloadingStrategy: NoPreloading preloadingStrategy: NoPreloading,
}), relativeLinkResolution: 'legacy'
}),
StatisticsModule.forRoot(), StatisticsModule.forRoot(),
Angulartics2RouterlessModule.forRoot(), Angulartics2RouterlessModule.forRoot(),
BrowserAnimationsModule, BrowserAnimationsModule,

2284
yarn.lock

File diff suppressed because it is too large Load Diff