Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Branch test for Endo Yarn 4 #9285

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/agd-builder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 3 additions & 2 deletions scripts/get-packed-versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@ WORKDIR=${1:-.}
cd -- "$WORKDIR" 1>&2

# Install and build the source directory.
corepack enable
yarn install 1>&2
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
Expand All @@ -36,7 +37,7 @@ yarn --silent workspaces info | 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
Expand Down
4 changes: 2 additions & 2 deletions scripts/get-versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 7 additions & 1 deletion scripts/registry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,13 @@ publish() {

(popd > /dev/null && git cat-file blob "$VERSIONSHASH") | "$thisdir/set-versions.sh" .

yarn install
# DEBUG
cat package.json
cat packages/*/package.json

yarn --version
# only Yarn v1 has verbose option
yarn install --verbose || yarn install
yarn build
git commit --allow-empty -am "chore: prepare for publishing"

Expand Down
2 changes: 1 addition & 1 deletion scripts/replace-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 6 additions & 2 deletions scripts/set-versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,13 @@ 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
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 {
Expand Down
Loading