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

Temp 2 #3

Closed
wants to merge 4,008 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
4008 commits
Select commit Hold shift + click to select a range
a816688
watch: reload changes in contents of --env-file
marekpiechut Aug 5, 2024
fafc845
stream: make checking pendingcb on WritableStream backward compatible
jakecastelli Aug 5, 2024
3616ace
inspector: provide detailed info to fix DevTools frontend errors
cola119 Aug 5, 2024
046343e
build: warn for GCC versions earlier than 12.2
targos Aug 5, 2024
cf21220
src: move spkac methods to ncrypto
jasnell Jul 21, 2024
bc6f895
doc: move release key for Myles Borins
richardlau Aug 5, 2024
ec7ee6c
deps: update amaro to 0.0.5
nodejs-github-bot Jul 29, 2024
b95eac5
deps: update amaro to 0.0.6
nodejs-github-bot Aug 4, 2024
981b5e3
doc, meta: replace command with link to keys
avivkeller Aug 5, 2024
c6aeddf
sea: don't set code cache flags when snapshot is used
joyeecheung Aug 5, 2024
926503b
src: shift more crypto impl details to ncrypto
jasnell Jul 24, 2024
a5200da
doc: move `onread` option from `socket.connect()` to `new net.socket()`
sendoru Aug 5, 2024
28adfbe
meta: bump `ossf/scorecard-action` from 2.3.3 to 2.4.0
dependabot[bot] Aug 5, 2024
e55eb45
meta: bump `github/codeql-action` from 3.25.11 to 3.25.15
dependabot[bot] Aug 6, 2024
6edbc04
meta: bump `actions/setup-node` from 4.0.2 to 4.0.3
dependabot[bot] Aug 6, 2024
552df3e
meta: bump `step-security/harden-runner` from 2.8.1 to 2.9.0
dependabot[bot] Aug 6, 2024
1852188
meta: bump actions/setup-python from 5.1.0 to 5.1.1
dependabot[bot] Aug 1, 2024
66a34da
meta: bump `actions/download-artifact` from 4.1.7 to 4.1.8
dependabot[bot] Aug 6, 2024
5b32511
meta: bump `actions/upload-artifact` from 4.3.3 to 4.3.4
dependabot[bot] Aug 6, 2024
f182c6c
deps: update simdutf to 5.3.1
nodejs-github-bot Aug 6, 2024
5f52c8a
deps: update undici to 6.19.5
nodejs-github-bot Aug 6, 2024
accf2ac
build: support `lint-js-fix` in `vcbuild.bat`
avivkeller Aug 6, 2024
1bcdba2
test: update wpt test for streams
Nahee-Park Aug 6, 2024
2b41c23
doc: add links to security steward companies
avivkeller Aug 6, 2024
1f69085
test: set test-structuredclone-jstransferable non-flaky
StefanStojanovic Aug 6, 2024
24ed890
doc: fix sea assets example
Sadzurami Aug 6, 2024
5bfebfe
test_runner: make mock_loader not confuse CJS and ESM resolution
syi0808 Aug 6, 2024
c852e22
path: fix relative on Windows
huseyinacacak-janea Aug 6, 2024
fd49758
doc: add esm examples to node:console
mfdebian Aug 6, 2024
277ed9f
doc: add KevinEady as a triager
legendecas Aug 6, 2024
b47aa70
tools: add workflow to ensure `README` lists are in sync with gh teams
aduh95 Aug 6, 2024
e1e7a41
benchmark: remove force option as force defaults to true
debbs061 Aug 6, 2024
359b428
test: add subtests to test-node-run
sungpaks Aug 6, 2024
5411975
deps: update acorn to 8.12.1
nodejs-github-bot Jun 16, 2024
3660ad5
2024-08-06, Version 22.6.0 (Current)
RafaelGSS Jul 30, 2024
0260bbe
benchmark: support --help in CLI
avivkeller Aug 6, 2024
dc86592
meta: add module label for the lib/internal/modules folder
avivkeller Aug 6, 2024
e2c6220
doc: add esm examples to node:dns
mfdebian Aug 6, 2024
78150f3
lib: fix unhandled errors in webstream adapters
indutny Aug 6, 2024
3ed9f98
fs: remove unnecessary option argument validation
JonasBa Aug 6, 2024
e0634f5
test: use assert.{s,deepS}trictEqual()
lpinca Aug 6, 2024
7327e44
doc: sort versions to fix the linter error
RafaelGSS Aug 6, 2024
a4f609f
doc: make some parameters optional in `tracingChannel.traceCallback`
deokjinkim Jul 27, 2024
a3ff3e8
meta: move one or more collaborators to emeritus
nodejs-github-bot Aug 7, 2024
e9deab9
tools: make undici updater build wasm from src
mhdawson Jul 31, 2024
2bcf999
src: skip inspector wait in internal workers
legendecas Aug 7, 2024
88bac52
test_runner: fix erroneous diagnostic warning when only: false
pmarchini Aug 8, 2024
90dea9e
doc: warn for windows build bug
jazelly Aug 8, 2024
9e6c526
test: refactor `test-runner-module-mocking`
aduh95 Aug 8, 2024
30f6c56
test: fix timeout not being cleared
Isaac-yz-Liu Aug 9, 2024
3cbeed8
module: refactor ts parser loading
marco-ippolito Aug 9, 2024
19bf154
doc: update `buffer.constants.MAX_LENGTH` size
samuliasmala Aug 9, 2024
88760f1
typings: add util.styleText type definition
RafaelGSS Aug 9, 2024
7366808
lib: improve async_context_frame structure
Aug 9, 2024
4557c13
deps: update undici to 6.19.7
nodejs-github-bot Aug 9, 2024
90d91ab
console: use validateOneOf for colorMode validation
rayark1 Aug 10, 2024
37f9eca
module,win: fix long path resolve
huseyinacacak-janea Aug 10, 2024
fde30a1
benchmark: change assert() to assert.ok()
RafaelGSS Aug 10, 2024
d708281
doc: remove module-based permission doc
RafaelGSS Aug 10, 2024
50a49a5
meta: add test-permission-* CODEOWNERS
RafaelGSS Aug 10, 2024
b49019e
doc: explicitly mention node:fs module restriction
RafaelGSS Aug 10, 2024
9b3d22d
benchmark: rename count to n
RafaelGSS Aug 10, 2024
90f2571
deps: update nbytes to 0.1.1
nodejs-github-bot Aug 10, 2024
298ff4f
tty: initialize winSize array with values
targos Aug 11, 2024
746213e
inspector: support `Network.loadingFailed` event
cola119 Aug 11, 2024
bc5ebe4
deps: update c-ares to v1.33.0
nodejs-github-bot Aug 11, 2024
4dae01b
deps: fix GN build warning in ncrypto
zcbenz Aug 11, 2024
66c8076
doc, test: simplify test README table
avivkeller Aug 11, 2024
56ff307
doc: add esm examples to node:http2
mfdebian Aug 11, 2024
80a7e76
lib: avoid for of loop and remove unnecessary variable in zlib
MCprotein Aug 12, 2024
559985c
deps: update simdjson to 3.10.0
nodejs-github-bot Aug 12, 2024
f8b31c8
deps: update zlib to 1.3.0.1-motley-887bb57
nodejs-github-bot Jun 16, 2024
69c7653
deps: update zlib to 1.3.0.1-motley-e432200
nodejs-github-bot Jun 23, 2024
ab21432
deps: update zlib to 1.3.0.1-motley-8b7eff8
nodejs-github-bot Jun 30, 2024
0c17a3f
deps: update zlib to 1.3.0.1-motley-68e57e6
nodejs-github-bot Jul 7, 2024
667b057
deps: update zlib to 1.3.0.1-motley-c2469fd
nodejs-github-bot Jul 14, 2024
2a5b86b
deps: update zlib to 1.3.0.1-motley-71660e1
nodejs-github-bot Aug 4, 2024
d7f3730
lib: replace spread operator with primordials function
MCprotein Aug 12, 2024
9a4eb21
module: do not attempt to strip type when there's no source
aduh95 Aug 12, 2024
87ee722
benchmark: add stream.compose benchmark
jakecastelli Aug 12, 2024
0301309
module: add --experimental-transform-types flag
marco-ippolito Aug 12, 2024
717b401
sqlite: ensure statement finalization on db close
cjihrig Aug 6, 2024
916865b
sqlite: split up large test file
cjihrig Jul 24, 2024
b8a2550
test: unmark test-sqlite as flaky
cjihrig Aug 6, 2024
4dc1ae0
url: modify pathToFileURL to handle extended UNC path
injunchoi98 Aug 12, 2024
624db50
doc: mark process.nextTick legacy
marco-ippolito Aug 12, 2024
5f230d2
src: move some X509Certificate stuff to ncrypto
jasnell Aug 5, 2024
a199c52
deps: update simdutf to 5.3.4
nodejs-github-bot Aug 13, 2024
9e8cc29
tools: add find pyenv path on windows
marco-ippolito Aug 13, 2024
1d35a06
src,test: ensure that V8 fast APIs are called
targos Aug 13, 2024
d0f5943
test_runner: do not expose internal loader
aduh95 Aug 13, 2024
b00102e
buffer: optimize for common encodings
ronag Aug 13, 2024
123693c
build: update `ruff` to `0.5.2`
avivkeller Aug 13, 2024
880c446
src: don't match after `--` in `Dotenv::GetPathFromArgs`
avivkeller Aug 13, 2024
02b3095
test: use relative paths in test-cli-permission tests
sendoru Aug 14, 2024
6051826
path: change `posix.join` to use array
HBSPS Aug 14, 2024
9f08320
buffer: optimize createFromString
ronag Aug 14, 2024
c1ec099
test: make sure current run result is pushed and reset
jakecastelli Aug 14, 2024
1212eca
test_runner: fix delete test file cause dependency file not watched
jakecastelli Aug 14, 2024
53c5322
tools: remove header from c-ares license
avivkeller Aug 14, 2024
94d062b
deps: upgrade openssl sources to quictls/openssl-3.0.14+quic1
nodejs-github-bot Aug 12, 2024
543d1a9
deps: update archs files for openssl-3.0.14+quic1
nodejs-github-bot Aug 12, 2024
2573f74
build: always disable strict aliasing
targos Aug 14, 2024
4e6befd
benchmark: use assert.ok searchparams
RafaelGSS Aug 14, 2024
38ad892
buffer: optimize byteLength for common encodings
ronag Aug 14, 2024
6261187
src: shift even moar x509 to ncrypto
jasnell Aug 7, 2024
503cf16
src: refactor http parser binding initialization
joyeecheung Aug 14, 2024
75d25bc
buffer: optimize byteLength for short strings
ronag Aug 14, 2024
ccf05ef
buffer: use fast API for writing one-byte strings
ronag Aug 15, 2024
fd76646
doc: fix typo in method name in the sea doc
firecraftgaming Aug 15, 2024
e020dd8
doc: correct peformance entry types
jazelly Aug 15, 2024
1abdd66
test_runner: use run() argument names in parseCommandLine()
cjihrig Aug 7, 2024
ecaeaf8
test_runner: pass harness object as option to root test
cjihrig Aug 8, 2024
5e9f1b7
test_runner: pass global options to createTestTree()
cjihrig Aug 12, 2024
7ac3a50
test_runner: return setup() from parseCommandLine()
cjihrig Aug 13, 2024
3f694f7
test_runner: refactor hook creation
cjihrig Aug 13, 2024
48d63c4
test_runner: remove parseCommandLine() from test.js
cjihrig Aug 13, 2024
0549590
src,test: track `URL.canParse` fast API calls
targos Aug 15, 2024
2c14615
buffer: properly apply dst offset and src length on fast path
ronag Aug 15, 2024
e2ea65c
doc: replace v19 mention in Current release
RafaelGSS Aug 15, 2024
8d37584
doc: add versions when `--watch-preserve-output` was added
theoludwig Aug 16, 2024
59da1df
cli: allow `--test-[name/skip]-pattern` in `NODE_OPTIONS`
avivkeller Aug 16, 2024
7fab6e8
doc: use gcc 12 on AIX for Node.js >=23
richardlau Aug 16, 2024
9d7cd9b
deps: update V8 to 12.8.374.13
targos Aug 14, 2024
1dfa3b8
build: reset embedder string to "-node.0"
targos Aug 14, 2024
e945bd9
src: update NODE_MODULE_VERSION to 129
targos Aug 7, 2024
cc36db7
deps: always define V8_EXPORT_PRIVATE as no-op
targos Sep 21, 2022
e600de9
deps: disable V8 concurrent sparkplug compilation
targos Apr 6, 2023
ed029bd
deps: avoid compilation error with ASan
targos Jul 31, 2023
ed187fa
deps: patch V8 to avoid duplicated zlib symbol
targos Sep 16, 2023
f626acc
deps: silence internal V8 deprecation warning
targos Mar 11, 2024
dc4e702
deps: patch V8 to support compilation with MSVC
StefanStojanovic Apr 21, 2024
16c9348
deps: V8: revert CL 5331688
targos Apr 21, 2024
a41c381
deps: fix FP16 bitcasts.h
StefanStojanovic May 28, 2024
28f3e5c
deps: always define V8_NODISCARD as no-op
targos Aug 8, 2024
415bc75
deps: V8: cherry-pick 35888fee7bba
joyeecheung Jul 25, 2024
bcc1e27
deps: V8: cherry-pick b1397772c70c
targos Aug 9, 2024
5355603
deps: V8: cherry-pick 00e9eeb3fb2c
targos Aug 9, 2024
fba06eb
deps: remove bogus V8 DCHECK
targos Aug 12, 2024
b7bcf3e
build: include v8-sandbox.h header in distribution
targos Apr 7, 2024
525b3f2
src: add source location to v8::TaskRunner
fdoray Apr 16, 2024
9d0748c
build: disable ICF for mksnapshot
LeszekSwirski Apr 12, 2024
df9efba
test: update v8-stats test for V8 12.6
targos May 9, 2024
8044051
tools: update V8 gypfiles for 12.6
targos May 11, 2024
0be79f4
src: remove dependency on wrapper-descriptor-based CppHeap
joyeecheung May 29, 2024
dc352a5
tools: update V8 gypfiles for 12.7
richardlau Jul 18, 2024
64e8646
tools: update V8 gypfiles for 12.8
targos Jul 28, 2024
f0134fa
src: stop using deprecated fields of `v8::FastApiCallbackOptions`
gahaas Jul 28, 2024
e4f61de
test: make snapshot comparison more flexible
codebytere Aug 16, 2024
97f39eb
doc: add note on weakness of permission model
tniessen Aug 17, 2024
9e83853
doc: add git node security --cleanup
RafaelGSS Aug 17, 2024
18f455b
doc: fix error description of the max header size
erm1116 Aug 18, 2024
2226155
test_runner: report failures in filtered suites
cjihrig Aug 18, 2024
80dac9e
doc: reserve ABI 130 for Electron 33
clavin Aug 19, 2024
4f94397
test_runner: use validateStringArray for `timers.enable()`
deokjinkim Aug 19, 2024
b246f22
src: update compile cache storage structure
joyeecheung Aug 19, 2024
d8d3a6b
deps: update amaro to 0.1.6
nodejs-github-bot Aug 14, 2024
57a4534
doc: add esm examples to node:https
mfdebian Aug 19, 2024
28c4f86
doc, meta: add missing `,` to `BUILDING.md`
avivkeller Aug 19, 2024
746e287
meta: run coverage-windows when `vcbuild.bat` updated
avivkeller Aug 19, 2024
561bc87
src: move more crypto code to ncrypto
jasnell Aug 11, 2024
ef4bdbf
test_runner: finish build phase before running tests
cjihrig Aug 20, 2024
7c76fa0
src: improve `buffer.transcode` performance
anonrig Aug 20, 2024
68e94c1
test_runner: make `mock.module`'s `specifier` consistent with `import()`
aduh95 Aug 20, 2024
5376e69
module: add sourceURL magic comment hinting generated source
legendecas Aug 20, 2024
821ffab
test_runner: account for newline in source maps
cjihrig Aug 21, 2024
385ca62
test_runner: defer inheriting hooks until run()
cjihrig Jul 19, 2024
cc26951
test_runner: support running tests in process
cjihrig Jul 13, 2024
e3f909e
deps: update sqlite to 3.46.1
nodejs-github-bot Aug 18, 2024
6b6b977
deps: sqlite: fix Windows compilation
cjihrig Jun 12, 2024
b4344cf
test_runner: refactor `mock_loader`
aduh95 Aug 21, 2024
612e457
test: prevent V8 from writing into the system's tmpdir
targos Aug 21, 2024
8b0c699
2024-08-21, Version 20.17.0 'Iron' (LTS)
marco-ippolito Aug 19, 2024
e35902c
module: fix discrepancy between .ts and .js
marco-ippolito Aug 22, 2024
cef2047
tools: add swc license
marco-ippolito Aug 22, 2024
4d5c885
2024-08-22, Version 22.7.0 (Current)
RafaelGSS Aug 19, 2024
e70bd47
deps: update undici to 6.19.8
nodejs-github-bot Aug 22, 2024
99f4a73
meta: add more labels to dep-updaters
avivkeller Aug 22, 2024
a21af4b
doc: fix capitalization in module.md
shallow-beach Aug 23, 2024
d787144
deps: update amaro to 0.1.7
nodejs-github-bot Aug 23, 2024
4de992f
stream: change stream to use index instead of `for...of`
HBSPS Aug 23, 2024
628469c
net: exclude ipv6 loopback addresses from server.listen
puskin94 Aug 23, 2024
9ee3a72
src: remove cached data tag from snapshot metadata
joyeecheung Aug 23, 2024
d5dc540
meta: remind users to use a supported version in bug reports
avivkeller Aug 23, 2024
9edf4a0
test_runner: add support for coverage thresholds
avivkeller Aug 23, 2024
22daeba
build: update required python version to 3.8
avivkeller Aug 23, 2024
bec3425
test: add tests for runner coverage with different stdout column widths
pmarchini Aug 24, 2024
e272cfb
build: don't clean obj.target directory if it doesn't exist
joyeecheung Aug 24, 2024
a81e786
fs: refactor handleTimestampsAndMode to remove redundant call
rayark1 Aug 24, 2024
c890a96
typings: provide internal types for wasi bindings
RulerOfCakes Aug 24, 2024
6dce10f
doc: update websocket flag description to reflect stable API status
debbs061 Aug 24, 2024
c062b52
src: use correct way to signal interceptor error
targos Aug 24, 2024
4e68b54
test: fix improper path to URL conversion
aduh95 Aug 24, 2024
6d654dd
timers: fix validation
ShogunPanda Aug 25, 2024
c3fe2d6
deps: update amaro to 0.1.8
nodejs-github-bot Aug 25, 2024
7fea010
sqlite: return results with null prototype
targos Aug 25, 2024
52322aa
net: validate host name for server listen
jazelly Aug 25, 2024
43f699d
benchmark: fix benchmark for file path and URL conversion
injunchoi98 Aug 25, 2024
1399d4e
test: use valid hostnames
lpinca Aug 25, 2024
c6a72f2
src: change SetEncodedValue to return Maybe<void>
tniessen Aug 26, 2024
05bd3cf
test: force spec reporter in test-runner-watch-mode.mjs
cjihrig Aug 26, 2024
8f1fa03
src: use better return types in KVStore
targos Aug 24, 2024
eab97b5
src: return `v8::Object` from error constructors
targos Aug 24, 2024
4ce9864
src: handle errors correctly in `permission.cc`
targos Aug 24, 2024
4f1c27a
src: handle errors correctly in webstorage
targos Aug 26, 2024
3a71ccf
tools: remove unused python files
avivkeller Aug 26, 2024
3d5357a
test: refactor test_runner tests to change default reporter
cjihrig Aug 27, 2024
b39fad6
deps: update c-ares to v1.33.1
nodejs-github-bot Aug 27, 2024
c00ea01
buffer: allow invalid encoding in from
ronag Aug 27, 2024
74ea78d
src: remove redundant AESCipherMode
tniessen Aug 27, 2024
dd8eeec
buffer: truncate instead of throw when writing beyond buffer
ronag Aug 27, 2024
431ac16
node-api: remove RefBase and CallbackWrapper
vmoroz Aug 27, 2024
6bf7b6e
src: move more crypto_dh.cc code to ncrypto
jasnell Aug 19, 2024
5e6aab0
module: use amaro default transform values
marco-ippolito Aug 23, 2024
ba07067
zlib: simplify validators
anonrig Aug 27, 2024
eb7e18f
test_runner: always make spec the default reporter
cjihrig Aug 27, 2024
589a60e
doc: add note about shasum generation failure
marco-ippolito Aug 27, 2024
a7271ab
lib: fix emit warning for debuglog.time when disabled
H4ad Aug 27, 2024
d813634
doc: support collaborators - talk amplification
mhdawson Aug 22, 2024
ebaabf6
deps: backport ICU-22787 to fix ClangCL on Windows
StefanStojanovic Aug 27, 2024
342b501
doc: fix information about including coverage files
avivkeller Aug 27, 2024
0b3ae01
test: fix embedding test for Windows
vmoroz Aug 27, 2024
885692a
doc: run license-builder
github-actions[bot] Aug 28, 2024
4f14eb1
Revert "net: validate host name for server listen"
jakecastelli Aug 25, 2024
4a0ec20
lib: respect terminal capabilities on styleText
RafaelGSS Aug 28, 2024
ff5ef70
src: add JS APIs for compile cache and NODE_DISABLE_COMPILE_CACHE
joyeecheung Aug 28, 2024
39215e1
test: refactor test-abortcontroller to use node:test
jasnell Aug 26, 2024
097dcfc
test: update test-aborted-util to use node:test
jasnell Aug 26, 2024
c44d41b
test: move a couple of tests over to using node:test
jasnell Aug 27, 2024
54e20c1
deps: V8: cherry-pick e74d0f437fcd
joyeecheung Aug 19, 2024
75741a1
src: use v8::Isolate::GetDefaultLocale() to compute navigator.language
joyeecheung Aug 9, 2024
99b491c
doc: fix module compile cache description
ShenHongFei Aug 29, 2024
29cf623
doc: add getHeapStatistics() property descriptions
bcmarinacci Aug 29, 2024
7616855
src: disable fast methods for `buffer.write`
targos Aug 29, 2024
0b6b2a4
test: merge ongc and gcutil into gc.js
tannal Aug 13, 2024
dcf50f1
test_runner: ensure test watcher picks up new test files
pmarchini Aug 29, 2024
d98cfcc
vm: introduce vanilla contexts via vm.constants.DONT_CONTEXTIFY
joyeecheung Aug 29, 2024
beabcec
deps: update nghttp2 to 1.63.0
nodejs-github-bot Aug 29, 2024
fc02b88
test,crypto: update WebCryptoAPI WPT
panva Aug 29, 2024
cf1d5c3
test: update test-assert to use node:test
jasnell Aug 27, 2024
5060bbf
test: update test-assert-typedarray-deepequal to use node:test
jasnell Aug 27, 2024
9cbef48
test: update multiple assert tests to use node:test
jasnell Aug 27, 2024
321a14b
doc: fix typo in styleText description
RafaelGSS Aug 29, 2024
2bd0f99
test: update test-abortsignal-cloneable to use node:test
jasnell Aug 27, 2024
01f751b
test: increase key size for ca2-cert.pem
mhdawson Aug 29, 2024
8966787
test: run V8 Fast API tests in release mode too
targos Aug 30, 2024
d2479fa
vm: return all own names and symbols in property enumerator interceptor
legendecas Aug 30, 2024
2cf8570
build: attempt to claim more disk space on macOS GHA runner
jakecastelli Aug 30, 2024
1344709
build: temp commit
jakecastelli Aug 30, 2024
01f7a02
test commit
jakecastelli Aug 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
doc: add esm examples to node:console
PR-URL: nodejs#54108
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
  • Loading branch information
