1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-23 15:16:54 -05:00
denoland-deno/ext/node/polyfills/internal/util
Nathan Whitaker 219a27dde5
fix(ext/node): Support returning tokens and option defaults in node:util.parseArgs (#23192)
Fixes #23179.
Fixes #22454.

Enables passing `{tokens: true}` to `parseArgs` and setting default
values for options.

With this PR, the observable framework works with deno out of the box
(no unstable flags needed).

The existing code was basically copied straight from node, so this PR
mostly just updates that (out of date) vendored code. Also fixes some
issues with error exports (before this PR, in certain error cases we
were attempting to construct error classes that weren't actually in
scope).

The last change (in the second commit) adds a small hack so that we
actually exercise the `test-parse-args.js` node_compat test, previously
it was reported as passing though it should have failed. That test now
passes.

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-04-02 16:20:48 -07:00
..
parse_args fix(ext/node): Support returning tokens and option defaults in node:util.parseArgs (#23192) 2024-04-02 16:20:48 -07:00
comparisons.ts chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
debuglog.ts chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
inspect.mjs feat(node/util): styleText (#22758) 2024-03-07 00:45:28 +01:00
types.ts chore: update deno_lint for CI (#21802) 2024-01-05 15:03:06 +00:00