From d99905379c03a395bb2a51eb53ade1186acd60b7 Mon Sep 17 00:00:00 2001 From: Oscar Hinton Date: Mon, 4 Nov 2024 17:51:43 +0100 Subject: [PATCH] [PM-4347] Upgrade angular to 17 (#11031) Upgrade angular to 17 --- angular.json | 4 +- apps/web/src/polyfills.ts | 3 +- .../default-active-user-state.spec.ts | 3 +- .../src/platform/state/key-definition.spec.ts | 3 +- .../src/vault/models/domain/login.spec.ts | 3 +- libs/components/src/item/item.mdx | 2 +- libs/components/src/item/item.stories.ts | 18 +- package-lock.json | 11411 ++++++---------- package.json | 45 +- 9 files changed, 4304 insertions(+), 7188 deletions(-) diff --git a/angular.json b/angular.json index 1670491b6f..7053050262 100644 --- a/angular.json +++ b/angular.json @@ -128,10 +128,10 @@ "builder": "@angular-devkit/build-angular:dev-server", "configurations": { "production": { - "browserTarget": "test-storybook:build:production" + "buildTarget": "test-storybook:build:production" }, "development": { - "browserTarget": "test-storybook:build:development" + "buildTarget": "test-storybook:build:development" } }, "defaultConfiguration": "development" diff --git a/apps/web/src/polyfills.ts b/apps/web/src/polyfills.ts index cc26cd13ab..33af553f78 100644 --- a/apps/web/src/polyfills.ts +++ b/apps/web/src/polyfills.ts @@ -1,10 +1,9 @@ import "core-js/stable"; -require("zone.js/dist/zone"); +import "zone.js"; if (process.env.NODE_ENV === "production") { // Production } else { // Development and test Error["stackTraceLimit"] = Infinity; - require("zone.js/dist/long-stack-trace-zone"); } diff --git a/libs/common/src/platform/state/implementations/default-active-user-state.spec.ts b/libs/common/src/platform/state/implementations/default-active-user-state.spec.ts index 99cc785f9b..b73415d6b7 100644 --- a/libs/common/src/platform/state/implementations/default-active-user-state.spec.ts +++ b/libs/common/src/platform/state/implementations/default-active-user-state.spec.ts @@ -220,7 +220,8 @@ describe("DefaultActiveUserState", () => { it("should not emit a previous users value if that user is no longer active", async () => { const user1Data: Jsonify = { date: "2020-09-21T13:14:17.648Z", - array: ["value"], + // NOTE: `as any` is here until we migrate to Nx: https://bitwarden.atlassian.net/browse/PM-6493 + array: ["value"] as any, }; const user2Data: Jsonify = { date: "2020-09-21T13:14:17.648Z", diff --git a/libs/common/src/platform/state/key-definition.spec.ts b/libs/common/src/platform/state/key-definition.spec.ts index 4eed038481..3406a4e901 100644 --- a/libs/common/src/platform/state/key-definition.spec.ts +++ b/libs/common/src/platform/state/key-definition.spec.ts @@ -192,7 +192,8 @@ describe("KeyDefinition", () => { expect(arrayDefinition).toBeTruthy(); expect(arrayDefinition.deserializer).toBeTruthy(); - const deserializedValue = arrayDefinition.deserializer([false, true]); + // NOTE: `as any` is here until we migrate to Nx: https://bitwarden.atlassian.net/browse/PM-6493 + const deserializedValue = arrayDefinition.deserializer([false, true] as any); expect(deserializedValue).toBeTruthy(); expect(deserializedValue).toHaveLength(2); diff --git a/libs/common/src/vault/models/domain/login.spec.ts b/libs/common/src/vault/models/domain/login.spec.ts index e420a953e6..4f9e454622 100644 --- a/libs/common/src/vault/models/domain/login.spec.ts +++ b/libs/common/src/vault/models/domain/login.spec.ts @@ -151,6 +151,7 @@ describe("Login DTO", () => { password: "myPassword" as EncryptedString, passwordRevisionDate: passwordRevisionDate.toISOString(), totp: "myTotp" as EncryptedString, + // NOTE: `as any` is here until we migrate to Nx: https://bitwarden.atlassian.net/browse/PM-6493 fido2Credentials: [ { credentialId: "keyId" as EncryptedString, @@ -167,7 +168,7 @@ describe("Login DTO", () => { discoverable: "discoverable" as EncryptedString, creationDate: fido2CreationDate.toISOString(), }, - ], + ] as any, }); expect(actual).toEqual({ diff --git a/libs/components/src/item/item.mdx b/libs/components/src/item/item.mdx index b5c7da80ba..ca697ebb43 100644 --- a/libs/components/src/item/item.mdx +++ b/libs/components/src/item/item.mdx @@ -71,7 +71,7 @@ The content can be a button, anchor, or static container.