You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Auto-detect node manager: prefer Volta over NVM. Override with NODE_MANAGER=volta|nvm
15
+
ifneq ($(VOLTA_BIN),no)
16
+
NODE_MANAGER ?= volta
17
+
else ifeq ($(NVM),yes)
18
+
NODE_MANAGER ?= nvm
19
+
else
20
+
NODE_MANAGER ?= none
21
+
endif
22
+
13
23
PHONY += js-install
14
24
js-install: ## Install JS packages
15
25
ifeq ($(JS_PACKAGE_MANAGER),yarn)
@@ -23,22 +33,30 @@ js-outdated: ## Show outdated JS packages
23
33
$(call step,Show outdated JS packages with $(JS_PACKAGE_MANAGER)...)
24
34
$(call node_run,outdated)
25
35
26
-
ifeq ($(NVM),no)
36
+
ifeq ($(NODE_MANAGER),volta)
27
37
definenode_run
28
-
$(call error,$(NVM_REQUIRED))
38
+
$(call step,Run '$(JS_PACKAGE_MANAGER)$(1)' with Node $(NODE_VERSION)...\n)
39
+
@volta run --node $(NODE_VERSION)$(JS_PACKAGE_MANAGER)$(if$(filter$(JS_PACKAGE_MANAGER),yarn),$(JS_PACKAGE_MANAGER_CWD_FLAG_YARN),$(JS_PACKAGE_MANAGER_CWD_FLAG_NPM))$(PACKAGE_JSON_PATH)$(1)
29
40
endef
30
-
else
41
+
else ifeq ($(NODE_MANAGER),nvm)
31
42
definenode_run
32
43
$(call step,Run '$(JS_PACKAGE_MANAGER)$(1)' with Node $(NODE_VERSION)...\n)
0 commit comments