Bartek Iwańczuk
381f5801f9
Revert "refactor(ext/node): Use Deno.inspect ( #17960 )" ( #18491 )
...
This reverts commit a3529d0232
.
This change made debugging Node tests very hard - `AssertionError` is
now printed as `[Circular *1]` giving no visibility what failed.
We need to align two implementations together and remove this one then.
2023-03-30 15:33:28 +00:00
David Sherret
81c5ddf9f2
fix(inspect): ensure non-compact output when object literal has newline in entry text ( #18366 )
...
Fixes `Deno.inspect` to make an object literal non-compact when an entry
has multiple lines in it.
2023-03-23 10:58:53 -04:00
Ryan Dahl
a3529d0232
refactor(ext/node): Use Deno.inspect ( #17960 )
...
No need for two almost identical implementations of the same thing
---------
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
Co-authored-by: Aapo Alasuutari <aapo.alasuutari@gmail.com>
2023-03-23 10:01:07 -04:00
Matt Mastracci
f69e4794d2
chore: update ext/ code to only use ASCII ( #18371 )
...
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-03-22 19:34:14 -06:00
Yoshiya Hinosawa
896d7f02cb
chore(ext/console): inspect anonymous function as [Function (anonymous)]
( #18283 )
...
This PR changes the inspect result of anonymous functions from
`[Function]` to `[Function (anonymous)]`. This behavior is aligned
to `util.inspect` of Node.js.
2023-03-21 13:12:13 +09:00
Yoshiya Hinosawa
e30d24be72
chore(ext/console): add 'quotes' internal option to Deno.inspect ( #18183 )
2023-03-17 12:22:09 +09:00
Bartek Iwańczuk
72fe9bb470
refactor: rename InternalModuleLoader to ExtModuleLoader, use ext: scheme for snapshotted modules ( #18041 )
...
This commit renames "deno_core::InternalModuleLoader" to
"ExtModuleLoader" and changes the specifiers used by the
modules loaded from this loader to "ext:".
"internal:" scheme was really ambiguous and it's more characters than
"ext:", which should result in slightly smaller snapshot size.
Closes https://github.com/denoland/deno/issues/18020
2023-03-08 12:44:54 +01:00
Kenta Moriuchi
55833cf799
fix(core): introduce SafeRegExp
to primordials ( #17592 )
2023-03-01 08:14:16 +09:00
Waldir Pimenta
19543ffec3
fix(ext/console): Only right-align integers in console.table() ( #17389 )
2023-02-08 18:14:40 +09:00
Leo Kettmeir
49af1ab18d
refactor: remove prefix from include_js_files & use extension name ( #17683 )
2023-02-07 21:09:50 +00:00
Leo Kettmeir
b4aa153097
refactor: Use ES modules for internal runtime code ( #17648 )
...
This PR refactors all internal js files (except core) to be written as
ES modules.
`__bootstrap`has been mostly replaced with static imports in form in
`internal:[path to file from repo root]`.
To specify if files are ESM, an `esm` method has been added to
`Extension`, similar to the `js` method.
A new ModuleLoader called `InternalModuleLoader` has been added to
enable the loading of internal specifiers, which is used in all
situations except when a snapshot is only loaded, and not a new one is
created from it.
---------
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-02-07 20:22:46 +01:00
Gasman
0eb5be9a12
fix(ext/console): log class for class constructor ( #17615 )
...
Co-authored-by: tannal <tannal.cn@gmail.com>
2023-02-05 00:34:36 +01:00
Kenta Moriuchi
266915d5ce
fix(ext): internal structuredClone
for ArrayBuffer
and TypedArray
subclasses ( #17431 )
2023-01-29 15:15:01 +01:00
Kenta Moriuchi
6da958d7ec
chore: update dlint to v0.37.0 for GitHub Actions ( #17295 )
...
Updated third_party dlint to v0.37.0 for GitHub Actions. This PR
includes following changes:
* fix(prefer-primordials): Stop using array pattern assignments
* fix(prefer-primordials): Stop using global intrinsics except for
`SharedArrayBuffer`
* feat(guard-for-in): Apply new guard-for-in rule
2023-01-16 17:17:18 +01:00
Kenta Moriuchi
ff89ff4abb
perf(ext,runtime): remove using SafeArrayIterator
from for-of
( #17255 )
2023-01-06 21:45:23 +09:00
David Sherret
0ee64ad847
fix: upgrade deno_ast to 0.23 ( #17269 )
...
Closes #17172
Closes #15669
Closes #8529
2023-01-04 18:54:54 -05:00
David Sherret
10e4b2e140
chore: update copyright year to 2023 ( #17247 )
...
Yearly tradition of creating extra noise in git.
2023-01-02 21:00:42 +00:00
Kenta Moriuchi
948f85216a
chore: Update dlint ( #17031 )
...
Introduces `SafeSetIterator` and `SafeMapIterator` to primordials
2022-12-20 03:37:50 +01:00
Bartek Iwańczuk
1ec357faf3
fix(inspector): ensure console methods provided by inspector are available ( #16724 )
2022-11-22 02:17:14 +01:00
sigmaSd
70ad6717df
fix sparse array inspection ( #16204 )
...
fix https://github.com/denoland/deno/issues/16202
2022-10-10 10:22:21 -04:00
李瑞丰
a2262c11d7
fix(ext/console): fix error when logging a proxied Date ( #16018 )
2022-09-26 23:55:58 +09:00
Marcos Casagrande
b73cb7bf9c
perf(ext/console): break on iterableLimit & better sparse array handling ( #15935 )
2022-09-26 15:55:22 +09:00
Jason
8178665bd1
fix(cli/repl): await Promise.any([])... ( #15623 )
2022-09-02 13:38:06 +02:00
Gamer Omega
e5489446d5
fix(ext/console): Fix a typo in a warning when .timeEnd is called on an unknown timer ( #15135 )
2022-07-09 21:30:29 +02:00
sevenwithawp
213d831ae3
refactor(ext) Decrease of StringPrototypeReplace recurrent usage ( #15058 )
...
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-07-09 14:28:02 -04:00
cjihrig
eadf943e59
fix(console): constrol inspect() indent with option ( #14867 )
...
This commit updates the Deno.inspect() logic to use the
indentLevel option to control indentation instead of passing
around separate indent/level parameters internally.
Refs: https://github.com/denoland/deno/issues/8099
Refs: https://github.com/denoland/deno/issues/14171
2022-06-15 09:52:28 -04:00
Colin Ihrig
64abb65f05
feat(console): pass options and depth to custom inspects ( #14855 )
...
This commit updates Deno.inspect() to pass inspect options and
the current inspect depth to custom inspect functions.
Refs: https://github.com/denoland/deno/issues/8099
Refs: https://github.com/denoland/deno/issues/14171
2022-06-13 10:59:22 -04:00
Nayeem Rahman
e3eae662f3
fix: Format non-error exceptions ( #14604 )
...
This commit adds "Deno.core.setFormatExceptionCallback" which
can be used to provide custom formatting for errors. It is useful
in cases when user throws something that is non-Error (eg.
a string, plain object, etc).
2022-06-06 20:26:57 +02:00
Ben Heidemann
dc4ab1d934
feat(ext/console): Compact empty iterables when calling Deno.inspect with compact false ( #14387 )
2022-04-26 13:04:28 +02:00
Ben Heidemann
ddbfa1418c
feat(ext/console): Add string abbreviation size option for "Deno.inspect" ( #14384 )
2022-04-25 13:59:15 +02:00
Bartek Iwańczuk
a87be28a46
feat: Better formatting for AggregateError ( #14285 )
...
This commit adds "aggregated" field to "deno_core::JsError" that stores
instances of "JsError" recursively to properly handle "AggregateError"
formatting. Appropriate logics was added to "PrettyJsError" and
"console" API to format AggregateErrors.
Co-authored-by: Nayeem Rahman <nayeemrmn99@gmail.com>
2022-04-16 16:12:26 +02:00
Bartek Iwańczuk
0bb96cde72
refactor: update runtime code for primordial check x in y ( #13642 )
...
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2022-04-16 14:09:07 +02:00
Jason
0bc286ab47
fix(ext/console): fix error with a Proxy of a Map ( #14032 )
2022-03-20 20:21:42 +09:00
Leo Kettmeir
8891c19c57
fix(ext/console): print circular ref indicator in cyan ( #13684 )
2022-02-16 16:21:59 +01:00
Bartek Iwańczuk
bf22f114a6
refactor: update runtime code for primordial check for iterators ( #13510 )
2022-02-07 13:54:32 +01:00
Zach
a7850d7fe6
fix(ext/console): fix uncaught TypeError in css styling ( #13567 )
...
When using css coloring in the console, non-color values should be ignored rather than throw exceptions.
Fixes #13469
2022-02-06 19:00:06 +09:00
Leo Kettmeir
2f438f4106
feat(ext/console): better circular information in object inspection ( #13555 )
2022-02-04 21:10:47 +01:00
Bartek Iwańczuk
8176a4d166
refactor: primordials for instanceof ( #13527 )
2022-02-01 18:06:11 +01:00
Bartek Iwańczuk
f248e6f177
Revert "refactor: update runtime code for primordial checks for "instanceof" ( #13497 )" ( #13511 )
...
This reverts commit 884143218f
.
2022-01-27 16:27:22 +01:00
Bartek Iwańczuk
884143218f
refactor: update runtime code for primordial checks for "instanceof" ( #13497 )
2022-01-27 13:36:36 +01:00
Bartek Iwańczuk
bc666e42a8
fix(ext/console): don't depend on globalThis present ( #13387 )
2022-01-17 23:23:49 +01:00
Ryan Dahl
1fb5858009
chore: update copyright to 2022 ( #13306 )
...
Co-authored-by: Erfan Safari <erfanshield@outlook.com>
2022-01-07 22:09:52 -05:00
Zach
de2df20d57
fix(ext/console): map basic css color keywords to ansi ( #13175 )
2021-12-23 13:06:24 +01:00
Kenta Moriuchi
95b9e5f30f
feat(ext/console): Display error.cause in console ( #12462 )
2021-10-30 19:25:46 +02:00
Kenta Moriuchi
1d55fcb74c
fix(console): fix display of primitive wrapper objects ( #12425 )
2021-10-14 12:52:08 +09:00
David Sherret
9b1f0c8ba3
chore: upgrade crates based on deno ast 0.3 ( #12403 )
2021-10-12 09:58:04 -04:00
Luca Casonato
5d814a4c24
feat: ArrayBuffer in structured clone transfer ( #11840 )
2021-08-25 13:48:53 +02:00
Nicolas Stucki
c4561ac969
feat(extensions/console): right align numeric columns in table ( #11748 )
2021-08-24 17:17:40 +02:00
Ryan Dahl
a0285e2eb8
Rename extensions/ directory to ext/ ( #11643 )
2021-08-11 12:27:05 +02:00