From 0b8ed9fa7d4f7b13287d5dd32d3054fbe56e25ea Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Mon, 17 Aug 2026 22:59:46 -0700 Subject: [PATCH] [Dev Deps] update `markdown-link-check` --- Makefile | 41 +++++++++++++++++++++++++++++------------ README.md | 2 +- package.json | 2 +- 3 files changed, 31 insertions(+), 14 deletions(-) diff --git a/Makefile b/Makefile index adb81d61..2c43538e 100644 --- a/Makefile +++ b/Makefile @@ -72,18 +72,35 @@ endif _ensure-clean: @[ -z "$$(git status --porcelain --untracked-files=no || echo err)" ] || { echo "Workspace is not clean; please commit changes first." >&2; exit 2; } +# Resolves $(TAG) against the most recent version tag; sets $$old_ver and $$new_ver in the recipe's shell. +define RESOLVE_VERSIONS +old_ver=`git describe --abbrev=0 --tags --match 'v[0-9]*.[0-9]*.[0-9]*'` || { echo "Failed to determine current version." >&2; exit 1; }; old_ver=$${old_ver#v}; \ +new_ver=`echo "$(TAG)" | sed 's/^v//'`; new_ver=$${new_ver:-patch}; \ +if printf "$$new_ver" | grep -q '^[0-9]'; then \ + semver "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be major.minor.patch' >&2; exit 2; }; \ + semver -r "> $$old_ver" "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be HIGHER than current one.' >&2; exit 2; } \ +else \ + new_ver=`semver -i "$$new_ver" "$$old_ver"` || { echo 'Invalid version-increment specifier: $(TAG)' >&2; exit 2; } \ +fi +endef + +# Prints the release notes that `make TAG= release` would use; invoke the same way. +.PHONY: release-notes +release-notes: _ensure-tag _ensure-current-version + @$(RESOLVE_VERSIONS); \ + ./release-notes.sh "v$$new_ver" + # Makes a release; invoke with `make TAG= release`. .PHONY: release release: _ensure-tag _ensure-clean _ensure-current-version - @old_ver=`git describe --abbrev=0 --tags --match 'v[0-9]*.[0-9]*.[0-9]*'` || { echo "Failed to determine current version." >&2; exit 1; }; old_ver=$${old_ver#v}; \ - new_ver=`echo "$(TAG)" | sed 's/^v//'`; new_ver=$${new_ver:-patch}; \ - if printf "$$new_ver" | grep -q '^[0-9]'; then \ - semver "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be major.minor.patch' >&2; exit 2; }; \ - semver -r "> $$old_ver" "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be HIGHER than current one.' >&2; exit 2; } \ - else \ - new_ver=`semver -i "$$new_ver" "$$old_ver"` || { echo 'Invalid version-increment specifier: $(TAG)' >&2; exit 2; } \ - fi; \ - printf "=== Bumping version **$$old_ver** to **$$new_ver** before committing and tagging:\n=== TYPE 'proceed' TO PROCEED, anything else to abort: " && read response && [ "$$response" = 'proceed' ] || { echo 'Aborted.' >&2; exit 2; }; \ - replace "$$old_ver" "$$new_ver" $(VERSIONED_FILES) && \ - git commit -m "v$$new_ver" $(VERSIONED_FILES) && \ - git tag -a "v$$new_ver" + @$(RESOLVE_VERSIONS); \ + notes_file=`mktemp` || { echo 'Failed to create a temp file for the release notes.' >&2; exit 1; }; \ + trap 'rm -f "$$notes_file"' EXIT; \ + ./release-notes.sh "v$$new_ver" > "$$notes_file" || { echo 'Failed to generate release notes.' >&2; exit 1; }; \ + echo '=== Release notes: ==='; \ + cat "$$notes_file"; \ + printf "\n=== Bumping version **$$old_ver** to **$$new_ver** before committing and tagging with the above notes:\n=== TYPE 'proceed' TO PROCEED, anything else to abort: " && read response && [ "$$response" = 'proceed' ] || { echo 'Aborted.' >&2; exit 2; }; \ + old_ver_re=`printf '%s' "$$old_ver" | sed 's/[.]/\\\\./g'` && \ + replace "$$old_ver_re" "$$new_ver" $(VERSIONED_FILES) && \ + git commit -F "$$notes_file" $(VERSIONED_FILES) && \ + git tag -a -F "$$notes_file" "v$$new_ver" diff --git a/README.md b/README.md index 714ff655..d8b87d49 100644 --- a/README.md +++ b/README.md @@ -1132,7 +1132,7 @@ Here's what you will need to do: If one of these broken versions is installed on your system, the above step will likely still succeed even if you didn't include the `--shared-zlib` flag. However, later, when you attempt to `npm install` something using your old version of node.js, you will see `incorrect data check` errors. If you want to avoid the possible hassle of dealing with this, include that flag. - For more details, see [this issue](https://github.com/nodejs/node/issues/39313) and [this comment](https://github.com/nodejs/node/issues/39313#issuecomment-90.40.676) + For more details, see [this issue](https://github.com/nodejs/node/issues/39313) and [this comment](https://github.com/nodejs/node/issues/39313#issuecomment-902395576) - Exit back to your native shell. diff --git a/package.json b/package.json index 3a48bc3e..06426c11 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "dockerfile_lint": "^0.3.4", "doctoc": "^2.5.0", "eclint": "^2.8.1", - "markdown-link-check": "^3.14.2", + "markdown-link-check": "^3.15.0", "replace": "^1.2.2", "semver": "^7.8.5", "urchin": "^0.0.5"