Skip to content

Commit 82940d6

Browse files
authored
build: refresh markdown lint dependencies on lockfile changes
Reinstall markdown lint dependencies when the lockfile changes and recheck all Markdown files with the updated rules. Assisted-by: Codex Signed-off-by: inoway46 <inoueyuya416@gmail.com> PR-URL: #67185 Refs: #67023 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent b48b454 commit 82940d6

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

‎Makefile‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1475,10 +1475,11 @@ bench-addons-clean:
14751475
$(RM) -r benchmark/napi/*/build
14761476
$(RM) benchmark/napi/.buildstamp
14771477

1478-
ifeq ("$(wildcard tools/.mdlintstamp)","")
1479-
LINT_MD_NEWER =
1480-
else
1478+
# Recheck all Markdown when the lint dependencies change.
1479+
ifeq ($(shell test tools/.mdlintstamp -nt tools/lint-md/package-lock.json && echo 1),1)
14811480
LINT_MD_NEWER = -newer tools/.mdlintstamp
1481+
else
1482+
LINT_MD_NEWER =
14821483
endif
14831484

14841485
LINT_MD_TARGETS = doc src lib benchmark test tools/doc tools/icu $(filter-out CLAUDE.md,$(wildcard *.md))
@@ -1488,7 +1489,7 @@ LINT_MD_FILES = $(shell $(FIND) $(LINT_MD_TARGETS) -type f \
14881489
run-lint-md = tools/lint-md/lint-md.mjs $(LINT_MD_FILES)
14891490

14901491
# Check for a specific file, as (empty) directories are persisted in git.
1491-
tools/lint-md/node_modules/remark-parse/package.json:
1492+
tools/lint-md/node_modules/remark-parse/package.json: tools/lint-md/package-lock.json
14921493
-cd tools/lint-md && $(call available-node,$(run-npm-ci))
14931494

14941495
# Lint all changed markdown files maintained by us

0 commit comments

Comments
 (0)