From e3507fcd734d047efac3f0ca7d6b9e5723653d54 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Fri, 17 Sep 2021 15:56:24 -0700 Subject: [PATCH 1/2] feat: prepare ncu for new README format This accommodates both the current README format and the upcoming README format. Refs: https://github.com/nodejs/node/pull/40137 --- lib/collaborators.js | 3 ++- test/fixtures/README/README.md | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/collaborators.js b/lib/collaborators.js index e8c39b1d..ce7b7aa0 100644 --- a/lib/collaborators.js +++ b/lib/collaborators.js @@ -6,7 +6,8 @@ const TSC_TITLE = '### TSC (Technical Steering Committee)'; const TSCE_TITLE = '### TSC Emeriti'; const CL_TITLE = '### Collaborators'; const CLE_TITLE = '### Collaborator Emeriti'; -const CONTACT_RE = /\* +\[(.+?)\]\(.+?\) +-\s\*\*(.+?)\*\* +<(.+?)>/mg; +const CONTACT_RE = + /\* +\[(.+?)\]\(.+?\) +-\s\*\*(.+?)\*\* +(?:<|<)(.+?)(?:>|>)/mg; const TSC = 'TSC'; const COLLABORATOR = 'COLLABORATOR'; diff --git a/test/fixtures/README/README.md b/test/fixtures/README/README.md index 811ec296..8c4084cc 100644 --- a/test/fixtures/README/README.md +++ b/test/fixtures/README/README.md @@ -235,7 +235,7 @@ For more information about the governance of the Node.js project, see ### TSC (Technical Steering Committee) * [bar](https://github.com/bar) - -**Bar User** <bar@example.com> (she/her) + **Bar User** \ (she/her) ### TSC emeriti @@ -245,7 +245,7 @@ For more information about the governance of the Node.js project, see ### Collaborators * [bar](https://github.com/bar) - -**Bar User** <bar@example.com> (she/her) + **Bar User** \ (she/her) * [Baz](https://github.com/Baz) - **Baz User** <baz@example.com> (he/him) * [foo](https://github.com/foo) - From 3dc0d625adf54eab10df7b8ab36711eb104b48c0 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sun, 19 Sep 2021 07:19:20 -0700 Subject: [PATCH 2/2] fixup! feat: prepare ncu for new README format --- .eslintrc | 2 +- lib/collaborators.js | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.eslintrc b/.eslintrc index 59415410..a2b6f889 100644 --- a/.eslintrc +++ b/.eslintrc @@ -5,7 +5,7 @@ "space-before-function-paren": ["error", "never"], "no-multi-spaces": ["error", { "ignoreEOLComments": true }], "camelcase": "off", - "max-len": [2, 80, 4, {"ignoreUrls": true}], + "max-len": [2, 80, 4, {"ignoreRegExpLiterals": true, "ignoreUrls": true}], "object-property-newline": "off" }, "env": { diff --git a/lib/collaborators.js b/lib/collaborators.js index ce7b7aa0..009d120c 100644 --- a/lib/collaborators.js +++ b/lib/collaborators.js @@ -6,8 +6,7 @@ const TSC_TITLE = '### TSC (Technical Steering Committee)'; const TSCE_TITLE = '### TSC Emeriti'; const CL_TITLE = '### Collaborators'; const CLE_TITLE = '### Collaborator Emeriti'; -const CONTACT_RE = - /\* +\[(.+?)\]\(.+?\) +-\s\*\*(.+?)\*\* +(?:<|<)(.+?)(?:>|>)/mg; +const CONTACT_RE = /\* +\[(.+?)\]\(.+?\) +-\s+\*\*(.+?)\*\* +(?:<|\\<)(.+?)(?:>|>)/mg; const TSC = 'TSC'; const COLLABORATOR = 'COLLABORATOR';