ci: verify published packages as consumers
All checks were successful
CI — Common Platform / Build, Test & Typecheck (push) Successful in 3m33s
Publish @bytelyst/* packages / publish (push) Successful in 2m27s

This commit is contained in:
root 2026-05-25 06:20:30 +00:00
parent c7f6b981f1
commit daabd37c78
2 changed files with 10 additions and 2 deletions

View File

@ -83,7 +83,7 @@ jobs:
echo "Queued packages:"
cat /tmp/packages-to-publish.tsv || true
- name: Build, test, pack, and optionally publish queued packages
- name: Build, test, pack, publish, and consumer-verify queued packages
env:
DRY_RUN: 'false'
run: |
@ -106,6 +106,14 @@ jobs:
(cd "$dir" && pnpm publish --no-git-checks --registry https://gitea.bytelyst.com/api/packages/bytelyst/npm/)
rm -f "$dir/.npmrc"
npm view "$name@$version" version dist.shasum dist.tarball --userconfig /tmp/publish.npmrc --registry https://gitea.bytelyst.com/api/packages/bytelyst/npm/
consumer_dir="/tmp/consumer-${name//@/}-${version}"
consumer_dir="${consumer_dir//\//-}"
rm -rf "$consumer_dir"
mkdir -p "$consumer_dir"
cp /tmp/publish.npmrc "$consumer_dir/.npmrc"
printf '{"name":"publish-consumer-verify","private":true,"type":"module","dependencies":{"%s":"%s"}}\n' "$name" "$version" > "$consumer_dir/package.json"
(cd "$consumer_dir" && pnpm install --no-frozen-lockfile)
(cd "$consumer_dir" && node --input-type=module -e "const m=await import('$name'); console.log(Object.keys(m).sort().join(','));")
fi
done < /tmp/packages-to-publish.tsv

View File

@ -1,6 +1,6 @@
{
"name": "@bytelyst/errors",
"version": "0.1.8",
"version": "0.1.9",
"type": "module",
"exports": {
".": {