-
-
Notifications
You must be signed in to change notification settings - Fork 159
fix(fs): complete Node 26 parity #6857
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
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
b3a27a0
fix(fs): complete Node 26 parity
TheHypnoo a9b5ccf
fix(fs): validate rmdir promise arguments
TheHypnoo 1a507f9
docs(changelog): record fs Node 26 parity
323d5d2
chore: merge main into PR branch
TheHypnoo 3530191
style(codegen): format loop purity match arm
TheHypnoo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| fix(fs): match Node 26 filesystem validation, option handling, descriptors, and callback behavior. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,19 +1,42 @@ | ||
| import * as fs from "node:fs"; | ||
| import { rmdir as rmdirPromise } from "node:fs/promises"; | ||
|
|
||
| // @ts-ignore | ||
| process.emitWarning = function () {}; | ||
|
|
||
| const ROOT = "/tmp/perry_node_suite_fs_rmdir_recursive_options"; | ||
| try { fs.rmSync(ROOT, { recursive: true, force: true }); } catch (_e) {} | ||
|
|
||
| fs.mkdirSync(ROOT + "/sync/a/b", { recursive: true }); | ||
| fs.writeFileSync(ROOT + "/sync/a/b/file.txt", "sync"); | ||
| fs.rmdirSync(ROOT + "/sync", { recursive: true }); | ||
| console.log("rmdirSync recursive removed:", !fs.existsSync(ROOT + "/sync")); | ||
|
|
||
| fs.mkdirSync(ROOT + "/callback/a/b", { recursive: true }); | ||
| fs.writeFileSync(ROOT + "/callback/a/b/file.txt", "callback"); | ||
| fs.rmdir(ROOT + "/callback", { recursive: true }, (err) => { | ||
| console.log("rmdir callback recursive err:", err === null); | ||
| console.log("rmdir callback recursive removed:", !fs.existsSync(ROOT + "/callback")); | ||
| }); | ||
| try { | ||
| fs.rmdirSync(ROOT, { recursive: true }); | ||
| } catch (err) { | ||
| console.log("rmdirSync recursive error:", err?.code); | ||
| } | ||
|
|
||
| try { | ||
| fs.rmdir(ROOT, { recursive: true }, () => {}); | ||
| } catch (err) { | ||
| console.log("rmdir callback recursive error:", err?.code); | ||
| } | ||
|
|
||
| try { | ||
| await fs.promises.rmdir(ROOT, { recursive: true }); | ||
| } catch (err) { | ||
| console.log("rmdir promises recursive error:", err?.code); | ||
| } | ||
|
|
||
| try { | ||
| await fs.promises.rmdir(); | ||
| } catch (err) { | ||
| console.log("rmdir promises missing path error:", err?.code); | ||
| } | ||
|
|
||
| try { | ||
| await rmdirPromise(); | ||
| } catch (err) { | ||
| console.log("rmdir promises namespace missing path error:", err?.code); | ||
| } | ||
|
|
||
| fs.mkdirSync(ROOT); | ||
| fs.rmdirSync(ROOT, {}); | ||
| console.log("rmdir empty options removed:", !fs.existsSync(ROOT)); | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.