From 51a36847ae5533c02342d4d43fe80d63b629e489 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Thu, 5 Mar 2026 17:45:45 +0100 Subject: [PATCH] ci: use yarn dedupe for all lockfiles MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit All lockfiles in the repo use Yarn 4, so use `yarn --cwd dedupe` uniformly instead of npx yarn-deduplicate for subdirectories. Co-Authored-By: Claude Opus 4.6 Signed-off-by: Fredrik Adelöw --- .../workflows/sync_dependabot-changesets.yml | 21 ++++++------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/.github/workflows/sync_dependabot-changesets.yml b/.github/workflows/sync_dependabot-changesets.yml index 750cdd3bb3..2a48c09d15 100644 --- a/.github/workflows/sync_dependabot-changesets.yml +++ b/.github/workflows/sync_dependabot-changesets.yml @@ -35,21 +35,12 @@ jobs: corepack enable changed=false - # Root lockfile (Yarn 4) - if git diff --name-only HEAD~1 | grep -q '^yarn\.lock$'; then - yarn dedupe - if ! git diff --quiet yarn.lock; then - git add yarn.lock - changed=true - fi - fi - - # Subdirectory lockfiles (Yarn Classic) - for dir in docs-ui microsite; do - if git diff --name-only HEAD~1 | grep -q "^${dir}/yarn.lock$"; then - npx yarn-deduplicate "$dir/yarn.lock" - if ! git diff --quiet "$dir/yarn.lock"; then - git add "$dir/yarn.lock" + for dir in . docs-ui microsite; do + if [ "$dir" = "." ]; then lockfile=yarn.lock; else lockfile="$dir/yarn.lock"; fi + if git diff --name-only HEAD~1 | grep -q "^${lockfile}$"; then + yarn --cwd "$dir" dedupe + if ! git diff --quiet "$lockfile"; then + git add "$lockfile" changed=true fi fi