Sfoglia il codice sorgente

feat(admin-ui): Update to Angular v15.x

Michael Bromley 2 anni fa
parent
commit
0c503b4389

+ 14 - 14
packages/admin-ui/package.json

@@ -20,15 +20,15 @@
     "directory": "package"
   },
   "dependencies": {
-    "@angular/animations": "14.2.12",
+    "@angular/animations": "15.2.1",
     "@angular/cdk": "13.2.3",
-    "@angular/common": "14.2.12",
-    "@angular/core": "14.2.12",
-    "@angular/forms": "14.2.12",
-    "@angular/language-service": "14.2.12",
-    "@angular/platform-browser": "14.2.12",
-    "@angular/platform-browser-dynamic": "14.2.12",
-    "@angular/router": "14.2.12",
+    "@angular/common": "15.2.1",
+    "@angular/core": "15.2.1",
+    "@angular/forms": "15.2.1",
+    "@angular/language-service": "15.2.1",
+    "@angular/platform-browser": "15.2.1",
+    "@angular/platform-browser-dynamic": "15.2.1",
+    "@angular/router": "15.2.1",
     "@apollo/client": "^3.5.5",
     "@biesbjerg/ngx-translate-extract-marker": "^1.0.0",
     "@cds/core": "^5.6.4",
@@ -66,10 +66,10 @@
     "zone.js": "~0.11.4"
   },
   "devDependencies": {
-    "@angular-devkit/build-angular": "^14.2.10",
-    "@angular/cli": "14.2.10",
-    "@angular/compiler": "14.2.12",
-    "@angular/compiler-cli": "14.2.12",
+    "@angular-devkit/build-angular": "^15.2.1",
+    "@angular/cli": "15.2.1",
+    "@angular/compiler": "15.2.1",
+    "@angular/compiler-cli": "15.2.1",
     "@vendure/ngx-translate-extract": "^8.0.5",
     "@types/jasmine": "~3.6.0",
     "@types/jasminewd2": "~2.0.6",
@@ -85,11 +85,11 @@
     "karma-jasmine": "~4.0.0",
     "karma-jasmine-html-reporter": "^1.7.0",
     "karma-mocha-reporter": "^2.2.5",
-    "ng-packagr": "14.2.2",
+    "ng-packagr": "15.2.2",
     "protractor": "~7.0.0",
     "puppeteer": "^8.0.0",
     "rimraf": "^3.0.2",
     "tslint": "~6.1.3",
     "typescript": "4.8.4"
   }
-}
+}

+ 0 - 17
packages/admin-ui/src/.browserslistrc

@@ -1,17 +0,0 @@
-# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
-# For additional information regarding the format and rule options, please see:
-# https://github.com/browserslist/browserslist#queries
-
-# For the full list of supported browsers by the Angular framework, please see:
-# https://angular.io/guide/browser-support
-
-# You can see what browsers were selected by your queries by running:
-#   npx browserslist
-
-last 1 Chrome version
-last 1 Firefox version
-last 2 Edge major versions
-last 2 Safari major versions
-last 2 iOS major versions
-Firefox ESR
-not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.

+ 1 - 5
packages/admin-ui/src/app/app.module.ts

@@ -7,11 +7,7 @@ import { routes } from './app.routes';
 
 @NgModule({
     declarations: [],
-    imports: [
-        CommonModule,
-        AppComponentModule,
-        RouterModule.forRoot(routes, { useHash: false, relativeLinkResolution: 'legacy' }),
-    ],
+    imports: [CommonModule, AppComponentModule, RouterModule.forRoot(routes, { useHash: false })],
     providers: [],
     bootstrap: [AppComponent],
 })

+ 1 - 7
packages/admin-ui/src/test.ts

@@ -7,13 +7,7 @@ import {
     platformBrowserDynamicTesting,
 } from '@angular/platform-browser-dynamic/testing';
 
-declare const require: any;
-
 // First, initialize the Angular testing environment.
 getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
-    teardown: { destroyAfterEach: false }
+    teardown: { destroyAfterEach: false },
 });
-// Then we find all the tests.
-const context = require.context('./', true, /\.spec\.ts$/);
-// And load the modules.
-context.keys().map(context);

+ 3 - 2
packages/admin-ui/tsconfig.json

@@ -12,7 +12,7 @@
     "strict": true,
     "noImplicitAny": false,
     "strictPropertyInitialization": false,
-    "target": "es2020",
+    "target": "ES2022",
     "skipLibCheck": true,
     "esModuleInterop": true,
     "allowSyntheticDefaultImports": true,
@@ -56,6 +56,7 @@
       "@vendure/admin-ui/system": [
         "./src/lib/system/src/public_api"
       ]
-    }
+    },
+    "useDefineForClassFields": false
   }
 }

+ 0 - 1
packages/admin-ui/tsconfig.lib.json

@@ -3,7 +3,6 @@
   "compilerOptions": {
     "outDir": "../../out-tsc/lib",
     "declarationMap": true,
-    "target": "es2020",
     "declaration": true,
     "inlineSources": true,
     "types": [],

File diff suppressed because it is too large
+ 231 - 374
yarn.lock


Some files were not shown because too many files changed in this diff