Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src: simplify node modules traverse path #53061

Merged
merged 1 commit into from
May 21, 2024

Conversation

anonrig
Copy link
Member

@anonrig anonrig commented May 19, 2024

Since we now support C++20, we can simplify our node_modules.cc implementation with filesystem and several C++20 functions.

cc @nodejs/cpp-reviewers @GeoffreyBooth @aduh95

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. labels May 19, 2024
@richardlau richardlau added dont-land-on-v18.x PRs that should not land on the v18.x-staging branch and should not be released in v18.x. dont-land-on-v20.x PRs that should not land on the v20.x-staging branch and should not be released in v20.x. labels May 19, 2024
@GeoffreyBooth GeoffreyBooth added the module Issues and PRs related to the module subsystem. label May 19, 2024
Copy link
Member

@lemire lemire left a comment

Choose a reason for hiding this comment

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

ends_with and other C++20 features can probably simplify a lot of code. Good work.

@anonrig anonrig added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels May 20, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label May 20, 2024
@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot
Copy link
Collaborator

src/node_modules.cc Outdated Show resolved Hide resolved
@nodejs-github-bot
Copy link
Collaborator

@anonrig anonrig requested review from lemire and guybedford May 21, 2024 14:32
@anonrig anonrig added the review wanted PRs that need reviews. label May 21, 2024
@anonrig
Copy link
Member Author

anonrig commented May 21, 2024

@lemire @guybedford can you review again?

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Member

@lemire lemire left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@tniessen tniessen left a comment

Choose a reason for hiding this comment

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

Thanks for modernizing this @anonrig!

On a side note, the fact that operator/ is overloaded is hilarious to me 😄

@anonrig anonrig added commit-queue Add this label to land a pull request using GitHub Actions. and removed review wanted PRs that need reviews. labels May 21, 2024
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label May 21, 2024
@nodejs-github-bot nodejs-github-bot merged commit a7dad43 into nodejs:main May 21, 2024
56 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in a7dad43

targos pushed a commit that referenced this pull request Jun 1, 2024
PR-URL: #53061
Reviewed-By: Daniel Lemire <daniel@lemire.me>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
lukins-cz pushed a commit to lukins-cz/OS-Aplet-node that referenced this pull request Jun 1, 2024
PR-URL: nodejs#53061
Reviewed-By: Daniel Lemire <daniel@lemire.me>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. c++ Issues and PRs that require attention from people who are familiar with C++. dont-land-on-v18.x PRs that should not land on the v18.x-staging branch and should not be released in v18.x. dont-land-on-v20.x PRs that should not land on the v20.x-staging branch and should not be released in v20.x. module Issues and PRs related to the module subsystem. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants