From bbb3bc9a402b1444ef001e0aefea74e5d3ca1175 Mon Sep 17 00:00:00 2001 From: Katherine Date: Thu, 27 Feb 2025 09:08:07 +0800 Subject: [PATCH 1/2] fix: error when creating comment block without comment collection (#6309) --- .../src/schema-initializer/items/DataBlockInitializer.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/client/src/schema-initializer/items/DataBlockInitializer.tsx b/packages/core/client/src/schema-initializer/items/DataBlockInitializer.tsx index de3db9d2de..97f79a19fb 100644 --- a/packages/core/client/src/schema-initializer/items/DataBlockInitializer.tsx +++ b/packages/core/client/src/schema-initializer/items/DataBlockInitializer.tsx @@ -398,7 +398,7 @@ export const DataBlockInitializer: FC = (props) => { ]; }, [searchedChildren, hideChildrenIfSingleCollection, name, compile, title, icon, onClick, props]); - if (childItems.length > 1 || (childItems.length === 1 && childItems[0].children?.length > 0)) { + if (childItems.length > 1 || (childItems.length === 1 && childItems[0].children)) { return ( { From 92cf679bda3feca8a812b58c524f8bb870492d18 Mon Sep 17 00:00:00 2001 From: xilesun <2013xile@gmail.com> Date: Thu, 27 Feb 2025 10:17:36 +0800 Subject: [PATCH 2/2] chore(ci): optimize release ci --- .github/workflows/changelog-and-release.yml | 4 ++-- .github/workflows/manual-release-develop.yml | 11 +++++++---- .github/workflows/manual-release-next.yml | 11 +++++++---- .github/workflows/manual-release.yml | 11 +++++++---- 4 files changed, 23 insertions(+), 14 deletions(-) diff --git a/.github/workflows/changelog-and-release.yml b/.github/workflows/changelog-and-release.yml index e67b68b70c..4a25e0ee06 100644 --- a/.github/workflows/changelog-and-release.yml +++ b/.github/workflows/changelog-and-release.yml @@ -89,7 +89,7 @@ jobs: with: node-version: 18 - name: Install dependencies - run: yarn install --frozen-lockfile + run: yarn install - name: Run script shell: bash run: | @@ -101,6 +101,6 @@ jobs: if: ${{ steps.get-info.outputs.version == 'rc' }} run: | git pull origin main - git add . + git add CHANGELOG.md CHANGELOG.zh-CN.md git commit -m "docs: update changelogs" git push origin main diff --git a/.github/workflows/manual-release-develop.yml b/.github/workflows/manual-release-develop.yml index 7374fc38f4..29cbd8ba03 100644 --- a/.github/workflows/manual-release-develop.yml +++ b/.github/workflows/manual-release-develop.yml @@ -55,12 +55,15 @@ jobs: do git clone -b develop https://x-access-token:${{ steps.app-token.outputs.token }}@github.com/nocobase/$repo.git packages/pro-plugins/@nocobase/$repo done - - name: Set Node.js 18 + - name: Set Node.js 20 uses: actions/setup-node@v3 with: - node-version: 18 - - name: Install Lerna - run: npm install -g lerna@4 auto-changelog@2 + node-version: 20 + - name: yarn install and build + run: | + yarn config set registry https://registry.npmjs.org/ + yarn install + yarn build - name: Run release.sh shell: bash run: | diff --git a/.github/workflows/manual-release-next.yml b/.github/workflows/manual-release-next.yml index b27cfe3741..ddb83fc67c 100644 --- a/.github/workflows/manual-release-next.yml +++ b/.github/workflows/manual-release-next.yml @@ -97,12 +97,15 @@ jobs: do git clone -b next https://x-access-token:${{ steps.app-token.outputs.token }}@github.com/nocobase/$repo.git packages/pro-plugins/@nocobase/$repo done - - name: Set Node.js 18 + - name: Set Node.js 20 uses: actions/setup-node@v3 with: - node-version: 18 - - name: Install Lerna - run: npm install -g lerna@4 auto-changelog@2 + node-version: 20 + - name: yarn install and build + run: | + yarn config set registry https://registry.npmjs.org/ + yarn install + yarn build - name: Run release.sh shell: bash run: | diff --git a/.github/workflows/manual-release.yml b/.github/workflows/manual-release.yml index 76e99b4da6..1830638a88 100644 --- a/.github/workflows/manual-release.yml +++ b/.github/workflows/manual-release.yml @@ -94,12 +94,15 @@ jobs: do git clone -b main https://x-access-token:${{ steps.app-token.outputs.token }}@github.com/nocobase/$repo.git packages/pro-plugins/@nocobase/$repo done - - name: Set Node.js 18 + - name: Set Node.js 20 uses: actions/setup-node@v3 with: - node-version: 18 - - name: Install Lerna - run: npm install -g lerna@4 auto-changelog@2 + node-version: 20 + - name: yarn install and build + run: | + yarn config set registry https://registry.npmjs.org/ + yarn install + yarn build - name: Run release.sh shell: bash run: |