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 — fs: allow 'withFileTypes' to be used with globs by avivkeller · Pull Request #52837 · nodejs/node

Conversation

@avivkeller

@avivkeller avivkeller commented May 5, 2024

Copy link
Copy Markdown
Member

Fixes #52752

This PR enables the usage of withFileTypes in fs.glob (and similar) functions.

When withFileTypes is provided, the exclude() function will receive Dirent objects as arguments, along with the return value and callbacks.

Sorry, something went wrong.

Uh oh!

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

bricss and theoludwig reacted with rocket emoji
All reactions
  • 🚀 2 reactions
@avivkeller
fs: allow 'withFileTypes' to be used with globs
1515357
@nodejs-github-bot nodejs-github-bot added fs Issues and PRs related to file-system APIs and the fs module. needs-ci PRs that need a full CI run. labels May 5, 2024
@avivkeller
doc: add PR URL
2dc41bf
MoLow
MoLow reviewed May 5, 2024
View reviewed changes
Comment thread lib/internal/fs/glob.js Resolved

Uh oh!

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

MoLow
MoLow approved these changes May 5, 2024
View reviewed changes

@MoLow MoLow left a comment

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.

Lgtm

Sorry, something went wrong.

Uh oh!

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

avivkeller reacted with heart emoji
All reactions
  • ❤️ 1 reaction
aduh95
aduh95 reviewed May 5, 2024
View reviewed changes
Comment thread lib/internal/fs/glob.js Resolved

Uh oh!

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

aduh95
aduh95 reviewed May 5, 2024
View reviewed changes
Comment thread test/parallel/test-fs-glob.mjs Resolved

Uh oh!

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

benjamingr
benjamingr approved these changes May 5, 2024
View reviewed changes

@benjamingr benjamingr left a comment

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.

good work

Sorry, something went wrong.

Uh oh!

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

avivkeller reacted with heart emoji
All reactions
  • ❤️ 1 reaction
avivkeller and others added 2 commits May 5, 2024 11:39
@avivkeller @aduh95
Update glob.js
b70ecc4
Co-authored-by: Antoine du Hamel <[email protected]>
@avivkeller @aduh95
Update test-fs-glob.mjs
0bd1e1b
Co-authored-by: Antoine du Hamel <[email protected]>
@avivkeller

avivkeller commented May 5, 2024

Copy link
Copy Markdown
Member Author

Thanks for the reviews! I'll fix the lint later today :-)

All reactions

Sorry, something went wrong.

Uh oh!

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

@avivkeller
lint
9d377e1
@benjamingr benjamingr 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 5, 2024
benjamingr
benjamingr approved these changes May 5, 2024
View reviewed changes
@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 5, 2024
@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/58961/

All reactions

Sorry, something went wrong.

Uh oh!

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

targos
targos reviewed May 5, 2024
View reviewed changes
Comment thread doc/api/fs.md Resolved

Uh oh!

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

Comment thread doc/api/fs.md Resolved

Uh oh!

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

Comment thread doc/api/fs.md Resolved

Uh oh!

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

avivkeller and others added 3 commits May 5, 2024 14:26
@avivkeller @targos
Update doc/api/fs.md
75041e2
Co-authored-by: Michaël Zasso <[email protected]>
@avivkeller @targos
Update doc/api/fs.md
bd621ca
Co-authored-by: Michaël Zasso <[email protected]>
@avivkeller @targos
Update doc/api/fs.md
8d2e905
Co-authored-by: Michaël Zasso <[email protected]>
@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/58965/

All reactions

Sorry, something went wrong.

Uh oh!

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

@aduh95 aduh95 added author ready PRs with CI started, the required approvals, and no outstanding review comments. commit-queue-squash PRs the Commit Queue should land as one squashed commit. labels May 5, 2024
@targos

targos commented May 6, 2024

Copy link
Copy Markdown
Member

That's a warning and can be ignored.

The actual error is fatal error C1060: compiler is out of heap space. This requires to Resume CI (I just did that)

avivkeller 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.

@nodejs-github-bot

