1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-25 15:29:32 -05:00
Commit graph

1483 commits

Author SHA1 Message Date
Nayeem Rahman
177cf5d734 feat(ext/web): Add error events for event listener and timer errors (#14159)
- feat: Add handleable error event for even listener errors
- feat: Add handleable error event for setTimeout()/setInterval() errors
- feat: Add Deno.core.destructureError()
- feat: Add Deno.core.terminate()
- fix: Don't throw listener errors from dispatchEvent()
- fix: Use biased mode when selecting between mod_evaluate() and
  run_event_loop() results
2022-04-14 13:17:24 -04:00
David Sherret
7a71b7428f fix: upgrade to swc_ecmascript 0.143 (#14238) 2022-04-14 13:17:23 -04:00
Aaron O'Mullan
2363916b37 refactor(core): OpCtx (#14228) 2022-04-14 13:17:23 -04:00
Yoshiya Hinosawa
9df06c346f feat(unstable): add ref/unref to Listener (#13961)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-04-07 10:32:22 -04:00
EduM22
4b853611ba fix(ext/crypto): check extractable in exportKey (#14222) 2022-04-07 09:42:33 -04:00
Jason
506c7b5a25 refactor(lsp): migrate from lspower back to tower-lsp (#14163) 2022-04-07 09:42:33 -04:00
David Sherret
79106d757f chore: fix main (#14175) 2022-04-07 09:42:33 -04:00
David Sherret
53abcffd62 chore(tests): use custom temp dir creation for the tests (#14153) 2022-04-07 09:42:33 -04:00
Kitson Kelly
e696cd8e13 feat(lsp): add experimental testing API (#13798)
Ref: denoland/vscode_deno#629
2022-04-07 09:42:29 -04:00
Kitson Kelly
e19303d690 feat(lsp): support API for config file (#14139)
Closes: #13910
2022-04-07 09:04:47 -04:00
Divy Srivastava
d5cd7c3261 fix(compile): follow redirects when resolving (#14161) 2022-03-31 11:33:03 -04:00
David Sherret
454a874d74 chore: disable wgpu tests in WSL (#14157) 2022-03-31 11:33:03 -04:00
David Sherret
bd767029e9 chore(tests): add more lsp tests for formatting (#14155) 2022-03-31 11:32:54 -04:00
Andreu Botella
542d9e7620 chore(wasm): Don't await on the argument to handleWasmStreaming (#14000)
`handleWasmStreaming` is the function that provides the binding with
the `fetch` API needed for `WebAssembly.instantiateStreaming()` and
`WebAssembly.compileStreaming()`. When I implemented it in #11200, I
thought V8 was calling these functions with the argument of the
`WebAssembly` streaming functions, without doing any resolving, and so
`handleWasmStreaming` awaits for the parameter to resolve. However,
as discovered in
https://github.com/denoland/deno/issues/13917#issuecomment-1065805565,
V8 does in fact resolve the parameter if it's a promise (and handles
rejections arising from that).

This change removes the `async` IIFE inside `handleWasmStreaming`,
letting initial errors be handled synchronously (which will however
not throw synchronously from the `WebAssembly` namespace functions).
Awaiting is still necessary for reading the bytes of the response,
though, and so there is an `async` IIFE for that.
2022-03-30 16:48:40 -04:00
David Sherret
fad9ff5ea4 chore: fix compile_windows_ext test (#14142) 2022-03-30 16:48:09 -04:00
David Sherret
a5c0deb73b
fix: Deno.run - do not modify user provided cmd array (#14109) 2022-03-25 13:31:30 +01:00
Luca Casonato
fcfce1bb86
fix(ext/ffi): enforce unstable check on ops (#14115) 2022-03-25 13:31:20 +01:00
Kitson Kelly
833767dd5d tests(cli): ignore previously unignored test (#14104)
Ref: #14103
2022-03-24 13:39:10 +11:00
Bartek Iwańczuk
8d4469eab8 fix(bench): require --unstable flag in JavaScript (#14091) 2022-03-24 13:39:10 +11:00
Bartek Iwańczuk
c7aecc1299 fix(test): don't error on missing op details (#14074) 2022-03-24 13:39:10 +11:00
Bartek Iwańczuk
3f805e61e2 refactor: remove loops in cli/tests/unit/http_test.ts (#14075) 2022-03-24 13:39:10 +11:00
David Sherret
fb6e135b3e chore: replace .expect("...") calls with .unwrap() in test code (#14081) 2022-03-24 13:39:10 +11:00
David Sherret
c47974677e fix(tests): do not use global env vars in install tests (#14078) 2022-03-24 13:39:10 +11:00
Nayeem Rahman
a90ae421dd fix(ext/fetch): Connect async error stack with user code (#13899) 2022-03-24 13:39:10 +11:00
Andreu Botella
d523cc2abc fix(fetch): Fix uncaught rejection panic with WebAssembly.instantiateStreaming (#13925)
When an exception is thrown during the processing of streaming WebAssembly,
`op_wasm_streaming_abort` is called. This op calls into V8, which synchronously
rejects the promise and calls into the promise rejection handler, if applicable.
But calling an op borrows the isolate's `JsRuntimeState` for the duration of the
op, which means it is borrowed when V8 calls into `promise_reject_callback`,
which tries to borrow it again, panicking.

This change changes `op_wasm_streaming_abort` from an op to a binding
(`Deno.core.abortWasmStreaming`). Although that binding must borrow the
`JsRuntimeState` in order to access the `WasmStreamingResource` stored in the
`OpTable`, it also takes ownership of that `WasmStreamingResource` instance,
which means it can drop any borrows of the `JsRuntimeState` before calling into
V8.
2022-03-24 13:39:10 +11:00
David Sherret
cd88cd6231 chore: fix development issues on Windows (#14030) 2022-03-24 13:39:10 +11:00
Kitson Kelly
fc8aa5ad8b feat(lsp): support deno.enablePaths setting (#13978)
Ref: denoland/vscode_deno#633
2022-03-24 13:39:10 +11:00
Luca Casonato
e43707792d fix: actually don't inherit runtime permissions (#14024) 2022-03-24 13:39:10 +11:00
Jason
74307a6950 fix(ext/console): fix error with a Proxy of a Map (#14032) 2022-03-24 13:39:10 +11:00
TrickyPi
3f7d2fc1e9 fix(cli): improve deno compile error messages (#13944)
Co-authored-by: David Sherret <dsherret@gmail.com>
2022-03-24 13:39:10 +11:00
Divy Srivastava
3a106f08d8 chore(ops): include argument position in serde_v8 errors (#14027) 2022-03-24 13:39:10 +11:00
Bert Belder
c5270abad7
feat(unstable): Add Deno.upgradeHttp API (#13618)
This commit adds "Deno.upgradeHttp" API, which
allows to "hijack" connection and switch protocols, to eg.
implement WebSocket required for Node compat.

Co-authored-by: crowlkats <crowlkats@toaxl.com>
Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-03-16 14:54:18 +01:00
Ryan Dahl
45b3aa22c0
feat(ext/fetch): Allow Response status 101 (#13969)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-03-16 14:30:43 +01:00
David Sherret
748aff1e94
feat(task): add unstable warning to deno task (#13966) 2022-03-15 21:24:07 -04:00
Ryan Dahl
163e1d6192
disable flakes (#13962) 2022-03-15 11:19:59 -04:00
Andreu Botella
9f494dc405
feat(ext/web): Add AbortSignal.timeout() (#13687) 2022-03-14 20:19:22 +01:00
Andreu Botella
c6bf07ec6d
fix(core): Don't override structured clone error messages from V8 (#13942)
In the implementation of structured serialization in
`Deno.core.serialize`, whenever there is a serialization error, an
exception will be thrown with the message "Failed to serialize
response", even though V8 provides a message to use in such cases.
This change instead throws an exception with the V8-provided message,
if there is one.
2022-03-14 19:35:15 +01:00
Bartek Iwańczuk
9d9e60b694
feat(task): log task script (#13922)
Logs task name and associated script with additional args.
This is disabled if "--quiet/-q" flag is present.
2022-03-12 02:35:18 +01:00
Bartek Iwańczuk
1a764790f2
test: fix flaky compat tests (#13921) 2022-03-12 02:08:55 +01:00
Bartek Iwańczuk
09ae512ccb
feat: "deno bench" subcommand (#13713)
This commit adds "deno bench" subcommand and "Deno.bench()"
API that allows to register bench cases. 

The API is modelled after "Deno.test()" and "deno test" subcommand.

Currently the output is rudimentary and bench cases and not
subject to "ops" and "resource" sanitizers.

Co-authored-by: evan <github@evan.lol>
2022-03-11 23:07:02 +01:00
Yoshiya Hinosawa
b198bfd795
refactor(core): validate promise id in refOp (#13905) 2022-03-12 01:18:49 +09:00
Filip Skokan
f9b4d262b3
fix(ext/crypto): handle JWK import with "use" (#13912) 2022-03-11 20:26:16 +05:30
Bartek Iwańczuk
47f22777be
feat: "deno task" subcommand (#13725)
Co-authored-by: David Sherret <dsherret@gmail.com>
2022-03-10 20:56:14 -05:00
Bartek Iwańczuk
808f797633
fix(compat): cjs/esm interop for dynamic imports (#13792)
This commit fixes CJS/ESM interop in compat mode for dynamically
imported modules.

"ProcState::prepare_module_load" was changed to accept a list
of "graph roots" without associated "module kind". That module kind
was always hardcoded to "ESM" which is not true for CJS/ESM interop -
a CommonJs module might be imported using "import()" function. In
such case the root of the graph should have "CommonJs" module kind
instead of "ESM".
2022-03-11 02:33:02 +01:00
Geert-Jan Zwiers
8db3a9546b
fix(test): skip typechecking for blocks inside HTML comments (#13889) 2022-03-11 02:14:32 +01:00
Geert-Jan Zwiers
38e88e32b7
fix(info): print deno info paths with unescaped backslashes on windows (#13847) 2022-03-10 19:57:57 -05:00
Bartek Iwańczuk
2e30112e62
test: update expected test output for 'deno test' (#13882) 2022-03-09 14:48:20 +01:00
Divy Srivastava
a5957f46ee
chore(ext/crypto): remove old todos (#13887) 2022-03-09 18:13:11 +05:30
Geert-Jan Zwiers
e53b6c16bc
fix(test): typecheck blocks annotated with long js/ts notations (#13785) 2022-03-08 02:10:40 +01:00
Satya Rohith
670aef5c1a
fix(ext/http): drop content-length header on compression (#13866) 2022-03-07 22:43:15 +05:30