[release-12.0.6] NPM: Backport NPM publishing from main (#111995)

* Backport npm publishing workflow from main

* Ignore false-cjs in validate-npm-packages
This commit is contained in:
Josh Hunt
2025-10-06 13:51:38 +01:00
committed by GitHub
parent 5d655ccf37
commit d351ebe919
5 changed files with 349 additions and 26 deletions
+2 -2
View File
@@ -1,4 +1,5 @@
#!/bin/bash
set -e
# 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
@@ -9,9 +10,8 @@ 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 attw "$file" --ignore-rules "named-exports" "false-cjs"
yarn publint "$file"
done
echo "🚀 All NPM package checks passed! 🚀"