nodejs-github-bot commented May 6, 2024

Copy link
Copy Markdown
Collaborator

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

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 6, 2024

Copy link
Copy Markdown
Collaborator

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

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 6, 2024

Copy link
Copy Markdown
Collaborator

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

All reactions

Sorry, something went wrong.

Uh oh!

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

VoltrexKeyva
VoltrexKeyva approved these changes May 6, 2024
View reviewed changes
@nodejs-github-bot

nodejs-github-bot commented May 7, 2024

Copy link
Copy Markdown
Collaborator

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

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

Copy link
Copy Markdown
Collaborator

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

All reactions

Sorry, something went wrong.

Uh oh!

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

@MoLow MoLow added the commit-queue PRs queued for automated landing through the Commit Queue. label May 7, 2024
@nodejs-github-bot nodejs-github-bot removed the commit-queue PRs queued for automated landing through the Commit Queue. label May 7, 2024
@nodejs-github-bot
nodejs-github-bot merged commit 303c80c into nodejs:main May 7, 2024
@nodejs-github-bot

nodejs-github-bot commented May 7, 2024

Copy link
Copy Markdown
Collaborator

Landed in 303c80c

All reactions

Sorry, something went wrong.

Uh oh!

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

@avivkeller
avivkeller deleted the withfiletypes-glob branch May 7, 2024 11:17
targos pushed a commit that referenced this pull request May 8, 2024
@avivkeller @targos
fs: allow 'withFileTypes' to be used with globs
7d7a762
PR-URL: #52837
Reviewed-By: Moshe Atlow <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
@targos targos added the semver-minor PRs that contain new features and should be released in the next minor version. label May 13, 2024
@targos

targos commented May 13, 2024

Copy link
Copy Markdown
Member

This PR adds a feature so it should be labeled semver-minor PRs that contain new features and should be released in the next minor version. (this is not supposed to be done by releasers).

All reactions

Sorry, something went wrong.

Uh oh!

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

targos added a commit that referenced this pull request May 13, 2024
@targos
2024-05-14, Version 22.2.0 (Current)
7d92816
Notable changes:

cli:
  * (SEMVER-MINOR) allow running wasm in limited vmem with
    --disable-wasm-trap-handler (Joyee Cheung)
    #52766
doc:
  * add pimterry to collaborators (Tim Perry)
    #52874
fs:
  * (SEMVER-MINOR) allow 'withFileTypes' to be used with globs
    (Aviv Keller) #52837
inspector:
  * (SEMVER-MINOR) introduce the `--inspect-wait` flag (Kohei Ueno)
    #52734
lib,src:
  * remove --experimental-policy (Rafael Gonzaga)
    #52583
perf_hooks:
  * (SEMVER-MINOR) add `deliveryType` and `responseStatus` fields
    (Matthew Aitken) #51589
test_runner:
  * (SEMVER-MINOR) support test plans (Colin Ihrig)
    #52860
zlib:
  * (SEMVER-MINOR) expose zlib.crc32() (Joyee Cheung)
    #52692

PR-URL: #52971
@targos targos mentioned this pull request May 13, 2024
v22.2.0 release proposal #52971
Merged
targos added a commit that referenced this pull request May 15, 2024
@targos
2024-05-15, Version 22.2.0 (Current)
d57af10
Notable changes:

cli:
  * (SEMVER-MINOR) allow running wasm in limited vmem with
    --disable-wasm-trap-handler (Joyee Cheung)
    #52766
doc:
  * add pimterry to collaborators (Tim Perry)
    #52874
fs:
  * (SEMVER-MINOR) allow 'withFileTypes' to be used with globs
    (Aviv Keller) #52837
inspector:
  * (SEMVER-MINOR) introduce the `--inspect-wait` flag (Kohei Ueno)
    #52734
lib,src:
  * remove --experimental-policy (Rafael Gonzaga)
    #52583
perf_hooks:
  * (SEMVER-MINOR) add `deliveryType` and `responseStatus` fields
    (Matthew Aitken) #51589
test_runner:
  * (SEMVER-MINOR) support test plans (Colin Ihrig)
    #52860
