You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by ho...@apache.org on 2024/01/22 22:48:53 UTC

(solr) branch branch_9x updated: Final fix for node problems (#2208)

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

houston pushed a commit to branch branch_9x
in repository https://gitbox.apache.org/repos/asf/solr.git


The following commit(s) were added to refs/heads/branch_9x by this push:
     new f5409dfbc86 Final fix for node problems (#2208)
f5409dfbc86 is described below

commit f5409dfbc861d851c9445f324113d5144a565bc2
Author: Houston Putman <ho...@apache.org>
AuthorDate: Mon Jan 22 16:02:07 2024 -0600

    Final fix for node problems (#2208)
    
    - Upgrade node to most recent minor version (16.20.2)
    - Set environment variable for registry on all NPM and NPX tasks
    
    (cherry picked from commit 909de37a6324a70251eacb5148d019e926d0977e)
---
 gradle/node.gradle | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/gradle/node.gradle b/gradle/node.gradle
index 41a853799c5..3da3a51d40e 100644
--- a/gradle/node.gradle
+++ b/gradle/node.gradle
@@ -23,6 +23,15 @@ configure([project(":solr:packaging"), project(":solr:solr-ref-guide"), project(
         tasks.npmSetup {
             args.addAll(['--registry', npmRegistry])
         }
+
+        afterEvaluate {
+            tasks.withType(NpmTask).each { npmTask ->
+                npmTask.environment.put('NPM_CONFIG_REGISTRY', npmRegistry)
+            }
+            tasks.withType(NpxTask).each { npxTask ->
+                npxTask.environment.put('NPM_CONFIG_REGISTRY', npmRegistry)
+            }
+        }
     }
 
     ext {
@@ -32,7 +41,7 @@ configure([project(":solr:packaging"), project(":solr:solr-ref-guide"), project(
 
     node {
         download = true
-        version = "16.15.1" // LTS
+        version = "16.20.2" // LTS
 
         def nodeDistUrl = "${ -> propertyOrEnvOrDefault("solr.node.distUrl", "SOLR_NODE_DIST_URL", '') }"
         if (!nodeDistUrl.isEmpty()) {