diff --git a/.github/actions/setup-maker/action.yml b/.github/actions/setup-maker/action.yml deleted file mode 100644 index 53587106ed..0000000000 --- a/.github/actions/setup-maker/action.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Setup maker -description: 'Setup maker dmg for electron' - -runs: - using: 'composite' - steps: - - name: 'Install @electron-forge/maker-dmg' - if: runner.os == 'macos' - shell: bash - run: yarn workspace @affine/electron add @electron-forge/maker-dmg --dev - env: - HUSKY: '0' - PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: '1' - ELECTRON_SKIP_BINARY_DOWNLOAD: '1' - SENTRYCLI_SKIP_DOWNLOAD: '1' diff --git a/.github/workflows/build-desktop.yml b/.github/workflows/build-desktop.yml index 757bd22865..4d0eaaa23f 100644 --- a/.github/workflows/build-desktop.yml +++ b/.github/workflows/build-desktop.yml @@ -61,7 +61,7 @@ jobs: environment: development needs: build-core steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup Node.js uses: ./.github/actions/setup-node - name: Build AFFiNE native diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index a0f7cd4cef..ead24994cf 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -153,14 +153,14 @@ jobs: fi - name: Login to GitHub Container Registry - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ghcr.io logout: false username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Build front Dockerfile @@ -177,7 +177,7 @@ jobs: # setup node without cache configuration # Prisma cache is not compatible with docker build cache - name: Setup Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version-file: '.nvmrc' registry-url: https://npm.pkg.github.com diff --git a/.github/workflows/nightly-build.yml b/.github/workflows/nightly-build.yml index de79fecaad..c08dc1c3ce 100644 --- a/.github/workflows/nightly-build.yml +++ b/.github/workflows/nightly-build.yml @@ -124,9 +124,6 @@ jobs: hard-link-nm: false build-plugins: false nmHoistingLimits: workspaces - - name: Setup Maker - timeout-minutes: 10 - uses: ./.github/actions/setup-maker - name: Build AFFiNE native uses: ./.github/actions/build-rust with: @@ -217,7 +214,7 @@ jobs: name: affine-linux-x64-builds path: ./ - name: Setup Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: 18 - name: Generate Release yml diff --git a/.github/workflows/publish-storybook.yml b/.github/workflows/publish-storybook.yml index 4b3271354d..ace6dbc9a7 100644 --- a/.github/workflows/publish-storybook.yml +++ b/.github/workflows/publish-storybook.yml @@ -45,7 +45,7 @@ jobs: env: CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} NODE_OPTIONS: ${{ env.NODE_OPTIONS }} - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 if: always() with: name: chromatic-build-artifacts-${{ github.run_id }} diff --git a/.github/workflows/release-desktop-app.yml b/.github/workflows/release-desktop-app.yml index 7b2d025fa6..c231b260cd 100644 --- a/.github/workflows/release-desktop-app.yml +++ b/.github/workflows/release-desktop-app.yml @@ -111,9 +111,6 @@ jobs: hard-link-nm: false build-plugins: false nmHoistingLimits: workspaces - - name: Setup Maker - timeout-minutes: 10 - uses: ./.github/actions/setup-maker - name: Build AFFiNE native uses: ./.github/actions/build-rust with: @@ -188,9 +185,6 @@ jobs: hard-link-nm: false build-plugins: false nmHoistingLimits: workspaces - - name: Setup Maker - timeout-minutes: 10 - uses: ./.github/actions/setup-maker - name: Build AFFiNE native uses: ./.github/actions/build-rust with: @@ -361,7 +355,7 @@ jobs: with: name: affine-linux-x64-builds path: ./ - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version: 18 - name: Generate Release yml @@ -371,8 +365,6 @@ jobs: RELEASE_VERSION: ${{ github.event.inputs.version || needs.before-make.outputs.RELEASE_VERSION }} - name: Create Release Draft uses: softprops/action-gh-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} with: name: ${{ github.event.inputs.version || needs.before-make.outputs.RELEASE_VERSION }} body: '' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4d22f177f7..6fd95b15a6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -117,14 +117,14 @@ jobs: run: | echo "GIT_SHORT_HASH=$(git rev-parse --short HEAD)" >> "$GITHUB_ENV" - name: Login to GitHub Container Registry - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ghcr.io logout: false username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Build front Dockerfile @@ -141,7 +141,7 @@ jobs: # setup node without cache configuration # Prisma cache is not compatible with docker build cache - name: Setup Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version-file: '.nvmrc' registry-url: https://npm.pkg.github.com diff --git a/.github/workflows/workers.yml b/.github/workflows/workers.yml index 179c6eb0e0..539b1f8a96 100644 --- a/.github/workflows/workers.yml +++ b/.github/workflows/workers.yml @@ -13,7 +13,7 @@ jobs: name: Deploy environment: production steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Publish uses: cloudflare/wrangler-action@v3.3.1 with: diff --git a/package.json b/package.json index a8b2c80550..cfdf687e89 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@affine/monorepo", - "version": "0.10.0-canary.2", + "version": "0.10.0-canary.3", "private": true, "author": "toeverything", "license": "MIT", diff --git a/packages/backend/server/package.json b/packages/backend/server/package.json index 83f06abc53..bc988fd1ee 100644 --- a/packages/backend/server/package.json +++ b/packages/backend/server/package.json @@ -1,7 +1,7 @@ { "name": "@affine/server", "private": true, - "version": "0.10.0-canary.2", + "version": "0.10.0-canary.3", "description": "Affine Node.js server", "type": "module", "bin": { diff --git a/packages/backend/storage/package.json b/packages/backend/storage/package.json index 9976505de5..d82e2dfc10 100644 --- a/packages/backend/storage/package.json +++ b/packages/backend/storage/package.json @@ -1,6 +1,6 @@ { "name": "@affine/storage", - "version": "0.10.0-canary.2", + "version": "0.10.0-canary.3", "engines": { "node": ">= 10.16.0 < 11 || >= 11.8.0" }, diff --git a/packages/common/cmdk/package.json b/packages/common/cmdk/package.json index 638ca1a968..7c53390b51 100644 --- a/packages/common/cmdk/package.json +++ b/packages/common/cmdk/package.json @@ -8,5 +8,5 @@ "react": "18.2.0", "react-dom": "18.2.0" }, - "version": "0.10.0-canary.2" + "version": "0.10.0-canary.3" } diff --git a/packages/common/debug/package.json b/packages/common/debug/package.json index fd375e6003..6f7f24e655 100644 --- a/packages/common/debug/package.json +++ b/packages/common/debug/package.json @@ -9,5 +9,5 @@ "@types/debug": "^4.1.9", "vitest": "0.34.6" }, - "version": "0.10.0-canary.2" + "version": "0.10.0-canary.3" } diff --git a/packages/common/env/package.json b/packages/common/env/package.json index 29bdec9eb8..35aa796a3f 100644 --- a/packages/common/env/package.json +++ b/packages/common/env/package.json @@ -3,8 +3,8 @@ "private": true, "type": "module", "devDependencies": { - "@blocksuite/global": "0.0.0-20231018100009-361737d3-nightly", - "@blocksuite/store": "0.0.0-20231018100009-361737d3-nightly", + "@blocksuite/global": "0.0.0-20231024064721-2aee7119-nightly", + "@blocksuite/store": "0.0.0-20231024064721-2aee7119-nightly", "react": "18.2.0", "react-dom": "18.2.0", "vitest": "0.34.6", @@ -27,5 +27,5 @@ "dependencies": { "lit": "^2.8.0" }, - "version": "0.10.0-canary.2" + "version": "0.10.0-canary.3" } diff --git a/packages/common/infra/package.json b/packages/common/infra/package.json index 33d6c10fbc..076888feaf 100644 --- a/packages/common/infra/package.json +++ b/packages/common/infra/package.json @@ -55,9 +55,9 @@ }, "dependencies": { "@affine/sdk": "workspace:*", - "@blocksuite/blocks": "0.0.0-20231018100009-361737d3-nightly", - "@blocksuite/global": "0.0.0-20231018100009-361737d3-nightly", - "@blocksuite/store": "0.0.0-20231018100009-361737d3-nightly", + "@blocksuite/blocks": "0.0.0-20231024064721-2aee7119-nightly", + "@blocksuite/global": "0.0.0-20231024064721-2aee7119-nightly", + "@blocksuite/store": "0.0.0-20231024064721-2aee7119-nightly", "jotai": "^2.4.3", "jotai-effect": "^0.1.0", "tinykeys": "^2.1.0", @@ -66,8 +66,8 @@ "devDependencies": { "@affine-test/fixtures": "workspace:*", "@affine/templates": "workspace:*", - "@blocksuite/editor": "0.0.0-20231018100009-361737d3-nightly", - "@blocksuite/lit": "0.0.0-20231018100009-361737d3-nightly", + "@blocksuite/editor": "0.0.0-20231024064721-2aee7119-nightly", + "@blocksuite/lit": "0.0.0-20231024064721-2aee7119-nightly", "@testing-library/react": "^14.0.0", "async-call-rpc": "^6.3.1", "electron": "link:../../frontend/electron/node_modules/electron", @@ -111,5 +111,5 @@ "optional": true } }, - "version": "0.10.0-canary.2" + "version": "0.10.0-canary.3" } diff --git a/packages/common/infra/src/command/command.ts b/packages/common/infra/src/command/command.ts index f57f8ad518..130d39b1e5 100644 --- a/packages/common/infra/src/command/command.ts +++ b/packages/common/infra/src/command/command.ts @@ -40,8 +40,18 @@ export interface AffineCommandOptions { preconditionStrategy?: PreconditionStrategy | (() => boolean); // main text on the left.. // make text a function so that we can do i18n and interpolation when we need to - label?: string | (() => string) | ReactNode | (() => ReactNode); - icon: React.ReactNode; // todo: need a mapping from string -> React element/SVG + label: + | string + | (() => string) + | { + title: string; + subTitle?: string; + } + | (() => { + title: string; + subTitle?: string; + }); + icon: ReactNode; // todo: need a mapping from string -> React element/SVG category?: CommandCategory; // we use https://github.com/jamiebuilds/tinykeys so that we can use the same keybinding definition // for both mac and windows @@ -53,8 +63,11 @@ export interface AffineCommandOptions { export interface AffineCommand { readonly id: string; readonly preconditionStrategy: PreconditionStrategy | (() => boolean); - readonly label?: ReactNode | string; - readonly icon?: React.ReactNode; // icon name + readonly label: { + title: string; + subTitle?: string; + }; + readonly icon?: ReactNode; // icon name readonly category: CommandCategory; readonly keyBinding?: KeybindingOptions; run(): void | Promise; @@ -71,8 +84,15 @@ export function createAffineCommand( options.preconditionStrategy ?? PreconditionStrategy.Always, category: options.category ?? 'affine:general', get label() { - const label = options.label; - return typeof label === 'function' ? label?.() : label; + let label = options.label; + label = typeof label === 'function' ? label?.() : label; + label = + typeof label === 'string' + ? { + title: label, + } + : label; + return label; }, keyBinding: typeof options.keyBinding === 'string' diff --git a/packages/common/sdk/package.json b/packages/common/sdk/package.json index de51f93c17..0d554deda1 100644 --- a/packages/common/sdk/package.json +++ b/packages/common/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@affine/sdk", - "version": "0.10.0-canary.2", + "version": "0.10.0-canary.3", "type": "module", "scripts": { "build": "vite build", @@ -22,11 +22,11 @@ "dist" ], "dependencies": { - "@blocksuite/block-std": "0.0.0-20231018100009-361737d3-nightly", - "@blocksuite/blocks": "0.0.0-20231018100009-361737d3-nightly", - "@blocksuite/editor": "0.0.0-20231018100009-361737d3-nightly", - "@blocksuite/global": "0.0.0-20231018100009-361737d3-nightly", - "@blocksuite/store": "0.0.0-20231018100009-361737d3-nightly", + "@blocksuite/block-std": "0.0.0-20231024064721-2aee7119-nightly", + "@blocksuite/blocks": "0.0.0-20231024064721-2aee7119-nightly", + "@blocksuite/editor": "0.0.0-20231024064721-2aee7119-nightly", + "@blocksuite/global": "0.0.0-20231024064721-2aee7119-nightly", + "@blocksuite/store": "0.0.0-20231024064721-2aee7119-nightly", "jotai": "^2.4.3", "zod": "^3.22.4" }, diff --git a/packages/common/y-indexeddb/package.json b/packages/common/y-indexeddb/package.json index 8792f432b8..71386d260c 100644 --- a/packages/common/y-indexeddb/package.json +++ b/packages/common/y-indexeddb/package.json @@ -1,7 +1,7 @@ { "name": "@toeverything/y-indexeddb", "type": "module", - "version": "0.10.0-canary.2", + "version": "0.10.0-canary.3", "description": "IndexedDB database adapter for Yjs", "repository": "toeverything/AFFiNE", "author": "toeverything", @@ -37,8 +37,8 @@ "y-provider": "workspace:*" }, "devDependencies": { - "@blocksuite/blocks": "0.0.0-20231018100009-361737d3-nightly", - "@blocksuite/store": "0.0.0-20231018100009-361737d3-nightly", + "@blocksuite/blocks": "0.0.0-20231024064721-2aee7119-nightly", + "@blocksuite/store": "0.0.0-20231024064721-2aee7119-nightly", "fake-indexeddb": "^5.0.0", "vite": "^4.4.11", "vite-plugin-dts": "3.6.0", diff --git a/packages/common/y-provider/package.json b/packages/common/y-provider/package.json index 3b9af78668..429ca28809 100644 --- a/packages/common/y-provider/package.json +++ b/packages/common/y-provider/package.json @@ -1,7 +1,7 @@ { "name": "y-provider", "type": "module", - "version": "0.10.0-canary.2", + "version": "0.10.0-canary.3", "description": "Yjs provider protocol for multi document support", "exports": { ".": "./src/index.ts" @@ -24,7 +24,7 @@ "build": "vite build" }, "devDependencies": { - "@blocksuite/store": "0.0.0-20231018100009-361737d3-nightly", + "@blocksuite/store": "0.0.0-20231024064721-2aee7119-nightly", "vite": "^4.4.11", "vite-plugin-dts": "3.6.0", "vitest": "0.34.6", diff --git a/packages/frontend/component/package.json b/packages/frontend/component/package.json index bf1d58bc68..0d86da75a4 100644 --- a/packages/frontend/component/package.json +++ b/packages/frontend/component/package.json @@ -63,12 +63,12 @@ "uuid": "^9.0.1" }, "devDependencies": { - "@blocksuite/blocks": "0.0.0-20231018100009-361737d3-nightly", - "@blocksuite/editor": "0.0.0-20231018100009-361737d3-nightly", - "@blocksuite/global": "0.0.0-20231018100009-361737d3-nightly", - "@blocksuite/icons": "2.1.34", - "@blocksuite/lit": "0.0.0-20231018100009-361737d3-nightly", - "@blocksuite/store": "0.0.0-20231018100009-361737d3-nightly", + "@blocksuite/blocks": "0.0.0-20231024064721-2aee7119-nightly", + "@blocksuite/editor": "0.0.0-20231024064721-2aee7119-nightly", + "@blocksuite/global": "0.0.0-20231024064721-2aee7119-nightly", + "@blocksuite/icons": "2.1.35", + "@blocksuite/lit": "0.0.0-20231024064721-2aee7119-nightly", + "@blocksuite/store": "0.0.0-20231024064721-2aee7119-nightly", "@storybook/jest": "^0.2.3", "@storybook/testing-library": "^0.2.2", "@testing-library/react": "^14.0.0", @@ -84,5 +84,5 @@ "vitest": "0.34.6", "yjs": "^13.6.8" }, - "version": "0.10.0-canary.2" + "version": "0.10.0-canary.3" } diff --git a/packages/frontend/component/src/components/affine-banner/browser-warning.tsx b/packages/frontend/component/src/components/affine-banner/browser-warning.tsx index 9168f3efe4..4a6cbbb5f9 100644 --- a/packages/frontend/component/src/components/affine-banner/browser-warning.tsx +++ b/packages/frontend/component/src/components/affine-banner/browser-warning.tsx @@ -1,5 +1,5 @@ import { CloseIcon } from '@blocksuite/icons'; -import type React from 'react'; +import type { ReactNode } from 'react'; import { browserWarningStyle, @@ -14,7 +14,7 @@ export const BrowserWarning = ({ }: { show: boolean; onClose: () => void; - message: React.ReactNode; + message: ReactNode; }) => { if (!show) { return null; diff --git a/packages/frontend/component/src/components/share-menu/share-menu.tsx b/packages/frontend/component/src/components/share-menu/share-menu.tsx index 81400c235d..a40c42adfa 100644 --- a/packages/frontend/component/src/components/share-menu/share-menu.tsx +++ b/packages/frontend/component/src/components/share-menu/share-menu.tsx @@ -88,11 +88,7 @@ const CloudShareMenu = (props: ShareMenuProps) => { modal: false, }} > -