mirror of
https://github.com/bitwarden/browser.git
synced 2025-02-19 01:51:27 +01:00
Merge branch 'main' into autofill/pm-8027-inline-menu-appears-within-input-fields-that-do-not-relate-to-user-login
This commit is contained in:
commit
1fac4e3a34
2
.github/workflows/build-cli.yml
vendored
2
.github/workflows/build-cli.yml
vendored
@ -65,7 +65,7 @@ jobs:
|
|||||||
os:
|
os:
|
||||||
[
|
[
|
||||||
{ base: "linux", distro: "ubuntu-22.04" },
|
{ base: "linux", distro: "ubuntu-22.04" },
|
||||||
{ base: "mac", distro: "macos-11" }
|
{ base: "mac", distro: "macos-13" }
|
||||||
]
|
]
|
||||||
license_type:
|
license_type:
|
||||||
[
|
[
|
||||||
|
28
.github/workflows/build-desktop.yml
vendored
28
.github/workflows/build-desktop.yml
vendored
@ -444,10 +444,7 @@ jobs:
|
|||||||
|
|
||||||
macos-build:
|
macos-build:
|
||||||
name: MacOS Build
|
name: MacOS Build
|
||||||
# Note, this workflow is running on macOS 11 to maintain compatibility with macOS 10.15 Catalina,
|
runs-on: macos-13
|
||||||
# as the newer versions will case the native modules to be incompatible with older macOS systems
|
|
||||||
# This version should stay pinned until we drop support for macOS 10.15, or we drop the native modules
|
|
||||||
runs-on: macos-11
|
|
||||||
needs: setup
|
needs: setup
|
||||||
env:
|
env:
|
||||||
_PACKAGE_VERSION: ${{ needs.setup.outputs.package_version }}
|
_PACKAGE_VERSION: ${{ needs.setup.outputs.package_version }}
|
||||||
@ -605,10 +602,7 @@ jobs:
|
|||||||
|
|
||||||
macos-package-github:
|
macos-package-github:
|
||||||
name: MacOS Package GitHub Release Assets
|
name: MacOS Package GitHub Release Assets
|
||||||
# Note, this workflow is running on macOS 11 to maintain compatibility with macOS 10.15 Catalina,
|
runs-on: macos-13
|
||||||
# as the newer versions will case the native modules to be incompatible with older macOS systems
|
|
||||||
# This version should stay pinned until we drop support for macOS 10.15, or we drop the native modules
|
|
||||||
runs-on: macos-11
|
|
||||||
needs:
|
needs:
|
||||||
- browser-build
|
- browser-build
|
||||||
- macos-build
|
- macos-build
|
||||||
@ -814,10 +808,7 @@ jobs:
|
|||||||
|
|
||||||
macos-package-mas:
|
macos-package-mas:
|
||||||
name: MacOS Package Prod Release Asset
|
name: MacOS Package Prod Release Asset
|
||||||
# Note, this workflow is running on macOS 11 to maintain compatibility with macOS 10.15 Catalina,
|
runs-on: macos-13
|
||||||
# as the newer versions will case the native modules to be incompatible with older macOS systems
|
|
||||||
# This version should stay pinned until we drop support for macOS 10.15, or we drop the native modules
|
|
||||||
runs-on: macos-11
|
|
||||||
needs:
|
needs:
|
||||||
- browser-build
|
- browser-build
|
||||||
- macos-build
|
- macos-build
|
||||||
@ -1014,11 +1005,7 @@ jobs:
|
|||||||
|
|
||||||
macos-package-dev:
|
macos-package-dev:
|
||||||
name: MacOS Package Dev Release Asset
|
name: MacOS Package Dev Release Asset
|
||||||
if: false # We need to look into how code signing works for dev
|
runs-on: macos-13
|
||||||
# Note, this workflow is running on macOS 11 to maintain compatibility with macOS 10.15 Catalina,
|
|
||||||
# as the newer versions will case the native modules to be incompatible with older macOS systems
|
|
||||||
# This version should stay pinned until we drop support for macOS 10.15, or we drop the native modules
|
|
||||||
runs-on: macos-11
|
|
||||||
needs:
|
needs:
|
||||||
- browser-build
|
- browser-build
|
||||||
- macos-build
|
- macos-build
|
||||||
@ -1188,14 +1175,15 @@ jobs:
|
|||||||
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
|
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
|
||||||
|
|
||||||
- name: Zip masdev asset
|
- name: Zip masdev asset
|
||||||
working-directory: ./dist/mas-dev-universal
|
run: |
|
||||||
run: zip -r Bitwarden-${{ env.PACKAGE_VERSION }}-masdev-universal.zip Bitwarden.app
|
cd dist/mas-dev-universal
|
||||||
|
zip -r Bitwarden-${{ env._PACKAGE_VERSION }}-masdev-universal.zip Bitwarden.app
|
||||||
|
|
||||||
- name: Upload masdev artifact
|
- name: Upload masdev artifact
|
||||||
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
|
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
|
||||||
with:
|
with:
|
||||||
name: Bitwarden-${{ env._PACKAGE_VERSION }}-masdev-universal.zip
|
name: Bitwarden-${{ env._PACKAGE_VERSION }}-masdev-universal.zip
|
||||||
path: apps/desktop/dist/mas-universal/Bitwarden-${{ env._PACKAGE_VERSION }}-masdev-universal.zip
|
path: apps/desktop/dist/mas-dev-universal/Bitwarden-${{ env._PACKAGE_VERSION }}-masdev-universal.zip
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
|
|
||||||
|
21
.github/workflows/release-desktop-beta.yml
vendored
21
.github/workflows/release-desktop-beta.yml
vendored
@ -393,10 +393,7 @@ jobs:
|
|||||||
|
|
||||||
macos-build:
|
macos-build:
|
||||||
name: MacOS Build
|
name: MacOS Build
|
||||||
# Note, this workflow is running on macOS 11 to maintain compatibility with macOS 10.15 Catalina,
|
runs-on: macos-13
|
||||||
# as the newer versions will case the native modules to be incompatible with older macOS systems
|
|
||||||
# This version should stay pinned until we drop support for macOS 10.15, or we drop the native modules
|
|
||||||
runs-on: macos-11
|
|
||||||
needs: setup
|
needs: setup
|
||||||
env:
|
env:
|
||||||
_PACKAGE_VERSION: ${{ needs.setup.outputs.release-version }}
|
_PACKAGE_VERSION: ${{ needs.setup.outputs.release-version }}
|
||||||
@ -457,7 +454,7 @@ jobs:
|
|||||||
|
|
||||||
az keyvault secret show --id https://bitwarden-ci.vault.azure.net/certificates/bitwarden-desktop-key |
|
az keyvault secret show --id https://bitwarden-ci.vault.azure.net/certificates/bitwarden-desktop-key |
|
||||||
jq -r .value | base64 -d > $HOME/certificates/bitwarden-desktop-key.p12
|
jq -r .value | base64 -d > $HOME/certificates/bitwarden-desktop-key.p12
|
||||||
|
|
||||||
az keyvault secret show --id https://bitwarden-ci.vault.azure.net/certificates/appstore-app-cert |
|
az keyvault secret show --id https://bitwarden-ci.vault.azure.net/certificates/appstore-app-cert |
|
||||||
jq -r .value | base64 -d > $HOME/certificates/appstore-app-cert.p12
|
jq -r .value | base64 -d > $HOME/certificates/appstore-app-cert.p12
|
||||||
|
|
||||||
@ -525,10 +522,7 @@ jobs:
|
|||||||
|
|
||||||
macos-package-github:
|
macos-package-github:
|
||||||
name: MacOS Package GitHub Release Assets
|
name: MacOS Package GitHub Release Assets
|
||||||
# Note, this workflow is running on macOS 11 to maintain compatibility with macOS 10.15 Catalina,
|
runs-on: macos-13
|
||||||
# as the newer versions will case the native modules to be incompatible with older macOS systems
|
|
||||||
# This version should stay pinned until we drop support for macOS 10.15, or we drop the native modules
|
|
||||||
runs-on: macos-11
|
|
||||||
needs:
|
needs:
|
||||||
- setup
|
- setup
|
||||||
- macos-build
|
- macos-build
|
||||||
@ -596,7 +590,7 @@ jobs:
|
|||||||
|
|
||||||
az keyvault secret show --id https://bitwarden-ci.vault.azure.net/certificates/bitwarden-desktop-key |
|
az keyvault secret show --id https://bitwarden-ci.vault.azure.net/certificates/bitwarden-desktop-key |
|
||||||
jq -r .value | base64 -d > $HOME/certificates/bitwarden-desktop-key.p12
|
jq -r .value | base64 -d > $HOME/certificates/bitwarden-desktop-key.p12
|
||||||
|
|
||||||
az keyvault secret show --id https://bitwarden-ci.vault.azure.net/certificates/appstore-app-cert |
|
az keyvault secret show --id https://bitwarden-ci.vault.azure.net/certificates/appstore-app-cert |
|
||||||
jq -r .value | base64 -d > $HOME/certificates/appstore-app-cert.p12
|
jq -r .value | base64 -d > $HOME/certificates/appstore-app-cert.p12
|
||||||
|
|
||||||
@ -738,10 +732,7 @@ jobs:
|
|||||||
|
|
||||||
macos-package-mas:
|
macos-package-mas:
|
||||||
name: MacOS Package Prod Release Asset
|
name: MacOS Package Prod Release Asset
|
||||||
# Note, this workflow is running on macOS 11 to maintain compatibility with macOS 10.15 Catalina,
|
runs-on: macos-13
|
||||||
# as the newer versions will case the native modules to be incompatible with older macOS systems
|
|
||||||
# This version should stay pinned until we drop support for macOS 10.15, or we drop the native modules
|
|
||||||
runs-on: macos-11
|
|
||||||
needs:
|
needs:
|
||||||
- setup
|
- setup
|
||||||
- macos-build
|
- macos-build
|
||||||
@ -804,7 +795,7 @@ jobs:
|
|||||||
|
|
||||||
az keyvault secret show --id https://bitwarden-ci.vault.azure.net/certificates/bitwarden-desktop-key |
|
az keyvault secret show --id https://bitwarden-ci.vault.azure.net/certificates/bitwarden-desktop-key |
|
||||||
jq -r .value | base64 -d > $HOME/certificates/bitwarden-desktop-key.p12
|
jq -r .value | base64 -d > $HOME/certificates/bitwarden-desktop-key.p12
|
||||||
|
|
||||||
az keyvault secret show --id https://bitwarden-ci.vault.azure.net/certificates/appstore-app-cert |
|
az keyvault secret show --id https://bitwarden-ci.vault.azure.net/certificates/appstore-app-cert |
|
||||||
jq -r .value | base64 -d > $HOME/certificates/appstore-app-cert.p12
|
jq -r .value | base64 -d > $HOME/certificates/appstore-app-cert.p12
|
||||||
|
|
||||||
|
@ -144,7 +144,7 @@ describe("AutofillInit", () => {
|
|||||||
.mockResolvedValue(pageDetails);
|
.mockResolvedValue(pageDetails);
|
||||||
|
|
||||||
const response = await autofillInit["handleExtensionMessage"](message, sender, sendResponse);
|
const response = await autofillInit["handleExtensionMessage"](message, sender, sendResponse);
|
||||||
await Promise.resolve(response);
|
await flushPromises();
|
||||||
|
|
||||||
expect(response).toBe(true);
|
expect(response).toBe(true);
|
||||||
expect(sendResponse).toHaveBeenCalledWith(pageDetails);
|
expect(sendResponse).toHaveBeenCalledWith(pageDetails);
|
||||||
|
@ -37,14 +37,29 @@ describe("generateRandomCustomElementName", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe("sendExtensionMessage", () => {
|
describe("sendExtensionMessage", () => {
|
||||||
it("sends a message to the extention", () => {
|
it("sends a message to the extension", async () => {
|
||||||
const extensionMessageResponse = sendExtensionMessage("updateAutofillOverlayHidden", {
|
const extensionMessagePromise = sendExtensionMessage("updateAutofillOverlayHidden", {
|
||||||
display: "none",
|
display: "none",
|
||||||
});
|
});
|
||||||
jest.spyOn(chrome.runtime, "sendMessage");
|
|
||||||
|
|
||||||
expect(chrome.runtime.sendMessage).toHaveBeenCalled();
|
// Jest doesn't give anyway to select the typed overload of "sendMessage",
|
||||||
expect(extensionMessageResponse).toEqual(Promise.resolve({}));
|
// a cast is needed to get the correct spy type.
|
||||||
|
const sendMessageSpy = jest.spyOn(chrome.runtime, "sendMessage") as unknown as jest.SpyInstance<
|
||||||
|
void,
|
||||||
|
[message: string, responseCallback: (response: string) => void],
|
||||||
|
unknown
|
||||||
|
>;
|
||||||
|
|
||||||
|
expect(sendMessageSpy).toHaveBeenCalled();
|
||||||
|
|
||||||
|
const [latestCall] = sendMessageSpy.mock.calls;
|
||||||
|
const responseCallback = latestCall[1];
|
||||||
|
|
||||||
|
responseCallback("sendMessageResponse");
|
||||||
|
|
||||||
|
const response = await extensionMessagePromise;
|
||||||
|
|
||||||
|
expect(response).toEqual("sendMessageResponse");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -53,7 +53,9 @@ describe("Fido2 page script with native WebAuthn support", () => {
|
|||||||
const mockCredentialAssertResult = createAssertCredentialResultMock();
|
const mockCredentialAssertResult = createAssertCredentialResultMock();
|
||||||
setupMockedWebAuthnSupport();
|
setupMockedWebAuthnSupport();
|
||||||
|
|
||||||
require("./page-script");
|
beforeAll(() => {
|
||||||
|
require("./page-script");
|
||||||
|
});
|
||||||
|
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
jest.resetModules();
|
jest.resetModules();
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
import "jest-preset-angular/setup-jest";
|
||||||
|
|
||||||
// Add chrome storage api
|
// Add chrome storage api
|
||||||
const QUOTA_BYTES = 10;
|
const QUOTA_BYTES = 10;
|
||||||
const storage = {
|
const storage = {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@bitwarden/desktop",
|
"name": "@bitwarden/desktop",
|
||||||
"description": "A secure and free password manager for all of your devices.",
|
"description": "A secure and free password manager for all of your devices.",
|
||||||
"version": "2024.5.0",
|
"version": "2024.5.1",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"bitwarden",
|
"bitwarden",
|
||||||
"password",
|
"password",
|
||||||
|
4
apps/desktop/src/package-lock.json
generated
4
apps/desktop/src/package-lock.json
generated
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "@bitwarden/desktop",
|
"name": "@bitwarden/desktop",
|
||||||
"version": "2024.5.0",
|
"version": "2024.5.1",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@bitwarden/desktop",
|
"name": "@bitwarden/desktop",
|
||||||
"version": "2024.5.0",
|
"version": "2024.5.1",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@bitwarden/desktop-native": "file:../desktop_native",
|
"@bitwarden/desktop-native": "file:../desktop_native",
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"name": "@bitwarden/desktop",
|
"name": "@bitwarden/desktop",
|
||||||
"productName": "Bitwarden",
|
"productName": "Bitwarden",
|
||||||
"description": "A secure and free password manager for all of your devices.",
|
"description": "A secure and free password manager for all of your devices.",
|
||||||
"version": "2024.5.0",
|
"version": "2024.5.1",
|
||||||
"author": "Bitwarden Inc. <hello@bitwarden.com> (https://bitwarden.com)",
|
"author": "Bitwarden Inc. <hello@bitwarden.com> (https://bitwarden.com)",
|
||||||
"homepage": "https://bitwarden.com",
|
"homepage": "https://bitwarden.com",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
|
2
package-lock.json
generated
2
package-lock.json
generated
@ -237,7 +237,7 @@
|
|||||||
},
|
},
|
||||||
"apps/desktop": {
|
"apps/desktop": {
|
||||||
"name": "@bitwarden/desktop",
|
"name": "@bitwarden/desktop",
|
||||||
"version": "2024.5.0",
|
"version": "2024.5.1",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"license": "GPL-3.0"
|
"license": "GPL-3.0"
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user