Skip to content

Commit fc1259b

Browse files
refacktargos
authored andcommitted
build: use npm ci
* remove obsolete `node_modules/js-yaml/package.json` target * remove `@touch` since `npm ci` is always destructive PR-URL: #22399 Refs: #21802 Refs: #21490 Reviewed-By: Tiancheng "Timothy" Gu <[email protected]> Reviewed-By: Sam Ruby <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Daijiro Wachi <[email protected]>
1 parent 0b340ab commit fc1259b

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

Makefile

+2-7
Original file line numberDiff line numberDiff line change
@@ -642,12 +642,8 @@ out/doc/api/assets/%: doc/api_assets/% out/doc/api/assets
642642
@cp $< $@
643643

644644

645-
run-npm-install = $(PWD)/$(NPM) install --production --no-package-lock
646645
run-npm-ci = $(PWD)/$(NPM) ci
647646

648-
tools/doc/node_modules/js-yaml/package.json:
649-
cd tools/doc && $(call available-node,$(run-npm-install))
650-
651647
gen-api = tools/doc/generate.js --node-version=$(FULLVERSION) \
652648
--analytics=$(DOCS_ANALYTICS) $< --output-directory=out/doc/api
653649

@@ -1074,8 +1070,7 @@ lint-md-build: tools/remark-cli/node_modules \
10741070

10751071
tools/doc/node_modules: tools/doc/package.json
10761072
ifeq ($(node_use_openssl),true)
1077-
cd tools/doc && $(call available-node,$(run-npm-install))
1078-
@touch $@
1073+
cd tools/doc && $(call available-node,$(run-npm-ci))
10791074
else
10801075
@echo "Skipping tools/doc/node_modules (no crypto)"
10811076
endif
@@ -1184,7 +1179,7 @@ LINT_CPP_FILES = $(filter-out $(LINT_CPP_EXCLUDE), $(wildcard \
11841179
ADDON_DOC_LINT_FLAGS=-whitespace/ending_newline,-build/header_guard
11851180

11861181
format-cpp-build:
1187-
cd tools/clang-format && $(call available-node,$(run-npm-install))
1182+
cd tools/clang-format && $(call available-node,$(run-npm-ci))
11881183

11891184
format-cpp-clean:
11901185
$(RM) -r tools/clang-format/node_modules

vcbuild.bat

+1-1
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ if not defined doc (
439439
if exist "tools\doc\node_modules\unified\package.json" goto skip-install-doctools
440440
SETLOCAL
441441
cd tools\doc
442-
%npm_exe% install
442+
%npm_exe% ci
443443
cd ..\..
444444
if errorlevel 1 goto exit
445445
ENDLOCAL

0 commit comments

Comments
 (0)