Ryan Dahl
c6e7a243d5
API change: Deno.startHttp -> Deno.serveHttp ( #10087 )
2021-04-09 11:54:27 -04:00
Bartek Iwańczuk
70af812876
feat: native HTTP bindings ( #9935 )
...
Co-authered-by: Luca Casonato <lucacasonato@yahoo.com>
Co-authered-by: Ben Noordhuis <info@bnoordhuis.nl>
Co-authered-by: Ryan Dahl <ry@tinyclouds.org>
2021-04-08 18:34:15 -04:00
Luca Casonato
4e70ff80c2
chore: update deps ( #10058 )
...
This commit updates crate dependencies.
2021-04-08 18:46:14 +02:00
Inteon
d050b491b1
fix(core): error handling in examples ( #9867 )
2021-04-08 18:04:02 +02:00
Satya Rohith
543080de55
fix(runtime/readFile*): close resources on error during read ( #10059 )
...
This commit ensures readFile, readFileSync, readTextFile,
and readTextFileSync does not leak resources on error.
2021-04-08 16:36:52 +02:00
Luca Casonato
966ce7de8a
feat: blob URL support ( #10045 )
...
This commit adds blob URL support. Blob URLs are stored in a process
global storage, that can be accessed from all workers, and the module
loader. Blob URLs can be created using `URL.createObjectURL` and revoked
using `URL.revokeObjectURL`.
This commit does not add support for `fetch`ing blob URLs. This will be
added in a follow up commit.
2021-04-07 15:22:14 +02:00
Luca Casonato
00e63306cb
refactor: add deno_file op crate ( #10019 )
...
Also enables WPT for FileReader.
2021-04-06 12:55:05 +02:00
Aaron O'Mullan
ff5d072702
refactor: rewrite "net" ops to use serde_v8 ( #10028 )
2021-04-06 10:33:43 +02:00
Luca Casonato
da60e2afcb
chore: deprecate Deno.Buffer and read/write utils ( #9793 )
...
This commit marks the `Deno.Buffer` / `Deno.readAll` /
`Deno.readAllSync` / `Deno.writeAll` / `Deno.writeAllSync` utils as
deprecated, and schedules them for removal in Deno 2.0. These
utilities are implemented in pure JS, so should not be part of the
Deno namespace.
These utilities are now available in std/io/buffer and std/io/util:
https://github.com/denoland/deno_std/pull/808 .
This additionallty removes all internal dependance on Deno.Buffer.
2021-04-06 00:05:36 +02:00
Aaron O'Mullan
2aed322dd5
refactor: convert ops to use serde_v8 ( #10009 )
...
This commit rewrites most of the ops to use "serde_v8" instead
of "json" serialization.
2021-04-05 18:40:24 +02:00
Aaron O'Mullan
824bd2f5c3
refactor: Switch op_now to be a json-op ( #9974 )
2021-04-03 20:35:28 +02:00
upendra1997
8257f51d7e
fix(permissions): don't panic when no input is given ( #9894 )
...
Fixes #9633
Co-authored-by: Kitson Kelly <me@kitsonkelly.com>
2021-04-03 07:49:51 +11:00
Aaron O'Mullan
058579da56
refactor(ops): remove variadic buffers ( #9944 )
2021-04-02 09:47:57 -04:00
Kitson Kelly
df1d36a759
chore: bump dependent crates for cli ( #9964 )
2021-04-02 22:22:08 +11:00
Aaron O'Mullan
fec1b2a5a4
refactor: new optimized op-layer using serde_v8 ( #9843 )
...
- Improves op performance.
- Handle op-metadata (errors, promise IDs) explicitly in the op-layer vs
per op-encoding (aka: out-of-payload).
- Remove shared queue & custom "asyncHandlers", all async values are
returned in batches via js_recv_cb.
- The op-layer should be thought of as simple function calls with little
indirection or translation besides the conceptually straightforward
serde_v8 bijections.
- Preserve concepts of json/bin/min as semantic groups of their
inputs/outputs instead of their op-encoding strategy, preserving these
groups will also facilitate partial transitions over to v8 Fast API for the
"min" and "bin" groups
2021-03-31 10:37:38 -04:00
Aaron O'Mullan
940b3a26bd
chore: Add missing copyright headers ( #9910 )
2021-03-27 01:33:06 +01:00
Ryan Dahl
f46e39c5c5
remove macro_use ( #9884 )
2021-03-26 12:34:25 -04:00
Yusuke Tanaka
e7954413e1
upgrade: Rust 1.51.0 ( #9895 )
2021-03-25 19:17:37 +01:00
Bartek Iwańczuk
c08284ab9d
chore: release crates ( #9847 )
2021-03-21 16:10:08 +01:00
Nayeem Rahman
dd12a668e7
refactor(runtime/permissions): Rename permission structs ( #9841 )
2021-03-21 08:49:58 -04:00
Inteon
1251c89321
refactor: Move bin ops to deno_core and unify logic with json ops ( #9457 )
...
This commit moves implementation of bin ops to "deno_core" crates
as well as unifying logic between bin ops and json ops to reuse
as much code as possible (both in Rust and JavaScript).
2021-03-20 17:51:08 +01:00
Ryan Dahl
0d26a82ea9
upgrade: tokio 1.4.0 ( #9842 )
2021-03-20 11:51:27 -04:00
crowlKats
0f9c929b3a
fix(op_crates/webgpu): create instance only when required ( #9771 )
...
Co-authored-by: Luca Casonato <lucacasonato@yahoo.com>
2021-03-20 00:43:54 +01:00
crowlKats
2d55090d8c
refactor(runtime/ops/worker_host): simplify worker perms handling ( #9835 )
2021-03-19 13:27:41 -04:00
Divy Srivastava
91ca58fb26
chores: enforce type ResourceId across codebase ( #9837 )
2021-03-19 13:25:37 -04:00
crowlKats
197305908b
normalize rids ( #9832 )
2021-03-18 20:55:31 -04:00
Aaron O'Mullan
7d12dd1899
fix: fallback to default UA and CA data for Deno.createHttpClient() ( #9830 )
2021-03-18 23:54:26 +01:00
crowlKats
b59151f39e
move runtime ops to serde ops ( #9828 )
2021-03-18 14:42:01 -04:00
Luca Casonato
62716422b9
chore(console): distinguish between log levels ( #9824 )
...
Change `Console.#printFunc` to pass a log level as the second argument
(0 = debug, 3 = error), instead of a boolean for `isErr`. This does not
change the Deno runtime behaviour at all.
2021-03-18 19:25:25 +01:00
Inteon
20627c9136
refactor: update minimal ops & rename to buffer ops ( #9719 )
...
This commit rewrites "dispatch_minimal" into "dispatch_buffer".
It's part of an effort to unify JS interface for ops for both json
and minimal (buffer) ops.
Before this commit "minimal ops" could be either sync or async
depending on the return type from the op, but this commit changes
it to have separate signatures for sync and async ops (just like
in case of json ops).
2021-03-18 14:10:27 +01:00
crowlKats
0e70d9e59b
refactor: clean up permission handling ( #9367 )
2021-03-17 17:45:12 -04:00
Casper Beyer
b2a1ad0611
chore: Upgrade rustyline to 8.0.0 ( #9781 )
...
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2021-03-15 14:08:41 +01:00
Casper Beyer
7286eea75c
fix(runtime): do not require deno namespace in workers for crypto ( #9784 )
2021-03-14 20:01:55 +01:00
Yusuke Tanaka
c8fbf6d38a
chore: upgrade to tokio 1.3.0 ( #9778 )
2021-03-14 10:03:24 -04:00
Luca Casonato
fbec6e39c7
chore: bump crates ( #9769 )
2021-03-12 22:29:07 +01:00
Luca Casonato
0770449c93
refactor: move Console to op_crates/console ( #9770 )
2021-03-12 21:23:59 +01:00
Luca Casonato
e83ff62ccb
chore: split web op crate ( #9635 )
...
This commit starts splitting out the deno_web op crate into multiple
smaller crates. This commit splits out WebIDL and URL API, but in the
future I want to split out each spec into its own crate. That means we
will have (in rough order of loading): `webidl`, `dom`, `streams`,
`console`, `encoding`, `url`, `file`, `fetch`, `websocket`, and
`webgpu` crates.
2021-03-12 16:17:18 +01:00
Bartek Iwańczuk
cdc0b6958d
chore: release crates ( #9731 )
2021-03-09 20:12:13 +01:00
Nayeem Rahman
0bc488c85c
fix(runtime/js): add navigator interface objects ( #9685 )
2021-03-08 13:27:49 +01:00
Tobias Nießen
ceeebe46ee
chore: fix decendents in runtime readme ( #9718 )
2021-03-08 13:23:46 +01:00
Nayeem Rahman
0f2121355f
fix(runtime/web_worker): Don't block self.onmessage with TLA ( #9619 )
...
This commit rewrites implementation of "JsRuntime::mod_evaluate".
Event loop is no longer polled automatically and users must manually
drive event loop forward after calling "mod_evaluate".
Co-authored-by: Nayeem Rahman <nayeemrmn99@gmail.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2021-03-04 13:19:47 +01:00
Ryan Dahl
25200ce295
Bump crates again ( #9653 )
2021-03-02 16:25:39 -05:00
Ryan Dahl
f1fe6a57ba
Bump crate versions ( #9651 )
2021-03-02 15:15:43 -05:00
Nayeem Rahman
badc88b78a
refactor(op_crates/web): Move URL parsing to Rust ( #9276 )
2021-03-02 02:30:24 +01:00
crowlKats
7cd14f97c9
feat: WebGPU API ( #7977 )
...
Co-authored-by: Luca Casonato <lucacasonato@yahoo.com>
2021-03-01 11:31:13 +01:00
Casper Beyer
ded68aba73
chore(runtime): remove rustyline dependency ( #9625 )
2021-02-28 16:28:02 +01:00
Akshat Agarwal
d88d8b75d0
chore(runtime): removed unused dependencies ( #9622 )
...
This PR removes the following unused dependencies from the runtime
crate:
- env_logger
- rustyline-derive
- shell-escape
2021-02-28 13:54:03 +01:00
Casper Beyer
2ac7798a20
feat(runtime): stabilize Deno.symlink and Deno.symlinkSync ( #9226 )
2021-02-26 01:13:48 +01:00
Kitson Kelly
e516e4d1d5
chore(cli/runtime): use re-export serde from deno_core ( #9599 )
2021-02-26 07:18:35 +11:00
Luca Casonato
975705a649
chore(core): optional args for registerErrorClass ( #9602 )
2021-02-25 20:06:06 +01:00
Casper Beyer
aa47f8186c
feat(runtime): stabilize Deno.link and Deno.linkSync ( #9417 )
...
This commit makes "Deno.link" and "Deno.linkSync" stable.
The permission required has been changed to read-write to
ensure one cannot escape the sandbox.
2021-02-25 18:35:10 +01:00
Casper Beyer
687ff2ab14
fix(runtime): do not panic on irregular dir entries ( #9579 )
2021-02-25 05:16:18 -05:00
Kitson Kelly
097e9c44f4
feat(runtime): stabilise permissions and add event target capabilities ( #9573 )
2021-02-25 14:33:09 +11:00
Casper Beyer
9cc7e32e37
feat: add exit sanitizer to Deno.test ( #9529 )
...
This adds an exit sanitizer to ensure that code being tested or
dependencies of that code can't accidentally call "Deno.exit"
leading to partial test runs and false results.
2021-02-24 13:55:50 +01:00
Kohei Ueno
2e3d72064a
fix: panic caused by Deno.env.set("", "") ( #9583 )
2021-02-23 04:24:59 -05:00
Luca Casonato
9d70ea2e9f
feat(unstable): per op metrics ( #9240 )
2021-02-21 19:20:31 +01:00
Casper Beyer
eefd522f04
fix(runtime/testing): false positive for timers when an error is thrown ( #9553 )
2021-02-21 17:21:25 +01:00
crowlKats
666c4b77b0
feat(runtime/ops): strongly typed deserialization of JSON ops ( #9532 )
2021-02-18 13:54:57 +01:00
Ryan Dahl
c7dabc99ee
Make ModuleSpecifier a type alias, not wrapper struct ( #9531 )
2021-02-17 13:47:18 -05:00
Bartek Iwańczuk
39f3aaaa72
chore: release crates ( #9481 )
2021-02-12 16:23:39 +01:00
Kitson Kelly
54e53cc9ea
chore: Update to Rust 1.50.0 ( #9479 )
2021-02-12 21:08:36 +11:00
Erik Price
a097c4089b
fix(runtime/tls): handle invalid host for connectTls/startTls ( #9453 )
2021-02-11 12:45:10 +01:00
David DeSimone
61108935f1
fix(console): log function object properties / do not log non-enumerable props by default ( #9363 )
2021-02-10 20:52:54 +09:00
Nayeem Rahman
900953a65a
fix(op_crates): Don't use Deno.inspect
in op crates ( #9332 )
...
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2021-02-09 16:31:46 +01:00
Luca Casonato
a195c75033
chore: update dependencies ( #9455 )
2021-02-09 15:34:34 +01:00
Ben Noordhuis
a601d94aa1
fix(runtime/tls): remove unnecessary clone calls ( #9429 )
2021-02-07 15:50:05 +01:00
Bartek Iwańczuk
64f06be0eb
chore: release crates ( #9410 )
2021-02-05 15:08:18 +01:00
Developing
923214c537
chore: use strict mode for internal runtime, core, and op_crates js ( #9391 )
2021-02-04 23:18:32 +01:00
Kitson Kelly
b77fcbc518
feat(lsp): add TS quick fix code actions ( #9396 )
2021-02-05 05:53:02 +11:00
Ryan Dahl
644a7ff2d7
fetch optimizations ( #9402 )
...
Release deno_fetch 0.20.2
2021-02-04 13:08:41 -05:00
Luca Casonato
25b35be50d
refactor: rewrite File implementation ( #9334 )
2021-02-04 15:05:36 +01:00
Ben Noordhuis
fb358380c0
fix: improve http client builder error message ( #9380 )
...
Include the lower-level error message in the generic error message.
No test because I can't actually make it fail by passing it bad PEM.
I checked and `reqwest::Certificate::from_pem()` always returns `Ok()`.
Fixes #9364 .
2021-02-03 11:40:43 +01:00
crowlKats
9690ce5e87
refactor(runtime): remove unneeded Deserialize trait for Permissions struct ( #9362 )
2021-02-02 18:16:24 +01:00
Yusuke Tanaka
84f8b87f1b
chore: make all tests annotated with #[cfg(test)]
( #9347 )
2021-02-01 10:55:23 -05:00
Luca Casonato
fa975a9bae
refactor: rewrite Blob implementation ( #9309 )
...
Co-authored-by: Kitson Kelly <me@kitsonkelly.com>
2021-01-30 19:22:24 +01:00
Yusuke Tanaka
ef46bc88bd
chore: upgrade tokio to 1.1.1 ( #9327 )
2021-01-29 21:18:31 -05:00
Ryan Dahl
11dd6f2013
v1.7.1
2021-01-29 09:53:03 -05:00
Nayeem Rahman
daad575825
fix(cli): Move WorkerOptions::deno types to unstable ( #9163 )
2021-01-29 08:15:59 -05:00
Bert Belder
98878bd812
refactor: IO resource types, fix concurrent read/write and graceful close ( #9118 )
...
Fixes: 9032.
2021-01-29 01:35:07 -08:00
Luca Casonato
6ecc86cf2a
chore: add jsdoc to 26_fetch.js and enable some fetch tests ( #9305 )
2021-01-28 21:37:21 +01:00
Luca Casonato
40fc5f55ea
chore: update crates ( #9251 )
...
Updates SWC, dprint, deno_lint, deno_doc, serde, and Tokio (to 1.1.0).
Co-authored-by: Kitson Kelly <me@kitsonkelly.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2021-01-26 17:00:40 +01:00
Anonymous
ad60e750d7
fix(runtime/js): use DOMException in Performance#measure ( #9142 )
2021-01-24 16:05:18 +01:00
Yoshiya Hinosawa
18ac7d40c8
fix(runtime): fix recursive dispatches of unload event ( #9207 )
2021-01-21 16:44:48 +09:00
Yoshiya Hinosawa
0a159bea15
fix(ops/net): fix panic in op_dns_resolve ( #9187 )
2021-01-20 15:47:17 +01:00
Ryan Dahl
bfaa121cd2
v1.7.0
2021-01-19 23:17:20 -05:00
Bert Belder
b0132e8f90
fix(cli): actually stabilize Deno.shutdown() ( #9181 )
2021-01-19 20:11:08 -08:00
Ryan Dahl
9312d48e69
upgrade: rusty_v8 0.16.0, v8 8.9.255.3 ( #9180 )
2021-01-19 18:40:30 -08:00
Yusuke Tanaka
0ef8c915c0
feat(unstable): add Deno.resolveDns API ( #8790 )
2021-01-19 09:39:04 -05:00
Nayeem Rahman
7db0605d45
fix(op_crates/web): Use WorkerLocation for location in workers ( #9084 )
2021-01-17 16:28:54 +01:00
Bartek Iwańczuk
b26dcbc69d
chore: Enforce ban-untagged-todo lint rule ( #9135 )
2021-01-17 00:32:59 +01:00
Liam Murphy
03bf2fc01f
core(runtime): fix copyright in date ( #9116 )
2021-01-15 13:18:49 +11:00
Yacine Hmito
836e22112a
refactor(op_crates/crypto): Prefix ops with "op_crypto_" ( #9067 )
2021-01-15 01:24:38 +01:00
Kitson Kelly
b8303c7812
refactor(op_crate/fetch): align streams to spec ( #9103 )
...
Fixes #8814
2021-01-15 08:57:19 +11:00
Steven Guerrero
2d1208556a
fix: don't swallow customInspect exceptions ( #9095 )
2021-01-14 14:18:51 -05:00
Bert Belder
979d71c883
refactor: make Process#kill() throw sensible errors on Windows ( #9111 )
...
Previously, calling `Process#kill()` after the process had exited would
sometimes throw a `TypeError` on Windows. After this patch, it will
throw `NotFound` instead, just like other platforms.
This patch also fixes flakiness of the `runKillAfterStatus` test on
Windows.
2021-01-14 10:26:59 -08:00
Ryan Dahl
8fc29f224d
release crates
2021-01-13 14:00:13 -05:00
Ben Noordhuis
ef0bbbbeaf
feat(runtime/tls): add global tls session cache ( #8877 )
...
Fixes #8875
2021-01-12 16:22:33 -08:00
Bartek Iwańczuk
8142496c57
feat: stabilize Deno.shutdown() and Conn#closeWrite()
...
Closes: #9099
2021-01-12 16:17:31 -08:00
Yoshiya Hinosawa
fd56fa89f3
fix(cli): dispatch unload on exit ( #9088 )
2021-01-12 05:32:58 -05:00
Yoshiya Hinosawa
f18ae461a8
chore: update copyright year ( #9094 )
2021-01-11 23:51:10 -08:00