Upgrading to Angular 12 and NgBootstrap 10
This commit is contained in:
		
							parent
							
								
									f96126d40b
								
							
						
					
					
						commit
						8be71577cc
					
				@ -145,7 +145,6 @@
 | 
			
		||||
            "main": "src/main.ts",
 | 
			
		||||
            "polyfills": "src/polyfills.ts",
 | 
			
		||||
            "tsConfig": "tsconfig.app.json",
 | 
			
		||||
            "aot": true,
 | 
			
		||||
            "assets": [
 | 
			
		||||
              "src/favicon.ico",
 | 
			
		||||
              "src/resources",
 | 
			
		||||
@ -157,7 +156,13 @@
 | 
			
		||||
            ],
 | 
			
		||||
            "scripts": [
 | 
			
		||||
              "generated-config.js"
 | 
			
		||||
            ]
 | 
			
		||||
            ],
 | 
			
		||||
            "vendorChunk": true,
 | 
			
		||||
            "extractLicenses": false,
 | 
			
		||||
            "buildOptimizer": false,
 | 
			
		||||
            "sourceMap": true,
 | 
			
		||||
            "optimization": false,
 | 
			
		||||
            "namedChunks": true
 | 
			
		||||
          },
 | 
			
		||||
          "configurations": {
 | 
			
		||||
            "production": {
 | 
			
		||||
@ -167,7 +172,14 @@
 | 
			
		||||
                  "with": "src/environments/environment.prod.ts"
 | 
			
		||||
                }
 | 
			
		||||
              ],
 | 
			
		||||
              "optimization": true,
 | 
			
		||||
              "optimization": {
 | 
			
		||||
                "scripts": true,
 | 
			
		||||
                "styles": {
 | 
			
		||||
                  "minify": true,
 | 
			
		||||
                  "inlineCritical": false
 | 
			
		||||
                },
 | 
			
		||||
                "fonts": true
 | 
			
		||||
              },
 | 
			
		||||
              "outputHashing": "all",
 | 
			
		||||
              "sourceMap": false,
 | 
			
		||||
              "namedChunks": false,
 | 
			
		||||