zlib:
  * (SEMVER-MINOR) expose zlib.crc32() (Joyee Cheung)
    #52692

PR-URL: #52971
targos added a commit that referenced this pull request May 15, 2024
@targos
2024-05-15, Version 22.2.0 (Current)
28b0a58
Notable changes:

cli:
  * (SEMVER-MINOR) allow running wasm in limited vmem with
    --disable-wasm-trap-handler (Joyee Cheung)
    #52766
doc:
  * add pimterry to collaborators (Tim Perry)
    #52874
fs:
  * (SEMVER-MINOR) allow 'withFileTypes' to be used with globs
    (Aviv Keller) #52837
inspector:
  * (SEMVER-MINOR) introduce the `--inspect-wait` flag (Kohei Ueno)
    #52734
lib,src:
  * remove --experimental-policy (Rafael Gonzaga)
    #52583
perf_hooks:
  * (SEMVER-MINOR) add `deliveryType` and `responseStatus` fields
    (Matthew Aitken) #51589
test_runner:
  * (SEMVER-MINOR) support test plans (Colin Ihrig)
    #52860
zlib:
  * (SEMVER-MINOR) expose zlib.crc32() (Joyee Cheung)
    #52692

PR-URL: #52971
soophoo pushed a commit to soophoo/node that referenced this pull request Jun 20, 2024
@avivkeller @soophoo
fs: allow 'withFileTypes' to be used with globs
b4eb464
PR-URL: nodejs#52837
Reviewed-By: Moshe Atlow <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
soophoo pushed a commit to soophoo/node that referenced this pull request Jun 20, 2024
@targos @soophoo
2024-05-15, Version 22.2.0 (Current)
eccd98f
Notable changes:

cli:
  * (SEMVER-MINOR) allow running wasm in limited vmem with
    --disable-wasm-trap-handler (Joyee Cheung)
    nodejs#52766
doc:
  * add pimterry to collaborators (Tim Perry)
    nodejs#52874
fs:
  * (SEMVER-MINOR) allow 'withFileTypes' to be used with globs
    (Aviv Keller) nodejs#52837
inspector:
  * (SEMVER-MINOR) introduce the `--inspect-wait` flag (Kohei Ueno)
    nodejs#52734
lib,src:
  * remove --experimental-policy (Rafael Gonzaga)
    nodejs#52583
perf_hooks:
  * (SEMVER-MINOR) add `deliveryType` and `responseStatus` fields
    (Matthew Aitken) nodejs#51589
test_runner:
  * (SEMVER-MINOR) support test plans (Colin Ihrig)
    nodejs#52860
zlib:
  * (SEMVER-MINOR) expose zlib.crc32() (Joyee Cheung)
    nodejs#52692

PR-URL: nodejs#52971
@targos targos added dont-land-on-v18.x labels Sep 21, 2024
@henriquekirchheck henriquekirchheck mentioned this pull request Nov 15, 2024
[node] fix types for glob exclude with file types DefinitelyTyped/DefinitelyTyped#71179
Merged
8 tasks done
@Netail Netail mentioned this pull request Nov 17, 2024
fix(@types/node): Node GlobOptions exclude (Dirent type when withFileTypes true) DefinitelyTyped/DefinitelyTyped#71165
Closed
7 of 8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@aduh95 aduh95 aduh95 left review comments
@benjamingr benjamingr benjamingr approved these changes
@MoLow MoLow MoLow approved these changes
+2 more reviewers
@targos targos targos left review comments
@VoltrexKeyva VoltrexKeyva VoltrexKeyva 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. commit-queue-squash PRs the Commit Queue should land as one squashed commit. fs Issues and PRs related to file-system APIs and the fs module. needs-ci PRs that need a full CI run. semver-minor PRs that contain new features and should be released in the next minor version.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

fs.glob add option to only include files (not directories) in the results entries

Uh oh!

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

7 participants

@avivkeller @nodejs-github-bot @targos @benjamingr @MoLow @aduh95 @VoltrexKeyva
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.