chore: bump up @blocksuite/affine version to v0.18.0 (#8899)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@blocksuite/affine](https://redirect.github.com/toeverything/blocksuite) ([source](https://redirect.github.com/toeverything/blocksuite/tree/HEAD/packages/affine/all), [changelog](https://redirect.github.com/toeverything/blocksuite/blob/master/packages/blocks/CHANGELOG.md)) | [`0.17.33` -> `0.18.0`](https://renovatebot.com/diffs/npm/@blocksuite%2faffine/0.17.33/0.18.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@blocksuite%2faffine/0.18.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@blocksuite%2faffine/0.18.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@blocksuite%2faffine/0.17.33/0.18.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@blocksuite%2faffine/0.17.33/0.18.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>toeverything/blocksuite (@&#8203;blocksuite/affine)</summary>

### [`v0.18.0`](https://redirect.github.com/toeverything/blocksuite/blob/HEAD/packages/affine/all/CHANGELOG.md#0180)

[Compare Source](https://redirect.github.com/toeverything/blocksuite/compare/v0.17.33...v0.18.0)

##### Minor Changes

-   [`9daa1f3`](https://redirect.github.com/toeverything/blocksuite/commit/9daa1f3): ## Feat

    -   feat(blocks): markdown adapter reference serialization and deserialization ([#&#8203;8782](https://redirect.github.com/toeverything/blocksuite/issues/8782))
    -   feat(blocks): add lazy loading to image and iframe ([#&#8203;8773](https://redirect.github.com/toeverything/blocksuite/issues/8773))

</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 these updates 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:eyJjcmVhdGVkSW5WZXIiOiIzOS4xOS4wIiwidXBkYXRlZEluVmVyIjoiMzkuMTkuMCIsInRhcmdldEJyYW5jaCI6ImNhbmFyeSIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=-->
This commit is contained in:
renovate
2024-11-25 08:58:21 +00:00
parent 0a20332674
commit 70633d0d16
37 changed files with 196 additions and 1354 deletions
-5
View File
@@ -1,5 +0,0 @@
static
fixtures/*.ydoc
test-results
*.zip
web-static
-12
View File
@@ -1,12 +0,0 @@
# AFFiNE Migration Testings
This package is used to testing migration logic for every breaking version.
```sh
BUILD_TYPE=canary yarn run build
cd tests/affine-migration
yarn run e2e
```
> Tips:
> Run `yarn dev` to start dev server in 8080 could make debugging more quickly.
-116
View File
@@ -1,116 +0,0 @@
import { patchDataEnhancement } from '@affine-test/kit/e2e-enhance/initializer';
import { SnapshotStorage } from '@affine-test/kit/e2e-enhance/snapshot';
import { test } from '@affine-test/kit/playwright';
import { clickEdgelessModeButton } from '@affine-test/kit/utils/editor';
import { coreUrl } from '@affine-test/kit/utils/load-page';
import { waitForEditorLoad } from '@affine-test/kit/utils/page-logic';
import { clickSideBarAllPageButton } from '@affine-test/kit/utils/sidebar';
import type { Page } from '@playwright/test';
import { expect } from '@playwright/test';
async function open404PageToInitData(page: Page, version: string) {
const snapshotStorage = new SnapshotStorage(version);
const { binaries, idbData, localStorageData } = await snapshotStorage.read();
// Open other page to init data
await page.goto(`${coreUrl}/404`);
await page.evaluate(
([v1, v2]) => window.writeAffineDatabase(v1, v2),
[idbData, binaries]
);
await page.evaluate(
value => window.writeAffineLocalStorage(value),
localStorageData
);
return { localStorageData };
}
test.beforeEach(async ({ page }) => {
await patchDataEnhancement(page);
});
test('v1 to v4', async ({ page }) => {
await open404PageToInitData(page, '0.7.0-canary.18');
await page.goto(coreUrl);
await clickSideBarAllPageButton(page);
await expect(page.getByTestId('upgrade-workspace-button')).toBeVisible();
await page.getByTestId('upgrade-workspace-button').click();
await expect(page.getByTestId('page-list-item')).toHaveCount(2);
await page
.getByTestId('page-list-item-title-text')
.getByText('hello')
.click();
await waitForEditorLoad(page);
await expect(page.locator('v-line').nth(0)).toHaveText('hello');
});
test('v2 to v4, database migration', async ({ page }) => {
const { localStorageData } = await open404PageToInitData(
page,
'0.8.0-canary.7'
);
const detailPagePath = `${coreUrl}/workspace/${localStorageData.last_workspace_id}/${localStorageData.last_page_id}`;
await page.goto(detailPagePath);
await expect(page.getByTestId('upgrade-workspace-button')).toBeVisible();
await page.getByTestId('upgrade-workspace-button').click();
// check page mode is correct
await expect(page.locator('v-line').nth(0)).toHaveText('hello');
await expect(page.locator('affine-database')).toBeVisible();
// check edgeless mode is correct
await clickEdgelessModeButton(page);
await expect(page.locator('affine-database')).toBeVisible();
});
test('v3 to v4, surface migration', async ({ page }) => {
const { localStorageData } = await open404PageToInitData(page, '0.8.4');
const detailPagePath = `${coreUrl}/workspace/${localStorageData.last_workspace_id}/${localStorageData.last_page_id}`;
await page.goto(detailPagePath);
await expect(page.getByTestId('upgrade-workspace-button')).toBeVisible();
await page.getByTestId('upgrade-workspace-button').click();
await waitForEditorLoad(page);
await page.waitForTimeout(500);
// check edgeless mode is correct
await clickEdgelessModeButton(page);
await expect(page.locator('.edgeless-toolbar-container')).toBeVisible();
await expect(page.locator('affine-edgeless-root')).toBeVisible();
});
test('v0 to v4, subdoc migration', async ({ page }) => {
await open404PageToInitData(page, '0.6.1-beta.1');
await page.goto(coreUrl);
await clickSideBarAllPageButton(page);
await expect(page.getByTestId('upgrade-workspace-button')).toBeVisible();
await page.getByTestId('upgrade-workspace-button').click();
await expect(page.getByTestId('page-list-item')).toHaveCount(2);
await page
.getByTestId('page-list-item-title-text')
.getByText('hello')
.click();
await waitForEditorLoad(page);
// check page mode is correct
await expect(page.locator('v-line').nth(0)).toHaveText('hello');
await expect(page.locator('v-line').nth(1)).toHaveText('TEST CONTENT');
// check edgeless mode is correct
await clickEdgelessModeButton(page);
await expect(page.locator('.edgeless-toolbar-container')).toBeVisible();
await expect(page.locator('affine-edgeless-root')).toBeVisible();
});
-12
View File
@@ -1,12 +0,0 @@
{
"name": "@affine-test/affine-migration",
"description": "AFFiNE migration e2e tests",
"scripts": {
"e2e": "yarn playwright test"
},
"devDependencies": {
"@affine-test/kit": "workspace:*",
"@playwright/test": "=1.48.2"
},
"version": "0.18.0"
}
@@ -1,46 +0,0 @@
import { testResultDir } from '@affine-test/kit/playwright';
import type {
PlaywrightTestConfig,
PlaywrightWorkerOptions,
} from '@playwright/test';
const config: PlaywrightTestConfig = {
testDir: './e2e',
fullyParallel: !process.env.CI,
timeout: process.env.CI ? 50_000 : 30_000,
outputDir: testResultDir,
use: {
baseURL: 'http://localhost:8080/',
browserName:
(process.env.BROWSER as PlaywrightWorkerOptions['browserName']) ??
'chromium',
permissions: ['clipboard-read', 'clipboard-write'],
viewport: { width: 1440, height: 800 },
actionTimeout: 5 * 1000,
locale: 'en-US',
trace: 'on-first-retry',
video: 'on-first-retry',
},
forbidOnly: !!process.env.CI,
workers: process.env.CI ? 1 : 4,
retries: 1,
reporter: process.env.CI ? 'github' : 'list',
webServer: [
// Intentionally not building the web, reminds you to run it by yourself.
{
command: 'yarn -T run start:web-static',
port: 8080,
timeout: 120 * 1000,
reuseExistingServer: !process.env.CI,
env: {
COVERAGE: process.env.COVERAGE || 'false',
},
},
],
};
if (process.env.CI) {
config.retries = 3;
}
export default config;
-17
View File
@@ -1,17 +0,0 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"esModuleInterop": true,
"resolveJsonModule": true,
"outDir": "lib"
},
"include": ["e2e"],
"references": [
{
"path": "../../tests/kit"
},
{
"path": "../../tests/fixtures"
}
]
}