GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — tools: replace while+exec() with matchAll() by Trott · Pull Request #41406 · nodejs/node

Conversation

@Trott

@Trott Trott commented Jan 5, 2022

Copy link
Copy Markdown
Member

No description provided.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

bricss reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@Trott
tools: replace while+exec() with matchAll()
a845b28
@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to Node.js documentation. tools Issues and PRs related to the tools directory. labels Jan 5, 2022
tniessen
tniessen approved these changes Jan 5, 2022
View reviewed changes
Comment thread tools/doc/allhtml.mjs
Comment on lines 103 to 109
// Validate all hrefs have a target.
const ids = new Set();
const idRe = / id="([^"]+)"/g;
let match;
while (match = idRe.exec(all)) {
const idMatches = all.matchAll(idRe);
for (const match of idMatches) {
ids.add(match[1]);
}

@tniessen tniessen Jan 5, 2022

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional suggestion to get rid of a few statements:

const ids = new Set([...all.matchAll(idRe)].map((match) => match[1]));

Or even:

const ids =
  new Set([...all.matchAll(/ id="([^"]+)"/g)].map((match) => match[1]));

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Trott Trott added the author ready PRs with CI started, the required approvals, and no outstanding review comments. label Jan 6, 2022
targos
targos approved these changes Jan 6, 2022
View reviewed changes
@Trott Trott added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Jan 8, 2022
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Jan 8, 2022
@nodejs-github-bot

nodejs-github-bot commented Jan 8, 2022

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/41789/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot

nodejs-github-bot commented Jan 8, 2022

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/41792/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot mentioned this pull request Jan 9, 2022
CI Reliability 2022-01-09 nodejs/reliability#170
Open
18 tasks
@Trott Trott added the commit-queue PRs queued for automated landing through the Commit Queue. label Jan 9, 2022
@nodejs-github-bot nodejs-github-bot removed the commit-queue PRs queued for automated landing through the Commit Queue. label Jan 9, 2022
@nodejs-github-bot
nodejs-github-bot merged commit e247089 into nodejs:master Jan 9, 2022
@nodejs-github-bot

nodejs-github-bot commented Jan 9, 2022

Copy link
Copy Markdown
Collaborator

Landed in e247089

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Trott
Trott deleted the matchallall branch January 9, 2022 13:23
@Trott Trott mentioned this pull request Jan 9, 2022
tools: replace for loop with map() #41451
Merged
This was referenced Jan 12, 2022
CI Reliability 2022-01-12 nodejs/reliability#171
Open
CI Reliability 2022-01-13 nodejs/reliability#172
Open
Trott added a commit to Trott/io.js that referenced this pull request Jan 13, 2022
@Trott
tools: replace for loop with map()
500241d
Refs: nodejs#41406 (comment)
Co-authored-by: Tobias Nießen <[email protected]>

PR-URL: nodejs#41451
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Anto Aravinth <[email protected]>
@github-actions github-actions Bot mentioned this pull request Jan 14, 2022
CI Reliability 2022-01-14 nodejs/reliability#173
Open
22 tasks
targos pushed a commit that referenced this pull request Jan 14, 2022
@Trott @targos
tools: replace while+exec() with matchAll()
4a57d47
PR-URL: #41406
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
targos pushed a commit that referenced this pull request Jan 14, 2022
@Trott @targos
tools: replace for loop with map()
ec337b2
Refs: #41406 (comment)
Co-authored-by: Tobias Nießen <[email protected]>

PR-URL: #41451
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Anto Aravinth <[email protected]>
@targos targos mentioned this pull request Jan 16, 2022
v17.4.0 release proposal #41557
Merged
danielleadams pushed a commit that referenced this pull request Feb 1, 2022
@Trott @danielleadams
tools: replace while+exec() with matchAll()
62450d3
PR-URL: #41406
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
danielleadams pushed a commit that referenced this pull request Feb 1, 2022
@Trott @danielleadams
tools: replace for loop with map()
86ece98
Refs: #41406 (comment)
Co-authored-by: Tobias Nießen <[email protected]>

PR-URL: #41451
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Anto Aravinth <[email protected]>
@danielleadams danielleadams mentioned this pull request Feb 1, 2022
v16.14.0 proposal #41804
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@tniessen tniessen tniessen approved these changes
+1 more reviewer
@targos targos targos approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. doc Issues and PRs related to Node.js documentation. tools Issues and PRs related to the tools directory.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@Trott @nodejs-github-bot @targos @tniessen
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.