0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-10-31 09:14:20 -04:00
Commit graph

6503 commits

Author SHA1 Message Date
Casper Beyer
1683044ed9
feat: provide ops details for ops sanitizer failures (#12188) 2021-10-11 17:00:33 +02:00
Divy Srivastava
3b2cb8e711
feat(ext/crypto): implement AES-CBC encryption & decryption (#12123)
* initial stuff

* stuff

* merge stuff

* cleanup

* fmt

* length

* update lockfile

* decrypt

* fixy

* clippy hello?

* hmm

* fixs

* fix lint

* add AesCbcParams

* fixes

* fixy

* lockfile fixy

* fix dumb assertions

* re run CI

* rerun CI

* rerun CI
2021-10-11 16:37:51 +02:00
David Sherret
426ebf854a
feat(unstable/test): imperative test steps API (#12190) 2021-10-11 09:45:02 -04:00
Feng Yu
668b400ff2
feat(runtime): improve error messages of runtime fs (#11984)
This commit annotates errors returned from FS Deno APIs to include
paths that were passed to the API calls.

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2021-10-11 15:21:18 +02:00
Divy Srivastava
423b02d889
fix(ext/ffi): types for nonblocking FFI (#12345) 2021-10-11 15:09:11 +02:00
Kitson Kelly
a7baf5f2bb
refactor: integrate deno_graph into CLI (#12369) 2021-10-11 08:26:22 +11:00
Aaron O'Mullan
5a8a989b78
refactor(metrics): move to core (#12386)
Avoids overhead of wrapping ops (and allocs when inspecting async-op futures)
2021-10-10 17:20:30 +02:00
Aaron O'Mullan
f2ac7ff23a
bench(deno_common): track void ops (#12389)
To track overhead through the entire CLI opcall stack (metrics included, etc...)
2021-10-10 16:36:55 +02:00
Andreu Botella
5edd277161
feat: Show the URL of streaming WASM modules in stack traces (#12268)
WebAssembly modules compiled through `WebAssembly.compile()` and similar
non-streaming APIs don't have a URL associated to them, because they
have been compiled from a buffer source. In stack traces, V8 will use
a URL such as `wasm://wasm/d1c677ea`, with a hash of the module.

However, wasm modules compiled through streaming APIs, like
`WebAssembly.compileStreaming()`, do have a known URL, which can be
obtained from the `Response` object passed into the streaming APIs. And
as per the developer-facing display conventions in the WebAssembly
Web API spec, this URL should be used in stack traces. This change
implements that.
2021-10-10 16:03:23 +02:00
Ryan Dahl
6ac0337165
feat: Stabilize Deno.kill and Deno.Process.kill (#12375)
Co-authored-by: Luca Casonato <lucacasonato@yahoo.com>
2021-10-10 15:48:26 +02:00
Feng Yu
ffea0f198c
test: remove duplicate import (#12374) 2021-10-10 15:24:03 +02:00
Bartek Iwańczuk
76de56091b
test(ext/ffi): add test for multiple buffers (#12373) 2021-10-10 15:18:02 +02:00
Satya Rohith
29f9e14457
feat: stabilize Deno.resolveDns (#12368) 2021-10-10 15:46:11 +05:30
Satya Rohith
25771b3d9b
feat(ext/net): relevant errors for resolveDns (#12370) 2021-10-10 15:44:45 +05:30
Andreu Botella
66804d26f3
chore(wpt): Enable WPT worker tests (#12222)
Classic workers were implemented in denoland#11338, which also enabled the WPT
tests in the `workers` directory. However, the rest of WPT worker tests
were not enabled because a number of them were hanging due to
web-platform-tests/wpt#29777. Now that that WPT issue is fixed, the bulk
of worker tests can be enabled.

There are still a few tests that hang, and so haven't been enabled. In
particular:

- The following tests seem to hang because a promise fails to resolve.
  We can detect such cases in non-worker tests because the process will
  exit without calling the WPT completion callback, but in worker tests
  the worker message ops will keep the event loop running. This will be
  fixed when we add timeouts to WPT tests (denoland#9460).

  - `/fetch/api/basic/error-after-response.any.worker.html`
  - `/html/webappapis/microtask-queuing/queue-microtask-exceptions.any.worker.html`
  - `/webmessaging/message-channels/worker-post-after-close.any.worker.html`
  - `/webmessaging/message-channels/worker.any.worker.html`
  - `/websockets/Create-on-worker-shutdown.any.worker.html`

- The following tests apparently hang because a promise rejection is
  never handled, which will kill the process in the main thread but not
  in workers (denoland#12221).

  - `/streams/readable-streams/async-iterator.any.worker.html`
  - `/workers/interfaces/WorkerUtils/importScripts/report-error-setTimeout-cross-origin.sub.any.worker.html`
  - `/workers/interfaces/WorkerUtils/importScripts/report-error-setTimeout-redirect-to-cross-origin.sub.any.worker.html`
  - `/workers/interfaces/WorkerUtils/importScripts/report-error-setTimeout-same-origin.sub.any.worker.html`
2021-10-08 17:44:38 +02:00
Divy Srivastava
a5d3c8b06c
feat(ext/crypto): implement deriveBits for ECDH (p256) (#11873) 2021-10-08 17:29:36 +02:00
Bartek Iwańczuk
c49a057599
feat(compat): inject Node globals in REPL (#12352) 2021-10-08 17:11:33 +02:00
Aaron O'Mullan
6b43e862fd
feat(runtime): allow passing extensions via Worker options (#12362) 2021-10-08 17:03:49 +02:00
Kenta Moriuchi
5f405bf114
fix(ext/web): Format DOMException stack property (#12333) 2021-10-08 17:01:02 +02:00
Divy Srivastava
2155e7545f
fix(ext/ffi): missing "buffer" type definitions (#12371) 2021-10-08 16:32:57 +02:00
Andreu Botella
74e5b68682
refactor: deduplicate defineEventHandler util (#12367) 2021-10-08 09:53:31 +02:00
Aaron O'Mullan
7e38ae17ea
perf(fetch): fast path Uint8Array in extractBody() (#12351) 2021-10-07 22:57:17 +02:00
Nayeem Rahman
330aaae936
tests: make worker test deterministic (#12361) 2021-10-07 22:53:09 +02:00
Andreu Botella
e8b3ffd155
fix(runtime): Getting navigator.hardwareConcurrency on workers shouldn't throw (#12354) 2021-10-07 19:39:33 +02:00
Aaron O'Mullan
370c27e09a
feat(core): cleaner opcall stack traces (#12358) 2021-10-07 18:39:27 +02:00
Divy Srivastava
ab2e0a465e
fix(ext/ffi): don't panic in dlopen (#12344) 2021-10-07 11:03:00 -04:00
Bert Belder
822047b845
fix(runtime): don't equate SIGINT to SIGKILL on Windows (#12356) 2021-10-07 16:31:02 +02:00
Aaron O'Mullan
c4b995ffe6
bench(op_baseline): measure Deno.core.isProxy() (#12347) 2021-10-06 20:18:25 +02:00
Bartek Iwańczuk
4e3068be63
Revert "fix(cli): ensure empty lines don't count towards coverage (#11957)" (#12348)
This reverts commit d5b38a9929.
2021-10-06 19:28:28 +02:00
Bartek Iwańczuk
b686907a45
feat(compat): inject Node globals (#12342)
This commit adds automatic injection of Node globals when "--compat" flag
is present.

This is done by executing "https://deno.land/std/node/global.ts" as a "side module",
before main module is executed.

This commit makes "--compat" required to be used with "--unstable" flag, as some
of Node globals require unstable Deno APIs.
2021-10-06 19:07:04 +02:00
Divy Srivastava
b033a7a6d4
fix(ext/crypto): key generation based on AES key length (#12146) 2021-10-06 11:24:41 +02:00
Divy Srivastava
3aa8591595
feat(ext/crypto): export spki for RSA (#12114) 2021-10-06 11:18:12 +02:00
Casper Beyer
d5b38a9929
fix(cli): ensure empty lines don't count towards coverage (#11957) 2021-10-06 07:05:18 +02:00
Ryan Dahl
10c415eaaa
Remove some unused benchmarks (#12315) 2021-10-05 22:27:44 -04:00
Divy Srivastava
2b39e74477
fix(ext/ffi): formatting dlopen errors on Windows (#12301) 2021-10-06 02:13:56 +02:00
Bartek Iwańczuk
37a24c7bdf
feat(compat): add support for node: prefixed built-ins (#12337)
Adds support for "node:" prefix for Node built-ins in "--compat" mode.

As per https://nodejs.org/api/esm.html#esm_node_imports
2021-10-06 01:25:13 +02:00
Bartek Iwańczuk
3faf75aa88
feat(ext/ffi): add support for buffer arguments (#12335)
This commit adds support for passing buffer arguments across 
FFI boundary.


Co-authored-by: eliassjogreen <eliassjogreen1@gmail.com>
Co-authored-by: Bert Belder <bertbelder@gmail.com>
2021-10-06 00:27:05 +02:00
Aaron O'Mullan
58bb63f355
perf(webidl): fix typo from #12286 (#12336)
In a tweak commit of #12286 I accidentally eliminated the else branch ... running the slow & the fast path providing a worst of both worlds path
2021-10-05 23:37:50 +02:00
CGQAQ
c555b31d40
feat(lint): add support for --watch flag (#11983) 2021-10-05 23:07:38 +02:00
Aaron O'Mullan
22328f8758
feat(core): native binding names (#12290)
Makes native builtin functions easier to recognize when debugging/profiling, they would otherwise appear as "(anonymous)" functions
2021-10-05 22:55:51 +02:00
Aaron O'Mullan
678a881f63
refactor(runtime): Worker bootstrap options (#12299) 2021-10-05 22:41:14 +02:00
Leo K
77a00ce1fb
chore: various op cleanup (#12329) 2021-10-05 22:38:27 +02:00
Bartek Iwańczuk
d67e858506
chore: merge v1.14.3 into main (#12327) 2021-10-05 21:40:39 +02:00
Divy Srivastava
80aee99c9e
feat(ext/ffi): Non-blocking FFI (#12274) 2021-10-05 14:50:00 +02:00
Bartek Iwańczuk
f1d3a17043
feat: add --compat flag to provide built-in Node modules (#12293)
This commit adds "--compat" flag. When the flag is passed a set of mappings for
built-in Node modules is injected into the import map. If user doesn't
explicitly provide an import map (using "--import-map" flag) then a map is
created on the fly. If there are already existing mappings in import map that
would clash with built-in Node modules a set of diagnostics is printed to the
terminal with suggestions how to proceed.
2021-10-05 01:35:55 +02:00
Luca Casonato
64a7187238
chore: remove No*Permissions structs (#12316)
These are confusing. They say they are "for users that don't care about
permissions", but that isn't correct. `NoTimersPermissions` disables
permissions instead of enabling them.

I would argue that implementors should decide what permissions they want
themselves, and not take our opinionated permissions struct.
2021-10-04 22:56:24 +02:00
Bartek Iwańczuk
c6ae41fd87
test: refactor lint tests into directories (#12317)
Just reorganizing lint tests in such a way that adding new file in a directory doesn't change result of other tests.
2021-10-04 18:16:49 +02:00
Aaron O'Mullan
5f41f822e7
perf(webidl): optimize createRecordConverter() (#12286)
Cuts self-time by ~6x, 172ns/iter => 22ns/iter benched on 1M Response builds / HeadersInit calls
2021-10-04 15:39:32 +02:00
Aaron O'Mullan
ea7a63cd5a
refactor(core): split opcall into sync/async (#12312) 2021-10-04 12:34:53 +02:00
Aaron O'Mullan
4a1300edde
fix(core/runtime): sync_ops_cache if nuked Deno ns (#12302)
Decouple JsRuntime::sync_ops_cache() from the availability of the Deno.* namespace in the global scope

This avoids crashes when calling sync_ops_cache() on a bootstrapped WebWorker who has dropped its Deno.* namespace

It's also just cleaner and more robust ...
2021-10-04 11:45:41 +02:00