Skip to content

Commit

Permalink
chore: bump up electron version to v33 (#8495)
Browse files Browse the repository at this point in the history
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [electron](https://redirect.github.com/electron/electron) | [`^32.0.0` -> `^33.0.0`](https://renovatebot.com/diffs/npm/electron/32.1.2/33.0.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/electron/33.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/electron/33.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/electron/32.1.2/33.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/electron/32.1.2/33.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>electron/electron (electron)</summary>

### [`v33.0.0`](https://redirect.github.com/electron/electron/compare/v32.2.0...v33.0.0)

[Compare Source](https://redirect.github.com/electron/electron/compare/v32.2.0...v33.0.0)

### [`v32.2.0`](https://redirect.github.com/electron/electron/releases/tag/v32.2.0): electron v32.2.0

[Compare Source](https://redirect.github.com/electron/electron/compare/v32.1.2...v32.2.0)

### Release Notes for v32.2.0

#### Fixes

-   Fixed a crash when calling `focus` on a `WebView`'s `webContents`. [#&#8203;43934](https://redirect.github.com/electron/electron/pull/43934) <span style="font-size:small;">(Also in [31](https://redirect.github.com/electron/electron/pull/43933), [33](https://redirect.github.com/electron/electron/pull/43932))</span>
-   Fixed a potential issue accessing a child window document when overriding browserWindow creation via `setWindowOpenHandler`. [#&#8203;43877](https://redirect.github.com/electron/electron/pull/43877) <span style="font-size:small;">(Also in [31](https://redirect.github.com/electron/electron/pull/43878), [33](https://redirect.github.com/electron/electron/pull/43816))</span>
-   Fixed an issue where an exception could be thrown on BrowserView after its owner BrowserWindow was closed. [#&#8203;44001](https://redirect.github.com/electron/electron/pull/44001) <span style="font-size:small;">(Also in [31](https://redirect.github.com/electron/electron/pull/43999), [33](https://redirect.github.com/electron/electron/pull/44000))</span>
-   Fixed closing a window with more than one attached sheet on macOS. [#&#8203;43954](https://redirect.github.com/electron/electron/pull/43954) <span style="font-size:small;">(Also in [31](https://redirect.github.com/electron/electron/pull/43953), [33](https://redirect.github.com/electron/electron/pull/43952))</span>
-   Fixed potential use-after-free during view removal on macOS. [#&#8203;43923](https://redirect.github.com/electron/electron/pull/43923) <span style="font-size:small;">(Also in [31](https://redirect.github.com/electron/electron/pull/43924), [33](https://redirect.github.com/electron/electron/pull/43922))</span>

#### Other Changes

-   Ensured that the `sender-id` hint is set when creating desktop notifications on DBus. [#&#8203;43950](https://redirect.github.com/electron/electron/pull/43950) <span style="font-size:small;">(Also in [31](https://redirect.github.com/electron/electron/pull/43951), [33](https://redirect.github.com/electron/electron/pull/43949))</span>
-   Updated Chromium to 128.0.6613.178. [#&#8203;44086](https://redirect.github.com/electron/electron/pull/44086)
-   Updated Node.js to v20.18.0. [#&#8203;44116](https://redirect.github.com/electron/electron/pull/44116)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/toeverything/AFFiNE).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4xMjAuMSIsInVwZGF0ZWRJblZlciI6IjM4LjEyMC4xIiwidGFyZ2V0QnJhbmNoIjoiY2FuYXJ5IiwibGFiZWxzIjpbImRlcGVuZGVuY2llcyJdfQ==-->
  • Loading branch information
renovate[bot] committed Oct 15, 2024
1 parent c484cad commit 3d3a66c
Show file tree
Hide file tree
Showing 13 changed files with 36 additions and 32 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"@vitest/coverage-istanbul": "2.1.1",
"@vitest/ui": "2.1.1",
"cross-env": "^7.0.3",
"electron": "^32.0.0",
"electron": "^33.0.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import-x": "^0.5.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/apps/electron/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"@vitejs/plugin-react-swc": "^3.6.0",
"builder-util-runtime": "^9.2.5-alpha.2",
"cross-env": "^7.0.3",
"electron": "^32.0.0",
"electron": "^33.0.0",
"electron-log": "^5.1.2",
"electron-squirrel-startup": "1.0.1",
"electron-window-state": "^5.0.3",
Expand Down
10 changes: 5 additions & 5 deletions tests/affine-cloud/e2e/collaboration.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ test.beforeEach(async () => {
});

test.beforeEach(async ({ page }) => {
await loginUser(page, user.email);
await loginUser(page, user);
});

// SKIP until BS-671 fix
Expand All @@ -57,7 +57,7 @@ test.skip('can collaborate with other user and name should display when editing'
const context = await browser.newContext();
await skipOnboarding(context);
const page2 = await context.newPage();
await loginUser(page2, userB.email);
await loginUser(page2, userB);
await addUserToWorkspace(workspaceId, userB.id, 1 /* READ */);
await page2.reload();
await waitForEditorLoad(page2);
Expand Down Expand Up @@ -128,7 +128,7 @@ test('can sync collections between different browser', async ({
const context = await browser.newContext();
await skipOnboarding(context);
const page2 = await context.newPage();
await loginUser(page2, user.email);
await loginUser(page2, user);
await page2.goto(page.url());
const collections = page2.getByTestId('explorer-collections');
await collections.getByTestId('category-divider-collapse-button').click();
Expand Down Expand Up @@ -193,7 +193,7 @@ test('can sync svg between different browsers', async ({ page, browser }) => {
const context = await browser.newContext();
await skipOnboarding(context);
const page2 = await context.newPage();
await loginUser(page2, user.email);
await loginUser(page2, user);
await page2.goto(page.url());

// second user should see the svg
Expand Down Expand Up @@ -237,7 +237,7 @@ test('When the first sync is not completed, should always show loading', async (
const context = await browser.newContext();
await skipOnboarding(context);
const page2 = await context.newPage();
await loginUser(page2, user.email);
await loginUser(page2, user);

// simulate sync stuck
await page2.evaluate(() => {
Expand Down
2 changes: 1 addition & 1 deletion tests/affine-cloud/e2e/login.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ test.describe('login first', () => {

test.beforeEach(async ({ page }) => {
user = await createRandomUser();
await loginUser(page, user.email);
await loginUser(page, user);
});

test('exit successfully and re-login', async ({ page }) => {
Expand Down
4 changes: 2 additions & 2 deletions tests/affine-cloud/e2e/migration.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ test.beforeEach(async () => {
});

test.beforeEach(async ({ page, context }) => {
await loginUser(page, user.email, {
await loginUser(page, user, {
beforeLogin: async () => {
expect(await getLoginCookie(context)).toBeUndefined();
},
Expand All @@ -56,7 +56,7 @@ test.skip('migration', async ({ page, browser }) => {
// create the old cloud workspace in another browser
const context = await browser.newContext();
const page = await context.newPage();
await loginUser(page, user.email);
await loginUser(page, user);
await page.reload();
await createLocalWorkspace(
{
Expand Down
2 changes: 1 addition & 1 deletion tests/affine-cloud/e2e/page-history.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ let user: {

test.beforeEach(async ({ page }) => {
user = await createRandomUser();
await loginUser(page, user.email);
await loginUser(page, user);
});

test.afterEach(async () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/affine-cloud/e2e/share-page.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ test.beforeEach(async () => {
});

test.beforeEach(async ({ page }) => {
await loginUser(page, user.email);
await loginUser(page, user);
});

test('can enable share page', async ({ page, browser }) => {
Expand Down
2 changes: 1 addition & 1 deletion tests/affine-cloud/e2e/workspace.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ let user: {

test.beforeEach(async ({ page }) => {
user = await createRandomUser();
await loginUser(page, user.email);
await loginUser(page, user);
});

test('should have pagination in member list', async ({ page }) => {
Expand Down
8 changes: 2 additions & 6 deletions tests/affine-desktop-cloud/e2e/basic.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,10 @@ test.beforeEach(async () => {
user = await createRandomUser();
});

test.beforeEach(async ({ page }) => {
await loginUser(page, user.email, {
test('new page', async ({ page }) => {
await loginUser(page, user, {
isElectron: true,
});
});

test('new page', async ({ page }) => {
await page.reload();
await waitForEditorLoad(page);
await createLocalWorkspace(
{
Expand Down
2 changes: 1 addition & 1 deletion tests/affine-desktop-cloud/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import type { PlaywrightTestConfig } from '@playwright/test';
const config: PlaywrightTestConfig = {
testDir: './e2e',
fullyParallel: true,
timeout: process.env.CI ? 50_000 : 30_000,
timeout: process.env.CI ? 300_000 : 60_000,
outputDir: testResultDir,
use: {
viewport: { width: 1440, height: 800 },
Expand Down
4 changes: 4 additions & 0 deletions tests/kit/electron.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ export const test = base.extend<{
timeout: 30000,
});

// wait until the page is stable enough
await page.waitForTimeout(2000);

await use(page as Page);
},
views: async ({ electronApp, page }, use) => {
Expand Down Expand Up @@ -131,6 +134,7 @@ export const test = base.extend<{
env[key] = value;
}
}
env.DEBUG = 'pw:browser';

env.SKIP_ONBOARDING = '1';

Expand Down
16 changes: 10 additions & 6 deletions tests/kit/utils/cloud.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ export async function createRandomUser(): Promise<{
password: string;
id: string;
}> {
const startTime = Date.now();
const user = {
name: faker.internet.userName(),
email: faker.internet.email().toLowerCase(),
Expand Down Expand Up @@ -140,6 +141,8 @@ export async function createRandomUser(): Promise<{
},
});
});
const endTime = Date.now();
console.log(`createRandomUser takes: ${endTime - startTime}ms`);
cloudUserSchema.parse(result);
return {
...result,
Expand All @@ -159,7 +162,10 @@ export async function deleteUser(email: string) {

export async function loginUser(
page: Page,
userEmail: string,
user: {
email: string;
password: string;
},
config?: {
isElectron?: boolean;
beforeLogin?: () => Promise<void>;
Expand All @@ -172,14 +178,12 @@ export async function loginUser(
}

await clickSideBarCurrentWorkspaceBanner(page);
await page.getByTestId('cloud-signin-button').click({
delay: 200,
});
await page.getByPlaceholder('Enter your email address').fill(userEmail);
await page.getByTestId('cloud-signin-button').click();
await page.getByPlaceholder('Enter your email address').fill(user.email);
await page.getByTestId('continue-login-button').click({
delay: 200,
});
await page.getByTestId('password-input').fill('123456');
await page.getByTestId('password-input').fill(user.password);
if (config?.beforeLogin) {
await config.beforeLogin();
}
Expand Down
12 changes: 6 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ __metadata:
async-call-rpc: "npm:^6.4.2"
builder-util-runtime: "npm:^9.2.5-alpha.2"
cross-env: "npm:^7.0.3"
electron: "npm:^32.0.0"
electron: "npm:^33.0.0"
electron-log: "npm:^5.1.2"
electron-squirrel-startup: "npm:1.0.1"
electron-updater: "npm:^6.2.1"
Expand Down Expand Up @@ -605,7 +605,7 @@ __metadata:
"@vitest/coverage-istanbul": "npm:2.1.1"
"@vitest/ui": "npm:2.1.1"
cross-env: "npm:^7.0.3"
electron: "npm:^32.0.0"
electron: "npm:^33.0.0"
eslint: "npm:^8.57.0"
eslint-config-prettier: "npm:^9.1.0"
eslint-plugin-import-x: "npm:^0.5.0"
Expand Down Expand Up @@ -18759,16 +18759,16 @@ __metadata:
languageName: node
linkType: hard

"electron@npm:^32.0.0":
version: 32.1.2
resolution: "electron@npm:32.1.2"
"electron@npm:^33.0.0":
version: 33.0.0
resolution: "electron@npm:33.0.0"
dependencies:
"@electron/get": "npm:^2.0.0"
"@types/node": "npm:^20.9.0"
extract-zip: "npm:^2.0.1"
bin:
electron: cli.js
checksum: 10/a4793dd12b2d1dffff53420092ac7612eee41d193f07e847783136ee296b5380abb169eb1a4c1929b01a99b1d93bf53f071f2c5128e8241e70ec930d303fba51
checksum: 10/d6df529d990ae9a32778e66b6e9453f80bacb6ed3854ce62a81b5f0f705d762323534159fdcdb36a62eaa2901a49c384fef6333d35d68fc7ebf6d39baeeed6c6
languageName: node
linkType: hard

Expand Down

0 comments on commit 3d3a66c

Please sign in to comment.