mirror of
https://github.com/bitwarden/browser
synced 2025-12-19 01:33:33 +00:00
[deps] Autofill: Update prettier to v3 (#7014)
* [deps] Autofill: Update prettier to v3 * prettier formatting updates --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Jonathan Prusik <jprusik@classynemesis.com>
This commit is contained in:
@@ -75,7 +75,7 @@ describe("RemoveLegacyEtmKeyMigrator", () => {
|
||||
await sut.migrate(helper);
|
||||
expect(helper.set).not.toHaveBeenCalledWith(
|
||||
matches((s) => s != "global"),
|
||||
any()
|
||||
any(),
|
||||
);
|
||||
});
|
||||
});
|
||||
@@ -95,7 +95,7 @@ describe("RemoveLegacyEtmKeyMigrator", () => {
|
||||
"global",
|
||||
Object.assign({}, exampleJSON().global, {
|
||||
stateVersion: 7,
|
||||
})
|
||||
}),
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -50,7 +50,7 @@ describe("moveStateVersion", () => {
|
||||
it("should throw if state version not found", async () => {
|
||||
helper.get.mockReturnValue({ otherStuff: "otherStuff1" } as any);
|
||||
await expect(sut.migrate(helper)).rejects.toThrow(
|
||||
"Migration failed, state version not found"
|
||||
"Migration failed, state version not found",
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ type TestState = { authenticatedAccounts: string[] } & { [key: string]: unknown
|
||||
// This could become a helper available to anyone
|
||||
const runMigrator = async <TMigrator extends Migrator<number, number>>(
|
||||
migrator: TMigrator,
|
||||
initalData?: Record<string, unknown>
|
||||
initalData?: Record<string, unknown>,
|
||||
): Promise<Record<string, unknown>> => {
|
||||
const fakeStorageService = new FakeStorageService(initalData);
|
||||
const helper = new MigrationHelper(migrator.fromVersion, fakeStorageService, mock());
|
||||
|
||||
@@ -27,7 +27,7 @@ export class MoveBrowserSettingsToGlobal extends Migrator<8, 9> {
|
||||
tryAddSetting(
|
||||
accounts: { userId: string; account: ExpectedAccountType }[],
|
||||
accountSelector: (account: ExpectedAccountType) => boolean | undefined,
|
||||
globalSetter: (value: boolean | undefined) => void
|
||||
globalSetter: (value: boolean | undefined) => void,
|
||||
): void {
|
||||
const hasValue = accounts.some(({ account }) => {
|
||||
return accountSelector(account) !== undefined;
|
||||
@@ -65,19 +65,19 @@ export class MoveBrowserSettingsToGlobal extends Migrator<8, 9> {
|
||||
this.tryAddSetting(
|
||||
accounts,
|
||||
(a) => a.settings?.disableAddLoginNotification,
|
||||
(v) => (targetGlobalState.disableAddLoginNotification = v)
|
||||
(v) => (targetGlobalState.disableAddLoginNotification = v),
|
||||
);
|
||||
|
||||
this.tryAddSetting(
|
||||
accounts,
|
||||
(a) => a.settings?.disableChangedPasswordNotification,
|
||||
(v) => (targetGlobalState.disableChangedPasswordNotification = v)
|
||||
(v) => (targetGlobalState.disableChangedPasswordNotification = v),
|
||||
);
|
||||
|
||||
this.tryAddSetting(
|
||||
accounts,
|
||||
(a) => a.settings?.disableContextMenuItem,
|
||||
(v) => (targetGlobalState.disableContextMenuItem = v)
|
||||
(v) => (targetGlobalState.disableContextMenuItem = v),
|
||||
);
|
||||
|
||||
await helper.set<TargetGlobalState>("global", {
|
||||
@@ -92,7 +92,7 @@ export class MoveBrowserSettingsToGlobal extends Migrator<8, 9> {
|
||||
delete account.settings?.disableContextMenuItem;
|
||||
delete account.settings?.neverDomains;
|
||||
await helper.set(userId, account);
|
||||
})
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user