This is an automated email from the ASF dual-hosted git repository.

lidavidm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-adbc.git


The following commit(s) were added to refs/heads/main by this push:
     new 1cda523ee1 chore(dev/release): switch to staged publishing for NPM 
(#5034)
1cda523ee1 is described below

commit 1cda523ee1185b46461719b57ae78459820bf067
Author: David Li <[email protected]>
AuthorDate: Tue Nov 17 16:00:15 2026 -0800

    chore(dev/release): switch to staged publishing for NPM (#5034)
    
    Closes #4953.
---
 ci/scripts/node_npm_upload.sh         | 14 ++++++++++++--
 docs/source/development/releasing.rst |  5 +++++
 2 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/ci/scripts/node_npm_upload.sh b/ci/scripts/node_npm_upload.sh
index a2d7c14b21..8bef0518ca 100755
--- a/ci/scripts/node_npm_upload.sh
+++ b/ci/scripts/node_npm_upload.sh
@@ -75,6 +75,7 @@ main() {
     npmrc=$(mktemp)
     trap "rm -f ${npmrc}" EXIT
     echo "//${registry_key#*://}/:_authToken=${NPM_TOKEN}" > "${npmrc}"
+    local stage=""
 
     # For non-npmjs registries (e.g. Gemfury), append a nightly date suffix
     # so each publish gets a unique version
@@ -86,6 +87,9 @@ main() {
         for pkg in "${packages_dir}"/apache-arrow-adbc-driver-manager-*.tgz; do
             repack_with_version "${pkg}" "${new_version}"
         done
+    else
+        # NPM requires "npm stage publish"
+        stage="stage"
     fi
 
     # Publish platform-specific packages first, then the main package
@@ -95,13 +99,19 @@ main() {
     shopt -u nullglob
     for pkg in "${platform_pkgs[@]+"${platform_pkgs[@]}"}"; do
         echo "==== Publishing ${pkg}"
-        npm publish "${pkg}" --access public --registry "${registry}" 
--userconfig "${npmrc}" ${tag_flag} ${dry_run_flag}
+        npm ${stage} publish "${pkg}" --access public --registry "${registry}" 
--userconfig "${npmrc}" ${tag_flag} ${dry_run_flag}
     done
 
     echo "==== Publishing main package"
     local main_pkg
     main_pkg=$(set -- 
"${packages_dir}"/apache-arrow-adbc-driver-manager-[0-9]*.tgz; echo "$1")
-    npm publish "${main_pkg}" --access public --registry "${registry}" 
--userconfig "${npmrc}" ${tag_flag} ${dry_run_flag}
+    npm ${stage} publish "${main_pkg}" --access public --registry 
"${registry}" --userconfig "${npmrc}" ${tag_flag} ${dry_run_flag}
+
+    if [[ -n "${stage}" && "${DRY_RUN:-0}" != "1" ]]; then
+        echo "==== Confirm staged packages"
+        echo "Go to https://www.npmjs.com and approve the staged packages"
+        read -p "After approving the artifacts, press ENTER to continue..." 
ignored
+    fi
 }
 
 main "$@"
diff --git a/docs/source/development/releasing.rst 
b/docs/source/development/releasing.rst
index 0c9162eca0..3cb9d02322 100644
--- a/docs/source/development/releasing.rst
+++ b/docs/source/development/releasing.rst
@@ -495,6 +495,11 @@ Be sure to go through on the following checklist:
       # dev/release/post-09-npm.sh
       dev/release/post-09-npm.sh
 
+   This will only `stage the packages
+   
<https://github.blog/changelog/2026-07-08-npm-install-time-security-and-gat-bypass2fa-deprecation/#2fa-bypass-tokens-will-no-longer-publish-directly>`_.
 Afterwards,
+   you must log in to NPM and approve each package (presenting your 2FA token
+   each time).
+
 .. dropdown:: Update conda-forge packages
    :class-title: sd-fs-5
    :class-container: sd-shadow-md

Reply via email to