This is an automated email from the ASF dual-hosted git repository.
brycemecum pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/main by this push:
new 1c0c13a925 GH-44585: [JS][Release] Skip bin dir in npm-release.sh
(#44861)
1c0c13a925 is described below
commit 1c0c13a925985dc4d58cb659a4d137cb23778458
Author: Bryce Mecum <[email protected]>
AuthorDate: Tue Nov 26 20:50:13 2024 -0800
GH-44585: [JS][Release] Skip bin dir in npm-release.sh (#44861)
### Rationale for this change
When publishing packages to npm, we want to skip any package.json files
inside ./bin directories because those aren't meant to be published.
### What changes are included in this PR?
Updated `find` command which excludes `bin` directories.
### Are these changes tested?
Yes.
### Are there any user-facing changes?
No.
* GitHub Issue: #44585
Authored-by: Bryce Mecum <[email protected]>
Signed-off-by: Bryce Mecum <[email protected]>
---
js/npm-release.sh | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/js/npm-release.sh b/js/npm-release.sh
index cff5945756..7c1e890c94 100755
--- a/js/npm-release.sh
+++ b/js/npm-release.sh
@@ -24,6 +24,7 @@ yarn gulp
read -p "Please enter your npm 2FA one-time password (or leave empty if you
don't have 2FA enabled): " NPM_OTP </dev/tty
-# publish the JS target modules to npm
-find targets -type f -name package.json -execdir sh -c \
+# collect targets by finding package.json files
+# skips any in a bin dir, see GH-44585
+find targets -type f -name package.json ! -path "*/bin/*" -execdir sh -c \
"npm publish \$(dirname \$(realpath {})) ${NPM_OTP:+ --otp=$NPM_OTP}" \;