From 0520b6fd69b862c7383175fc7a8c2f720dcb4c3c Mon Sep 17 00:00:00 2001 From: xurxodev Date: Fri, 27 Feb 2026 12:40:53 +0100 Subject: [PATCH 1/9] Support yarn 4 projects --- .github/workflows/app-test.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/app-test.yml b/.github/workflows/app-test.yml index 42d1e2a..e9d1d54 100644 --- a/.github/workflows/app-test.yml +++ b/.github/workflows/app-test.yml @@ -23,7 +23,9 @@ jobs: uses: actions/setup-node@v4 with: node-version-file: ".nvmrc" - cache: "yarn" + + - name: Enable Corepack + run: corepack enable - name: Get yarn cache directory path id: yarn-cache-dir-path @@ -49,3 +51,4 @@ jobs: - name: Run typescript tests run: npx tsc + \ No newline at end of file From f7016d8a7c2aaa7f64032cad52046f45b593dc97 Mon Sep 17 00:00:00 2001 From: xurxodev Date: Fri, 27 Feb 2026 13:04:17 +0100 Subject: [PATCH 2/9] fix(ci): capture only cache path from yarn cache dir for GITHUB_ENV Avoid Corepack download message breaking the env file (tail -n1). --- .github/workflows/app-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/app-test.yml b/.github/workflows/app-test.yml index e9d1d54..d3edacb 100644 --- a/.github/workflows/app-test.yml +++ b/.github/workflows/app-test.yml @@ -29,7 +29,7 @@ jobs: - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "YARN_CACHE_DIR=$(yarn cache dir)" >> $GITHUB_ENV + run: echo "YARN_CACHE_DIR=$(yarn cache dir 2>&1 | tail -n1)" >> $GITHUB_ENV - name: Cache yarn dependencies uses: actions/cache@v3 From 0593c8663af45a1eee41b6a8acc31a1166bb849e Mon Sep 17 00:00:00 2001 From: xurxodev Date: Fri, 27 Feb 2026 13:14:31 +0100 Subject: [PATCH 3/9] fix(ci): quote run command so pipe is not parsed as YAML --- .github/workflows/app-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/app-test.yml b/.github/workflows/app-test.yml index d3edacb..ac5d322 100644 --- a/.github/workflows/app-test.yml +++ b/.github/workflows/app-test.yml @@ -29,7 +29,7 @@ jobs: - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "YARN_CACHE_DIR=$(yarn cache dir 2>&1 | tail -n1)" >> $GITHUB_ENV + run: 'echo "YARN_CACHE_DIR=$(yarn cache dir 2>&1 | tail -n1)" >> $GITHUB_ENV' - name: Cache yarn dependencies uses: actions/cache@v3 From 7f9243d976af1a491a7fed601a24c9a65730d282 Mon Sep 17 00:00:00 2001 From: xurxodev Date: Fri, 27 Feb 2026 13:17:41 +0100 Subject: [PATCH 4/9] fix(ci): use head -n1 for yarn cache dir so path is used, not menu line --- .github/workflows/app-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/app-test.yml b/.github/workflows/app-test.yml index ac5d322..e64ba3e 100644 --- a/.github/workflows/app-test.yml +++ b/.github/workflows/app-test.yml @@ -29,7 +29,7 @@ jobs: - name: Get yarn cache directory path id: yarn-cache-dir-path - run: 'echo "YARN_CACHE_DIR=$(yarn cache dir 2>&1 | tail -n1)" >> $GITHUB_ENV' + run: 'echo "YARN_CACHE_DIR=$(yarn cache dir 2>&1 | head -n1)" >> $GITHUB_ENV' - name: Cache yarn dependencies uses: actions/cache@v3 From f96bbb65080ababa38d3691d735b81dd543bb5bb Mon Sep 17 00:00:00 2001 From: xurxodev Date: Fri, 27 Feb 2026 17:36:25 +0100 Subject: [PATCH 5/9] fix(ci): use grep ^/ for yarn cache dir to get path line only --- .github/workflows/app-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/app-test.yml b/.github/workflows/app-test.yml index e64ba3e..25ba81b 100644 --- a/.github/workflows/app-test.yml +++ b/.github/workflows/app-test.yml @@ -29,7 +29,7 @@ jobs: - name: Get yarn cache directory path id: yarn-cache-dir-path - run: 'echo "YARN_CACHE_DIR=$(yarn cache dir 2>&1 | head -n1)" >> $GITHUB_ENV' + run: 'echo "YARN_CACHE_DIR=$(yarn cache dir 2>&1 | grep -E ^/ | head -n1)" >> $GITHUB_ENV' - name: Cache yarn dependencies uses: actions/cache@v3 From 2f0a6cd2eb06f28dc89a2427291a4d837b1e7828 Mon Sep 17 00:00:00 2001 From: xurxodev Date: Fri, 27 Feb 2026 17:56:48 +0100 Subject: [PATCH 6/9] fix(ci): strip spaces and add fallback for yarn cache dir path --- .github/workflows/app-test.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/app-test.yml b/.github/workflows/app-test.yml index 25ba81b..dbecf9f 100644 --- a/.github/workflows/app-test.yml +++ b/.github/workflows/app-test.yml @@ -29,7 +29,10 @@ jobs: - name: Get yarn cache directory path id: yarn-cache-dir-path - run: 'echo "YARN_CACHE_DIR=$(yarn cache dir 2>&1 | grep -E ^/ | head -n1)" >> $GITHUB_ENV' + run: | + CACHE_DIR=$(yarn cache dir 2>&1 | sed 's/^[[:space:]]*//' | grep -E '^/' | head -n1) + if [ -z "$CACHE_DIR" ]; then CACHE_DIR="$RUNNER_TEMP/yarn-cache"; fi + echo "YARN_CACHE_DIR=$CACHE_DIR" >> $GITHUB_ENV - name: Cache yarn dependencies uses: actions/cache@v3 @@ -51,4 +54,3 @@ jobs: - name: Run typescript tests run: npx tsc - \ No newline at end of file From 7cf2b1694c769091425a77a4b2c5ac76af5b9e83 Mon Sep 17 00:00:00 2001 From: xurxodev Date: Mon, 2 Mar 2026 15:10:59 +0100 Subject: [PATCH 7/9] fix(ci): use ACTIONS_YARN_CACHE_PATH instead of YARN_CACHE_DIR Avoids conflict with YARN_CACHE_DIR that yarn may set. Cache path logic is unchanged. --- .github/workflows/app-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/app-test.yml b/.github/workflows/app-test.yml index dbecf9f..6a1f1de 100644 --- a/.github/workflows/app-test.yml +++ b/.github/workflows/app-test.yml @@ -32,13 +32,13 @@ jobs: run: | CACHE_DIR=$(yarn cache dir 2>&1 | sed 's/^[[:space:]]*//' | grep -E '^/' | head -n1) if [ -z "$CACHE_DIR" ]; then CACHE_DIR="$RUNNER_TEMP/yarn-cache"; fi - echo "YARN_CACHE_DIR=$CACHE_DIR" >> $GITHUB_ENV + echo "ACTIONS_YARN_CACHE_PATH=$CACHE_DIR" >> $GITHUB_ENV - name: Cache yarn dependencies uses: actions/cache@v3 id: yarn-cache with: - path: ${{ env.YARN_CACHE_DIR }} + path: ${{ env.ACTIONS_YARN_CACHE_PATH }} key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} restore-keys: | ${{ runner.os }}-yarn- From f7be1b048f8c9c96ee895983b682dfc9a3f3d054 Mon Sep 17 00:00:00 2001 From: xurxodev Date: Mon, 2 Mar 2026 15:36:29 +0100 Subject: [PATCH 8/9] fix(ci): align bundlemon workflow with yarn 4 (Corepack + cache) - Enable Corepack so yarn 4 works (packageManager in package.json) - Remove setup-node cache: 'yarn' to avoid YARN_CACHE_DIR conflict - Add explicit yarn cache steps using ACTIONS_YARN_CACHE_PATH (same as app-test) --- .github/workflows/bundlemon-build-size.yml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/bundlemon-build-size.yml b/.github/workflows/bundlemon-build-size.yml index 518994e..5ce394c 100644 --- a/.github/workflows/bundlemon-build-size.yml +++ b/.github/workflows/bundlemon-build-size.yml @@ -56,8 +56,26 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v4 with: - node-version-file: '.nvmrc' # Use the Node.js version specified in .nvmrc - cache: 'yarn' + node-version-file: '.nvmrc' + + - name: Enable Corepack + run: corepack enable + + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: | + CACHE_DIR=$(yarn cache dir 2>&1 | sed 's/^[[:space:]]*//' | grep -E '^/' | head -n1) + if [ -z "$CACHE_DIR" ]; then CACHE_DIR="$RUNNER_TEMP/yarn-cache"; fi + echo "ACTIONS_YARN_CACHE_PATH=$CACHE_DIR" >> $GITHUB_ENV + + - name: Cache yarn dependencies + uses: actions/cache@v3 + id: yarn-cache + with: + path: ${{ env.ACTIONS_YARN_CACHE_PATH }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- - name: Cache npm for npx-scoped tools uses: actions/cache@v3 From b58856a538e9bf711057e70402d50a8a068a7ddc Mon Sep 17 00:00:00 2001 From: xurxodev Date: Thu, 12 Mar 2026 07:03:00 +0100 Subject: [PATCH 9/9] fix(ci): use explicit yarn 1/yarn 4 cache path resolution and bump cache action to v5 - keep manual Yarn cache flow so Corepack can be enabled before resolving Yarn 4 - resolve cache path explicitly for Yarn 1 and Yarn 4 instead of parsing mixed output - upgrade Yarn and npm cache steps from actions/cache@v3 to v5 --- .github/workflows/app-test.yml | 9 +++++++-- .github/workflows/bundlemon-build-size.yml | 11 ++++++++--- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/.github/workflows/app-test.yml b/.github/workflows/app-test.yml index 6a1f1de..65cb806 100644 --- a/.github/workflows/app-test.yml +++ b/.github/workflows/app-test.yml @@ -30,12 +30,17 @@ jobs: - name: Get yarn cache directory path id: yarn-cache-dir-path run: | - CACHE_DIR=$(yarn cache dir 2>&1 | sed 's/^[[:space:]]*//' | grep -E '^/' | head -n1) + YARN_MAJOR=$(yarn --version | cut -d. -f1) + if [ "$YARN_MAJOR" = "1" ]; then + CACHE_DIR=$(yarn cache dir) + else + CACHE_DIR=$(yarn config get cacheFolder) + fi if [ -z "$CACHE_DIR" ]; then CACHE_DIR="$RUNNER_TEMP/yarn-cache"; fi echo "ACTIONS_YARN_CACHE_PATH=$CACHE_DIR" >> $GITHUB_ENV - name: Cache yarn dependencies - uses: actions/cache@v3 + uses: actions/cache@v5 id: yarn-cache with: path: ${{ env.ACTIONS_YARN_CACHE_PATH }} diff --git a/.github/workflows/bundlemon-build-size.yml b/.github/workflows/bundlemon-build-size.yml index 5ce394c..4e975b3 100644 --- a/.github/workflows/bundlemon-build-size.yml +++ b/.github/workflows/bundlemon-build-size.yml @@ -64,12 +64,17 @@ jobs: - name: Get yarn cache directory path id: yarn-cache-dir-path run: | - CACHE_DIR=$(yarn cache dir 2>&1 | sed 's/^[[:space:]]*//' | grep -E '^/' | head -n1) + YARN_MAJOR=$(yarn --version | cut -d. -f1) + if [ "$YARN_MAJOR" = "1" ]; then + CACHE_DIR=$(yarn cache dir) + else + CACHE_DIR=$(yarn config get cacheFolder) + fi if [ -z "$CACHE_DIR" ]; then CACHE_DIR="$RUNNER_TEMP/yarn-cache"; fi echo "ACTIONS_YARN_CACHE_PATH=$CACHE_DIR" >> $GITHUB_ENV - name: Cache yarn dependencies - uses: actions/cache@v3 + uses: actions/cache@v5 id: yarn-cache with: path: ${{ env.ACTIONS_YARN_CACHE_PATH }} @@ -78,7 +83,7 @@ jobs: ${{ runner.os }}-yarn- - name: Cache npm for npx-scoped tools - uses: actions/cache@v3 + uses: actions/cache@v5 with: path: ~/.npm key: ${{ runner.os }}-npm-npx