From d98a97174baaacf9efbab3ec9599cf6f0afd1ed8 Mon Sep 17 00:00:00 2001 From: Kris Kowal Date: Thu, 25 Apr 2024 09:59:47 -0700 Subject: [PATCH 1/9] ci: Poke continuous integration From 030ab65377c1390097852a02e8920b1941b8ec0d Mon Sep 17 00:00:00 2001 From: Kris Kowal Date: Thu, 25 Apr 2024 10:23:15 -0700 Subject: [PATCH 2/9] fix: Sprinkle corepack enable for endo install --- scripts/get-packed-versions.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/get-packed-versions.sh b/scripts/get-packed-versions.sh index 621109965a6..0cca443999c 100755 --- a/scripts/get-packed-versions.sh +++ b/scripts/get-packed-versions.sh @@ -19,6 +19,7 @@ WORKDIR=${1:-.} cd -- "$WORKDIR" 1>&2 # Install and build the source directory. +corepack enable yarn install 1>&2 yarn build 1>&2 From 40975f3664e0ca9b33eb7095bc6547b1a047b37b Mon Sep 17 00:00:00 2001 From: Kris Kowal Date: Thu, 25 Apr 2024 11:15:43 -0700 Subject: [PATCH 3/9] fix: replace yarn workspaces info with npm query .workspace --- scripts/get-packed-versions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/get-packed-versions.sh b/scripts/get-packed-versions.sh index 0cca443999c..6fc9ad6082d 100755 --- a/scripts/get-packed-versions.sh +++ b/scripts/get-packed-versions.sh @@ -25,7 +25,7 @@ yarn build 1>&2 yarn lerna run build:types 1>&2 -yarn --silent workspaces info | jq -r '.[].location' | while read -r dir; do +npm query .workspace | jq -r '.[].location' | while read -r dir; do # Skip private packages. echo "dir=$dir" 1>&2 test "$(jq .private < "$dir/package.json")" != true || continue From 7dc7c6e0f01cd2f896031ce27747da60137469cd Mon Sep 17 00:00:00 2001 From: Kris Kowal Date: Thu, 25 Apr 2024 11:38:45 -0700 Subject: [PATCH 4/9] fix: npm generates package.tgz now --- scripts/get-packed-versions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/get-packed-versions.sh b/scripts/get-packed-versions.sh index 6fc9ad6082d..ecaf970ee8d 100755 --- a/scripts/get-packed-versions.sh +++ b/scripts/get-packed-versions.sh @@ -37,7 +37,7 @@ npm query .workspace | jq -r '.[].location' | while read -r dir; do name=$(jq -r .name < package.json) version=$(jq -r .version < package.json) stem=$(echo "$name" | sed -e 's!^@!!; s!/!-!g;') - file="$(pwd)/${stem}-v${version}.tgz" + file="$(pwd)/package.tgz" # Clean up. rm -f "${stem}"-v*.tgz From 62314c78847a0e0333d861393c940bc03c959ddf Mon Sep 17 00:00:00 2001 From: Kris Kowal Date: Thu, 25 Apr 2024 12:15:23 -0700 Subject: [PATCH 5/9] fix: more npm query --- scripts/agd-builder.sh | 2 +- scripts/get-versions.sh | 4 ++-- scripts/replace-packages.sh | 2 +- scripts/set-versions.sh | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/agd-builder.sh b/scripts/agd-builder.sh index deb173bdbc0..e55a4173c3e 100755 --- a/scripts/agd-builder.sh +++ b/scripts/agd-builder.sh @@ -187,7 +187,7 @@ $do_not_build || ( files=(package.json) while IFS= read -r line; do files+=("$line") - done < <(lazy_yarn -s workspaces info \ + done < <(npm query .workspace \ | sed -ne '/"location":/{ s/.*": "//; s!",.*!/package.json!; p; }') src=$(find "${files[@]}" "${print[@]}" | head -1 || true) diff --git a/scripts/get-versions.sh b/scripts/get-versions.sh index b91cb8773c0..7495a8035c0 100755 --- a/scripts/get-versions.sh +++ b/scripts/get-versions.sh @@ -5,7 +5,7 @@ set -ueo pipefail WORKDIR=${1:-.} cd -- "$WORKDIR" -yarn workspaces --json info \ - | jq -r '.data | fromjson | .[].location | "\(.)/package.json"' \ +npm query .workspace \ + | jq -r '.[].location | "\(.)/package.json"' \ | xargs jq '{key: .name, value: "^\(.version)"}' \ | jq --slurp from_entries diff --git a/scripts/replace-packages.sh b/scripts/replace-packages.sh index 534647d730c..dc934a93cec 100755 --- a/scripts/replace-packages.sh +++ b/scripts/replace-packages.sh @@ -14,7 +14,7 @@ DSTDIR=${2-$PWD/node_modules} pushd "$SRCDIR" yarn install yarn build -yarn --silent workspaces info | jq -r '.[].location' | while read -r dir; do +npm query .workspace | jq -r '.[].location' | while read -r dir; do # Skip private packages. test "$(jq .private < "$dir/package.json")" != true || continue diff --git a/scripts/set-versions.sh b/scripts/set-versions.sh index a1aa3cdbf01..aa7e395a02e 100755 --- a/scripts/set-versions.sh +++ b/scripts/set-versions.sh @@ -11,8 +11,8 @@ cd -- "${1-"$DIR/.."}" VERSIONSHASH=$(git hash-object -w --stdin) -yarn workspaces --json info \ - | jq -r '.data | fromjson | .[].location | "\(.)/package.json"' \ +npm query .workspace \ + | jq -r '.[].location | "\(.)/package.json"' \ | while read PACKAGEJSON; do PACKAGEJSONHASH=$( jq --slurpfile versions <(git cat-file blob "$VERSIONSHASH") ' From 678ed59c5cc03d05ddf985afcbaf8715e45cb0fb Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Thu, 25 Apr 2024 14:05:07 -0700 Subject: [PATCH 6/9] ci: debug --- scripts/registry.sh | 5 +++++ scripts/set-versions.sh | 1 + 2 files changed, 6 insertions(+) diff --git a/scripts/registry.sh b/scripts/registry.sh index 4824ac1c3b4..f2b8c75c366 100755 --- a/scripts/registry.sh +++ b/scripts/registry.sh @@ -66,6 +66,11 @@ publish() { (popd > /dev/null && git cat-file blob "$VERSIONSHASH") | "$thisdir/set-versions.sh" . + # DEBUG + cat package.json + cat packages/*/package.json + + yarn --version yarn install yarn build git commit --allow-empty -am "chore: prepare for publishing" diff --git a/scripts/set-versions.sh b/scripts/set-versions.sh index aa7e395a02e..d0aada3ba03 100755 --- a/scripts/set-versions.sh +++ b/scripts/set-versions.sh @@ -14,6 +14,7 @@ VERSIONSHASH=$(git hash-object -w --stdin) npm query .workspace \ | jq -r '.[].location | "\(.)/package.json"' \ | while read PACKAGEJSON; do + echo "$PACKAGEJSON" PACKAGEJSONHASH=$( jq --slurpfile versions <(git cat-file blob "$VERSIONSHASH") ' def update(name): if .[name] then { From 72710dfbb46d4a4a261a89f8357388dd10a468b2 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Thu, 25 Apr 2024 14:23:47 -0700 Subject: [PATCH 7/9] next --- .github/workflows/integration.yml | 2 +- scripts/set-versions.sh | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 8a0cb0cc1c6..8c3c3294fd7 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -29,7 +29,7 @@ on: concurrency: group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true + # cancel-in-progress: true jobs: pre_check: diff --git a/scripts/set-versions.sh b/scripts/set-versions.sh index d0aada3ba03..d68346e1188 100755 --- a/scripts/set-versions.sh +++ b/scripts/set-versions.sh @@ -14,7 +14,10 @@ VERSIONSHASH=$(git hash-object -w --stdin) npm query .workspace \ | jq -r '.[].location | "\(.)/package.json"' \ | while read PACKAGEJSON; do + echo PACKAGEJSON echo "$PACKAGEJSON" + echo BLOB "$VERSIONSHASH" + git cat-file blob "$VERSIONSHASH" PACKAGEJSONHASH=$( jq --slurpfile versions <(git cat-file blob "$VERSIONSHASH") ' def update(name): if .[name] then { From 42a5aad4890a9869c6e9d60803913f7715bd5359 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Thu, 25 Apr 2024 14:31:22 -0700 Subject: [PATCH 8/9] next --- .github/workflows/integration.yml | 2 +- scripts/registry.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 8c3c3294fd7..8a0cb0cc1c6 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -29,7 +29,7 @@ on: concurrency: group: ${{ github.workflow }}-${{ github.ref }} - # cancel-in-progress: true + cancel-in-progress: true jobs: pre_check: diff --git a/scripts/registry.sh b/scripts/registry.sh index f2b8c75c366..822a7f5df9e 100755 --- a/scripts/registry.sh +++ b/scripts/registry.sh @@ -71,7 +71,7 @@ publish() { cat packages/*/package.json yarn --version - yarn install + yarn install --verbose yarn build git commit --allow-empty -am "chore: prepare for publishing" From f3ba7ba40c8138941f6112161145174ab410d8fd Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Thu, 25 Apr 2024 14:41:16 -0700 Subject: [PATCH 9/9] next --- scripts/registry.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/registry.sh b/scripts/registry.sh index 822a7f5df9e..548adcb91db 100755 --- a/scripts/registry.sh +++ b/scripts/registry.sh @@ -71,7 +71,8 @@ publish() { cat packages/*/package.json yarn --version - yarn install --verbose + # only Yarn v1 has verbose option + yarn install --verbose || yarn install yarn build git commit --allow-empty -am "chore: prepare for publishing"