Skip to content

Commit

Permalink
Update to Angular 11 (#285)
Browse files Browse the repository at this point in the history
  • Loading branch information
asithade authored Dec 9, 2022
1 parent 5e10929 commit e27826b
Show file tree
Hide file tree
Showing 32 changed files with 3,131 additions and 2,511 deletions.
36 changes: 9 additions & 27 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,10 @@
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"aot": true,
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.scss"
],
"scripts": []
"assets": ["src/favicon.ico", "src/assets"],
"styles": ["src/styles.scss"],
"scripts": [],
"allowedCommonJsDependencies": ["url-parse", "query-string", "src/app/core/services/cla-contributor.service"]
},
"configurations": {
"production": {
Expand All @@ -43,7 +39,6 @@
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
Expand Down Expand Up @@ -71,7 +66,6 @@
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
Expand Down Expand Up @@ -99,7 +93,6 @@
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
Expand Down Expand Up @@ -143,27 +136,16 @@
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.scss"
],
"assets": ["src/favicon.ico", "src/assets"],
"styles": ["src/styles.scss"],
"scripts": []
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"tsconfig.app.json",
"tsconfig.spec.json",
"e2e/tsconfig.json"
],
"exclude": [
"**/node_modules/**"
]
"tsConfig": ["tsconfig.app.json", "tsconfig.spec.json", "e2e/tsconfig.json"],
"exclude": ["**/node_modules/**"]
}
},
"e2e": {
Expand All @@ -185,4 +167,4 @@
"cli": {
"analytics": false
}
}
}
2 changes: 1 addition & 1 deletion e2e/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../tsconfig.base.json",
"extends": "../tsconfig.json",
"compilerOptions": {
"resolveJsonModule": true,
"esModuleInterop": true,
Expand Down
113 changes: 28 additions & 85 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@
},
"version": "0.1.0",
"scripts": {
"ng": "./node_modules/@angular/cli/bin/ng",
"serve": "./node_modules/@angular/cli/bin/ng serve",
"build": "./node_modules/@angular/cli/bin/ng build",
"ng": "ng",
"serve": "ng serve",
"build": "ng build",
"serve:dev:local": "yarn prebuild:dev && ng serve --port 8100",
"build:dev": "yarn prebuild:dev && ./node_modules/@angular/cli/bin/ng build --prod --configuration=dev",
"build:staging": "yarn prebuild:staging && ./node_modules/@angular/cli/bin/ng build --prod --configuration=staging",
"build:prod": "yarn prebuild:prod && ./node_modules/@angular/cli/bin/ng build --prod --configuration=production",
"build:dev": "yarn prebuild:dev && ng build --prod --configuration=dev",
"build:staging": "yarn prebuild:staging && ng build --prod --configuration=staging",
"build:prod": "yarn prebuild:prod && ng build --prod --configuration=production",
"serve-local": "ng serve --port 8100",
"test": "yarn test:unit",
"test:unit": "ng test --watch=false --progress=false --browsers=ChromeHeadless",
"lint": "./node_modules/@angular/cli/bin/ng lint",
"e2e": "./node_modules/@angular/cli/bin/ng e2e",
"lint": "ng lint",
"e2e": "ng e2e",
"sls": "./node_modules/serverless/bin/serverless.js",
"eslint": "./node_modules/.bin/eslint \"./src/**/*.ts\"",
"eslint-fix": "./node_modules/.bin/eslint \"./src/**/*.ts\" --fix",
"eslint": "eslint \"./src/**/*.ts\"",
"eslint-fix": "eslint \"./src/**/*.ts\" --fix",
"deploy:cloudfront:dev": "SLS_DEBUG=* ROOT_DOMAIN=dev.communitybridge.org PRODUCT_DOMAIN=easycla.dev.communitybridge.org yarn sls deploy --stage='dev' --cloudfront=true --verbose",
"deploy:frontend:dev": "SLS_DEBUG=* ROOT_DOMAIN=dev.communitybridge.org PRODUCT_DOMAIN=easycla.dev.communitybridge.org yarn sls client deploy --stage='dev' --cloudfront=true --no-confirm --no-policy-change --no-config-change --verbose",
"deploy:invalidate:dev": "SLS_DEBUG=* ROOT_DOMAIN=dev.communitybridge.org PRODUCT_DOMAIN=easycla.dev.communitybridge.org yarn sls cloudfrontInvalidate --stage='dev' --region='us-east-1' --cloudfront='true' --verbose",
Expand All @@ -41,15 +41,15 @@
},
"private": true,
"dependencies": {
"@angular/animations": "~10.0.3",
"@angular/common": "~10.0.3",
"@angular/compiler": "~10.0.3",
"@angular/core": "~10.0.3",
"@angular/forms": "~10.0.3",
"@angular/localize": "~10.2.4",
"@angular/platform-browser": "~10.0.3",
"@angular/platform-browser-dynamic": "~10.0.3",
"@angular/router": "~10.0.3",
"@angular/animations": "~11.2.14",
"@angular/common": "~11.2.14",
"@angular/compiler": "~11.2.14",
"@angular/core": "~11.2.14",
"@angular/forms": "~11.2.14",
"@angular/localize": "~11.2.14",
"@angular/platform-browser": "~11.2.14",
"@angular/platform-browser-dynamic": "~11.2.14",
"@angular/router": "~11.2.14",
"@fortawesome/fontawesome-free": "^5.15.1",
"@ng-bootstrap/ng-bootstrap": "^6.1.0",
"@silvermine/serverless-plugin-cloudfront-lambda-edge": "^2.1.1",
Expand All @@ -69,16 +69,16 @@
"serverless-plugin-tracing": "^2.0.0",
"serverless-prune-plugin": "^1.4.3",
"serverless-pseudo-parameters": "^2.5.0",
"tslib": "^2.0.3",
"tslib": "^2.0.0",
"url-parse": "^1.5.0",
"zone.js": "~0.11.3"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.1000.2",
"@angular/cli": "~10.0.2",
"@angular/compiler-cli": "~10.0.3",
"@angular/language-service": "~10.0.3",
"@types/jasmine": "~3.5.0",
"@angular-devkit/build-angular": "~0.1102.19",
"@angular/cli": "~11.2.19",
"@angular/compiler-cli": "~11.2.14",
"@angular/language-service": "~11.2.14",
"@types/jasmine": "~3.6.0",
"@types/jasminewd2": "~2.0.3",
"@types/node": "^12.19.11",
"@typescript-eslint/eslint-plugin": "^2.30.0",
Expand All @@ -87,74 +87,17 @@
"codelyzer": "^6.0.0",
"eslint": "^6.8.0",
"husky": "^4.2.5",
"jasmine-core": "~3.5.0",
"jasmine-core": "~3.6.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "^6.3.14",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~3.3.0",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.5.0",
"protractor": "~7.0.0",
"ts-node": "~8.3.0",
"tslint": "~6.1.0",
"typescript": "~3.9.6"
},
"resolutions": {
"ansi-html": "^0.0.8",
"ansi-regex": "^5.0.1",
"async": "^3.2.2",
"aws-sdk": "^2.820.0",
"axios": "^0.21.1",
"browserslist": "^4.16.5",
"color-string": "^1.5.5",
"decode-uri-component": "^0.2.1",
"dns-packet": "^5.2.2",
"elliptic": "^6.5.4",
"engine.io": "^6.2.1",
"eventsource": "^1.1.1",
"find-process": "^1.4.5",
"follow-redirects": "^1.14.7",
"hosted-git-info": "^3.0.8",
"ini": "^1.3.7",
"is-svg": "^4.2.2",
"glob-parent": "^5.1.2",
"got": "^11.8.5",
"json-schema": "^0.4.0",
"jszip": "^3.7.0",
"karma": "^6.3.14",
"loader-utils": "^2.0.4",
"lodash": "^4.17.21",
"log4js": "^6.4.0",
"minimatch": "^3.0.5",
"minimist": "^1.2.6",
"moment": "^2.29.4",
"netmask": "^2.0.1",
"nth-check": "^2.0.1",
"node-fetch": "^2.6.7",
"node-forge": "^1.0.0",
"normalize-url": "^6.0.1",
"object-path": "^0.11.5",
"pac-resolver": "^5.0.0",
"path-parse": "^1.0.7",
"postcss": "^7.0.38",
"protobufjs": "^6.10.3",
"semver-regex": "^3.1.3",
"set-getter": "^0.1.1",
"set-value": "^4.0.1",
"simple-git": "^3.3.0",
"socket.io": "^2.4.0",
"socket.io-parser": "^4.2.1",
"ssri": "^8.0.1",
"tar": "^6.1.9",
"terser": "^4.8.1",
"ua-parser-js": "^0.7.24",
"underscore": "^1.12.1",
"url-parse": "^1.5.0",
"vm2": "^3.9.11",
"webpack-subresource-integrity": "^1.5.1",
"ws": "^7.4.6",
"xmlhttprequest-ssl": "^1.6.1",
"y18n": "^5.0.5"
"typescript": "~4.1.6"
},
"husky": {
"hooks": {
Expand Down
2 changes: 1 addition & 1 deletion src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const routes: Routes = [
];

@NgModule({
imports: [RouterModule.forRoot(routes, { useHash: true })],
imports: [RouterModule.forRoot(routes, { useHash: true, relativeLinkResolution: 'legacy' })],
exports: [RouterModule]
})
export class AppRoutingModule { }
1 change: 1 addition & 0 deletions src/app/config/cla-env-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
// SPDX-License-Identifier: MIT

import * as env from './cla-env-config.json';

export const EnvConfig = env as any;
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright The Linux Foundation and each contributor to CommunityBridge.
// SPDX-License-Identifier: MIT

import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';

import { AddCompanyModalComponent } from './add-company-modal.component';
import { ReactiveFormsModule, FormsModule } from '@angular/forms';
Expand All @@ -14,7 +14,7 @@ describe('AddCompanyModalComponent', () => {
let component: AddCompanyModalComponent;
let fixture: ComponentFixture<AddCompanyModalComponent>;

beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [AddCompanyModalComponent],
imports: [FormsModule, ReactiveFormsModule, HttpClientModule, RouterTestingModule],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// Copyright The Linux Foundation and each contributor to CommunityBridge.
// SPDX-License-Identifier: MIT

import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { ClaNotSignedModalComponent } from './cla-not-signed-modal.component';

describe('ClaNotSignedModalComponent', () => {
let component: ClaNotSignedModalComponent;
let fixture: ComponentFixture<ClaNotSignedModalComponent>;

beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ClaNotSignedModalComponent],
})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// Copyright The Linux Foundation and each contributor to CommunityBridge.
// SPDX-License-Identifier: MIT

import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { ConfigureClaManagerModalComponent } from './configure-cla-manager-modal.component';

describe('ConfigureClaManagerModalComponent', () => {
let component: ConfigureClaManagerModalComponent;
let fixture: ComponentFixture<ConfigureClaManagerModalComponent>;

beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ConfigureClaManagerModalComponent],
})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright The Linux Foundation and each contributor to CommunityBridge.
// SPDX-License-Identifier: MIT

import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { IdentifyClaManagerModalComponent } from './identify-cla-manager-modal.component';
import { RouterTestingModule } from '@angular/router/testing';
import { HttpClientModule } from '@angular/common/http';
Expand All @@ -13,7 +13,7 @@ describe('IdentifyClaManagerModalComponent', () => {
let component: IdentifyClaManagerModalComponent;
let fixture: ComponentFixture<IdentifyClaManagerModalComponent>;

beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [IdentifyClaManagerModalComponent],
imports: [FormsModule, ReactiveFormsModule, HttpClientModule, RouterTestingModule],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// Copyright The Linux Foundation and each contributor to CommunityBridge.
// SPDX-License-Identifier: MIT

import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { ModalHeaderComponent } from './modal-header.component';

describe('ModalHeaderComponent', () => {
let component: ModalHeaderComponent;
let fixture: ComponentFixture<ModalHeaderComponent>;

beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ModalHeaderComponent],
})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright The Linux Foundation and each contributor to CommunityBridge.
// SPDX-License-Identifier: MIT

import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';

import { ClaRequestAuthorizationComponent } from './cla-request-authorization.component';
import { RouterTestingModule } from '@angular/router/testing';
Expand All @@ -13,7 +13,7 @@ describe('ClaRequestAuthorizationComponent', () => {
let component: ClaRequestAuthorizationComponent;
let fixture: ComponentFixture<ClaRequestAuthorizationComponent>;

beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ClaRequestAuthorizationComponent],
imports: [RouterTestingModule, HttpClientModule],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright The Linux Foundation and each contributor to CommunityBridge.
// SPDX-License-Identifier: MIT

import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';

import { CorporateDashboardComponent } from './corporate-dashboard.component';
import { RouterTestingModule } from '@angular/router/testing';
Expand All @@ -14,7 +14,7 @@ describe('CorporateDashboardComponent', () => {
let component: CorporateDashboardComponent;
let fixture: ComponentFixture<CorporateDashboardComponent>;

beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [CorporateDashboardComponent],
imports: [FormsModule, ReactiveFormsModule, RouterTestingModule, HttpClientModule],
Expand Down
Loading

0 comments on commit e27826b

Please sign in to comment.