1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-01 09:24:20 -04:00
Commit graph

293 commits

Author SHA1 Message Date
Bartek Iwańczuk
504d2936ec
fix: unhandledrejection handling for sync throw in top level (#15279)
Fixes an edge in "unhandledrejection" event that prevent synchronous
errors being surfaced when throw from a top-level scope.
2022-07-23 00:40:42 +02:00
Bartek Iwańczuk
4e71a9424e
fix: proper typings for unhandledrejection event (#15271) 2022-07-21 23:54:53 +02:00
Satya Rohith
6c3d9b981f
fix(cli): unset jsxFragmentFactory & jsxFactory options (#15264) 2022-07-21 14:44:18 +05:30
David Sherret
26cea0e2ca
feat(test): add --parallel flag, soft deprecate --jobs (#15259)
Co-authored-by: mrkldshv <markladyshev@gmail.com>
2022-07-20 17:36:54 -04:00
Bartek Iwańczuk
d53936eb7d
Reland "feat: add "unhandledrejection" event support" (#15211) 2022-07-20 20:28:19 +02:00
Nayeem Rahman
6e350b2b7c
chore(cli): Ignore "experimentalDecorators" and "moduleDetection" options (#15202) 2022-07-20 16:59:56 +02:00
Bartek Iwańczuk
d17b3906bf
chore: use import.meta.resolve() in tests (#15256) 2022-07-20 16:56:53 +02:00
Dante Issaias
2b1f145c3e
chore(ext): update webgpu (#15059) 2022-07-20 02:22:26 +02:00
Leo Kettmeir
2eb27c92db
fix: WebSocketStream ping event causes pending promises (#15235) 2022-07-18 22:49:49 +02:00
Roj
70d1ecaeaa
feat(cli): support configuring the test tool in the config file (#15079) 2022-07-18 15:12:19 -04:00
Bartek Iwańczuk
999cbfb52b
feat: import.meta.resolve() (#15074)
This commit adds new "import.meta.resolve()" API which
allows to resolve specifiers relative to the module the API
is called in. This API supports resolving using import maps.
2022-07-18 20:05:26 +02:00
Bartek Iwańczuk
89c1ad0303
fix: revert changes to test output for uncaught errors (#15231) 2022-07-18 18:58:13 +02:00
Nayeem Rahman
45c49034a7
BREAKING(unstable): Improve Deno.spawn() stdio API (#14919)
- "SpawnOutput" extends "ChildStatus" instead of composing it
- "SpawnOutput::stdout", "SpawnOutput::stderr", "Child::stdin", 
"Child::stdout" and "Child::stderr" are no longer optional, instead 
made them getters that throw at runtime if that stream wasn't set 
to "piped". 
- Remove the complicated "<T extends SpawnOptions = SpawnOptions>" 
which we currently need to give proper type hints for the availability of 
these fields. Their typings for these would get increasingly complex 
if it became dependent on more options (e.g. "SpawnOptions::pty" 
which if set should make the stdio streams unavailable)
2022-07-18 15:16:12 +02:00
Nayeem Rahman
22a4998e29
refactor: allocate IDs for tests (#14729) 2022-07-15 13:09:22 -04:00
Mark Ladyshau
ee0c0586b3
feat(cli/test): add DENO_JOBS env variable for test subcommand (#14929) 2022-07-15 10:29:55 -04:00
Bartek Iwańczuk
f9b692e68e
Revert "feat: add "unhandledrejection" event support (#12994) (#15080)" (#15210)
This reverts commit 1a7259b04b.
2022-07-15 01:06:20 +02:00
Bartek Iwańczuk
1a7259b04b
feat: add "unhandledrejection" event support (#12994) (#15080)
Relanding #12994 

This commit adds support for "unhandledrejection" event.

This event will trigger event listeners registered using:

"globalThis.addEventListener("unhandledrejection")
"globalThis.onunhandledrejection"
This is done by registering a default handler using
"Deno.core.setPromiseRejectCallback" that allows to
handle rejected promises in JavaScript instead of Rust.

This commit will make it possible to polyfill
"process.on("unhandledRejection")" in the Node compat
layer.

Co-authored-by: Colin Ihrig <cjihrig@gmail.com>
2022-07-14 22:39:20 +02:00
Rafael Ávila de Espíndola
a34ed568e9
fix(cli): expand tsc roots when using checkJs (#15164)
A JS file can still point to a TS file, so we need to expand the roots
in the checkJs case too.

Fixes: #15163
2022-07-14 10:40:47 -04:00
David Sherret
667812a297
fix(cli): synchronize async stdio/file reads and writes (#15092)
Fixes a regression where async writes and reads could get out of order.
2022-07-13 11:16:42 -04:00
David Sherret
7470b2d2a7
chore: fix flaky integration::test::meta (#15192) 2022-07-13 11:01:52 -04:00
David Sherret
0c87dd1e98
perf: use emit from swc instead of tsc (#15118) 2022-07-12 18:58:39 -04:00
Kitson Kelly
5db16d1229
fix(lsp): enable auto imports (#15145)
Fixes: #15111
2022-07-12 09:35:18 +10:00
David Sherret
82431062fa
fix(coverage): better handling of multi-byte characters (#15159) 2022-07-11 19:02:11 -04:00
Nayeem Rahman
989c723130
perf(cli/proc_state): Get error source lines from memory (#15031) 2022-07-11 20:43:47 +02:00
Bartek Iwańczuk
06934db883
Revert "feat: add "unhandledrejection" event support (#12994)" (#15075)
This reverts commit f7af0b01a5.
2022-07-04 23:34:39 +02:00
Bartek Iwańczuk
f7af0b01a5
feat: add "unhandledrejection" event support (#12994)
This commit adds support for "unhandledrejection" event.

This event will trigger event listeners registered using:

"globalThis.addEventListener("unhandledrejection")
"globalThis.onunhandledrejection"
This is done by registering a default handler using
"Deno.core.setPromiseRejectCallback" that allows to
handle rejected promises in JavaScript instead of Rust.

This commit will make it possible to polyfill
"process.on("unhandledRejection")" in the Node compat
layer.

Co-authored-by: Colin Ihrig <cjihrig@gmail.com>
2022-07-04 21:14:58 +02:00
Colin Ihrig
0f6a5c5fc2
feat(web): add beforeunload event (#14830)
This commit adds the 'beforeunload' event.

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-06-28 10:49:30 -04:00
Andreu Botella
38505db391
fix(modules): Immediately resolve follow-up dyn imports to a dyn imported module (#14958)
When a dynamically imported module gets resolved, any code that comes after an
await import() to that module will continue running. However, if that is the
last code in the evaluation of another dynamically imported module, that second
module will not resolve until the next iteration of the event loop, even though
it does not depend on the event loop at all.

When the event loop is being blocked by a long-running operation, such as a
long-running timer, or by an async op that might never end, such as with workers
or BroadcastChannels, that will result in the second dynamically imported module
not being resolved for a while, or ever.

This change fixes this by running the dynamic module loading steps in a loop
until no more dynamic modules can be resolved.
2022-06-25 20:56:29 +02:00
Bartek Iwańczuk
d39094913e
fix: don't error if Deno.bench() or Deno.test() are used in run subcommand (#14946) 2022-06-24 12:00:53 +02:00
Nayeem Rahman
ef7bc5e0a6
fix(check): ignore TS2306 (#14940)
Fixes a regression where this type checking error was being surfaced in certain scenarios.
2022-06-23 12:18:32 -04:00
Aapo Alasuutari
3d6fa64f19
feat(ext/ffi): Callbacks (#14663)
This commit adds support for unstable FFI
callbacks. A callback is registered using
the `Deno.UnsafeCallback` API.

The backing memory for the callback can 
be disposed of using `Deno.UnsafeCallback#close`.
It is not safe to pass the callback after calling
close.

Callbacks from other than the isolate thread
are not supported.

Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
Co-authored-by: Bert Belder <bertbelder@gmail.com>
2022-06-20 16:36:04 +05:30
David Sherret
f564497630
fix(fmt): should fail --check on parse error (#14907) 2022-06-18 12:44:43 -04:00
Ryan Dahl
3d2394954c
upgrade: v8 10.4.132.5 (#14874) 2022-06-15 12:30:19 -04:00
Nayeem Rahman
845d4754c6
fix(check): use "moduleDetection": "force" (#14875) 2022-06-15 12:26:43 -04:00
cjihrig
b2109a12aa fix(url): properly indent when inspecting URLs (#14867)
This commit updates the custom inspect function for URL objects
to pass the inspect options through so that the context is
propagated and the resulting indentation is correct.

Fixes: https://github.com/denoland/deno/issues/14171
2022-06-15 09:52:28 -04:00
Mark Ladyshau
d4f609d8e7
feat(test): update test summary report (#14629) 2022-06-14 20:51:49 +02:00
David Sherret
443041c23e
feat(vendor): support using an existing import map (#14836) 2022-06-14 10:05:37 -04:00
Bartek Iwańczuk
fc3a966a2d
Deno.exit() is an alias to self.close() in worker contexts (#14826)
This commit changes Deno.exit() to be an alias to self.close() in worker contexts,
and the provided exit code becomes is ignored.
2022-06-13 23:53:04 +02:00
Bartek Iwańczuk
4a0a412d7c
feat: no type-check by default (#14691)
This commit changes default default behavior of type checking
for several subcommands.

Instead of type checking and reporting type errors only for local
files, the type checking is skipped entirely. Type checking can
still be enabled using the "--check" flag.

Following subcomands are affected:
- deno cache
- deno install
- deno eval
- deno run
2022-06-13 23:13:16 +02:00
Ryan Dahl
21dfeea3c4
Remove unstable Deno.sleepSync (#14719)
Co-authored-by: David Sherret <dsherret@gmail.com>
2022-06-13 21:28:00 +02:00
Mark Ladyshau
decdc59071
fix(cli): add config flag to deno info (#14706) 2022-06-13 20:09:04 +02:00
Kayla Washburn
94068b7109
feat(task): add --cwd flag for configuring the working directory (#14823) 2022-06-08 15:30:16 -06:00
Nayeem Rahman
9385a91312
refactor(core): Move Deno.core bindings to ops (#14793) 2022-06-07 11:25:10 +02: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
Geert-Jan Zwiers
7d9e8baebb
chore: fix flaky integration::bench::multifile_summary test (#14771) 2022-06-02 03:03:28 +02:00
Kitson Kelly
7eee521199
feat: update to TypeScript 4.7 (#14242) 2022-06-01 10:19:18 +10:00
David Sherret
b65d5024ef
fix: read raw stdin to prevent buffering (regression) (#14704) 2022-05-23 12:35:02 -04:00
David Sherret
69be1f3cf7
fix: deno task should actually use current exe for deno command (#14705) 2022-05-23 12:04:28 -04:00
Colin Ihrig
d55444b41c
fix(coverage): do not report transpiled files with no lines (#14699)
This commit omits files from the coverage report that have no
lines of code to report coverage for.

Fixes: https://github.com/denoland/deno/issues/14683
2022-05-22 10:45:22 -04:00
David Sherret
1fcecb6789
refactor: upgrade to deno_ast 0.15 (#14680) 2022-05-20 16:40:55 -04:00