forked from denoland/deno
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ext/node): support NODE_DEBUG env (denoland#23583)
- Loading branch information
1 parent
455cf17
commit b844406
Showing
7 changed files
with
75 additions
and
19 deletions.
There are no files selected for viewing
This file contains 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 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 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 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,6 @@ | ||
{ | ||
"args": "run --allow-read main.mjs", | ||
"envs": { "NODE_DEBUG": "*" }, | ||
"output": "main.out", | ||
"exitCode": 0 | ||
} |
This file contains 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 @@ | ||
hello world |
This file contains 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,14 @@ | ||
import { createReadStream } from "node:fs"; | ||
import path from "node:path"; | ||
|
||
const filePath = path.join(import.meta.dirname, "hello.txt"); | ||
const readableStream = createReadStream(filePath); | ||
readableStream.on("data", (chunk) => { | ||
console.log(chunk.toString()); | ||
}); | ||
readableStream.on("end", () => { | ||
console.log("Finished reading the file"); | ||
}); | ||
readableStream.on("error", (error) => { | ||
console.error("Error reading the file:", error); | ||
}); |
This file contains 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,36 @@ | ||
STREAM [WILDCARD] 'resume' | ||
STREAM [WILDCARD] 'resume' false | ||
STREAM [WILDCARD] 'read' 0 | ||
STREAM [WILDCARD] 'need readable' false | ||
STREAM [WILDCARD] 'length less than watermark' true | ||
STREAM [WILDCARD] 'reading, ended or constructing' false | ||
STREAM [WILDCARD] 'flow' true | ||
STREAM [WILDCARD] 'read' undefined | ||
STREAM [WILDCARD] 'need readable' true | ||
STREAM [WILDCARD] 'length less than watermark' true | ||
STREAM [WILDCARD] 'reading, ended or constructing' false | ||
STREAM [WILDCARD] 'read' 0 | ||
STREAM [WILDCARD] 'need readable' true | ||
STREAM [WILDCARD] 'length less than watermark' true | ||
STREAM [WILDCARD] 'reading, ended or constructing' false | ||
STREAM [WILDCARD] 'maybeReadMore read 0' | ||
STREAM [WILDCARD] 'read' 0 | ||
STREAM [WILDCARD] 'need readable' true | ||
STREAM [WILDCARD] 'length less than watermark' true | ||
STREAM [WILDCARD] 'do read' | ||
STREAM [WILDCARD] 'readableAddChunk' <Buffer 68 65 6c 6c 6f 20 77 6f 72 6c 64 0a> | ||
hello world | ||
|
||
STREAM [WILDCARD] 'maybeReadMore read 0' | ||
STREAM [WILDCARD] 'read' 0 | ||
STREAM [WILDCARD] 'need readable' true | ||
STREAM [WILDCARD] 'length less than watermark' true | ||
STREAM [WILDCARD] 'do read' | ||
STREAM [WILDCARD] 'readableAddChunk' null | ||
STREAM [WILDCARD] 'onEofChunk' | ||
STREAM [WILDCARD] 'emitReadable_' false 0 true | ||
STREAM [WILDCARD] 'flow' true | ||
STREAM [WILDCARD] 'read' undefined | ||
STREAM [WILDCARD] 'endReadable' false | ||
STREAM [WILDCARD] 'endReadableNT' false 0 | ||
Finished reading the file |