@ -186,7 +198,8 @@
 | 
			
		||||
                }
 | 
			
		||||
              ]
 | 
			
		||||
            }
 | 
			
		||||
          }
 | 
			
		||||
          },
 | 
			
		||||
          "defaultConfiguration": ""
 | 
			
		||||
        },
 | 
			
		||||
        "serve": {
 | 
			
		||||
          "builder": "@angular-devkit/build-angular:dev-server",
 | 
			
		||||
@ -270,7 +283,9 @@
 | 
			
		||||
          "options": {
 | 
			
		||||
            "outputPath": "dist/mempool/server",
 | 
			
		||||
            "main": "server.ts",
 | 
			
		||||
            "tsConfig": "tsconfig.server.json"
 | 
			
		||||
            "tsConfig": "tsconfig.server.json",
 | 
			
		||||
            "sourceMap": true,
 | 
			
		||||
            "optimization": false
 | 
			
		||||
          },
 | 
			
		||||
          "configurations": {
 | 
			
		||||
            "production": {
 | 
			
		||||
@ -285,7 +300,8 @@
 | 
			
		||||
              "localize": true,
 | 
			
		||||
              "optimization": true
 | 
			
		||||
            }
 | 
			
		||||
          }
 | 
			
		||||
          },
 | 
			
		||||
          "defaultConfiguration": ""
 | 
			
		||||
        },
 | 
			
		||||
        "serve-ssr": {
 | 
			
		||||
          "builder": "@nguniversal/builders:ssr-dev-server",
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										15653
									
								
								frontend/package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										15653
									
								
								frontend/package-lock.json
									
									
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@ -22,7 +22,7 @@
 | 
			
		||||
  "scripts": {
 | 
			
		||||
    "ng": "./node_modules/@angular/cli/bin/ng",
 | 
			
		||||
    "tsc": "./node_modules/typescript/bin/tsc",
 | 
			
		||||
    "i18n-extract-from-source": "./node_modules/@angular/cli/bin/ng extract-i18n --ivy --out-file ./src/locale/messages.xlf",
 | 
			
		||||
    "i18n-extract-from-source": "./node_modules/@angular/cli/bin/ng extract-i18n --out-file ./src/locale/messages.xlf",
 | 
			
		||||
    "i18n-pull-from-transifex": "tx pull -a --parallel --minimum-perc 1 --force",
 | 
			
		||||
    "serve": "npm run generate-config && ng serve -c local",
 | 
			
		||||
    "serve:stg": "npm run generate-config && ng serve -c staging",
 | 
			
		||||
@ -30,7 +30,7 @@
 | 
			
		||||
    "start": "npm run generate-config && npm run sync-assets-dev && ng serve -c local",
 | 
			
		||||
    "start:stg": "npm run generate-config && npm run sync-assets-dev && ng serve -c staging",
 | 
			
		||||
    "start:local-prod": "npm run generate-config && npm run sync-assets-dev && ng serve -c local-prod",
 | 
			
		||||
    "build": "npm run generate-config && ng build --prod --localize && npm run sync-assets && npm run build-mempool.js",
 | 
			
		||||
    "build": "npm run generate-config && ng build --configuration production --localize && npm run sync-assets && npm run build-mempool.js",
 | 
			
		||||
    "sync-assets": "node sync-assets.js && rsync -av ./dist/mempool/browser/en-US/resources ./dist/mempool/browser/resources",
 | 
			
		||||
    "sync-assets-dev": "node sync-assets.js dev",
 | 
			
		||||
    "generate-config": "node generate-config.js",
 | 
			
		||||
@ -53,23 +53,23 @@
 | 
			
		||||
    "cypress:run:ci": "node update-config.js TESTNET_ENABLED=true SIGNET_ENABLED=true LIQUID_ENABLED=true BISQ_ENABLED=true ITEMS_PER_PAGE=25 && npm run generate-config && start-server-and-test serve:local-prod 4200 cypress:run:record"
 | 
			
		||||
  },
 | 
			
		||||
  "dependencies": {
 | 
			
		||||
    "@angular/animations": "~11.2.8",
 | 
			
		||||
    "@angular/common": "~11.2.8",
 | 
			
		||||
    "@angular/compiler": "~11.2.8",
 | 
			
		||||
    "@angular/core": "~11.2.8",
 | 
			
		||||
    "@angular/forms": "~11.2.8",
 | 
			
		||||
    "@angular/localize": "^11.2.8",
 | 
			
		||||
    "@angular/platform-browser": "~11.2.8",
 | 
			
		||||
    "@angular/platform-browser-dynamic": "~11.2.8",
 | 
			
		||||
    "@angular/platform-server": "~11.2.8",
 | 
			
		||||
    "@angular/router": "~11.2.8",
 | 
			
		||||
    "@angular/animations": "~12.2.6",
 | 
			
		||||
    "@angular/common": "~12.2.6",
 | 
			
		||||
    "@angular/compiler": "~12.2.6",
 | 
			
		||||
    "@angular/core": "~12.2.6",
 | 
			
		||||
    "@angular/forms": "~12.2.6",
 | 
			
		||||
    "@angular/localize": "^12.2.6",
 | 
			
		||||
    "@angular/platform-browser": "~12.2.6",
 | 
			
		||||
    "@angular/platform-browser-dynamic": "~12.2.6",
 | 
			
		||||
    "@angular/platform-server": "~12.2.6",
 | 
			
		||||
    "@angular/router": "~12.2.6",
 | 
			
		||||
    "@fortawesome/angular-fontawesome": "^0.8.2",
 | 
			
		||||
    "@fortawesome/fontawesome-common-types": "^0.2.35",
 | 
			
		||||
    "@fortawesome/fontawesome-svg-core": "^1.2.35",
 | 
			
		||||
    "@fortawesome/free-solid-svg-icons": "^5.15.3",
 | 
			
		||||
    "@juggle/resize-observer": "^3.3.1",
 | 
			
		||||
    "@mempool/mempool.js": "^2.2.4",
 | 
			
		||||
    "@ng-bootstrap/ng-bootstrap": "^7.0.0",
 | 
			
		||||
    "@ng-bootstrap/ng-bootstrap": "^10.0.0",
 | 
			
		||||
    "@nguniversal/express-engine": "11.2.1",
 | 
			
		||||
    "@types/qrcode": "^1.3.4",
 | 
			
		||||
    "bootstrap": "4.5.0",
 | 
			
		||||
@ -90,10 +90,10 @@
 | 
			
		||||
    "zone.js": "~0.11.4"
 | 
			
		||||
  },
 | 
			
		||||
  "devDependencies": {
 | 
			
		||||
    "@angular-devkit/build-angular": "^0.1102.7",
 | 
			
		||||
    "@angular/cli": "~11.2.7",
 | 
			
		||||
    "@angular/compiler-cli": "~11.2.8",
 | 
			
		||||
    "@angular/language-service": "~11.2.8",
 | 
			
		||||
    "@angular-devkit/build-angular": "^12.2.6",
 | 
			
		||||
    "@angular/cli": "~12.2.6",
 | 
			
		||||
    "@angular/compiler-cli": "~12.2.6",
 | 
			
		||||
    "@angular/language-service": "~12.2.6",
 | 
			
		||||
    "@nguniversal/builders": "^11.2.1",
 | 
			
		||||
    "@types/express": "^4.17.0",
 | 
			
		||||
    "@types/jasmine": "~3.6.0",
 | 
			
		||||
@ -103,14 +103,14 @@
 | 
			
		||||
    "http-proxy-middleware": "^1.0.5",
 | 
			
		||||
    "jasmine-core": "~3.6.0",
 | 
			
		||||
    "jasmine-spec-reporter": "~5.0.0",
 | 
			
		||||
    "karma": "~6.1.0",
 | 
			
		||||
    "karma": "~6.3.4",
 | 
			
		||||
    "karma-chrome-launcher": "~3.1.0",
 | 
			
		||||
    "karma-coverage": "~2.0.3",
 | 
			
		||||
    "karma-jasmine": "~4.0.0",
 | 
			
		||||
    "karma-jasmine-html-reporter": "^1.5.0",
 | 
			
		||||
    "ts-node": "~8.3.0",
 | 
			
		||||
    "tslint": "~6.1.0",
 | 
			
		||||
    "typescript": "~4.1.5"
 | 
			
		||||
    "typescript": "~4.3.5"
 | 
			
		||||
  },
 | 
			
		||||
  "optionalDependencies": {
 | 
			
		||||
    "@cypress/schematic": "^1.3.0",
 | 
			
		||||
 | 
			
		||||
@ -1,4 +1,4 @@
 | 
			
		||||
import 'zone.js/dist/zone-node';
 | 
			
		||||
import 'zone.js/node';
 | 
			
		||||
import './generated-config';
 | 
			
		||||
 | 
			
		||||
import * as domino from 'domino';
 | 
			
		||||
 | 
			
		||||
@ -1,4 +1,4 @@
 | 
			
		||||
import 'zone.js/dist/zone-node';
 | 
			
		||||
import 'zone.js/node';
 | 
			
		||||
import './generated-config';
 | 
			
		||||
 | 
			
		||||
import { ngExpressEngine } from '@nguniversal/express-engine';
 | 
			
		||||
 | 
			
		||||
@ -17,7 +17,7 @@ export class HttpCacheInterceptor implements HttpInterceptor {
 | 
			
		||||
  intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
 | 
			
		||||
    if (this.isBrowser && request.method === 'GET') {
 | 
			
		||||
 | 
			
		||||
      const cachedResponse = this.transferState.get(makeStateKey(request.url), null);
 | 
			
		||||
      const cachedResponse = this.transferState.get<any>(makeStateKey(request.url), null);
 | 
			
		||||
      if (cachedResponse) {
 | 
			
		||||
        const modifiedResponse = new HttpResponse<any>({
 | 
			
		||||
          headers: cachedResponse.headers,
 | 
			
		||||
@ -35,7 +35,7 @@ export class HttpCacheInterceptor implements HttpInterceptor {
 | 
			
		||||
      .pipe(tap((event: HttpEvent<any>) => {
 | 
			
		||||
        if (!this.isBrowser && event instanceof HttpResponse) {
 | 
			
		||||
          let keyId = request.url.split('/').slice(3).join('/');
 | 
			
		||||
          this.transferState.set(makeStateKey('/' + keyId), event);
 | 
			
		||||
          this.transferState.set<any>(makeStateKey('/' + keyId), event);
 | 
			
		||||
        }
 | 
			
		||||
      }));
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
@ -14,4 +14,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.
 | 
			
		||||
 | 
			
		||||
@ -59,7 +59,7 @@ import '@angular/localize/init';
 | 
			
		||||
/***************************************************************************************************
 | 
			
		||||
 * 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.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/***************************************************************************************************
 | 
			
		||||
 | 
			
		||||
@ -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,
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user