From d05fd25339fd4be4237a60a7710f8abc0d46b868 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Tue, 15 Nov 2022 23:59:17 +0530 Subject: [PATCH 1/8] Fix #3799: Remove `type` from package.json --- packages/mermaid/package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/mermaid/package.json b/packages/mermaid/package.json index 9cbc695b1e..f8ff463250 100644 --- a/packages/mermaid/package.json +++ b/packages/mermaid/package.json @@ -1,11 +1,10 @@ { "name": "mermaid", - "version": "9.2.2", + "version": "9.2.3-rc.1", "description": "Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.", "main": "./dist/mermaid.min.js", "module": "./dist/mermaid.core.mjs", "types": "./dist/mermaid.d.ts", - "type": "commonjs", "exports": { ".": { "require": "./dist/mermaid.min.js", From 3358406e685e22e7621a0e4851ac0ff02ad21f19 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Wed, 16 Nov 2022 00:06:47 +0530 Subject: [PATCH 2/8] fix: release-preview-publish.yml --- .github/workflows/release-preview-publish.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release-preview-publish.yml b/.github/workflows/release-preview-publish.yml index 2b2ff559b2..da12cb5cca 100644 --- a/.github/workflows/release-preview-publish.yml +++ b/.github/workflows/release-preview-publish.yml @@ -10,21 +10,27 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + + - uses: pnpm/action-setup@v2 + - name: Setup Node.js uses: actions/setup-node@v3 with: + cache: pnpm node-version: 18.x - - name: Install Yarn - run: npm i yarn --global + + - name: Install Packages + run: | + pnpm install --frozen-lockfile + env: + CYPRESS_CACHE_FOLDER: .cache/Cypress - name: Install Json run: npm i json --global - - name: Install Packages - run: yarn install --frozen-lockfile - - name: Publish run: | + cd packages/mermaid PREVIEW_VERSION=8 VERSION=$(echo ${{github.ref}} | tail -c +20)-preview.$PREVIEW_VERSION echo $VERSION From 1ad63d5b0b7a410fd9a1809c14bd95c1b0d927d7 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Wed, 16 Nov 2022 09:49:41 +0530 Subject: [PATCH 3/8] chore: Add working directory --- .github/workflows/release-preview-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-preview-publish.yml b/.github/workflows/release-preview-publish.yml index da12cb5cca..f5b70eedd3 100644 --- a/.github/workflows/release-preview-publish.yml +++ b/.github/workflows/release-preview-publish.yml @@ -29,8 +29,8 @@ jobs: run: npm i json --global - name: Publish + working-directory: ./packages/mermaid run: | - cd packages/mermaid PREVIEW_VERSION=8 VERSION=$(echo ${{github.ref}} | tail -c +20)-preview.$PREVIEW_VERSION echo $VERSION From 503114c0eb76f1b3776fd7b5ac6007eac0c64060 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Wed, 16 Nov 2022 10:22:37 +0530 Subject: [PATCH 4/8] fix: Add commit count to release preview --- .github/workflows/release-preview-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-preview-publish.yml b/.github/workflows/release-preview-publish.yml index f5b70eedd3..8bcfbc357a 100644 --- a/.github/workflows/release-preview-publish.yml +++ b/.github/workflows/release-preview-publish.yml @@ -31,7 +31,7 @@ jobs: - name: Publish working-directory: ./packages/mermaid run: | - PREVIEW_VERSION=8 + PREVIEW_VERSION=$(git log --oneline "origin/$GITHUB_REF_NAME" ^"origin/master" | wc -l) VERSION=$(echo ${{github.ref}} | tail -c +20)-preview.$PREVIEW_VERSION echo $VERSION npm version --no-git-tag-version --allow-same-version $VERSION From 1d828fe8be8ee818c35df0a2c3dfe153d8d83e5a Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Wed, 16 Nov 2022 10:27:42 +0530 Subject: [PATCH 5/8] fix: Add commit count to release preview --- .github/workflows/release-preview-publish.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release-preview-publish.yml b/.github/workflows/release-preview-publish.yml index 8bcfbc357a..f910c67b7c 100644 --- a/.github/workflows/release-preview-publish.yml +++ b/.github/workflows/release-preview-publish.yml @@ -10,6 +10,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + - run: | + git fetch --no-tags --prune --depth=1 origin +refs/heads/master:refs/remotes/origin/master - uses: pnpm/action-setup@v2 From 52ee234c0fec0dc2a00e78844c193963d0359d7c Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Wed, 16 Nov 2022 10:31:07 +0530 Subject: [PATCH 6/8] fix: Fetch depth --- .github/workflows/release-preview-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-preview-publish.yml b/.github/workflows/release-preview-publish.yml index f910c67b7c..ff57b4f580 100644 --- a/.github/workflows/release-preview-publish.yml +++ b/.github/workflows/release-preview-publish.yml @@ -11,7 +11,7 @@ jobs: steps: - uses: actions/checkout@v3 - run: | - git fetch --no-tags --prune --depth=1 origin +refs/heads/master:refs/remotes/origin/master + git fetch --no-tags --prune --depth=0 origin +refs/heads/master:refs/remotes/origin/master - uses: pnpm/action-setup@v2 From e05e0f8ae35e7e6c1739a68b76361637aea9b18e Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Wed, 16 Nov 2022 10:31:49 +0530 Subject: [PATCH 7/8] fix: Fetch depth --- .github/workflows/release-preview-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-preview-publish.yml b/.github/workflows/release-preview-publish.yml index ff57b4f580..e9c4e46a33 100644 --- a/.github/workflows/release-preview-publish.yml +++ b/.github/workflows/release-preview-publish.yml @@ -11,7 +11,7 @@ jobs: steps: - uses: actions/checkout@v3 - run: | - git fetch --no-tags --prune --depth=0 origin +refs/heads/master:refs/remotes/origin/master + git fetch --no-tags --prune origin +refs/heads/master:refs/remotes/origin/master - uses: pnpm/action-setup@v2 From 2092330eec603abfd673cf782762f217bd8b5e5c Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Wed, 16 Nov 2022 11:30:58 +0530 Subject: [PATCH 8/8] fix: Fetch depth --- .github/workflows/release-preview-publish.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-preview-publish.yml b/.github/workflows/release-preview-publish.yml index e9c4e46a33..5f4936ab68 100644 --- a/.github/workflows/release-preview-publish.yml +++ b/.github/workflows/release-preview-publish.yml @@ -10,8 +10,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - run: | - git fetch --no-tags --prune origin +refs/heads/master:refs/remotes/origin/master + with: + fetch-depth: 0 - uses: pnpm/action-setup@v2