From 5b1c4cd006f24e0e0267802ff966e376971a7c8e Mon Sep 17 00:00:00 2001 From: Michael FIG Date: Tue, 4 Jul 2023 14:00:54 -0600 Subject: [PATCH 1/2] refactor: adapt types for newer `@endo/eventual-send` --- packages/vats/src/vat-bank.js | 2 +- packages/vats/test/bootstrapTests/supports.js | 2 +- packages/wallet/api/src/lib-wallet.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/vats/src/vat-bank.js b/packages/vats/src/vat-bank.js index d963d4bba11..b81ad9f4611 100644 --- a/packages/vats/src/vat-bank.js +++ b/packages/vats/src/vat-bank.js @@ -614,7 +614,7 @@ const prepareBankManager = ( /** * @param {string} denom * @param {AssetIssuerKit} feeKit - * @returns {import('@endo/far').EOnly} + * @returns {ERef>} */ getRewardDistributorDepositFacet(denom, feeKit) { const { bankChannel } = this.state; diff --git a/packages/vats/test/bootstrapTests/supports.js b/packages/vats/test/bootstrapTests/supports.js index 13b3b315162..11dbf68f9a3 100644 --- a/packages/vats/test/bootstrapTests/supports.js +++ b/packages/vats/test/bootstrapTests/supports.js @@ -31,7 +31,7 @@ const trace = makeTracer('BSTSupport', false); /** @typedef {Awaited>} BootstrapRootObject */ -/** @type {Record} */ +/** @type {{ [P in keyof BootstrapRootObject]: P }} */ export const bootstrapMethods = { bootstrap: 'bootstrap', consumeItem: 'consumeItem', diff --git a/packages/wallet/api/src/lib-wallet.js b/packages/wallet/api/src/lib-wallet.js index 174f1cc253e..9b95d06a5a3 100644 --- a/packages/wallet/api/src/lib-wallet.js +++ b/packages/wallet/api/src/lib-wallet.js @@ -726,7 +726,7 @@ export function makeWalletRoot({ // eslint-disable-next-line no-use-before-define p = makeEmptyPurse(petnameForBrand, petnameForBrand, true); } else { - p = Promise.resolve(); + p = Promise.resolve(undefined); } return E.when(p, _ => petnameForBrand); }; From 426d613fc02ac11c860ca2a63527948f4e1f9ca8 Mon Sep 17 00:00:00 2001 From: Michael FIG Date: Tue, 4 Jul 2023 14:01:38 -0600 Subject: [PATCH 2/2] ci(restore-node): new `get-packed-versions.sh` cache busting --- scripts/get-packed-versions.sh | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/scripts/get-packed-versions.sh b/scripts/get-packed-versions.sh index b1a173c5f5f..e5f0c856a73 100755 --- a/scripts/get-packed-versions.sh +++ b/scripts/get-packed-versions.sh @@ -7,6 +7,11 @@ # the destination repository. set -xueo pipefail +cache_bust=true +case $1 in +--no-cache-bust) cache_bust=false; shift ;; +esac + WORKDIR=${1:-.} cd -- "$WORKDIR" 1>&2 @@ -27,12 +32,24 @@ yarn --silent workspaces info | jq -r '.[].location' | while read -r dir; do stem=$(echo "$name" | sed -e 's!^@!!; s!/!-!g;') file="$(pwd)/${stem}-v${version}.tgz" + # Clean up. + rm -f "${stem}"-v*.tgz + # Create the tarball. yarn pack 1>&2 + if $cache_bust; then + # Bust the cache! + sum=$(sha1sum "$file" | sed -e 's/ .*//') + dst="$(pwd)/${stem}-v${version}-${sum}.tgz" + mv "$file" "$dst" + else + dst=$file + fi + # Write out the version entry. - jq -s --arg name "$name" --arg file "$file" \ - '{ key: $name, value: ("file:" + $file) }' < /dev/null + jq -n --arg name "$name" --arg file "$dst" \ + '{ key: $name, value: ("file:" + $file) }' popd 1>&2 ##################