Files
grafana/scripts/validate-npm-packages.sh
Jack Westbrook 279bdc2636 CI: Use publint to validate npm packages (#106521)
* ci(packages): use publint to validate npm packages are good to publish

* style(validate-npm-packages): remove extra line
2025-06-11 11:05:42 +02:00

19 lines
580 B
Bash
Executable File

#!/bin/bash
# This script is used to validate the npm packages that are published to npmjs.org are in the correct format.
# It won't catch things like malformed JS or Types but it will assert that the package has
# the correct files and package.json properties.
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 attw "$file" --ignore-rules "named-exports"
yarn publint "$file"
done
echo "🚀 All NPM package checks passed! 🚀"
exit 0