From 9c4e7a51587cbfc28b1f2b874cbe35d7ac8024e4 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Fri, 24 Sep 2021 14:14:32 +0000 Subject: [PATCH] tools: fix lint-md autolinking Update a transitive dependency in lint-md to fix an autolink bug in the formatter that causes a lot of our files (particularly changelogs) to be misformatted when run through the automatic formatter. Refs: https://github.com/syntax-tree/mdast-util-gfm-autolink-literal/commit/7555d45f9ad4ecdd578ffedf3cbc4b01d3ae0135 PR-URL: https://github.com/nodejs/node/pull/40181 Reviewed-By: James M Snell Reviewed-By: Daijiro Wachi --- tools/lint-md/lint-md.mjs | 8 ++++++-- tools/lint-md/package-lock.json | 12 ++++++------ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/tools/lint-md/lint-md.mjs b/tools/lint-md/lint-md.mjs index b5b5f63379305b..fb02f6c5025bd3 100644 --- a/tools/lint-md/lint-md.mjs +++ b/tools/lint-md/lint-md.mjs @@ -27475,8 +27475,12 @@ function findUrl(_, protocol, domain, path, match) { * @param {RegExpMatchObject} match */ function findEmail(_, atext, label, match) { - // Not an expected previous character. - if (!previous(match, true) || /[_-]$/.test(label)) { + if ( + // Not an expected previous character. + !previous(match, true) || + // Label ends in not allowed character. + /[_-\d]$/.test(label) + ) { return false } diff --git a/tools/lint-md/package-lock.json b/tools/lint-md/package-lock.json index e4f594eb1fec37..d8066be8c3cdc4 100644 --- a/tools/lint-md/package-lock.json +++ b/tools/lint-md/package-lock.json @@ -732,9 +732,9 @@ } }, "node_modules/mdast-util-gfm-autolink-literal": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mdast-util-gfm-autolink-literal/-/mdast-util-gfm-autolink-literal-1.0.1.tgz", - "integrity": "sha512-dCUDNYXCytIonTHIUOZXp5S3FWd1XAt6IVH1fBfH6BbUF9U+9m1T9XllfHPvKJCccKNI+0RlYmQJ0rfMTDxEtA==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/mdast-util-gfm-autolink-literal/-/mdast-util-gfm-autolink-literal-1.0.2.tgz", + "integrity": "sha512-FzopkOd4xTTBeGXhXSBU0OCDDh5lUj2rd+HQqG92Ld+jL4lpUfgX2AT2OHAVP9aEeDKp7G92fuooSZcYJA3cRg==", "dependencies": { "@types/mdast": "^3.0.0", "ccount": "^2.0.0", @@ -3243,9 +3243,9 @@ } }, "mdast-util-gfm-autolink-literal": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mdast-util-gfm-autolink-literal/-/mdast-util-gfm-autolink-literal-1.0.1.tgz", - "integrity": "sha512-dCUDNYXCytIonTHIUOZXp5S3FWd1XAt6IVH1fBfH6BbUF9U+9m1T9XllfHPvKJCccKNI+0RlYmQJ0rfMTDxEtA==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/mdast-util-gfm-autolink-literal/-/mdast-util-gfm-autolink-literal-1.0.2.tgz", + "integrity": "sha512-FzopkOd4xTTBeGXhXSBU0OCDDh5lUj2rd+HQqG92Ld+jL4lpUfgX2AT2OHAVP9aEeDKp7G92fuooSZcYJA3cRg==", "requires": { "@types/mdast": "^3.0.0", "ccount": "^2.0.0",