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 — util: improve isInsideNodeModules by Uzlopak · Pull Request #52147 · nodejs/node

Conversation

@Uzlopak

@Uzlopak Uzlopak commented Mar 18, 2024

Copy link
Copy Markdown
Contributor

Improve isInsideNodeModules by avoiding a Regex
kNodeModulesRE is using a non-capturing group

Sorry, something went wrong.

Uh oh!

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

All reactions
@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. util Issues and PRs related to the built-in util module. labels Mar 18, 2024
aduh95
aduh95 reviewed Mar 18, 2024
View reviewed changes
Comment thread lib/internal/util.js Resolved

Uh oh!

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

Comment thread lib/internal/util.js Resolved

Uh oh!

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

anonrig
anonrig reviewed Mar 19, 2024
View reviewed changes
Comment thread lib/internal/util.js Resolved

Uh oh!

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

Comment thread lib/internal/util.js Resolved

Uh oh!

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

@Uzlopak
Uzlopak force-pushed the util-isInsideNodeModules branch 2 times, most recently from d08b72a to 0778337 Compare March 20, 2024 22:00
@aduh95

aduh95 commented Mar 20, 2024

Copy link
Copy Markdown
Contributor

kNodeModulesRE is using a non-capturing group

Just curious, did you do that for performance reasons, or is that a neutral change to make the regex more intention-revealing?

All reactions

Sorry, something went wrong.

Uh oh!

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

aduh95
aduh95 approved these changes Mar 20, 2024
View reviewed changes
@aduh95 aduh95 added author ready PRs with CI started, the required approvals, and no outstanding review comments. request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. labels Mar 20, 2024
@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 Mar 20, 2024
@nodejs-github-bot

nodejs-github-bot commented Mar 20, 2024

Copy link
Copy Markdown
Collaborator

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

All reactions

Sorry, something went wrong.

Uh oh!

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

@Uzlopak

Uzlopak commented Mar 20, 2024

Copy link
Copy Markdown
Contributor Author

I just saw that the capturing group is not used and the captured string can be very long. So i had performance in mind, but i didnt wanted to claim a (significant?) performance gain, which i probably cant prove.

aduh95 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

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

@aduh95

aduh95 commented Mar 20, 2024

Copy link
Copy Markdown
Contributor

Looks like this a breaking the following tests:

  • parallel.test-buffer-constructor-outside-node-modules
  • parallel.test-buffer-constructor-node-modules-paths
All reactions

Sorry, something went wrong.

Uh oh!

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

@Uzlopak

Uzlopak commented Mar 20, 2024

Copy link
Copy Markdown
Contributor Author

I will have a look at it in few hours ;)

All reactions

Sorry, something went wrong.

Uh oh!

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

@Uzlopak Uzlopak closed this Mar 21, 2024
@Uzlopak
Uzlopak force-pushed the util-isInsideNodeModules branch from 0778337 to c714cda Compare March 21, 2024 01:07
@Uzlopak Uzlopak reopened this Mar 21, 2024
@Uzlopak

Uzlopak commented Mar 21, 2024

Copy link
Copy Markdown
Contributor Author

@aduh95

Should be fixed now.

All reactions

Sorry, something went wrong.

Uh oh!

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

BridgeAR
BridgeAR approved these changes Mar 21, 2024
View reviewed changes
@aduh95 aduh95 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 Mar 21, 2024
@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 Mar 21, 2024
@nodejs-github-bot

nodejs-github-bot commented Mar 21, 2024

Copy link
Copy Markdown
Collaborator

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

All reactions

Sorry, something went wrong.

Uh oh!

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

lpinca
lpinca approved these changes Mar 21, 2024
View reviewed changes
@nodejs-github-bot

nodejs-github-bot commented Mar 21, 2024

Copy link
Copy Markdown
Collaborator

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

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 Mar 22, 2024

Copy link
Copy Markdown
Collaborator

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

All reactions

Sorry, something went wrong.

Uh oh!

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

@Uzlopak

Uzlopak commented Apr 15, 2024

Copy link
Copy Markdown
Contributor Author

@nodejs/node-core-utils

can this be merged?

All reactions

Sorry, something went wrong.

Uh oh!

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

anonrig
anonrig reviewed Apr 15, 2024
View reviewed changes
Comment thread lib/internal/util.js Outdated

@anonrig anonrig Apr 15, 2024

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.

This only applies to Windows right?

Sorry, something went wrong.

Uh oh!

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

All reactions

@Uzlopak Uzlopak Apr 15, 2024

Copy link
Copy Markdown
Contributor Author

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.

this PR is already old but afaik it was effecting linux too

Sorry, something went wrong.

Uh oh!

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

All reactions
@BridgeAR BridgeAR 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 May 4, 2024
@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 May 4, 2024
@nodejs-github-bot

nodejs-github-bot commented May 4, 2024

