Skip to content

Commit

Permalink
build: use npm ci
Browse files Browse the repository at this point in the history
* remove obsolete `node_modules/js-yaml/package.json` target
* remove `@touch` since `npm ci` is always destructive

PR-URL: nodejs#22399
Refs: nodejs#21802
Refs: nodejs#21490
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Sam Ruby <rubys@intertwingly.net>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
  • Loading branch information
refack committed Aug 23, 2018
1 parent 9d9f691 commit d320511
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
9 changes: 2 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -642,12 +642,8 @@ out/doc/api/assets/%: doc/api_assets/% out/doc/api/assets
@cp $< $@


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

tools/doc/node_modules/js-yaml/package.json:
cd tools/doc && $(call available-node,$(run-npm-install))

gen-api = tools/doc/generate.js --node-version=$(FULLVERSION) \
--analytics=$(DOCS_ANALYTICS) $< --output-directory=out/doc/api

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

tools/doc/node_modules: tools/doc/package.json
ifeq ($(node_use_openssl),true)
cd tools/doc && $(call available-node,$(run-npm-install))
@touch $@
cd tools/doc && $(call available-node,$(run-npm-ci))
else
@echo "Skipping tools/doc/node_modules (no crypto)"
endif
Expand Down Expand Up @@ -1184,7 +1179,7 @@ LINT_CPP_FILES = $(filter-out $(LINT_CPP_EXCLUDE), $(wildcard \
ADDON_DOC_LINT_FLAGS=-whitespace/ending_newline,-build/header_guard

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

format-cpp-clean:
$(RM) -r tools/clang-format/node_modules
Expand Down
2 changes: 1 addition & 1 deletion vcbuild.bat
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ if not defined doc (
if exist "tools\doc\node_modules\unified\package.json" goto skip-install-doctools
SETLOCAL
cd tools\doc
%npm_exe% install
%npm_exe% ci
cd ..\..
if errorlevel 1 goto exit
ENDLOCAL
Expand Down

0 comments on commit d320511

Please sign in to comment.