CI: Assert NPM package types are bundled correctly (#95533)

* ci(npm-packages): use attw cli to assert package types are built corrctly

* fix(validate-npm-packages): correct path to tarball
This commit is contained in:
Jack Westbrook 2024-10-31 14:29:21 +01:00 committed by GitHub
parent 2bcc46c338
commit a93de5f0d8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -7,6 +7,10 @@ ARTIFACTS_DIR="./npm-artifacts"
for file in "$ARTIFACTS_DIR"/*.tgz; do
echo "🔍 Checking NPM package: $file"
# Ignore named-exports for now as builds aren't compatible yet.
yarn dlx @arethetypeswrong/cli "$file" --ignore-rules "named-exports"
# get filename then strip everything after package name.
dir_name=$(basename "$file" .tgz | sed -E 's/@([a-zA-Z0-9-]+)-[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9-]+)?/\1/')
mkdir -p "./npm-artifacts/$dir_name"