mfdebian authored Aug 6, 2024
commit fd4975879646ba74c58ba031d1be68fef7097235
29 changes: 27 additions & 2 deletions doc/api/console.md
Original file line number Diff line number Diff line change
@@ -80,7 +80,11 @@ The `Console` class can be used to create a simple logger with configurable
output streams and can be accessed using either `require('node:console').Console`
or `console.Console` (or their destructured counterparts):

```js
```mjs
import { Console } from 'node:console';
```

```cjs
const { Console } = require('node:console');
```

@@ -132,7 +136,28 @@ Creates a new `Console` with one or two writable stream instances. `stdout` is a
writable stream to print log or info output. `stderr` is used for warning or
error output. If `stderr` is not provided, `stdout` is used for `stderr`.

```js
```mjs
import { createWriteStream } from 'node:fs';
import { Console } from 'node:console';
// Alternatively
// const { Console } = console;

const output = createWriteStream('./stdout.log');
const errorOutput = createWriteStream('./stderr.log');
// Custom simple logger
const logger = new Console({ stdout: output, stderr: errorOutput });
// use it like console
const count = 5;
logger.log('count: %d', count);
// In stdout.log: count 5
```

```cjs
const fs = require('node:fs');
const { Console } = require('node:console');
// Alternatively
// const { Console } = console;

const output = fs.createWriteStream('./stdout.log');
const errorOutput = fs.createWriteStream('./stderr.log');
// Custom simple logger