Copy link
Copy Markdown
Collaborator

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

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 May 5, 2024

Copy link
Copy Markdown
Collaborator

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

All reactions

Sorry, something went wrong.

Uh oh!

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

@aduh95 aduh95 added the commit-queue PRs queued for automated landing through the Commit Queue. label May 5, 2024
@nodejs-github-bot nodejs-github-bot added commit-queue-failed PRs whose Commit Queue landing failed and need manual intervention before retrying. and removed commit-queue PRs queued for automated landing through the Commit Queue. labels May 5, 2024
@nodejs-github-bot

nodejs-github-bot commented May 5, 2024

Copy link
Copy Markdown
Collaborator
Commit Queue failed
- Loading data for nodejs/node/pull/52147
✔  Done loading data for nodejs/node/pull/52147
----------------------------------- PR info ------------------------------------
Title      util: improve isInsideNodeModules (#52147)
Author     Aras Abbasi  (@Uzlopak)
Branch     Uzlopak:util-isInsideNodeModules -> nodejs:main
Labels     util, author ready, needs-ci
Commits    1
 - util: improve isInsideNodeModules
Committers 1
 - uzlopak 
PR-URL: https://github.com/nodejs/node/pull/52147
Reviewed-By: Antoine du Hamel 
Reviewed-By: Ruben Bridgewater 
Reviewed-By: Luigi Pinca 
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/52147
Reviewed-By: Antoine du Hamel 
Reviewed-By: Ruben Bridgewater 
Reviewed-By: Luigi Pinca 
--------------------------------------------------------------------------------
   ℹ  This PR was created on Mon, 18 Mar 2024 20:58:36 GMT
   ✔  Approvals: 3
   ✔  - Antoine du Hamel (@aduh95) (TSC): https://github.com/nodejs/node/pull/52147#pullrequestreview-1950310069
   ✔  - Ruben Bridgewater (@BridgeAR) (TSC): https://github.com/nodejs/node/pull/52147#pullrequestreview-1951180547
   ✔  - Luigi Pinca (@lpinca): https://github.com/nodejs/node/pull/52147#pullrequestreview-1953430893
   ✘  Last GitHub CI failed
   ℹ  Last Full PR CI on 2024-05-05T08:45:43Z: https://ci.nodejs.org/job/node-test-pull-request/58945/
- Querying data for job/node-test-pull-request/58945/
   ✔  Last Jenkins CI successful
--------------------------------------------------------------------------------
   ✔  Aborted `git node land` session in /home/runner/work/node/node/.ncu
https://github.com/nodejs/node/actions/runs/8957320660
All reactions

Sorry, something went wrong.

Uh oh!

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

@Uzlopak @aduh95
util: improve isInsideNodeModules
b77f32b
PR-URL: nodejs#52147
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
@aduh95
aduh95 force-pushed the util-isInsideNodeModules branch from f02a1ba to b77f32b Compare May 5, 2024 09:56
@aduh95
aduh95 merged commit b77f32b into nodejs:main May 5, 2024
@Uzlopak
Uzlopak deleted the util-isInsideNodeModules branch May 5, 2024 10:13
targos pushed a commit that referenced this pull request May 8, 2024
@Uzlopak @targos
util: improve isInsideNodeModules
a42b93b
PR-URL: #52147
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
@targos targos mentioned this pull request May 13, 2024
v22.2.0 release proposal #52971
Merged
@pimterry pimterry mentioned this pull request May 20, 2024
WASM crashes on Node v22.2.0 if it reaches the new Buffer() deprecation warning #53075
Closed
marco-ippolito pushed a commit that referenced this pull request Jun 17, 2024
@Uzlopak @marco-ippolito
util: improve isInsideNodeModules
d7eba50
PR-URL: #52147
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
@marco-ippolito marco-ippolito mentioned this pull request Jun 17, 2024
v20.15.0 proposal #53486
Merged
soophoo pushed a commit to soophoo/node that referenced this pull request Jun 20, 2024
@Uzlopak @soophoo
util: improve isInsideNodeModules
2f3deea
PR-URL: nodejs#52147
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
@richardlau richardlau added the dont-land-on-v18.x label Aug 11, 2024
@kravets-levko kravets-levko mentioned this pull request Aug 14, 2024
TypeError: Cannot read properties of undefined (reading '0') using client.openSession(); databricks/databricks-sql-nodejs#264
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@anonrig anonrig anonrig left review comments
@lpinca lpinca lpinca approved these changes
@BridgeAR BridgeAR BridgeAR approved these changes
@aduh95 aduh95 aduh95 approved these changes

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. commit-queue-failed PRs whose Commit Queue landing failed and need manual intervention before retrying. needs-ci PRs that need a full CI run. util Issues and PRs related to the built-in util module.

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.

7 participants

@Uzlopak @aduh95 @nodejs-github-bot @lpinca @anonrig @BridgeAR @richardlau
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.