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

fs: allow 'withFileTypes' to be used with globs #52837

Merged
merged 8 commits into from
May 7, 2024

Conversation

RedYetiDev
Copy link
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.

@nodejs-github-bot nodejs-github-bot added fs Issues and PRs related to the fs subsystem / file system. needs-ci PRs that need a full CI run. labels May 5, 2024
lib/internal/fs/glob.js Outdated Show resolved Hide resolved
Copy link
Member

@MoLow MoLow left a comment

Choose a reason for hiding this comment

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

Lgtm

lib/internal/fs/glob.js Outdated Show resolved Hide resolved
Copy link
Member

@benjamingr benjamingr left a comment

Choose a reason for hiding this comment

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

good work

RedYetiDev and others added 2 commits May 5, 2024 11:39
Co-authored-by: Antoine du Hamel <[email protected]>
Co-authored-by: Antoine du Hamel <[email protected]>
@RedYetiDev
Copy link
Member Author

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

@benjamingr benjamingr added the request-ci Add this label to start a Jenkins CI on a PR. label May 5, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label May 5, 2024
@nodejs-github-bot
Copy link
Collaborator

doc/api/fs.md Outdated Show resolved Hide resolved
doc/api/fs.md Outdated Show resolved Hide resolved
doc/api/fs.md Outdated Show resolved Hide resolved
RedYetiDev and others added 3 commits May 5, 2024 14:26
Co-authored-by: Michaël Zasso <[email protected]>
Co-authored-by: Michaël Zasso <[email protected]>
Co-authored-by: Michaël Zasso <[email protected]>
@nodejs-github-bot
Copy link
Collaborator

@aduh95 aduh95 added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. labels May 5, 2024
@targos
Copy link
Member

targos commented May 6, 2024

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)

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@MoLow MoLow added the commit-queue Add this label to land a pull request using GitHub Actions. label May 7, 2024
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label May 7, 2024
@nodejs-github-bot nodejs-github-bot merged commit 303c80c into nodejs:main May 7, 2024
59 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in 303c80c

@RedYetiDev RedYetiDev deleted the withfiletypes-glob branch May 7, 2024 11:17
Ch3nYuY pushed a commit to Ch3nYuY/node that referenced this pull request May 8, 2024
PR-URL: nodejs#52837
Reviewed-By: Moshe Atlow <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
targos pushed a commit that referenced this pull request May 8, 2024
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
Copy link
Member

targos commented May 13, 2024

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

targos added a commit that referenced this pull request May 13, 2024
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
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
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
EliphazBouye pushed a commit to EliphazBouye/node that referenced this pull request Jun 20, 2024
PR-URL: nodejs#52837
Reviewed-By: Moshe Atlow <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
EliphazBouye pushed a commit to EliphazBouye/node that referenced this pull request Jun 20, 2024
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
bmeck pushed a commit to bmeck/node that referenced this pull request Jun 22, 2024
PR-URL: nodejs#52837
Reviewed-By: Moshe Atlow <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
bmeck pushed a commit to bmeck/node that referenced this pull request Jun 22, 2024
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
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. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. fs Issues and PRs related to the fs subsystem / file system. 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
Development

Successfully merging this pull request may close these issues.

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