mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-27 06:43:19 +08:00
Each limitations partial held its whole text on one line (map-and-set.mdx was a single 1,080-character line), so any two edits to the same partial conflicted. The partials now put one sentence per line, with a bullet's continuation lines indented two spaces. Markdown joins the lines, so the rendered pages are unchanged. scripts/limitations-partials.mjs reads a labeled bullet's indented continuation lines as part of the bullet when it splits and joins the page, and AGENTS.md states the convention.
12 lines
1.3 KiB
Plaintext
12 lines
1.3 KiB
Plaintext
`process.argv[0]` is `"scriptc"`, `process.argv[1]` is the binary's path, and program arguments begin at index 2.
|
|
In programs that use `node:test`, a leading `--test-update-snapshots` argument is Node's snapshot update flag: it is kept out of `process.argv` and appears in `process.execArgv`, which is otherwise `[]`.
|
|
`process.version` and `process.versions.node` report the Node.js release the runtime is verified against.
|
|
|
|
Uncaught exceptions print `Uncaught <value>` to stderr instead of Node.js's source excerpt and stack-trace block; thrown strings and numbers print their value.
|
|
Exit codes and output written before the exception are preserved.
|
|
Runtime errors expose `message` and Node's `code` as typed members.
|
|
The other own properties Node gives them, such as a system error's `errno`, `syscall`, and `path`, a child process error's `status`, `stdout`, and `stderr`, or an assertion error's `actual` and `expected`, are readable through an untyped view of the error (for example a cast of a caught value) and appear in `util.inspect` output.
|
|
|
|
Errors carry no stack frames.
|
|
`console.log` and `util.inspect` print an Error in Node's stackless form, `[TypeError: message]`, where Node prints `TypeError: message` followed by stack frames; the two agree when `Error.stackTraceLimit` is `0`.
|