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

3395 commits

Author SHA1 Message Date
Justin Chase
02c74fb709
feat(tls): Optionally support loading native certs (#11491)
This commit adds "DENO_TLS_CA_STORE" env variable to support 
optionally loading certificates from the users local certificate store. 
This will allow them to successfully connect via tls with corporate 
and self signed certs provided they have them installed in their keystore. 
It also allows them to deal with revoked certs by simply updating 
their keystore without having to upgrade Deno.

Currently supported values are "mozilla", "system" or empty value.
2021-08-07 14:49:38 +02:00
David Sherret
fddeb4cea2
chore: fix repl_with_eval_flag test (#11603) 2021-08-06 18:09:19 -04:00
David Sherret
864ce6e832
feat(repl): add --eval flag for evaluating code when the repl starts (#11590) 2021-08-06 17:30:28 -04:00
Elias Sjögreen
33c8d790c3
feat: ffi to replace plugins (#11152)
This commit removes implementation of "native plugins" and replaces
it with FFI API.

Effectively "Deno.openPlugin" API was replaced with "Deno.dlopen" API.
2021-08-06 23:28:10 +02:00
Bartek Iwańczuk
0d1a522a03
revert: allow URL for permissions (#11600)
Revert changes to "net" permissions in regards to handling URLs 
introduced in 15b0e61de.
2021-08-06 21:10:04 +02:00
Benjamin Gruenbaum
2b53602d3c
feat: support AbortSignal in writeFile (#11568) 2021-08-06 10:21:29 -07:00
David Sherret
466d3df9d1
refactor: make ParsedModule implement Sync (#11581) 2021-08-06 10:36:16 -04:00
David Sherret
e9ddc7a41a
feat(repl): support exports in the REPL (#11592) 2021-08-06 09:37:24 -04:00
Leo K
15b0e61de5
feat(runtime): allow URL for permissions (#11578) 2021-08-06 15:04:00 +02:00
Jean Pierre
728d205d9d
feat(lsp): implement refactoring code actions (#11555)
Closes: denoland/vscode_deno#433
2021-08-06 11:46:32 +10:00
Leo K
3f0cf9619f
refactor(cli/tests): remove unnecessary void return types (#11577) 2021-08-05 13:08:58 +02:00
David Sherret
299c7cfe54
feat(fmt): format top-level JSX elements/fragments with parens when multi-line (#11582) 2021-08-04 23:17:32 -04:00
David Sherret
fcaf8cd8e3
chore: refactor netHangsOnClose test to not use deferred (#11585) 2021-08-04 19:45:10 -04:00
Leo K
2ac031d6fd
feat(unstable): clean environmental variables for subprocess (#11571)
This commit adds "Deno.RunOptions.clearEnv" option, that allows
to clear environmental variables from parent process before spawning
a subprocess.
2021-08-04 21:47:43 +02:00
David Sherret
1cd95dd8b5
chore: surface import map JSON parse error to user (#11573) 2021-08-03 15:29:12 -04:00
David Sherret
d7d452efc1
chore: format toml files internally (#11563) 2021-08-02 10:19:27 -04:00
Bartek Iwańczuk
505d253436
Revert "fix(extensions/fetch): Add Origin header to outgoing requests for fetch (#11557)" (#11565)
This reverts commit f87aa44d94.
2021-08-02 15:56:52 +02:00
Bartek Iwańczuk
3a2e94492b
feat: stabilize Deno.serveHttp() (#11544)
This commit moves "Deno.serveHttp()" and related types
to stable namespace.
2021-08-02 14:40:46 +02:00
Feng Yu
f87aa44d94
fix(extensions/fetch): Add Origin header to outgoing requests for fetch (#11557) 2021-08-02 02:19:21 -07:00
David Sherret
ecb4c9492f
chore: fix failing netTcpListenCloseWhileIterating test on some machines (#11552) 2021-07-31 21:10:19 -04:00
David Sherret
a13db3650e
fix(lsp): do not output to stderr before exiting the process (#11562) 2021-07-31 21:05:09 -04:00
Yusuke Tanaka
8f00b5542c
chore: upgrade Rust to 1.54.0 (#11554) 2021-07-30 15:03:41 +02:00
Divy Srivastava
2b13bb6945
feat(runtime): implement navigator.hardwareConcurrency (#11448)
This commit implements "navigator.hardwareConcurrency" API, which
supersedes "Deno.systemCpuInfo()" API (which was removed in this commit).
2021-07-29 21:45:11 +02:00
David Sherret
eece46f0d8
fix: support windows file specifiers with import maps (#11551) 2021-07-29 15:20:34 -04:00
Casper Beyer
c276b52828
feat: type check codeblocks in Markdown file with "deno test --doc" (#11421) 2021-07-29 21:03:06 +02:00
Satya Rohith
d0ec29b493
chore: release deno_fetch (#11549) 2021-07-29 21:59:44 +05:30
Feng Yu
935083d99a
fix(cli): deno doc panics on invalid url (#11536) 2021-07-29 04:07:25 -07:00
Nayeem Rahman
42afbed053
BREAKING(unstable): Rename Deno.WebSocketUpgrade::websocket to socket (#11542) 2021-07-28 13:13:14 +02:00
Bartek Iwańczuk
c198535caf
fix: flaky worker test (#11540) 2021-07-28 13:12:45 +02:00
Kitson Kelly
667b026798
feat(lsp): ability to set DENO_DIR via settings (#11527)
Ref: denoland/vscode_deno#287
2021-07-28 07:25:09 +10:00
Yasser A.Idrissi
fd0b24b246
test(cli): add test for deno test --shuffle (#11523) 2021-07-27 20:18:16 +02:00
Bartek Iwańczuk
f47c550100
test: make integration::workers::workers test inspectable (#11524) 2021-07-27 02:11:38 +02:00
Kitson Kelly
c6f4e41529
refactor(lsp): minor improvements to handling closed documents (#11518)
Ref #10897
2021-07-27 07:40:12 +10:00
Liam Murphy
091a26104b
fix(cli/dts): Type Deno.errors.* as subclasses of Error (#10702) 2021-07-26 20:40:24 +02:00
Casper Beyer
2e69d2135a
feat(cli/tools/test): imply media type from doc attribute (#11438) 2021-07-26 19:48:35 +02:00
Bartek Iwańczuk
dfba7a2b01
v1.12.2 2021-07-26 16:38:27 +02:00
Bartek Iwańczuk
f9bb7949b8
chore: release crates (#11519) 2021-07-26 15:45:40 +02:00
Casper Beyer
b2fcd3d014
fix(cli): side-load test modules (#11515)
This fixes a regression introduced in 1.9 where test modules became main
modules by side loading them in a generated module.
2021-07-26 14:05:44 +02:00
Kitson Kelly
72ac9c3ae0
fix(lsp): handle importmaps properly (#11496)
Fixes: #11146
Fixes: #11456
Fixes: #10439
2021-07-25 15:33:42 +10:00
Pavel Hrách
74c7559d20
fix(http): support multiple options in connection header for websocket (#11505)
Fixes #11494
2021-07-24 12:14:03 +10:00
Luca Casonato
28f2f02b7a
feat: add --enable-testing-features-do-not-use (#11499)
This flag does nothing yet. It is added in preparation for the addition
of classic workers.
2021-07-23 16:31:16 +02:00
Luca Casonato
8b34f07bb0
fix(http/ws): case insensitive connection header (#11489)
The "connection" header should be case insensitive:
https://datatracker.ietf.org/doc/html/rfc7230#section-6.1
2021-07-22 14:28:55 +02:00
Casper Beyer
4861b13aab
fix(cli): normalize test command errors (#11375) 2021-07-22 13:34:29 +02:00
Luca Casonato
78fc9a4c60
fix: support --cert flag for tls connect APIs (#11484) 2021-07-22 12:28:46 +02:00
Kitson Kelly
7d151efc68
fix(cli): info now displays type reference deps (#11478)
Fixes #11476
2021-07-22 15:34:28 +10:00
Kitson Kelly
bdc53b45b7
fix(lsp): do not populate maybe_type slot with import type dep (#11477)
Fixes: #11458
Fixes: #11461
Closes: denoland/vscode_deno#414
2021-07-22 15:00:45 +10:00
Bert Belder
63546c15bf fix(cli): rebuild when environment variables change (#11471) 2021-07-20 19:06:40 -07:00
Kitson Kelly
c34fef4b71
feat(lsp): add workspace config to status page (#11459) 2021-07-21 11:50:43 +10:00
Luca Casonato
a2512de95f
fix: close fetch response body on GC (#11467)
This commit fixes fetch response bodies to be automatically closed if
the `Response.body` readable stream goes out of scope and is GC'ed.
2021-07-20 21:06:24 +02:00
Bartek Iwańczuk
9b9becf1ae
fix: panic for non-WS connections to inspector (#11466) 2021-07-20 15:41:36 +02:00
Yoshiya Hinosawa
65a1724acb
test(cli): add test case for 'deno test --watch' (#11434) 2021-07-20 18:29:17 +09:00
Luca Casonato
55632266e9
tests: re-enable disabled Response.formData test (#11453) 2021-07-20 00:11:50 +02:00
Bartek Iwańczuk
7d69f06db8
v1.12.1 2021-07-19 21:09:07 +02:00
Bartek Iwańczuk
cd445a2a0d
chore: release crates (#11454) 2021-07-19 20:20:42 +02:00
Ayato Tokubi
af4912ed0d
fix(repl): output error without hanging when input is invalid (#11426) 2021-07-19 05:38:13 -07:00
Kitson Kelly
07eb44e483
fix(tsc): add .at() types manually to tsc (#11443)
Fixes: #11441
2021-07-19 11:56:14 +10:00
Casper Beyer
3d3bb1e65c
fix(cli): re-enable --watch flag for test (#11433) 2021-07-18 17:55:25 +09:00
Casper Beyer
e0e26b4101
fix(cli): add help description for test --jobs option (#11415) 2021-07-17 18:27:37 -04:00
Andreu Botella
240545282a
fix(workers): silently ignore non-existent worker IDs (#11417)
Fixes #11416
2021-07-17 08:51:06 +10:00
Luca Casonato
91bbd1a6d5
fix(ext/http): correctly concat cookie headers (#11422)
Cookie headers should not be concatenated by commas, rather by
semicolons.
2021-07-16 16:31:16 +02:00
Casper Beyer
2e57476fbb
fix(cli): return error from coverage_command (#11411) 2021-07-15 18:28:14 +02:00
David Sherret
79ac050d29
chore: upgrade to swc 0.46 (#11402) 2021-07-14 21:28:01 -04:00
Casper Beyer
69ca44d8e2
refactor(cli/tools/test_runner): split reporter into distinct stages (#11395)
This splits up the reporter into smaller functions, one for each
distinct event that happens during the testing process.
2021-07-14 21:05:16 +02:00
Ayato Tokubi
6ce2a089a8
chore(repl): fix integration test input to not throw parse errors (#11401) 2021-07-14 14:41:24 -04:00
Casper Beyer
844910e44f
test(cli): ensure clear timeout doesn't trigger sanitizers (#11396) 2021-07-14 19:47:47 +02:00
Casper Beyer
56635d3b52
refactor(cli/tools/test_runner): make test reporters stateless (#11357)
This collects summary information in the event collector and 
passes it to the reporter instead of having this embedded in 
each reporter which leads to a lot of duplication.
2021-07-14 00:11:58 +02:00
Bartek Iwańczuk
1ad6575028
v1.12.0 2021-07-13 10:45:17 +02:00
Bartek Iwańczuk
642dd3d3c4
chore: release crates (#11378) 2021-07-13 02:16:49 +02:00
Luca Casonato
9c020d8c27
upgrade: deno_lint 0.10.0 (#11374) 2021-07-13 00:04:44 +02:00
Luca Casonato
51e0bfda3c
chore(runtime): deprecate Deno.copy (#11369) 2021-07-12 19:44:42 +02:00
Divy Srivastava
00484d24ba
feat(extensions/crypto): implement verify() for RSA (#11312) 2021-07-12 14:45:36 +02:00
Bartek Iwańczuk
e95c0c85fa
fix: non-existent field in cli/flags.rs (#11368) 2021-07-12 14:22:33 +02:00
Yasser A.Idrissi
32855f2c85
feat: Add support for "deno test --fail-fast=N" (#11316)
This commit adds support for specifying threshold in the "--fail-fast"
flag for "deno test" subcommand. Previously using "--fail-fast" stopped
running the test suite after first failure and with this change users
may specify number of failed tests that will cause the suite to be interrupted.

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2021-07-12 12:55:42 +02:00
Casper Beyer
0bc54a0099
chore(cli/tools/test_runner): inline execute_module rresults (#11358) 2021-07-12 12:46:32 +02:00
Luca Casonato
f649960f87
refactor: deno_http op crate (#11335) 2021-07-12 12:44:49 +02:00
Ryan Dahl
511c48a03a
Revert "Remove unstable native plugins (#10908)"
This reverts commit 7dd4090c2a.
2021-07-11 18:12:26 -07:00
Andreu Botella
eea6000ef6
fix: align DedicatedWorkerGlobalScope event handlers to spec (#11353) 2021-07-10 23:32:10 +02:00
Ryan Dahl
67c9937e66
Revert "feat(cli/tools/test_runner): add terse reporter (#11156)" (#11352)
it's another flag to understand, more code, and isn't something that anyone really needs.

This reverts commit 9d57a4aaeb.
2021-07-10 07:51:30 -07:00
Casper Beyer
9d57a4aaeb
feat(cli/tools/test_runner): add terse reporter (#11156)
This commit adds "--terse" flag to "deno test" that makes testing reporter
output one character per test case instead of one line per case.

This is an unstable feature.
2021-07-10 01:29:18 +02:00
Casper Beyer
9b89668065
fix(cli): make --doc work with --watch (#11183) 2021-07-10 01:15:15 +02:00
Luca Casonato
ab079a8d63
chore: update crates (#11332) 2021-07-09 17:15:50 +02:00
David Sherret
d9c43f7f43
feat(repl): support autocomplete on declarations containing a primitive (#11325) 2021-07-08 12:58:18 -04:00
Bartek Iwańczuk
27e1b4cb5a
feat(core): return v8::Value from JsRuntime::execute_script (#11129)
This commit changes return type of JsRuntime::execute_script to include
v8::Value returned from evaluation.

When embedding deno_core it is sometimes useful to be able to inspect
script evaluation value without the hoops of adding ops to store the
value on the OpState.

v8::Global<v8::Value> is used so consumers don't have to pass
scope themselves.
2021-07-08 18:56:53 +02:00
Casper Beyer
c76c09e335
refactor(cli/tools/coverage): strongly type inspector values (#11326) 2021-07-08 17:53:56 +02:00
David Sherret
5fa58c9216
fix: inspecting prototypes of built-ins with custom inspect implementations should not throw (#11308) 2021-07-08 09:43:36 -04:00
Leo K
5e092b19fe
feat(runtime/http): server side websocket support (#10359)
Co-authored-by: Nayeem Rahman <nayeemrmn99@gmail.com>
Co-authored-by: Luca Casonato <hello@lcas.dev>
2021-07-08 13:33:01 +02:00
Leo K
397c34ca15
fix(cli/tools/upgrade): check if passed version is valid (#11296) 2021-07-07 14:59:39 -04:00
Casper Beyer
f48a3fd194
fix(cli/tools/lint): output json reports to stdout (#11311) 2021-07-07 20:39:24 +02:00
David Sherret
29b9c89312
chore: temporarily disable flaky single_compile_with_reload test (#11320) 2021-07-07 13:52:42 -04:00
Divy Srivastava
a8dcf9e261
fix(extensions/console): left align table entries (#11295) 2021-07-07 08:56:30 -07:00
Divy Srivastava
e3a4e9cf11
fix(crypto): hash input for RSASSA-PKCS1-v1_5 before signing (#11314) 2021-07-07 16:33:58 +02:00
David Sherret
7fc0e8ec8c
chore: use parking_lot for synchronization primitives to align with tokio (#11289)
parking_lot is already transitively used in tokio via the "full" cargo feature
2021-07-06 23:48:01 -04:00
Casper Beyer
78ac19f51f
fix(repl): do not panic when Deno.inspect throws (#11292) 2021-07-06 23:33:06 +02:00
Luca Casonato
bdfad23dd0
feat: support SharedArrayBuffer sharing between workers (#11040)
This commit adds support for sharing SABs between workers.
2021-07-06 19:42:52 +02:00
Divy Srivastava
570309d795
feat(crypto): implement generateKey() and sign() (#9614)
Co-authored-by: Luca Casonato <hello@lcas.dev>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2021-07-06 14:16:04 +02:00
Casper Beyer
e8258e0210
feat(test): add --shuffle flag to randomize test ordering (#11163) 2021-07-05 21:20:33 -04:00
David Sherret
ce3fbb4bd1
chore: add tests for previous assertion error when file contained only triple slash references (#11285) 2021-07-05 15:21:44 -04:00
Bartek Iwańczuk
334cef06e7
chore: upgrade crates (#11284) 2021-07-05 19:48:24 +02:00
Nayeem Rahman
060dd3ae82
fix(core): Delay deadlock detection for dynamic imports (#11282) 2021-07-05 18:59:49 +02:00
Casper Beyer
407de8b834
fix(runtime): ignored tests should not cause permission changes (#11278) 2021-07-05 18:36:43 +02:00
Yusuke Tanaka
0a33cc1951
chore: upgrade Tokio to 1.8.0 (#11281) 2021-07-05 15:50:56 +02:00
Jimmy Wärting
2c0b0e45b7
refactor: asynchronous blob backing store (#10969)
Co-authored-by: Luca Casonato <hello@lcas.dev>
2021-07-05 15:34:37 +02:00
Casper Beyer
ea87d860be
tests: be more liberal with expectation wildcards (#11279) 2021-07-05 14:30:51 +02:00
Leo K
220104f577
fix: spec conformance for performance API (#10887) 2021-07-05 13:17:11 +02:00
Craig Morten
a6c840d150
fix(fetch): OPTIONS should be allowed a non-null body (#11242) 2021-07-05 12:38:12 +02:00
Casper Beyer
c4cc353d59
refactor(runtime): reduce duplication in test harness (#11274) 2021-07-05 10:26:57 +02:00
Bartek Iwańczuk
5addba2abc
refactor: use primordials in runtime/, part2 (#11248) 2021-07-04 00:17:52 +02:00
Andreu Botella
ffa75be480
feat: enable WebAssembly.instantiateStreaming and wasm async compilation (#11200)
The WebAssembly streaming APIs used to be enabled, but used to take
buffer sources as their first argument (see #6154 and #7259). This
change re-enables them, requiring a Promise<Response> instead, as well as
enabling asynchronous compilation of WebAssembly modules.
2021-07-03 23:33:36 +02:00
Bartek Iwańczuk
6137c8046d
refactor: use primordials in runtime/, part1 (#11241) 2021-07-03 16:58:08 +02:00
David Sherret
68b4d60fd7
fix(diff): better handling of text with only line ending differences (#11212)
Additionally fixes:

* It not displaying a diff when one text had a trailing newline and the other didn't.
* Edge case where the line number width could be incorrect if the original text had say 99 lines and the edit text had 100 lines.
2021-07-02 10:16:09 -04:00
Bartek Iwańczuk
7dd4090c2a
Remove unstable native plugins (#10908)
This commit removes implementation of native plugins
alongside the unstable "Deno.openPlugin()" API.
2021-07-02 16:11:23 +02:00
Bartek Iwańczuk
513f921219
feat(core): pump V8 message loop on event loop tick (#11221)
This commit adds support for Atomics and FinalizationRegistry by integrating
V8's message loop into "JsRuntime::poll_event_loop".
2021-07-02 10:46:37 +02:00
Zhangyuan Nie
5648b22fe1
docs(cli/flags): use deno instead of target/debug/deno (#11215) 2021-07-02 10:43:53 +02:00
Luca Casonato
0385a99052
v1.11.3
Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
2021-07-02 00:13:40 +02:00
David Sherret
899470addc
chore: update dprint-plugin-json to remove duplicate dprint-core dependency (#11209) 2021-07-01 11:22:28 -04:00
Luca Casonato
e9e286a56e
upgrade: swc 0.44.0 (#11197) 2021-07-01 11:48:42 +02:00
Luca Casonato
de6e44794b
fix: panic in request body streaming (#11191) 2021-06-30 18:05:58 +02:00
Bert Belder
5db9f627e3
chore: get rid of REPL timeout (#11175)
* Get rid of timeout
* Use tokio channel and reduce calls to run_event_loop

Co-authored-by: David Sherret <dsherret@gmail.com>
2021-06-29 14:39:28 -04:00
Casper Beyer
a0c0daac24
test(cli): harden test runner tests (#11166) 2021-06-29 15:40:16 +02:00
Casper Beyer
96d0582900
fix(cli): pretty print coverage files (#11157) 2021-06-29 03:39:19 +02:00
Bartek Iwańczuk
38a7128cdd
feat: Add "deno_net" extension (#11150)
This commits moves implementation of net related APIs available on "Deno"
namespace to "deno_net" extension.

Following APIs were moved:
- Deno.listen()
- Deno.connect()
- Deno.listenTls()
- Deno.serveHttp()
- Deno.shutdown()
- Deno.resolveDns()
- Deno.listenDatagram()
- Deno.startTls()
- Deno.Conn
- Deno.Listener
- Deno.DatagramConn
2021-06-29 01:43:03 +02:00
Bartek Iwańczuk
30cba24848
chore: release deno_core (#11164) 2021-06-28 20:59:23 +02:00
Bartek Iwańczuk
9e875b2a23
fix(http): remove unwrap() in HTTP bindings (#11130) 2021-06-28 00:19:40 +02:00
David Sherret
098a7c8886
chore: split up integration_tests.rs into separate files (#11131) 2021-06-27 13:27:36 -04:00
Andreu Botella
5bf7da91f1
fix(runtime/http): Encode and decode headers as byte strings in the HTTP server (#11144) 2021-06-27 02:29:01 +02:00
Bartek Iwańczuk
7b9737b9f4
feat(inspector): pipe console messages between terminal and inspector (#11134)
This commit adds support for piping console messages to inspector.

This is done by "wrapping" Deno's console implementation with default
console provided by V8 by the means of "Deno.core.callConsole" binding.

Effectively each call to "console.*" methods calls a method on Deno's
console and V8's console.
2021-06-27 02:27:50 +02:00
Luca Casonato
22e7b0f585
fix: MessagePort in message for postMessage transfers (#11103) 2021-06-26 11:17:05 +02:00
David Sherret
1f4cdc067a
fix(lsp): reload import registries should not error when the module registries directory does not exist (#11123) 2021-06-25 21:44:27 -04:00
David Sherret
5ee6995cf7
chore: move repl integration tests to separate file (#11127) 2021-06-25 19:07:06 -04:00
Luca Casonato
40b083c540
fix: specify AbortSignal for native http requests (#11126) 2021-06-26 00:01:25 +02:00
Ryan Dahl
48f9df9aa2
upgrade: rusty_v8 0.23.0 (V8 9.2.230.12) (#11113) 2021-06-25 12:54:53 +02:00
Yoshiya Hinosawa
d832d2bfd1
chore(ext/console): deprecate Deno.customInspect (#10035)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2021-06-25 16:19:18 +09:00
Yoshiya Hinosawa
606611708c
fix(runtime/signal): use op_async_unref for op_signal_poll (#11097) 2021-06-25 13:15:35 +09:00
Yoshiya Hinosawa
66c5f41c5b
test(cli): refactor the usages of delay (#11098)
This PR refactors the usages of delay utility in js unit testing. The same
utiliy is defined in several places with different names. This PR replaces those
usages with the one provided in std/async/delay.ts to improve the readability
and consistency of test code.
2021-06-25 03:44:14 +02:00
Kitson Kelly
9e51766f3e
feat(lsp): dependency hover information (#11090) 2021-06-25 09:06:51 +10:00
David Sherret
586586b791
fix: make readonly Event properties readonly (#11106) 2021-06-24 14:21:13 -04:00
David Sherret
a2067ec46d
fix(inspect): eliminate panic inspecting event classes (#10979) 2021-06-24 09:43:41 -04:00
David Sherret
4b3845b998
feat(repl): support import declarations in the REPL (#11086) 2021-06-24 09:00:46 -04:00
Kitson Kelly
8ed83cba7e
fix(lsp): handle invalid config setting better (#11104)
Fixes #11100 
Fixes #10808
2021-06-24 22:41:04 +10:00
Bert Belder
e02403bb45
ci: run Linux release builds in sysroot with Ubuntu 18.04 and LLVM (#10920) 2021-06-23 19:36:05 +00:00
David Sherret
477273085f
chore: use lsp to get parent process id (#11083)
Removes the previously added internal `--parent-pid` flag. This solution is better.
2021-06-22 21:48:01 -04:00
Benjamin Gruenbaum
20b0a5125a
feat(core): support AbortSignal in readFile (#10943) 2021-06-22 11:45:26 -04:00
Luca Casonato
6261c89e04
feat: transfer MessagePort between workers (#11076)
Add support for transferring `MessagePort`s between workers.
2021-06-22 16:30:16 +02:00
Yoshiya Hinosawa
4e3ec47857
fix(runtime): fix signal promise API (#11069) 2021-06-22 15:17:44 +09:00
Yusuke Tanaka
097c02f11b
chore: upgrade crates (#11007) 2021-06-22 06:15:32 +02:00
Vladimir Ivanov
cd59601b34
fix(extensions/fetch): Filter out custom HOST headers (#11020)
This commit updates "fetch" API to ignore custom "Host" headers
and return value provided by "reqwest".
2021-06-22 05:42:04 +02:00
Tomofumi Chiba
4f1b1903cf
feat(fetch): add programmatic proxy (#10907)
This commit adds new options to unstable "Deno.createHttpClient" API.

"proxy" and "basicAuth" options were added that allow to use custom proxy
when client instance is passed to "fetch" API.
2021-06-22 05:21:57 +02:00
Charlie Moog
580c9f9ef0
fix(core): don't panic on stdout/stderr write failures in Deno.core.print (#11039) 2021-06-22 04:39:59 +02:00
Muthu Kumar
388274e02e
fix: move stable/unstable types/APIs to their correct places (#10880)
- Moved ppid and memoryUsage types from deno.unstable to deno.ns.
- Moved sleepSync to unstable object, shutdown to stable object.
2021-06-22 03:03:00 +02:00
Casper Beyer
68c519d061
feat(repl): show list completion (#11001) 2021-06-22 02:07:26 +02:00
Bartek Iwańczuk
9105892ec8
refactor: unify JavaScript script execution method (#11043)
This commit renames "JsRuntime::execute" to "JsRuntime::execute_script". Additionally
same renames were applied to methods on "deno_runtime::Worker" and
"deno_runtime::WebWorker".

A new macro was added to "deno_core" called "located_script_name" which
returns the name of Rust file alongside line no and col no of that call site.
This macro is useful in combination with "JsRuntime::execute_script"
and allows to provide accurate place where "one-off" JavaScript scripts
are executed for internal runtime functions.

Co-authored-by: Nayeem Rahman <nayeemrmn99@gmail.com>
2021-06-22 01:45:41 +02:00
Kitson Kelly
a5eb2dfc93
fix(#10761): graph errors reported as diagnostics for Deno.emit() (#10767)
Fixes #10761
2021-06-22 07:27:32 +10:00
Kitson Kelly
281c4cd8fc
feat(cli): support "types" when type checking (#10999)
Fixes #10677
2021-06-22 07:18:32 +10:00
Kitson Kelly
cda15f2a98
feat: Deno namespace configurable and unfrozen (#11062)
Closes #11033
2021-06-22 07:17:35 +10:00
David Sherret
2d2b5625e0
feat(repl): Type stripping in the REPL (#10934) 2021-06-21 15:13:25 -04:00
Luca Casonato
f9ff981daf
feat: MessageChannel and MessagePort (#11051)
This commit introduces support for MessageChannel and MessagePort.
MessagePorts can be transfered across other MessagePorts.
2021-06-21 19:53:52 +02:00
Bartek Iwańczuk
a2f939b99c
refactor(core): always attach inspector to isolate (#11042)
This commit changes "deno_core::JsRuntime" to always create
"deno_core::JsRuntimeInspector" instance.
2021-06-21 19:37:51 +02:00
Bartek Iwańczuk
2c0e482221
v1.11.2 2021-06-21 17:47:25 +02:00
Bartek Iwańczuk
90e3abe8f9
chore: release crates (#11068) 2021-06-21 16:37:34 +02:00
Kitson Kelly
3f5fbea17c
fix: add support for module es2020 to Deno.emit (#11065) 2021-06-21 21:47:09 +10:00
Satya Rohith
952caa79b3
feat(lsp): quick fix actions to ignore lint errors (#10627)
Closes #10122
2021-06-21 16:43:35 +10:00
David Sherret
60071c941b
fix(lsp): do not rename in strings and comments (#11041) 2021-06-19 11:23:50 -04:00
Nayeem Rahman
2ea41d3ac1
fix(core/modules): Prepare modules only once per runtime (#11015)
This commit changes module loading implementation in "deno_core"
to call "ModuleLoader::prepare" hook only once per entry point.

This is done to avoid multiple type checking of the same code
in case of duplicated dynamic imports.

Relevant code in "cli/module_graph.rs" was updated as well.
2021-06-19 16:14:43 +02:00
Yusuke Tanaka
b0c04a7941
chore: upgrade Tokio to 1.7.1 (#11045) 2021-06-19 15:37:07 +02:00
Bartek Iwańczuk
a8e4fc15e5
fix: Worker accepts specifier as URL (#11038)
This commit updates type declarations for Worker to accept specifiers
as either strings or URL, bringing it in line with TypeScript
declarations and browser behavior.
2021-06-18 21:34:51 +02:00
David Sherret
419fe2e6b4
chore: fix new linting errors flagged by Rust 1.53 (#11029) 2021-06-17 21:48:16 -04:00
David Sherret
aecf989d43
chore(lsp): add --parent-pid <pid> flag (#11023)
This commit adds a new `--parent-pid <pid>` flag to `deno lsp` that when provided starts a task that checks for the existence of the provided process id (ex. vscode's) every 30 seconds. If the process doesn't exist (meaning the deno process has nothing interacting with it), then it terminates itself.
2021-06-17 19:57:58 -04:00
Yusuke Tanaka
8031644e65
chore: upgrade Rust to 1.53.0 (#11021) 2021-06-17 15:56:30 -04:00
Yusuke Tanaka
a8007059b7
chore: upgrade Tokio to 1.7.0 (#11008) 2021-06-16 16:39:51 +02:00
Bartek Iwańczuk
d7ce3adc8b
v1.11.1 2021-06-15 23:28:27 +02:00
Bartek Iwańczuk
ba91a727a6
chore: release crates (#10976) 2021-06-15 22:14:58 +02:00
David Sherret
984b8bf0c8
fix(inspector): Deno.inspect should inspect the object the proxy represents rather than the target of the proxy (#10977) 2021-06-15 15:33:13 -04:00
Ryan Dahl
9c42b5e03b
Remove various unnecessary allow(clippy) declarations (#10971) 2021-06-15 19:22:28 +02:00
David Sherret
b4026dac9c
fix(repl): Complete declarations (#10963) 2021-06-15 09:31:36 -04:00
Kitson Kelly
1eac527adb
fix(cli): improve worker types (#10965) 2021-06-15 11:16:06 +10:00
Yusuke Tanaka
f4728e26fe
chore: upgrade swc_ecmascript (#10959) 2021-06-14 22:25:33 +02:00
Bartek Iwańczuk
1246a433f8
fix: poll connection after writing response chunk in Deno.serveHttp() (#10961)
This commit changes "op_http_response_write" to first send response chunk
and then poll the underlying HTTP connection.

Previously after writing a chunk of response HTTP connection wasn't polled
and thus data wasn't written to the socket until after next op interacting 
with the connection.
2021-06-14 22:10:55 +02:00
Bartek Iwańczuk
1e1959f6fa
fix: hang in Deno.serveHttp() (#10923)
Waiting on next request in Deno.serveHttp() API hanged
when responses were using ReadableStream. This was caused
by op_http_request_next op that was never woken after
response was fully written. This commit adds waker field to
DenoService which is called after response is finished.
2021-06-14 14:52:49 +02:00
Edward Bebbington
a6f1edd953
docs(unstable/emit): Note that for emit, Deno.formatDiagnostics can be used (#10925) 2021-06-11 19:42:43 -04:00
David Sherret
1a92c39b77
refactor(ast): Change AST parsing error to return struct with message and location (#10911)
* Remove unused check js emit option.
* Improve parse error.
* Format.
2021-06-11 09:03:42 -04:00
David Sherret
9d706d71b5
chore: Fix broken test on Windows (#10900) 2021-06-10 12:35:38 -04:00
David Sherret
26a97a1f3b
chore(tests): Kill orphaned deno processes spawned during the tests (#10922) 2021-06-10 10:38:03 -04:00
Bartek Iwańczuk
fe11495920
refactor: use join instead of format! (#10921) 2021-06-10 16:18:13 +02:00
Bartek Iwańczuk
6091ea098a
refactor: merge deno_file crate into deno_web (#10914)
This refactor makes it so there's one less crate to publish on each release.
2021-06-10 15:26:10 +02:00
David Sherret
67690b78bd
refactor(repl): Extract out structs for internal REPL code (#10915)
* Extract out ReplEditor.
* Extract out ReplSession.
* Move PRELUDE declaration up.
2021-06-09 19:07:50 -04:00
Kitson Kelly
e779ea9565
fix(runtime): early binding to dispatchEvent in workers (#10904) 2021-06-09 22:21:02 +10:00
Kitson Kelly
6b826033a4
feat(lsp): add additional logging information (#10890) 2021-06-09 10:00:26 +10:00
Bartek Iwańczuk
b98293e21c
v1.11.0 2021-06-08 21:38:36 +02:00
Bartek Iwańczuk
3a96fe55a0
chore: release crates (#10896) 2021-06-08 20:34:18 +02:00
Bartek Iwańczuk
d9df4347a1
chore: upgrade deno_lint 0.6.1 (#10882) 2021-06-07 17:44:31 +02:00
Divy Srivastava
89290741d1
feat(compile): Initialize runtime_compiler ops for standalone binaries (#10052) 2021-06-07 14:02:53 +02:00
Kitson Kelly
3b3be024fa
feat(lsp): add test code lens (#10874)
Ref #8643
2021-06-07 21:38:07 +10:00
Kitson Kelly
d6f6e157bd
tests(lsp): fix flakey lsp integration test (#10875) 2021-06-07 19:12:07 +10:00
Bartek Iwańczuk
3b220c64f6
chore: upgrade crates (#10867)
* deno_doc - 0.5.0
* deno_lint - 0.6.0
* dprint-plugin-typescript - 0.46.0
* dprint-plugin-markdown - 0.8.0
* dprint-plugin-json - 0.12.0
* swc_bundler - 0.37.4
* swc_ecmascript - 0.36.0
2021-06-06 18:42:12 +02:00
jeiea
633c5aab1f
fix(#10747): cannot read config option in windows (#10791)
Fixes #10747
2021-06-06 15:00:17 +10:00
Luca Casonato
c73ef5fa14
refactor(web): use encoding_rs for text encoding (#10844)
This commit removes all JS based text encoding / text decoding. Instead
encoding now happens in Rust via encoding_rs (already in tree). This
implementation retains stream support, but adds the last missing
encodings. We are incredibly close to 100% WPT on text encoding now.

This should reduce our baseline heap by quite a bit.
2021-06-05 23:10:07 +02:00
Divy Srivastava
e67010b5e2
feat(cli/compile): Support data uri dynamic imports in deno compile (#9936) 2021-06-05 16:24:17 +02:00
Bartek Iwańczuk
1d070f3d47
feat: make 'deno lint' stable (#10851) 2021-06-05 15:57:31 +02:00
Kitson Kelly
e8be116ab6
fix(lsp): refactor, fix issues and add benchmark for code lens (#10841) 2021-06-05 07:31:44 +10:00
Bartek Iwańczuk
5457e741fa
fix: hang in op_http_next_request (#10836)
This commit adds "CancelHandle" to "ConnResource" and changes
"op_http_next_request" to await for the cancel signal. In turn
when async iterating over "Deno.HttpConn" the iterator breaks
upon closing of the resource.
2021-06-04 01:32:36 +02:00
Yusuke Tanaka
41e9a21307
fix(cli): output json with trailing newline character (#10830) 2021-06-03 20:49:02 +02:00
Casper Beyer
55e962b688
feat(cli): support URL overload for Deno.chdir (#10793) 2021-06-03 16:32:18 +02:00
Casper Beyer
ece56d9935
feat(runtime): support URL overloads for Deno.symlink and Deno.symlinkSync (#10664) 2021-06-03 16:16:00 +02:00
Casper Beyer
dc69b03339
feat(runtime): support URL overloads for Deno.rename/Deno.renameSync (#10512) 2021-06-03 16:14:37 +02:00
Kitson Kelly
844a1317ec
fix(#10775): diagnostics update on dependency changes (#10817)
Fixes #10775
2021-06-03 21:13:53 +10:00
Kitson Kelly
473713c621
fix(#10815): lsp only responds to formatting for md, json, jsonc (#10816)
Fixes #10815
2021-06-02 20:29:58 +10:00
Kitson Kelly
bb5bf91067
feat(lsp): registry auto discovery (#10813)
Closes: #10194
Fixes: #10468
2021-06-01 21:53:08 +10:00
Kitson Kelly
9abb899f5f
fix(lsp): updates to workspace config are processed sync (#10812) 2021-06-01 19:24:36 +10:00
Nayeem Rahman
6dd7a7ecd9
fix(cli): represent bare imports as module graph error slots (#10804)
Fixes #10795
2021-06-01 16:45:37 +10:00
Yoshiya Hinosawa
595700c993
feat: add FsWatcher interface (#10798) 2021-06-01 15:35:06 +09:00
Bert Belder
f891368057 v1.10.3 / 2021.05.31
- feat(lsp): diagnostics for deno types and triple-slash refs (#10699)
 - feat(lsp): provide X-Deno-Warning as a diagnostic (#10680)
 - feat(lsp): show hints from `deno_lint` in addition to messages
   (#10739)
 - feat(lsp): support formatting json and markdown files (#10180)
 - fix(cli): always allow documentation modules to be checked (#10581)
 - fix(cli): canonicalize coverage dir (#10364)
 - fix(cli): don't statically error on dynamic unmapped bare specifiers
   (#10618)
 - fix(cli): empty tsconfig.json file does not cause error (#10734)
 - fix(cli): support source maps with Deno.emit() and bundle (#10510)
 - fix(cli/dts): fix missing error class (NotSupported) in types (#10713)
 - fix(cli/install): support `file:` scheme URLs (#10562)
 - fix(cli/test): don't use reserved symbol `:` in specifier (#10751)
 - fix(cli/test): ensure coverage dir exists (#10717)
 - fix(cli/upgrade): modify download size paddings (#10639)
 - fix(runtime/http): expose nextRequest() errors in respondWith()
   (#10384)
 - fix(runtime/http): fix empty blob response (#10689)
 - fix(serde_v8): remove intentional deserialization error on non-utf8
   strings (#10156)
 - fix(ext/fetch): fix error message of Request constructor (#10772)
 - fix(ext/fetch): make prototype properties writable (#10769)
 - fix(ext/fetch): remove unimplemented Request attributes (#10784)
 - fix(ext/file): update File constructor following the spec (#10760)
 - fix(ext/webstorage): use opstate for sqlite connection (#10692)
 - fix(lsp): deps diagnostics include data property (#10696)
 - fix(lsp): ignore type definition not found diagnostic (#10610)
 - fix(lsp): local module import added by code action now includes the
   file extension (#10778)
 - fix(lsp): make failed to load config error descriptive (#10685)
 - fix(lsp): memoize script versions per tsc request (#10601)
 - fix(lsp): re-enable the per resource configuration without a deadlock
   (#10625)
 - docs(cli): update getting started for clarity (#10694)
 - docs(cli/dts) replace `read()` with `readSync()` (#10732)
 - docs(cli/dts): fix plugin example (#10647)
 - docs(cli/dts): fix typo in `TestDefinition.only` description (#10697)
 - docs(cli/dts): fix unix socket examples (#10705)
 - docs(cli/dts): make worker example pass (#10703)
 - docs(cli/dts): tag test permission example as typescript (#10753)
 - docs(permissions): fix grammatical error in permissions docs (#10755)
 - docs(runtime): fix fetch API usage of HTTP server (#10777)
 - docs(testing): fix misspelling (#10683)
 - docs(typescript): fix typo in faqs (#10682)
 -----BEGIN PGP SIGNATURE-----
 
 iQFJBAABCgAzFiEERCcr7u+ib5W/fkyWeneIey4u1GEFAmC1RbwVHGJlcnRiZWxk
 ZXJAZ21haWwuY29tAAoJEHp3iHsuLtRhXJsH/RETkMkLj1rZSdQWaOdVnRmP02pb
 QmbmtfPVtM0Xvh+zL23Jk2fU2cJPRsf71U260QMyzxE8LVDZ58k9KFID24MdB3b/
 J6Y5zLxyhkzc1EutN+D09y2nwrvJv3UKOls2ZLXtZ/HEmqQVOmqlGIaPIGxiQOPO
 yAWXKXid/hZ41xDygJpL6FEmemnVlOzPHX/AeccKcyQos7CUUqcNocReUklZcje6
 1IEEe6NcAi7x7hRB6lfjtXIZRcEjMD21ZmLsyKEH6YOJfoPzlR0uKYJR0i0ZO5Hr
 H4erWA9R3OJDwvx5DhCGxyqW6IuD4A3HGChHtcANdH+RWTyHquqgDSzpeHA=
 =Hhjk
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQFJBAABCgAzFiEERCcr7u+ib5W/fkyWeneIey4u1GEFAmC1TdsVHGJlcnRiZWxk
 ZXJAZ21haWwuY29tAAoJEHp3iHsuLtRhYVEH/iHbk8AXA5xF8kV+q2R0IhRrtZjV
 8VjDiC1nTGfIJcjXxoUVa1VaYQlfxNxcKPc/PSoW/oUwSoS0I9QvAxPY81dPYNUe
 TtiJjf7fNWssu04TK/5rillRuag3e+AGrR605uK2A1b0Y/qlOumtaGN48TXcbyFt
 p/p4zXT9TSC+/cOxZFNjnh+UVwpqOJxWxXBBtzrsDcsBfdvOCy/fo7qwjmqbe/q4
 BDXNAG4AYHtg5X94b8bEgPDutUjk5HY08KA0EvVffGD0c3czvaF3lO7p8FHt95/3
 rG+hS02OxUWRe8rltZk6s1mItypig4EyWWoiUJMaPt8zTz1t9rdy+M0oEpY=
 =bAil
 -----END PGP SIGNATURE-----

Merge v1.10.3 into main (#10801)
2021-05-31 20:58:03 +00:00
Bert Belder
1567c1013c
v1.10.3 2021-05-31 20:20:42 +00:00
Casper Beyer
330cd6b7ea
feat(cli): support URL overloads for Deno.utime and Deno.utimeSync (#10792) 2021-05-31 20:05:57 +02:00
Bartek Iwańczuk
ea2c7ac556
fix: running subcommand with coverage collection (#10802) 2021-05-31 16:53:49 +02:00
Nayeem Rahman
8a7e1c616d
fix(cli): Don't statically error on dynamic unmapped bare specifiers (#10618)
Fixes #10168
Fixes #10615
Fixes #10616
2021-05-31 16:37:36 +02:00
Kitson Kelly
925ba8fbbf
fix(#10765): lsp import fixes include extensions (#10778)
Fixes #10765
2021-05-31 16:37:36 +02:00
Yusuke Tanaka
475bc35646
chore: upgrade Tokio to 1.6.1 (#10782) 2021-05-31 16:37:35 +02:00
Romain Prignon
cf6b764a35
fix(#10733): empty tsconfig.json file does not cause error (#10734)
Fixes #10733
2021-05-31 16:37:35 +02:00
Luca Casonato
379d40955a
fix(fetch): make prototype properties writable (#10769) 2021-05-31 16:37:34 +02:00
Yusuke Tanaka
8a19f28a00
feat(lsp): show hints from deno_lint in addition to messages (#10739) 2021-05-31 16:37:34 +02:00
Yoshiya Hinosawa
323fa5272d
fix(extension/file): update File constructor following the spec (#10760) 2021-05-31 16:37:34 +02:00
Casper Beyer
620a2e0f84
docs(cli/dts): tag test permission example as typescript (#10753) 2021-05-31 16:37:33 +02:00
Kitson Kelly
6bbefdff39
feat(lsp): diagnostics for deno types and triple-slash refs (#10699)
Fixes #9823
2021-05-31 16:37:33 +02:00
Casper Beyer
7b6bba5d3a
fix(cli/test): don't use reserved symbol : in specifier (#10751) 2021-05-31 16:37:33 +02:00
CGQAQ
43417b4660
fix(cli/upgrade): modify download size paddings (#10639) 2021-05-31 16:37:33 +02:00
迷渡
859a88ba44
fix(docs): rename read to readSync (#10732)
Signed-off-by: 迷渡 <justjavac@gmail.com>
2021-05-31 16:37:33 +02:00
Yoshiya Hinosawa
195808a538
fix(test): ensure coverage dir exists (#10717) 2021-05-31 16:37:32 +02:00
Yoshiya Hinosawa
7b1fd3d146
fix(runtime/http): fix empty blob response (#10689) 2021-05-31 16:37:32 +02:00
Kitson Kelly
25b784f00d
chore(lsp): provide test for lsp deadlock issue (#10679)
Resolves: #10587
2021-05-31 16:37:32 +02:00
Casper Beyer
47ec33eca7
fix(cli/tools/test_runner): --doc should not require permissions (#10719) 2021-05-31 16:37:32 +02:00
Kitson Kelly
176075980b
fix(lsp): re-enable the per resource configuration without a deadlock (#10625)
Fixes #10603
2021-05-31 16:37:32 +02:00
Carter Snook
67cf683aad
fix(cli/dts): fix missing error class (NotSupported) in types (#10713) 2021-05-31 16:37:32 +02:00
Casper Beyer
2fe4aaa10d
fix(cli): always allow documentation modules to be checked (#10581) 2021-05-31 16:37:31 +02:00
Casper Beyer
3df9f41dfd
test(cli/dts): typecheck examples in declaration files (#10707)
This commits adds two integration tests that typecheck examples
in the docstrings in Deno declaration files.
2021-05-31 16:37:31 +02:00
Casper Beyer
8a512b99c9
fix(cli/tools/test_runner): use file_fetcher.fetch to get sources (#10708) 2021-05-31 16:37:30 +02:00
Casper Beyer
2e9bd3e295
fix(cli): canonicalize coverage dir (#10364) 2021-05-31 16:37:30 +02:00
Casper Beyer
736ff290b8
docs(cli/dts): fix plugin example (#10647) 2021-05-31 16:37:30 +02:00
Nayeem Rahman
218ba031f0
fix(runtime/http): expose nextRequest() errors in respondWith() (#10384) 2021-05-31 16:37:30 +02:00
Kitson Kelly
6ef64b9fce
fix(#10695): deps diagnostics include data property (#10696)
Fixes #10695
2021-05-31 16:37:30 +02:00
Casper Beyer
073e05f9fb
docs(cli/dts): make worker example pass (#10703) 2021-05-31 16:37:29 +02:00
Casper Beyer
736b736479
docs: fix unix socket examples (#10705) 2021-05-31 16:37:29 +02:00
Satya Rohith
7a751b8135
fix(deno install): support file: scheme URLs (#10562) 2021-05-31 16:37:29 +02:00
Casper Beyer
44cd0b1ef6
docs(cli/dts): fix typo in TestDefinition.only description (#10697) 2021-05-31 16:37:29 +02:00
Satya Rohith
4fedc702c6
fix(runtime): support source maps with Deno.emit() and bundle (#10510)
Closes: #10413
2021-05-31 16:37:29 +02:00
Satya Rohith
913d4f28b3
fix(lsp): make failed to load config error descriptive (#10685) 2021-05-31 16:37:28 +02:00
Yusuke Tanaka
22426fee1e
chore: update deno_lint binary used in CI to v0.5.0 (#10652) 2021-05-31 16:37:28 +02:00
Kitson Kelly
d987ca5b07
feat(lsp): provide X-Deno-Warning as a diagnostic (#10680)
Closes #9932
2021-05-31 16:37:28 +02:00
Satya Rohith
6966c4e916
feat(lsp): support formatting json and markdown files (#10180)
Resolves #9447
Resolves #9415
2021-05-31 16:37:28 +02:00
Satya Rohith
a622486a1a
fix(lsp): ignore type definition not found diagnostic (#10610)
Fixes #10575
2021-05-31 16:37:27 +02:00
Kitson Kelly
ef6d69c314
refactor(lsp): memoize script versions per tsc request (#10601) 2021-05-31 16:37:27 +02:00
Kitson Kelly
96abb27e73
refactor: share test harness for lsp between bench and integration (#10659) 2021-05-31 16:37:27 +02:00
Nayeem Rahman
3a33510bd4
fix(cli): Don't statically error on dynamic unmapped bare specifiers (#10618)
Fixes #10168
Fixes #10615
Fixes #10616
2021-05-31 10:20:34 +10:00
Luca Casonato
83ce333633
build: cli(build) shouldn't depend on deno_runtime (#10787)
This speeds up incremental rebuild when only touching JS files by 30%
compared to #10786.

Rebuild time after touch 01_broadcast_channel.js:

main: run 1 49.18s, run 2 50.34s
#10786: run 1 43.12s, run 2 43.19s
this + #10786: run 1 30.30s, run 2 30.95s
2021-05-29 16:25:14 +02:00
Kitson Kelly
bbefceddb9
fix(#10765): lsp import fixes include extensions (#10778)
Fixes #10765
2021-05-29 21:21:11 +10:00
Yusuke Tanaka
5f92f35bee
chore: upgrade Tokio to 1.6.1 (#10782) 2021-05-29 13:18:24 +02:00
Kitson Kelly
59237d195f
feat(cli): upgrade to TypeScript 4.3 (#9960) 2021-05-28 09:33:11 +10:00
Romain Prignon
3468e1fcf8
fix(#10733): empty tsconfig.json file does not cause error (#10734)
Fixes #10733
2021-05-27 16:33:33 +10:00
crowlKats
b21fa78a1e
feat(cli): add origin data dir to deno info (#10589)
Co-authored-by: Nayeem Rahman <nayeemrmn99@gmail.com>
Co-authored-by: Luca Casonato <lucacasonato@yahoo.com>
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2021-05-27 14:23:12 +09:00
Luca Casonato
d5d59bb794
fix(fetch): make prototype properties writable (#10769) 2021-05-26 23:44:42 +02:00
Bartek Iwańczuk
e5beb800c9
refactor: move JsRuntimeInspector to deno_core (#10763)
This commit moves implementation of "JsRuntimeInspector" to "deno_core" crate.

To achieve that following changes were made:

* "Worker" and "WebWorker" no longer own instance of "JsRuntimeInspector",
instead it is now owned by "deno_core::JsRuntime".

* Consequently polling of inspector is no longer done in "Worker"/"WebWorker",
instead it's done in "deno_core::JsRuntime::poll_event_loop".

* "deno_core::JsRuntime::poll_event_loop" and "deno_core::JsRuntime::run_event_loop",
now accept "wait_for_inspector" boolean that tells if event loop should still be 
"pending" if there are active inspector sessions - this change fixes the problem 
that inspector disconnects from the frontend and process exits once the code has
stopped executing.
2021-05-26 21:07:12 +02:00
Bartek Iwańczuk
e9edd7e14d
refactor: Rewrite Inspector implementation (#10725)
This commit refactors implementation of inspector.

The intention is to be able to move inspector implementation to "deno_core".

Following things were done to make that possible:

* "runtime/inspector.rs" was split into "runtime/inspector/mod.rs"
and "runtime/inspector/server.rs", separating inspector implementation
from Websocket server implementation.

* "DenoInspector" was renamed to "JsRuntimeInspector" and reference to "server"
was removed from the structure, making it independent of Websocket server
used to connect to Chrome Devtools.

* "WebsocketSession" was renamed to "InspectorSession" and rewritten in such
a way that it's not tied to Websockets anymore; instead it accepts a pair
of "proxy" channel ends that allow to integrate the session with different
"transports".

* "InspectorSession" was renamed to "LocalInspectorSession" to better indicate
that it's an "in-memory" session and doesn't require Websocket server. It was
also rewritten in such a way that it uses "InspectorSession" from previous point
instead of reimplementing "v8::inspector::ChannelImpl" trait; this is done by using
the "proxy" channels to communicate with the V8 session.

Consequently "LocalInspectorSession" is now a frontend to "InspectorSession". This
introduces a small inconvenience that awaiting responses for "LocalInspectorSession" requires
to concurrently poll worker's event loop. This arises from the fact that "InspectorSession"
is now owned by "JsRuntimeInspector", which in turn is owned by "Worker" or "WebWorker".
To ease this situation "Worker::with_event_loop" helper method was added, that takes
a future and concurrently polls it along with the event loop (using "tokio::select!" macro
inside a loop).
2021-05-26 17:47:33 +02:00
Yusuke Tanaka
02a4e7dc7c
feat(lsp): show hints from deno_lint in addition to messages (#10739) 2021-05-26 08:15:09 +10:00
Yoshiya Hinosawa
c8b3f85796
fix(extension/file): update File constructor following the spec (#10760) 2021-05-25 22:35:17 +09:00
Casper Beyer
3a2e020c8f
docs(cli/dts): tag test permission example as typescript (#10753) 2021-05-25 15:01:15 +02:00
Kitson Kelly
cd4194a5e4
feat(lsp): diagnostics for deno types and triple-slash refs (#10699)
Fixes #9823
2021-05-25 12:34:01 +10:00
Casper Beyer
6044b037fb
fix(cli/test): don't use reserved symbol : in specifier (#10751) 2021-05-24 17:26:04 +02:00
CGQAQ
428bc6849f
fix(cli/upgrade): modify download size paddings (#10639) 2021-05-24 16:55:44 +09:00
Ben Noordhuis
af1546391c feat(extensions): BroadcastChannel WPT conformance
Replaces the file-backed provider by an in-memory one because proper
file locking is a hard problem that detracts from the proof of concept.

Teach the WPT runner how to extract tests from .html files because all
the relevant tests in test_util/wpt/webmessaging/broadcastchannel are
inside basics.html and interface.html.
2021-05-23 15:16:42 +02:00
Ben Noordhuis
8cf7f966f2 feat(extensions): add BroadcastChannel
Co-Authored-By: Ben Noordhuis <info@bnoordhuis.nl>
Fixes: #10354
2021-05-23 15:16:42 +02:00
迷渡
b88fcef26b
fix(docs): rename read to readSync (#10732)
Signed-off-by: 迷渡 <justjavac@gmail.com>
2021-05-21 10:00:16 -04:00
Yoshiya Hinosawa
b3f2502b32
fix(test): ensure coverage dir exists (#10717) 2021-05-21 22:57:00 +09:00
Yoshiya Hinosawa
4a9b40b717
fix(runtime/http): fix empty blob response (#10689) 2021-05-21 10:11:53 +09:00
Kitson Kelly
8708d3c045
chore(lsp): provide test for lsp deadlock issue (#10679)
Resolves: #10587
2021-05-21 07:35:37 +10:00
Casper Beyer
c9db09630d
fix(cli/tools/test_runner): --doc should not require permissions (#10719) 2021-05-20 15:02:39 +02:00
Kitson Kelly
014d8d51c0
fix(lsp): re-enable the per resource configuration without a deadlock (#10625)
Fixes #10603
2021-05-20 19:56:48 +10:00
Carter Snook
bdee065d42
fix(cli/dts): fix missing error class (NotSupported) in types (#10713) 2021-05-20 14:57:15 +09:00
Casper Beyer
1f0a84530a
fix(cli): always allow documentation modules to be checked (#10581) 2021-05-19 21:08:41 +02:00
Casper Beyer
df7639c096
test(cli/dts): typecheck examples in declaration files (#10707)
This commits adds two integration tests that typecheck examples
in the docstrings in Deno declaration files.
2021-05-19 18:41:36 +02:00
Casper Beyer
3ec32a0a1c
fix(cli/tools/test_runner): use file_fetcher.fetch to get sources (#10708) 2021-05-19 16:45:00 +02:00
Casper Beyer
42f76670fc
fix(cli): canonicalize coverage dir (#10364) 2021-05-19 15:33:22 +02:00
Casper Beyer
8a9b83b3ea
docs(cli/dts): fix plugin example (#10647) 2021-05-19 15:07:10 +02:00
Nayeem Rahman
b43b639f45
fix(runtime/http): expose nextRequest() errors in respondWith() (#10384) 2021-05-19 21:39:52 +09:00
Kitson Kelly
91decbfabf
fix(#10695): deps diagnostics include data property (#10696)
Fixes #10695
2021-05-19 22:28:23 +10:00
Casper Beyer
3af44a26eb
docs(cli/dts): make worker example pass (#10703) 2021-05-19 08:15:35 -04:00
Casper Beyer
7f94db1bfd
docs: fix unix socket examples (#10705) 2021-05-19 08:15:01 -04:00
Satya Rohith
6e1e33ce88
fix(deno install): support file: scheme URLs (#10562) 2021-05-19 07:40:23 -04:00
Casper Beyer
ef5e5f5e46
docs(cli/dts): fix typo in TestDefinition.only description (#10697) 2021-05-19 16:33:01 +09:00
Satya Rohith
5127bb0d89
fix(runtime): support source maps with Deno.emit() and bundle (#10510)
Closes: #10413
2021-05-19 14:18:01 +10:00
Satya Rohith
19e4080fa2
fix(lsp): make failed to load config error descriptive (#10685) 2021-05-18 16:48:11 -04:00
Yusuke Tanaka
cda09c166f
chore: update deno_lint binary used in CI to v0.5.0 (#10652) 2021-05-18 17:24:01 +02:00
Kitson Kelly
12bfdef62c
feat(lsp): provide X-Deno-Warning as a diagnostic (#10680)
Closes #9932
2021-05-18 20:19:52 +10:00
Satya Rohith
d69a5fbe1a
feat(lsp): support formatting json and markdown files (#10180)
Resolves #9447
Resolves #9415
2021-05-18 16:35:46 +10:00
Satya Rohith
8ffeabc678
fix(lsp): ignore type definition not found diagnostic (#10610)
Fixes #10575
2021-05-18 14:09:33 +10:00
Kitson Kelly
3318c495f6
refactor(lsp): memoize script versions per tsc request (#10601) 2021-05-18 08:51:35 +10:00
Kitson Kelly
27e7bb090e
refactor: share test harness for lsp between bench and integration (#10659) 2021-05-18 06:45:13 +10:00
Luca Casonato
9ad52a28e5
1.10.2 2021-05-17 17:34:45 +02:00
Luca Casonato
5887dd3c95
chore: release crates (#10661)
For the Deno 1.10.2 release.
2021-05-17 17:34:35 +02:00
Luca Casonato
30b2779bb6
tests: fix broken tests on main (#10663) 2021-05-17 12:59:11 +02:00
Casper Beyer
75d547809f
docs(cli/dts): fix Deno.startTls example (#10657) 2021-05-17 18:44:07 +09:00
Luca Casonato
5151afa123
fix: static import permissions in dynamic imports
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2021-05-17 09:45:54 +02:00
Casper Beyer
910935c071
feat(runtime): support urls for Deno.realPath and Deno.realPathSync (#10626) 2021-05-17 06:31:21 +02:00
Casper Beyer
ac8ea823f5
docs(cli/dts): fix http server example (#10651) 2021-05-16 16:57:55 +02:00
Casper Beyer
808226f110
docs(cli/dts): remove stray new operators in examples (#10648) 2021-05-15 15:20:37 +02:00
Yusuke Tanaka
be2347ddc2
chore: upgrade Tokio to 1.6.0 (#10637) 2021-05-15 15:13:10 +02:00
Yusuke Tanaka
24a2e1ef82
docs(cli/dts): fix link from master to main (#10633) 2021-05-15 16:22:45 +09:00
Casper Beyer
b0e30dbbc6
refactor(cli/ops): don't pass ops through json (#10629) 2021-05-14 14:25:50 +02:00
Niclas Overby
608c7d68e2
fix(lsp): remove duplicate cwd in config path (#10620) 2021-05-13 23:56:30 +02:00
Casper Beyer
62c752211c
docs(cli/dts): use Deno.stdin.rid in Deno.setRaw example (#10623) 2021-05-13 14:20:55 +02:00
Casper Beyer
b504eb94bb
docs(cli/dts): fix Deno.createHttpClient example (#10608) 2021-05-13 16:45:55 +09:00
Casper Beyer
5e4764a00f
docs(cli/dts): fix missing std/testing/asserts.ts imports in examples (#10579) 2021-05-13 16:03:34 +09:00
Yoshiya Hinosawa
e8a7f237de
fix(cli): ignore x-typescript-types header when media type is not js/jsx (#10574) 2021-05-13 08:07:22 +09:00
Casper Beyer
473c93a90b
docs(cli/dts): fix worker net permissions example (#10578) 2021-05-12 15:15:34 +02:00
Casper Beyer
7211c7cf8f
docs(cli/dts): fix Deno.applySourceMap example (#10602) 2021-05-12 15:14:48 +02:00
Ryan Dahl
1cd1419e18
v1.10.1 2021-05-11 23:11:50 -04:00
Kitson Kelly
0e17f086ce
fix(#10603): revert minimal changes to resolve deadlock bug (#10605) 2021-05-12 13:10:06 +10:00
Bartek Iwańczuk
57927781ed
v1.10.0 2021-05-12 02:06:07 +02:00
Bartek Iwańczuk
de706961dc
chore: release crates (#10596) 2021-05-11 23:14:24 +02:00
Bartek Iwańczuk
8d88a83b88
disable test_watch integration test (#10594) 2021-05-11 22:09:44 +02:00
Tim Ramlot
635253bd3a
feat(runtime/worker): Structured cloning worker message passing (#9323)
This commit upgrade "Worker.postMessage()" implementation to use 
structured clone algorithm instead of non-spec compliant JSON serialization.
2021-05-11 21:09:09 +02:00
Kitson Kelly
41a3b17de4
fix(lsp): remove code_action/diagnostics deadlock (#10555)
Landed without test to meet 1.10.0 deadline. See #10587.
2021-05-11 10:43:00 -04:00
Casper Beyer
46f0ac59e0
docs: remove stale Deno.compile example (#10580) 2021-05-11 06:44:23 -04:00
Casper Beyer
62562f3fd1
docs(cli/dts): fix Deno.permissions.query example (#10572) 2021-05-11 14:44:15 +09:00
Casper Beyer
576f14baeb
docs(cli/dts): fix Deno.test permission examples (#10571) 2021-05-11 14:42:26 +09:00
Kitson Kelly
81f8585643
feat(lsp): add internal debugging logging (#10438)
Ref: #10368
2021-05-11 14:54:10 +10:00
Casper Beyer
2b8bac3c85
docs(cli/dts): fix Deno.watchFs example (#10570) 2021-05-11 11:18:29 +09:00
Casper Beyer
ba8d6ec771
docs(cli/dts): fix Deno.inspect examples (#10569) 2021-05-11 11:17:07 +09:00
Casper Beyer
2b8376db24
docs(cli/dts): fix Deno.seek and Deno.seekSync examples (#10568) 2021-05-11 11:13:33 +09:00
Casper Beyer
60c172cccb
docs(cli/dts): fix Deno.run example (#10567) 2021-05-11 11:11:17 +09:00
Bert Belder
640d431b35
fix(tls): flush send buffer in the background after closing TLS stream (#10146)
In #9118, TLS streams were split into a "read half" and a "write half"
using tokio::io::split() to allow concurrent Conn#read() and
Conn#write() calls without one blocking the other. However, this
introduced a bug: outgoing data gets discarded when the TLS stream is
gracefully closed, because the read half is closed too early, before all
TLS control data has been received.

Fixes: #9692
Fixes: #10049
Fixes: #10296
Fixes: denoland/deno_std#750
2021-05-11 03:11:26 +02:00
Casper Beyer
36c5461129
feat(test): add support for type checking documentation (#10521)
This commit adds support for type checking codeblocks in the JS doc 
comments.
2021-05-11 01:54:39 +02:00
Bartek Iwańczuk
c44e53a5b6
chore: upgrade crates (#10559) 2021-05-10 22:39:16 +02:00
Elias Sjögreen
f12b82e183
fix(cli): typings for Deno.os.arch (#10541) 2021-05-10 16:12:42 -04:00
Bartek Iwańczuk
ce48b32979
refactor(cli): replace loading file for --config flag with generic structure (#10481)
Currently file passed to --config file is parsed using TsConfig structure
that does multiple things when loading the file. Instead of relying on that
structure I've introduced ConfigFile structure that can be updated to
sniff out more fields from the config file in the future.
2021-05-10 18:16:39 +02:00
Ryan Dahl
18c75f0e42
Switch grant/deny prompt to yes/no (#10547) 2021-05-10 07:11:34 -04:00
crowlKats
dfe528198d
feat: add WebStorage API (#7819)
This commit introduces localStorage and sessionStorage.
2021-05-10 12:02:47 +02:00
Bartek Iwańczuk
32ad8f77d6
test: run deno test --watch test only on unix (#10550) 2021-05-10 10:51:49 +02:00
Liam Murphy
7a9ebd1585
feat: add deno test --watch (#9160)
This commit implements file watching for deno test.

When a file is changed, only the test modules which 
use it as a dependency are rerun.

This is accomplished by reworking the file watching infrastructure 
to pass the paths which have changed to the resolver, and then 
constructing a module graph for each test module to check if it 
contains any changed files.
2021-05-10 08:06:13 +02:00
Kitson Kelly
84733d90c7
feat: support workspace folders configuration (#10488)
Ref #8643
2021-05-10 11:16:04 +10:00
Satya Rohith
33b1a6ed61
fix(cli/installer): allow remote import maps (#10499) 2021-05-10 09:48:30 +09:00
Thiago Padilha
18a684ab1c
fix: TextEncoder#encodeInto spec compliance + perf gains (#10129) 2021-05-08 23:31:40 +02:00
Aaron O'Mullan
d5f39fd121
cleanup(ops): remove unused ZeroCopyBuf arg-types (#10530) 2021-05-08 14:37:42 +02:00
Kitson Kelly
c709f5df36
refactor(lsp): publish diagnostics independently (#10525)
Resolves #10518
2021-05-07 21:05:32 +10:00
Aaron O'Mullan
1e8e44f4c3
refactor(ops): replace ZeroCopyBuf arg by 2nd generic deserializable arg (#10448) 2021-05-06 19:32:03 +02:00
Luca Casonato
f208e6a26f
chore: update wgpu and realign to spec (#9760) 2021-05-06 16:48:45 +02:00
Casper Beyer
ce76f8c3a9
docs: tag permission examples as ts (#10506) 2021-05-06 13:54:13 +02:00
迷渡
7e22987876
docs: env.get will return undefined if not exist (#10514) 2021-05-06 19:45:36 +10:00
Yoshiya Hinosawa
e64cf4eeac
test(compile): show command output to testing log for debugging purpose (#10503) 2021-05-05 17:42:45 +09:00
Casper Beyer
49c4d57b0f
docs(cli/dts): add missing awaits (#10501) 2021-05-05 14:59:12 +09:00
Casper Beyer
d654e78e0d
docs(cli/dts): fix env examples (#10500) 2021-05-05 14:57:02 +09:00
Casper Beyer
a16a830e33
docs(cli/dts): use one block per writeAll example (#10496) 2021-05-05 14:55:21 +09:00
Casper Beyer
9c206545f7
docs(cli/dts): explicitly import assert in examples (#10495) 2021-05-05 14:50:38 +09:00
Casper Beyer
820c658ff8
docs(cli/dts): use one code block per truncate example (#10494) 2021-05-05 12:45:10 +09:00
Satya Rohith
89b61b5d05
fix(cli): give context when failed to load import map (#10478) 2021-05-04 14:27:20 +02:00
Casper Beyer
17118c41e4
docs(cli/ftruncateSync): use openSync in example (#10485) 2021-05-04 16:47:11 +09:00
Anonymous
688557e226
fix(op_crates/fetch): check fetch() argument length (#10474) 2021-05-03 09:05:42 +02:00
Aaron O'Mullan
ea917384fe
refactor(core): convert core.print() to a builtin op (#10436) 2021-05-02 19:30:03 -04:00
Aaron O'Mullan
c9ac851b90
cleanup(bench/deno_http_native): don't use Deno.core funcs (#10460)
`Deno.core.*` is unstable and not fit for public consumption, although this is a somewhat internal bench some people may use it as reference code and start using `Deno.core.encode()` in their own code
2021-05-02 19:23:19 -04:00
Casper Beyer
40961cda58
fix(test): change inflection depending on number of pending tests (#10466) 2021-05-02 08:30:30 -04:00
Aaron O'Mullan
89057529bc
clean(cli): prefix all op functions with op_ (#10463)
Makes the codebase more searchable and helps distinguish op functions from helper functions

Besides tests/examples/benches this pattern appears to be used everywhere else in the codebase
2021-05-02 08:29:19 -04:00
Divy Srivastava
bb12c7a57a
fix(test): re-enable "compile_windows_ext" test (#10131)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2021-05-01 23:13:06 +09:00
Liam Murphy
be287ff6a1
fix(console): Remove console.timeStamp from types (#10455)
Fixes #10444
2021-05-01 06:41:38 -04:00
Andy Hayden
684c357136
Rename crate_ops to extensions (#10431) 2021-04-30 15:51:48 -04:00
Casper Beyer
abaec7a88e
fix(cli/tools/test): print module tests originate from (#10428) 2021-04-30 11:56:47 -04:00
Casper Beyer
f31ee8d1bf
fix(test): default to num cpus when no value is given (#10443) 2021-04-30 08:57:42 -04:00
William Perron
a50dab683f
fix(op_crate/fetch): infinite loop on fill headers (#10406)
Fixes a pesky bug in the fetch implementation where if the init part is
specified in `fetch` instead of the `Request` constructor, the
fillHeaders function receives two references to the same object, causing
it to append to the same list being iterated over.
2021-04-29 13:56:59 -04:00
Kitson Kelly
0ac2a17a0f
chore: remove unused keys from TsConfigJson (#10417) 2021-04-29 22:26:37 +10:00
Casper Beyer
ec0d3b6128
refactor(cli): move test reporting into trait (#10408) 2021-04-29 13:42:35 +02:00
Satya Rohith
f60373e0d1
chore(lsp): remove dead code (#10409) 2021-04-28 14:36:23 -04:00
Casper Beyer
c455c28b83
feat(test): run test modules in parallel (#9815)
This commit adds support for running test in parallel.

Entire test runner functionality has been rewritten
from JavaScript to Rust and a set of ops was added to support reporting in Rust.

A new "--jobs" flag was added to "deno test" that allows to configure 
how many threads will be used. When given no value it defaults to 2.
2021-04-28 20:17:04 +02:00
Aaron O'Mullan
0260b488fb
core: introduce extensions (#9800)
Extensions allow declarative extensions to "JsRuntime" (ops, state, JS or middleware).

This allows for:
- `op_crates` to be plug-and-play & self-contained, reducing complexity leaked to consumers
- op middleware (like metrics_op) to be opt-in and for new middleware (unstable, tracing,...)
- `MainWorker` and `WebWorker` to be composable, allowing users to extend workers with their ops whilst benefiting from the other infrastructure (inspector, etc...)

In short extensions improve deno's modularity, reducing complexity and leaky abstractions for embedders and the internal codebase.
2021-04-28 18:41:50 +02:00
Bartek Iwańczuk
b28f9445aa
refactor(core): simplify module loading code (#10385)
General cleanup of module loading code, tried to reduce indentation in various methods
on "JsRuntime" to improve readability.

Added "JsRuntime::handle_scope" helper function, which returns a "v8::HandleScope".
This was done to reduce a code pattern that happens all over the "deno_core".

Additionally if event loop hangs during loading of dynamic modules a list of
currently pending dynamic imports is printed.
2021-04-28 18:28:46 +02:00
Satya Rohith
2bd087ab1b
chore: upgrade dprint plugins (#10397) 2021-04-28 10:08:51 -04:00
Yoshiya Hinosawa
8c6f977192
docs: document how to stop file watcher (#10403) 2021-04-28 21:37:16 +09:00
Casper Beyer
3a03084580
test(cli): run unit tests using Deno.test (#10330)
Co-authored-by: Luca Casonato <lucacasonato@yahoo.com>
2021-04-27 13:14:01 +02:00
Bartek Iwańczuk
baf7092ea2
remove --unstable flag from CLI features (#10190) 2021-04-27 12:44:36 +02:00
Aaron O'Mullan
83770e898e
fix(console): circular customInspect (#10338) 2021-04-27 11:54:47 +02:00
Yoshiya Hinosawa
4fa0e9c652
docs: fix ftruncateSync example (#10393) 2021-04-27 11:23:18 +02:00
Bert Belder
299518d935 fix(tls): throw meaningful error when hostname is invalid (#10387)
`InvalidDNSNameError` is thrown when a string is not a valid hostname,
e.g. it contains invalid characters, or starts with a numeric digit. It
does not involve a (failed) DNS lookup.
2021-04-26 23:40:45 +02:00
Ryan Dahl
f7c298e297
Remove denort optimization (#10350)
denort is an optimization to "deno compile" to produce slightly smaller
output. It's a decent idea, but causes a lot of negative side-effects:

- Deno's link time is a source of constant agony both locally and in CI,
  denort doubles link time.
- The release process is a long and arduous undertaking with many manual
  steps. denort necessitates an additional manual zip + upload from M1
  apple computers.
- The "deno compile" interface is complicated with the "--lite" option.
  This is confusing for uses ("why wouldn't you want lite?").

The benefits of this feature do not outweigh the negatives. We must find
a different approach to optimizing "deno compile" output.
2021-04-26 13:28:38 -04:00
Casper Beyer
e4e7d957e8
feat(core): enable wasm threading support (#10116) 2021-04-26 17:54:07 +02:00
David Sherret
791513d608
feat: Support deno-fmt-ignore-file for markdown formatting (#10191) 2021-04-26 17:43:32 +02:00
Carter Snook
0d3b22a53a
fix: invalid types for asynchronous and synchronous File#truncate (#10353) 2021-04-26 16:56:22 +02:00
Ryan Dahl
9c3da280e0
remove #![deny(warnings)] (#10376)
Prefer RUSTFLAGS="-D warnings" to prevent warnings, but cannot 
enable yet due to #10378.
2021-04-26 10:10:57 -04:00
Carter Snook
0897bd51a0
fix(#10360): clarify JSDoc for Deno.noColor (#10373)
Fixes #10360 

Co-authored-by: Luca Casonato <lucacasonato@yahoo.com>
2021-04-26 13:59:22 +10:00
Casper Beyer
f3751e498f
feat(cli): add test permissions to Deno.test (#10188)
This commits adds adds "permissions" option to the test definitions 
which allows tests to run with different permission sets than 
the process's permission.

The change will only be in effect within the test function, once the 
test has completed the original process permission set is restored.

Test permissions cannot exceed the process's permission.
You can only narrow or drop permissions, failure to acquire a 
permission results in an error being thrown and the test case will fail.
2021-04-25 23:38:59 +02:00
Satya Rohith
7063e449f1
fix(#10362): include range for export statements (#10369)
Fixes #10362
2021-04-26 06:59:18 +10:00
Nayeem Rahman
fb1ccc3d88
refactor(cli): rename Deno.emit() bundle options to "module" and "classic" (#10332) 2021-04-26 06:54:57 +10:00
Aaron O'Mullan
83bece56b0
refactor(core): move op cache sync responsibility to rust space (#10340)
Even if bootstrapping the JS runtime is low level, it's an abstraction leak of 
core to require users to call `Deno.core.ops()` in JS space.

So instead we're introducing a `JsRuntime::sync_ops_cache()` method, 
once we have runtime extensions a new runtime will ensure the ops 
cache is setup (for the provided extensions) and then loading/unloading 
plugins should be the only operations that require op cache syncs
2021-04-25 22:00:05 +02:00
Aaron O'Mullan
201185f9fb
fix(cli/dts): sleepSync doesn't return a Promise (#10358)
Per its name its synchronous for the current thread
2021-04-25 00:48:43 +02:00
crowlKats
fd3b961126
feat(cli/upgrade): add download progress (#10343) 2021-04-24 13:37:43 -04:00
Satya Rohith
13f7592b8a
refactor: use 'data-url' crate to process data URLs in lsp & file_fetcher (#10196)
Closes: #10118
2021-04-23 20:43:13 +02:00
Jesse Jackson
feb6af7732
fix(op_crates/fetch): Prevent throwing when inspecting a request (#10335)
Fixes: #10334
2021-04-23 20:38:45 +02:00
Ryan Dahl
2400ecbe16
Use ubuntu-latest-xl on more CI jobs (#10322) 2021-04-23 12:11:23 -04:00
Aaron O'Mullan
dd156e886b
refactor(core): rename send() to opcall() (#10307)
I think it's a better fit since recv() was killed and opcall <> syscall (send/recv 
was too reminiscent of request/response and custom payloads)
2021-04-23 11:50:45 -04:00
Luca Casonato
8074d8bcf3
1.9.2 2021-04-23 16:08:06 +02:00
Luca Casonato
52d316f143
chore: release crates (#10327)
Release crates for the cli 1.9.2 release.
2021-04-23 15:05:12 +02:00
Luca Casonato
0cef6aca86
chore: update dependencies (#10325)
This updates swc_* crates to latest, and various other deps.
2021-04-23 13:37:09 +02:00
Nayeem Rahman
8a416a5ba2
fix(runtime/js/http): cancel body on response failure (#10225) 2021-04-23 12:34:04 +02:00
Aaron O'Mullan
2d722832c4
fix(cli): standalone bin corruption on M1 (#10311) 2021-04-23 12:33:45 +02:00
Ryan Dahl
21ab4d94c0
fix(#10292): Don't gray-out internal frames (#10293) 2021-04-22 08:30:03 -04:00
Ryan Dahl
b837fc300d
fix(#10302): flaky worker test (#10303) 2021-04-21 22:02:11 -04:00
Aaron O'Mullan
ff9ff4a377
refactor(core): simplify error handling (#10297)
- register builtin v8 errors in core.js so consumers don't have to
- remove complexity of error args handling (consumers must provide a 
  constructor with custom args, core simply provides msg arg)
2021-04-21 20:50:50 -04:00
Aaron O'Mullan
8d0e0ead51
fix(fetch): Response inspect regression (#10295) 2021-04-21 23:03:04 +02:00
Satya Rohith
3b78f6c449
fix: do not panic on not found cwd (#10238) 2021-04-21 17:52:00 +02:00
Nicholas Rodrigues Lordello
320c19c7c0
fix(installer): Remove double '.' from temporary archive extension on upgrade (#10289) 2021-04-21 17:48:28 +02:00
Jean Pierre
572ec4a0a7
fix(lsp): document symbol performance mark (#10264) 2021-04-21 12:41:24 +10:00
Bartek Iwańczuk
7760d9a669
v1.9.1 2021-04-21 01:46:42 +02:00
Bartek Iwańczuk
3432833574
chore: release crates (#10269)
* Revert "tooling(bench_util): benching and profiling utilities (#10223)"

This reverts commit 733a000305.

* Upgrade notify
2021-04-21 00:15:39 +02:00
Bartek Iwańczuk
0cc0196576
chore: upgrade deno_doc, deno_lint (#10268) 2021-04-20 19:37:27 +02:00
Satya Rohith
15ffdd2624
fix(runtime): include HTTP op in WebWorker (#10207) 2021-04-20 16:26:31 +02:00
Luca Casonato
9e6cd91014
chore: align fetch to spec (#10203)
This commit aligns the `fetch` API and the `Request` / `Response`
classes belonging to it to the spec. This commit enables all the
relevant `fetch` WPT tests. Spec compliance is now at around 90%.

Performance is essentially identical now (within 1% of 1.9.0).
2021-04-20 14:47:22 +02:00
Kitson Kelly
115197ffb0
fix(#10031): lsp handles x-typescript-types header on type only imports properly (#10261) 2021-04-20 22:22:22 +10:00
Yoshiya Hinosawa
8424647d22
chore: update copyright headers (#10243) 2021-04-20 14:27:36 +09:00
Jean Pierre
2079da0f1c
feat(lsp): Implement textDocument/documentSymbol (#9981)
Co-authored-by: Kitson Kelly <me@kitsonkelly.com>
2021-04-20 11:29:27 +10:00
Jean Pierre
6d404ec54b
feat(lsp): Implement textDocument/semanticTokens/full (#10233)
Co-authored-by: Kitson Kelly <me@kitsonkelly.com>
2021-04-20 11:26:36 +10:00
Kitson Kelly
b6203cb465
revert: Conn type changes in #10012 and #10061 (#10255)
Fixes #10200 (again)

This reverts commit 9c7c9a35c1 and a8057e3e06.
2021-04-20 10:12:33 +10:00
Kitson Kelly
fe8057105e
fix(#10125): remove documents when closed in the lsp (#10254)
Fixes #10125
2021-04-20 07:11:23 +10:00
Kitson Kelly
65f7a021f0
feat(lsp): improve diagnostic status page (#10253) 2021-04-20 07:10:43 +10:00
Luca Casonato
fe59e7ae60
fix(rt/http): correct URL in Request (#10256)
This commit fixes the URL returned from `request.url` in the HTTP server
to be fully qualified. This previously existed, but was removed and
accidentially not readded during optimizations of the HTTP ops.

Returning a non fully qualified URL from `Request#url` is not spec
compliant.
2021-04-19 17:07:44 +02:00
Liam Murphy
4786e1d92d
fix(runtime): handle race condition in postMessage where worker has terminated (#10239)
The panic was caused by the lack of an error class mapping for
futures::channel::TrySendError, but it shouldn't have been throwing an error in
the first place - when a worker has terminated, postMessage should just return.
The issue was that the termination message hadn't yet been recieved, so it was
carrying on with trying to send the message. This adds another check on the Rust
side for if the channel is closed, and if it is the worker is treated as
terminated.
2021-04-19 16:57:02 +02:00
Jean Pierre
65a2a04d3b
feat(lsp): implement textDocument/prepareCallHierarchy (#10061) 2021-04-19 15:11:26 +10:00
Luca Casonato
0552eaf569
chore: align Headers to spec (#10199)
This commit aligns `Headers` to spec. It also removes the now unused
03_dom_iterable.js file. We now pass all relevant `Headers` WPT. We do
not implement any sort of header filtering, as we are a server side
runtime.

This is likely not the most efficient implementation of `Headers` yet.
It is however spec compliant. Once all the APIs in the `HTTP` hot loop
are correct we can start optimizing them. It is likely that this commit
reduces bench throughput temporarily.
2021-04-19 01:00:13 +02:00
David Sherret
0c5ecec8f6
fix(install): use first deno executable on PATH rather than deno.exe (#10247) 2021-04-18 19:38:40 +02:00
Aaron O'Mullan
06cd451d20
cleanup(cli): use runtime's reg_sync() and reg_async() (#10241) 2021-04-18 16:03:46 +02:00
Ryan Dahl
9b5d8a2f2c
chore: improve help text (#10186) 2021-04-18 15:12:55 +02:00
Aaron O'Mullan
204b699be4
chore(cli/lsp): fix 2 lint errors (#10228)
1. error: called `.iter().count()` on a `Vec`
2. error: inconsistent struct constructor
2021-04-18 15:29:37 +10:00
crowlKats
d8447cff36
refactor(cli/flags): reorganize declarations (#10204) 2021-04-16 09:28:41 -04:00
Kitson Kelly
9c7c9a35c1
fix(#10200): weaken types so non-breaking (#10205)
Fixes #10200
2021-04-16 22:34:29 +10:00
Ryan Dahl
fe9cee620a
fix(#10182): hang during http server response (#10197) 2021-04-15 18:48:56 -04:00
Luca Casonato
353e79c796
chore: align FormData to spec (#10169)
This PR aligns `FormData` to spec. All WPT tests are passing.
2021-04-14 22:49:16 +02:00
Bartek Iwańczuk
262ee78592
v1.9.0 2021-04-13 20:11:17 +02:00
Bartek Iwańczuk
1be65bbe4f
chore: release crates (#10164) 2021-04-13 18:22:48 +02:00
Ben Noordhuis
d46b37f6a8
feat(cli): raise file descriptor limit on startup (#10162)
Raise the soft limit to the hard limit when possible. This is similar
to what Node.js does to avoid running into "out of file descriptors"
errors too quickly.

On most Linux systems, raises the limit from 1,024 to 1,048,576.
On most macOS systems, raises the limit from 256 to 10,240.

Fixes #10148.
2021-04-13 10:24:45 -04:00
Nayeem Rahman
df49a8462c
fix(cli/dts): Make respondWith() return a Promise (#10128) 2021-04-13 07:41:47 -04:00
crowlKats
a8057e3e06
feat(cli/dts): stricter typings for Listener & Conn (#10012) 2021-04-13 13:33:17 +02:00
crowlKats
8b59d9f7bc
feat(permissions): allow env permission to take values (#9825) 2021-04-13 13:25:21 +02:00
Casper Beyer
ec1fce58d9
fix(core): remove wasm-test-streaming flag (#10158) 2021-04-13 06:20:05 -04:00
Bert Belder
b9f758d3ad upgrade: rusty_v8 0.22.0 (V8 9.1.269.2) (#10152) 2021-04-13 02:54:36 +02:00
Aaron O'Mullan
46b1c653c0
refactor(deno): remove concept of bin & json ops (#10145) 2021-04-12 15:55:05 -04:00
Nayeem Rahman
a20504642d
fix(runtime/js/http): Correctly parse user response headers (#10076) 2021-04-12 10:24:45 -04:00
Casper Beyer
9d53dab4df
feat(runtime): add truncate and truncateSync methods to Deno.File (#10130) 2021-04-12 14:32:58 +02:00
Casper Beyer
da9219341f
feat(runtime): add stat and statSync methods to Deno.File (#10107) 2021-04-12 13:33:05 +02:00
Casper Beyer
875ac73f1e
feat(runtime): stabilize Deno.fstat and Deno.fstatSync (#10108)
This commit stabilizes Deno.fstat and Deno.fstatSync 
which are well known system calls and have a stable interface.
2021-04-12 11:27:38 +02:00
Aaron O'Mullan
bf99039ea9
feat: Add Deno.memoryUsage() (#9986) 2021-04-12 10:47:44 +02:00
crowlKats
fefe93c91b
feat(runtime/permissions): prompt fallback (#9376)
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2021-04-12 11:15:43 +09:00
Nayeem Rahman
8b49d948f5
fix(runtime/js/timers): Use (0, eval) instead of eval() (#10103) 2021-04-12 01:40:42 +02:00
Liam Murphy
3c645457a4
fix(op_crates/console): console.table value misalignment with varying keys (#10127) 2021-04-11 14:19:50 +02:00
Luca Casonato
e7f18d6468
feat: blob URL support in fetch (#10120)
This commit adds blob URL support in `fetch`. Tested via WPT. This is
the first op_crate to have a rust dependency on a different op_crate.
2021-04-11 14:09:10 +02:00
Casper Beyer
f5a9474952
feat: stabilize Deno.ftruncate and Deno.ftruncateSync (#10126)
This stabilizes Deno.ftruncate and Deno.ftruncateSync.

This is a well known system call and the interface is 
not going to change. Implicitly requires write permissions 
as the file has to be opened with write to be truncated.
2021-04-11 14:05:22 +02:00
Nayeem Rahman
8aa0d5f96e
feat: set useDefineForClassFields to true (#10119)
Fixes: #9773
2021-04-11 07:56:40 +10:00
Luca Casonato
8d55d8b6be
feat(unstable): ALPN config in listenTls (#10065)
This commit adds the ability for users to configure ALPN protocols when
calling `Deno.listenTls`.
2021-04-10 22:04:44 +02:00
Nayeem Rahman
dc4ab98ee7
fix(cli/diagnostics): Update UNSTABLE_DENO_PROPS (#10095) 2021-04-10 02:41:59 +02:00
Luca Casonato
1aeabce134
chore: improve lsp registry validations (#10096) 2021-04-10 02:37:42 +02:00
crowlKats
e7b7129b7a
feat(permissions): allow run permission to take values (#9833)
This commit adds allowlist support to `--allow-run` flag.

Additionally `Deno.permissions.query()` allows to query for specific
programs within allowlist.
2021-04-10 00:12:00 +02:00
Bartek Iwańczuk
1c7217e390
chore: upgrade dependencies (#10094)
This commit upgrades:
- swc_ecmascript
- swc_bundler
- deno_doc
- deno_lint
- dprint-plugin-typescript
2021-04-09 23:35:29 +02:00
Nayeem Rahman
c86ee742a2
fix: async op error stacktraces (#10080)
Co-authored-by: Aaron O'Mullan <aaron.omullan@gmail.com>
2021-04-09 11:55:33 -04:00
Ryan Dahl
c6e7a243d5
API change: Deno.startHttp -> Deno.serveHttp (#10087) 2021-04-09 11:54:27 -04:00
Kitson Kelly
d9d4a5d73c
feat(lsp): add registry import auto-complete (#9934) 2021-04-09 11:27:27 +10:00
Kitson Kelly
1ed9512022
fix(lsp): normalize windows file URLs properly (#10034)
Fixes: #9744
Fixes: https://github.com/denoland/vscode_deno/issues/386
2021-04-09 09:36:32 +10: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
Kitson Kelly
26c8d824d1
fix(lsp): don't error on tsc debug failures for code actions (#10047)
Resolves: #9913
2021-04-07 19:47:31 +10:00
Yoshiya Hinosawa
cbaa054154
docs: export EmitOptions and EmitResult (#10037) 2021-04-06 22:33:02 +09:00
Kitson Kelly
2c86ca1d64
fix(lsp): properly handle encoding URLs from lsp client (#10033)
Fixes #9741
2021-04-06 21:45:53 +10:00
Luca Casonato
00e63306cb
refactor: add deno_file op crate (#10019)
Also enables WPT for FileReader.
2021-04-06 12:55:05 +02:00
Kitson Kelly
2c52c0a145
fix(lsp): folding range adjustment panic (#10030)
Fixes #10029
2021-04-06 13:27:27 +10:00
Luca Casonato
d849c87eb1
chore: deprecate Deno.iter and Deno.iterSync (#10025)
This commit marks the `Deno.iter` and `Deno.iterSync` 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/util:
denoland/deno_std#843.
2021-04-06 00:05:55 +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
Luca Casonato
284e6c3039
chore: update std submodule (#10017) 2021-04-05 15:57:52 +02:00
David Sherret
eed4e29337
chore(cli): Upgrade jsonc_parser to 0.17 (#9977)
Use new parse_to_serde_value as it's faster and less code here.
2021-04-04 07:27:13 -04:00
Nayeem Rahman
1312a57984
fix: Properly await already evaluating dynamic imports (#9984) 2021-04-04 07:26:00 -04:00
Aaron O'Mullan
058579da56
refactor(ops): remove variadic buffers (#9944) 2021-04-02 09:47:57 -04:00
Kitson Kelly
adf5761090 v1.8.3 2021-04-02 22:22:08 +11:00
Kitson Kelly
df1d36a759 chore: bump dependent crates for cli (#9964) 2021-04-02 22:22:08 +11:00
Jean Pierre
035f7b0ca0
feat(lsp): implement textDocument/foldingRange (#9900)
Co-authored-by: Kitson Kelly <me@kitsonkelly.com>
2021-04-02 17:21:07 +11:00
David Sherret
6048ce5a34
chore(cli): add "Deno" to the windows file description (#9959) 2021-04-02 10:10:00 +11:00
defectivepixel
2d7fdb0a19
chore(cli): fix futime and futimeSync code examples (#9953) 2021-04-02 08:53:31 +11:00
Kitson Kelly
ec6317e894
fix(lsp): ensure insert_text is passed back on completions (#9951)
Fixes #9920
2021-04-01 20:18:51 +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
269ea88e0e
bench: track Date.now() as upper bound reference (#9922) 2021-03-29 01:12:19 +02:00
Aaron O'Mullan
7c7a62a7f8
feat(bench/deno_common): show ns/op (#9915)
It's simply the inverse of the rate (ops/s), but it's often useful to look at time per op
2021-03-27 23:17:06 -04:00
Ryan Dahl
f46e39c5c5
remove macro_use (#9884) 2021-03-26 12:34:25 -04:00
Aaron O'Mullan
6c6f3e87c1
Add bench suite of common Deno functions (#9878) 2021-03-26 09:13:53 -04:00
Luca Casonato
d5e0e8c0c2
fix: include deno.crypto in "deno types" (#9863) 2021-03-26 08:43:58 +01:00
Yusuke Tanaka
385b14463c
refactor(lsp): remove unused code (#9897) 2021-03-26 15:46:55 +11:00
Yusuke Tanaka
e7954413e1
upgrade: Rust 1.51.0 (#9895) 2021-03-25 19:17:37 +01:00
Kitson Kelly
881e1e8164
fix(cli): re-add dom.asynciterable lib (#9888)
Fixes: #9881
2021-03-25 22:09:03 +11:00
Kitson Kelly
5ebb401703
feat(lsp): add import completions (#9821) 2021-03-25 11:13:37 +11:00
Jean Pierre
77cfadf532
feat(lsp): implement textDocument/selectionRange (#9845)
Ref: #8643
2021-03-24 10:33:25 +11:00
Aaron O'Mullan
876f075dde
feat(core): Deno.core.heapStats() (#9659)
This commit implements "Deno.core.heapStats()" function 
that allows to programatically measure isolate heap-usage.
2021-03-23 15:33:06 +01:00
Bartek Iwańczuk
f50ed4e281
v1.8.2 2021-03-21 21:12:09 +01:00
Bartek Iwańczuk
c08284ab9d
chore: release crates (#9847) 2021-03-21 16:10:08 +01: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
Andrew Mitchell
277e19f4d2
fix(cli/bundle): display anyhow error chain (#9822) 2021-03-18 20:02:29 -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
Bert Belder
fb5a2786ec
refactor(lsp): slightly reorganize diagnostics debounce logic (#9796)
This patch doesn't actually fix the bug I was hoping to fix, which is
that `update_diagnostics()` sometimes gets called even when there are
more updates that should be processed first. I did eventually figure out
that this issue is caused by Tokio's cooperative yielding, which
currently can't be disabled.

However overall it makes the debounce code somewhat more readable IMO,
which is why I'm suggesting to land it anyway.
2021-03-18 21:26:41 +01: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
Kitson Kelly
506b321d47
refactor(lsp): refactor completions and add tests (#9789) 2021-03-16 09:01:41 +11:00
Ryan Dahl
2ff9b01551
Revert "fix(cli/module_graph): Set useDefineForClassFields to true" (#9792)
Backwards incompatible change cannot be made in-between patch releases.

This commit broke std tests https://github.com/denoland/deno_std/runs/2112369372

This reverts commit c4709834b3.
2021-03-15 13:56:31 -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
Nayeem Rahman
c4709834b3
fix(cli/module_graph): Set useDefineForClassFields to true (#9774)
Fixes #9773
2021-03-15 09:19:27 +11: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
David Sherret
3ab48864fe
fix(fmt): Correctly format hard breaks in markdown (#9742) 2021-03-10 08:17:24 -05:00
Kitson Kelly
88a7fa36aa
fix(lsp): allow on disk files to change (#9746)
Fixes #9348
2021-03-10 21:39:16 +11:00
Kitson Kelly
f800dfc3cb
chore: remove unused import on non-windows (#9743) 2021-03-10 15:17:55 +11:00
Kitson Kelly
a020ebde2d
fix(lsp): diagnostics use own thread and debounce (#9572) 2021-03-10 13:41:35 +11:00
Bartek Iwańczuk
8d3baa7777
v1.8.1 2021-03-09 21:55:44 +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
Casper Beyer
3ec9a9bfe4
fix(coverage): ensure single line functions don't yield false positives (#9717) 2021-03-08 11:51:01 +01:00
Nayeem Rahman
33eea0400d
fix(cli/ast): Pass importsNotUsedAsValues to swc (#9714)
Fixes #9709
2021-03-08 06:40:11 +10:00
Divy Srivastava
74584eef04
fix(cli/compile): do not append .exe depending on target (#9668) 2021-03-07 08:20:01 -05:00
Nayeem Rahman
da5ca4f521
fix(cli/tests): Fix flaky worker test (#9691) 2021-03-05 05:32:17 -05:00
Casper Beyer
04740af787
test(cli): move lint command tests into a module (#9674) 2021-03-04 13:40:38 +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
hvithrafn
79e2e6a1f4
chore(lsp): update lspower to 0.8.4 (#9663)
Co-authored-by: hvithrafn <hvithrafn@users.noreply.github.com>
2021-03-03 15:32:10 +11:00
Ryan Dahl
f9c8f98968
Pin lspower, because it made semvar incompatible patch release (#9656) 2021-03-02 20:04:18 -05:00
Ryan Dahl
18b894072d
v1.8.0 2021-03-02 18:23:14 -05:00
Ryan Dahl
f1fe6a57ba
Bump crate versions (#9651) 2021-03-02 15:15:43 -05:00
Bert Belder
1f47bdd69d
test(op_crates/web): add regression tests for past URL bugs (#9639) (#9639)
Closes: #9383
2021-03-02 19:09:58 +01:00
Bartek Iwańczuk
faf2e80272
chore: upgrade crates (#9632) 2021-03-02 13:39:56 +01:00
Nayeem Rahman
badc88b78a
refactor(op_crates/web): Move URL parsing to Rust (#9276) 2021-03-02 02:30:24 +01:00
Casper Beyer
62f33e3b14
test(cli): reorganize test subcommand testcases and fixtures (#9627) 2021-03-01 13:02:51 +01:00
Kitson Kelly
6dae627749
feat(cli): represent type dependencies in info (#9630)
Fixes #7927
2021-03-01 22:49:58 +11:00
Bartek Iwańczuk
0dc89c0a79
feat: stabilise import maps (#9526)
This commit stabilises import maps by removing requirement
on "--unstable" flag when "--import-map" flag is used.
2021-03-01 12:41:22 +01:00
crowlKats
7cd14f97c9
feat: WebGPU API (#7977)
Co-authored-by: Luca Casonato <lucacasonato@yahoo.com>
2021-03-01 11:31:13 +01:00
Kitson Kelly
dbdbe7a1cf
fix(lsp): improve exception handling on tsc snapshots (#9628)
Refs #9348
2021-03-01 11:53:20 +11:00
Bartek Iwańczuk
c2a7386a42
feat: Align import map to spec and test using WPT (#9616)
This commit updates implementation of import maps to
align it to current revision of the spec.

Existing tests were removed in favor of using suite from
WPT.
2021-03-01 01:49:08 +01:00
Luca Casonato
ff83df399a
fix: typo in coverage exit_unstable (#9626) 2021-03-01 01:25:43 +01:00
Luca Casonato
72425ec4ce
chore: improve internal webidl functions (#9606) 2021-03-01 01:25:31 +01:00
Divy Srivastava
4b56537ea9
chore: move crypto types to op_crates/crypto (#9609) 2021-02-26 12:06:26 -05:00
Ryan Dahl
07eb009044
Improve 'deno lsp' help text (#9610) 2021-02-26 15:51:25 +01:00
Divy Srivastava
67ca978f97
chore: simplify internal dependencies between crates (#9600) 2021-02-26 12:46:15 +01:00
Nayeem Rahman
ebd2047de4
feat(cli/source_map): Use top user frame for error source lines (#9604)
This commit changes formatting of JS errors; by not showing 
source lines for internal code. Where possible, instead using 
the top stack frame associated with user code i.e. the first 
location that is colourful and not a "deno:" URL.
2021-02-26 12:40:05 +01:00
Ryan Dahl
3d87198ba0
Upgrade rusty_v8 (V8 9.0.257.3) (#9605) 2021-02-25 19:22:01 -05: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
Liam Murphy
cdae4423c2
feat(cli/doc): use type definitions "deno doc" if available (#8459)
This commit adds support for type definitions in "deno doc";
with this change "deno doc" is able to leverage the same directives
as TS compiler.

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2021-02-25 16:24:05 +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
d26bef21a5
test(lsp): add benchmarking tests (#9586)
Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
2021-02-25 16:14:17 +11:00
Kitson Kelly
d7837c8eb5
feat(cli): update to TypeScript 4.2 (#9341) 2021-02-25 15:16:19 +11:00
Kitson Kelly
097e9c44f4
feat(runtime): stabilise permissions and add event target capabilities (#9573) 2021-02-25 14:33:09 +11:00
Kitson Kelly
90e4c5dcde
reafactor(lsp): use generics with JSON values (#9587) 2021-02-25 14:15:55 +11:00
Casper Beyer
ae8874b4b2
feat: add "deno coverage" subcommand (#8664)
This commit adds a new subcommand called "coverage" 
which can generate code coverage reports to stdout in 
multiple formats from code coverage profiles collected to disk.

Currently this supports outputting a pretty printed diff and 
the lcov format for interoperability with third-party services and tools.

Code coverage is still collected via other subcommands 
that run and collect code coverage such as 
"deno test --coverage=<directory>" but that command no 
longer prints a pretty printed report at the end of a test 
run with coverage collection enabled.

The restrictions on which files that can be reported on has 
also been relaxed and are fully controllable with the include 
and exclude regular expression flags on the coverage subcommand.

Co-authored-by: Luca Casonato <lucacasonato@yahoo.com>
2021-02-24 15:27:51 +01:00
Yosi Pramajaya
f6a80f34d9
test: Fix --reload in integration_tests (#9345)
This commit removes redundant "--reload" args because "util::deno_cmd"
recreates "DENO_DIR". 

This commit also fixes ta_reload in integration tests to actually test reload.
2021-02-24 15:18:35 +01: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
Inteon
dccf5e0c5c
refactor(core): Allow multiple overflown responses in single poll (#9433)
This commit rewrites "JsRuntime::poll" function to fix a corner case that
might caused "overflown_response" to be overwritten by other overflown response.

The logic has been changed to allow returning multiple overflown response
alongside responses from shared queue.
2021-02-23 13:08:50 +01:00
Kohei Ueno
2e3d72064a
fix: panic caused by Deno.env.set("", "") (#9583) 2021-02-23 04:24:59 -05:00
David DeSimone
8be0c8b43a
fix(tests): fix fetchConnectionError test if port is in use (#9465)
Fixes #9379
2021-02-22 13:26:17 +01:00
Bartek Iwańczuk
05911e5d7f
chore: disable flaky test (#9568) 2021-02-22 11:46:17 +01:00
Satya Rohith
4f391ecec0
chore: upgrade internal dprint plugins (#9566)
Co-authored-by: David Sherret <dsherret@gmail.com>
2021-02-22 00:17:31 +01:00
Luca Casonato
9d70ea2e9f
feat(unstable): per op metrics (#9240) 2021-02-21 19:20:31 +01:00
Casper Beyer
af93256d05
fix(cli): capitalize inspect and inspect-brk descriptions (#9567) 2021-02-21 19:09:30 +01:00
Satya Rohith
06fcfc5c0a
feat: add --ext flag to deno eval (#9295)
This PR deprecates the "--ts"/"-T" flag of "deno eval" (which will later be removed in 2.0)
and introduces "--ext" which is used by "deno fmt" for content type selection. 
This is to ensure we have a single flag that can be used across subcommands 
to select the language (JS/TS).
2021-02-21 17:58:32 +01:00
DjDeveloper
fe1b512820
fix(op_crates/websocket): default to close code 1005 (#9339)
Currently if WebSocket is closed without code, it will error 
while on Chrome it would close with code 1005 instead.

Co-authored-by: crowlKats <13135287+crowlKats@users.noreply.github.com>
2021-02-21 17:51:46 +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
Casper Beyer
b47f9cee8c
fix(repl): filter out symbol candidates (#9555) 2021-02-21 16:58:31 +01:00
Nayeem Rahman
14ec22e880
fix(core/bindings): Add stacks for dynamic import resolution errors (#9562) 2021-02-21 16:22:06 +01:00
Yusuke Tanaka
18b2dbf0d0
fix(dts): update doc of Deno.formatDiagnostics (#9564) 2021-02-21 16:17:27 +01:00
Nayeem Rahman
10fb25db63
fix(core/runtime): Fix dynamic imports for already rejected modules (#9559) 2021-02-20 22:50:13 +01:00
Yusuke Tanaka
91881b7cd3
fix: lint and fmt error if no target files are found (#9527) 2021-02-19 07:18:16 -05:00
Nayeem Rahman
555595e6d0
fix(core): Make dynamic import async errors catchable (#9505)
Fixes #6259
2021-02-19 09:36:02 +11:00
Ryan Dahl
bb30e9291e
refactor: use Mutex for ErrorBuffer (#9539)
RwLock should only be used in circumstatnces where it has some benefit.
Multiple concurrent readers is usually an undesirable design bug.
2021-02-18 15:20:52 -05:00
Satya Rohith
d9b1f96897
feat: add json(c) support to deno fmt (#9292)
This commit adds support for formatting JSON and JSONC 
in "deno fmt".

New values "json" and "jsonc" are added to "--ext" flag for 
standard input processing.
2021-02-18 17:31:32 +01:00
Kitson Kelly
2225e83da2
fix(lsp): handle data URLs properly (#9522)
Fixes #9514

Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
2021-02-18 15:37:05 +11:00
Kitson Kelly
78e34d4912
fix(lsp): document spans use original range (#9525)
Fixes: #9444

Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
2021-02-18 14:15:13 +11:00
Ryan Dahl
c7dabc99ee
Make ModuleSpecifier a type alias, not wrapper struct (#9531) 2021-02-17 13:47:18 -05:00
Bartek Iwańczuk
f6d6b24506
feat: support loading import map from URL (#9519)
This commit adds support for loading import maps from URLs,
both remote and local.

This feature is supported in CLI flag as well as in runtime
compiler API.
2021-02-17 14:32:57 +01:00
Kitson Kelly
879897ada6
feat(cli): support auth tokens for accessing private modules (#9508)
Closes #5239
2021-02-16 13:50:27 +11:00
Yuki Tanaka
ccd6ee5c23
feat(lsp): Implement textDocument/signatureHelp (#9330)
Co-authored-by: Kitson Kelly <me@kitsonkelly.com>
2021-02-16 13:34:09 +11:00
Casper Beyer
3f5265b21e
fix: align btoa to spec (#9053) 2021-02-16 02:10:59 +01:00
Kitson Kelly
7e9028b532
feat(cli): Deno.emit supports bundling as IIFE (#9291)
Closes #9204
2021-02-16 12:02:00 +11:00
Bartek Iwańczuk
8c6d147e6a
chore: Reorganise workers tests (#9493) 2021-02-15 14:48:47 +01:00
Kitson Kelly
64a1da84fe
fix(lsp): handle cached type dependencies properly (#9500) 2021-02-15 20:32:06 +11:00
Nayeem Rahman
5873adeb5e
fix(cli/source_map): Don't use file names from source maps (#9462) 2021-02-14 17:38:41 +11:00
Jared Beller
b50691efed
refactor(core): Strongly typed deserialization of JSON ops (#9423)
This PR makes json_op_sync/async generic to all Deserialize/Serialize types
instead of the loosely-typed serde_json::Value. Since serde_json::Value
implements Deserialize/Serialize, very little existing code needs to be updated,
however as json_op_sync/async are now generic, type inference is broken in some
cases (see cli/build.rs:146). I've found this reduces a good bit of boilerplate,
as seen in the updated deno_core examples.

This change may also reduce serialization and deserialization overhead as serde
has a better idea of what types it is working with. I am currently working on
benchmarks to confirm this and I will update this PR with my findings.
2021-02-13 11:56:56 -05:00
Luca Casonato
af460fc464
fix: webidl utils and align Event to spec (#9470) 2021-02-13 15:58:12 +01:00
Ryan Dahl
d2d7dc8d67
v1.7.4 2021-02-13 08:20:49 -05:00
Bartek Iwańczuk
f67b06939b
v1.7.3 2021-02-12 17:37:45 +01:00
Bartek Iwańczuk
39f3aaaa72
chore: release crates (#9481) 2021-02-12 16:23:39 +01:00
Kitson Kelly
79916226b7
fix(lsp): properly handle static assets (#9476) 2021-02-12 22:49:42 +11:00
Kitson Kelly
54e53cc9ea
chore: Update to Rust 1.50.0 (#9479) 2021-02-12 21:08:36 +11:00
Yosi Pramajaya
146fb360c6
test(cli): improve test of deno cache (#9340) 2021-02-12 14:54:46 +09:00
Kitson Kelly
d6c05b09dd
feat(lsp): add deno cache code actions (#9471) 2021-02-12 15:17:48 +11:00
Bartek Iwańczuk
723c99de8a
chore: upgrade crates (#9474) 2021-02-11 17:05:42 +01: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
Kitson Kelly
6752be05cd
fix(lsp): handle type deps properly (#9436)
Fixes #9425
2021-02-10 09:46:12 +11:00
Trivikram Kamat
ffe12aa92d
chore: bump TypeScript to 4.1.4 (#9459) 2021-02-09 23:27:38 +01: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
Kitson Kelly
d95666cae0
fix(lsp): handle code lenses for non-documents (#9454) 2021-02-09 20:48:53 +11:00
Kitson Kelly
97d5ef2950
fix(cli): import maps handles data URLs (#9437)
Fixes #9420
2021-02-09 15:05:37 +11:00
Casper Beyer
36e9e53b37
refactor(cli/tools/repl): merge highlighter into helper (#9448) 2021-02-08 17:25:10 +01:00
Kitson Kelly
1f9e9002d5
fix(lsp): prepare diagnostics when the config changes (#9438) 2021-02-08 21:45:46 +11:00
Kitson Kelly
e368c5d0f9
feat(lsp): add implementations code lens (#9441) 2021-02-08 21:45:10 +11:00
Kitson Kelly
09b79463d7 feat(lsp): add asset cache regression test
When we migrated away from all the locks, there was a regression that
was not caught immediately. The tsc::get_asset() would attempt to modify
the snapshot, but the problem was that the snapshot was a .clone() of
the inner language server's assets, which meant that modifications to
that where lost. When we then attempted to do a hover on those assets,
the inner language servers assets didn't have the retrieved asset, and
therefore would throw an error.
2021-02-08 10:47:32 +01:00
Ben Noordhuis
ccbaedb138 fix(lsp): DRY asset cache lookup logic 2021-02-08 10:47:32 +01:00
Ben Noordhuis
e7a7bf8a79 fix(lsp): fix asset cache lookup regression
Commit 2828690fc ("fix(lsp): fix deadlocks, use one big mutex") from
last month introduced a regression in asset cache lookups where results
of lazy caching were lost due to operating on a copy of the asset cache.

This commit fixes that by copying the asset from the copy to the real
cache.
2021-02-08 10:47:32 +01:00
Ben Noordhuis
be10db10fd fix(lsp): remove Sources mutex
The mutex was used to hide the fact that the Sources object mutates
itself when it's queried. Be honest about that and mark everything that
directly or indirectly mutates it as `mut`.

This is a follow-up to commit 2828690fc7
from last month ("fix(lsp): fix deadlocks, use one big mutex (#9271)")
2021-02-08 10:47:32 +01:00
Nayeem Rahman
0cac243a83
fix(cli): check for inline source maps before external ones (#9394)
Fixes #6965
2021-02-08 10:14:05 +11:00
Kitson Kelly
b6353672f8
fix(lsp): support codeAction/resolve (#9405) 2021-02-06 07:10:53 +11:00
Bartek Iwańczuk
ae10219f59
v1.7.2 2021-02-05 19:37:27 +01:00
Bartek Iwańczuk
64f06be0eb
chore: release crates (#9410) 2021-02-05 15:08:18 +01:00
Casper Beyer
c83e261b42
fix(repl): prevent symbol completion panic (#9400) 2021-02-05 12:09:52 +01:00
Kitson Kelly
5b9376908a
fix(cli/lsp): fix using jsx/tsx when not emitting via tsc (#9407)
Closes #9308
Closes #9023
Closes #8993
2021-02-05 22:01:48 +11: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
Bartek Iwańczuk
79fa7e0e96
docs: update example for Deno.Process (#9390) 2021-02-04 13:09:00 +01:00
Bartek Iwańczuk
9069632216
chore: upgrade swc (#9374) 2021-02-03 11:54:53 +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
Casper Beyer
6abf126c2a
chore: remove std directory (#9361)
This removes the std folder from the tree.

Various parts of the tests are pretty tightly dependent 
on std (47 direct imports and 75 indirect imports, not 
counting the cli tests that use them as fixtures) so I've 
added std as a submodule for now.
2021-02-02 12:05:46 +01:00
Bartek Iwańczuk
a2b5d44f1a
refactor: Reorganise integration tests (#9282)
This commit reorganises cli/tests/integration_tests.rs.

All integration tests had been moved into integration module,
which allows to run only integration tests by "cargo test integration".

Additionally some tests were further grouped under nested modules
like "inspector", "file_watcher" or "repl".
2021-02-01 19:09:25 +01:00
Yusuke Tanaka
84f8b87f1b
chore: make all tests annotated with #[cfg(test)] (#9347) 2021-02-01 10:55:23 -05:00
Yoshiya Hinosawa
23281be33a
fix(cli): fix handling of non-normalized specifier (#9357) 2021-02-01 17:02:02 +09:00
Kitson Kelly
534531e4dd
feat(lsp): add references code lens (#9316) 2021-02-01 14:30:41 +11:00
Yusuke Tanaka
ef46bc88bd
chore: upgrade tokio to 1.1.1 (#9327) 2021-01-29 21:18:31 -05:00
Casper Beyer
9965fc8cc3
fix(cli/coverage): display mapped instrumentation line counts (#9310) 2021-01-29 14:45:22 -05:00
hvithrafn
013b8fe606
Update lspower dependency (#9179) 2021-01-29 14:34:33 -05:00
Ryan Dahl
11dd6f2013
v1.7.1 2021-01-29 09:53:03 -05:00
Bartek Iwańczuk
4b92eef25e
test: fix lock_write_fetch test (#9318) 2021-01-29 14:23:02 +01:00
Nayeem Rahman
daad575825
fix(cli): Move WorkerOptions::deno types to unstable (#9163) 2021-01-29 08:15:59 -05:00
Nayeem Rahman
f3122442db
fix(op_crates/web): Add customInspect for Location (#9290) 2021-01-29 08:08:22 -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
Bartek Iwańczuk
c8a5e3c1e4
chore: reenable watch tests (#9306) 2021-01-29 10:34:00 +01:00
Yoshiya Hinosawa
fc162162a1
fix(cli): fix panic in Deno.emit (#9302) 2021-01-29 10:33:58 +09: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
Kitson Kelly
7bda0f567e
fix(cli): add lib dom.asynciterable (#9288)
Fixes #9218
2021-01-29 06:41:30 +11:00
Casper Beyer
5cf194380b
fix(coverage): use source maps when printing pretty reports (#9278)
This commits makes use of source maps and the original source 
when printing lacking line coverage in the pretty printer.

Only the executable lines are checked as before (as non-executable 
lines will always be ignored anyways). The lines then mapped to the 
appropriate source line when a source map is present.
2021-01-28 15:11:38 +01:00
William Perron
f858b653be
bench: remove custom error types (#9301)
Fixes #9253
2021-01-27 22:50:14 -05:00
Kitson Kelly
894ff6bb58
fix(cli): early abort before type checking on missing modules (#9285)
Fixes #9275
2021-01-28 06:54:20 +11:00
Luca Casonato
2638aa03a5
tests: new typescript WPT runner (#9269) 2021-01-27 15:06:18 +01:00
Kitson Kelly
ecfda65eff
fix(cli): correctly determine emit state with redirects (#9287)
Fixes #9129
2021-01-27 22:25:33 +11:00
Ikko Ashimine
798027a596
chore: fix typo in lint.rs (#9281) 2021-01-27 14:41:48 +11:00
Kitson Kelly
e7323002d9
feat(lsp): add performance measurements (#9209) 2021-01-27 11:32:49 +11:00
Kitson Kelly
ada43cc56a
fix(lsp): handle mbc properly when formatting (#9273) 2021-01-27 07:50:13 +11:00
akfm
43f4a23f89
fix(cli): fmt command help message (#9280) 2021-01-26 21:01:10 +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
Kitson Kelly
f9949a3170
fix(op_crates/fetch): fix ReadableStream.pipeThrough() (#9265)
Fixes #9252
2021-01-26 21:56:29 +11:00
Kitson Kelly
8b6893438a
fix(lsp): complete list of unused diagnostics (#9274) 2021-01-26 21:55:59 +11:00
Ben Noordhuis
2828690fc7
fix(lsp): fix deadlocks, use one big mutex (#9271)
The LSP code had numerous places where competing threads could take out
out locks in different orders, making it very prone to deadlocks.
This commit sidesteps the entire issue by switching to a single lock.

The above is a little white lie: the Sources struct still uses a mutex
internally to avoid having to boil the ocean (because being honest about
what it does involves changing all its methods to `&mut self` but that
ripples out extensively...) I'll save that one for another day.
2021-01-26 10:55:04 +01:00
Kitson Kelly
2b4e0be43c
fix(lsp): reduce deadlocks with in memory documents (#9259) 2021-01-26 10:47:12 +11:00
Luca Casonato
e0eb111e3e
Revert "tests: enable wpt for url (#9046)" (#9264)
This reverts commit 66e99d349b.
2021-01-25 16:02:03 +01:00
akfm
cf688cb408
docs(cli): fix return type in comment (#9248) 2021-01-25 15:14:25 +09:00
Luca Casonato
66e99d349b
tests: enable wpt for url (#9046) 2021-01-24 22:29:36 +01:00
ali ahmed
feff6361b1
feat(op_crates/web): adding gb18030 and GBK encodings (#9242) 2021-01-24 20:08:01 +01:00
Anonymous
ad60e750d7
fix(runtime/js): use DOMException in Performance#measure (#9142) 2021-01-24 16:05:18 +01:00
akfm
2ca637962f
docs(cli): fix typo stanalone -> standalone (#9246) 2021-01-24 14:25:18 +01:00
Nayeem Rahman
452df2f23a
fix(cli/flags): don't panic on invalid location scheme (#9202) 2021-01-24 02:18:19 +01:00
Liam Murphy
a61389a55e
fix(compile): fix panic when cross-compiling between windows and unix (#9203) 2021-01-24 02:40:13 +09:00
Kitson Kelly
1a9209d1e3
fix(lsp): handle mbc documents properly (#9151)
Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
2021-01-22 21:03:16 +11:00
Nayeem Rahman
bdb1ee6480
fix(core): Handle prepareStackTrace() throws (#9211)
Fixes #9206
2021-01-21 20:48:04 +11:00
Yoshiya Hinosawa
18ac7d40c8
fix(runtime): fix recursive dispatches of unload event (#9207) 2021-01-21 16:44:48 +09:00
Casper Beyer
413f79a494
fix(coverage): ignore comments (#8639)
This commit fixes coverage collection by ignoring
comments when tallying up line counts.
2021-01-20 15:51:36 +01: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
Kitson Kelly
02c6a88d8a
docs: improve manual around typescript (#8139)
Fixes #9054
2021-01-20 09:28:58 +11:00
ali ahmed
973c33c899
feat(web): add utf-16 and big5 to TextEncoder/TextDecoder (#8108) 2021-01-19 21:58:57 +01:00
Luca Casonato
0e8e6d7251
chore: add compile aarch64-apple-darwin target (#9174) 2021-01-19 20:03:50 +01:00
Satya Rohith
16036a8a51 feat: add markdown support to deno fmt (#8887)
This commit adds support for formatting markdown files with "deno fmt".

Additionally "--ext={js|jsx|ts|tsx|md}" flag was added to "deno fmt"
that allows to specify file type when providing contents over stdio.
2021-01-19 18:39:35 +01:00
Luca Casonato
4c223d0521
fix: panic during deno compile with no args (#9167) 2021-01-19 16:19:36 +01:00
Yusuke Tanaka
0ef8c915c0
feat(unstable): add Deno.resolveDns API (#8790) 2021-01-19 09:39:04 -05:00
Luca Casonato
cf3202644d
fix: full commit hash in canary compile download (#9166) 2021-01-19 13:53:23 +01:00
Freddy Fallon
867ce78fb6
fix(installer): pass cached-only to executable_args (#9169) 2021-01-19 13:46:08 +01:00
Liam Murphy
3505823e20
fix(cli/install): escape % symbols in windows batch files (#9133)
Fixes #9096.
2021-01-18 19:34:37 -08:00
Bartek Iwańczuk
9ff468df73
feat: Standalone lite binaries and cross compilation (#9141)
This commit adds --target and --lite flags to deno compile subcommand.

--target allows to cross-compile binary to different target architectures by
fetching appropriate binary from remote server on first run. All downloaded
binaries are stored in "$DENO_DIR/dl".

--lite allows to use lite version of the runtime (ie. the one that doesn't contain
built-in tooling like formatter or linter).
2021-01-19 03:40:22 +01:00
Nayeem Rahman
b12afdb89a
feat: Add WorkerOptions interface to type declarations (#9147) 2021-01-19 03:26:39 +01:00
Casper Beyer
f43855cead
fix(cli): print a newline after help and version (#9158) 2021-01-19 01:56:24 +01:00
Luca Casonato
7a30d1a3d8
fix: redirect in --location relative fetch (#9150) 2021-01-18 13:59:29 +01:00
William Perron
18150b3a78
bench: fix off-by-one error in thread_count (#9145) 2021-01-18 05:00:51 -05:00
Kitson Kelly
2077864a8d
fix(op_crate/fetch): add back ReadableStream.getIterator and deprecate (#9146) 2021-01-18 10:40:39 +11:00
Nayeem Rahman
81d73f2987
fix(cli): Check permissions for Deno.emit() (#9139) 2021-01-18 08:58:23 +11:00
William Perron
2b5b93158c
benchmark: cleanup serde_json values being passed around (#9115) 2021-01-17 11:40:29 -05:00
Vishal Pratap Singh
271fbe39e3
tests(wpt): enable working wasm tests (#9072) 2021-01-17 16:46:33 +01: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
f4dbb267c6
fix: incremental build for deno declaration files (#9138) 2021-01-17 15:12:00 +01:00
Bartek Iwańczuk
b26dcbc69d
chore: Enforce ban-untagged-todo lint rule (#9135) 2021-01-17 00:32:59 +01:00
linbingquan
fc45a19801
docs(cli): correct example (#9136) 2021-01-17 10:31:29 +11:00
Bartek Iwańczuk
69fb2b31b3
upgrade: dlint in third_party/ (#9134) 2021-01-16 16:09:11 +01:00
Hirochika Matsumoto
4b2df87c54
refactor(lsp): don't duplicate fields present in DocumentSpan (#9131) 2021-01-16 13:00:42 +01:00
Bartek Iwańczuk
a3007de950
upgrade: deno_lint to 0.2.16 (#9127) 2021-01-15 19:20:01 +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
Yoshiya Hinosawa
c75f92c4e2
fix: align DOMException API to the spec and add web platform testing of it. (#9106)
* fix: align DOMException API to the spec

* test: fix test case 070_location

* test(DOMException): disable "does not inherit from Error: class-side"
test of WPT

* test: remove test cases in deno codebase

* docs: add note about skipped test
2021-01-14 22:08:49 +09:00
Bert Belder
78c27e0923
Merge pull request #9107
Bump crate versions and publish crates.
2021-01-13 11:44:31 -08:00
Ryan Dahl
8fc29f224d release crates 2021-01-13 14:00:13 -05:00
Bert Belder
060bfe7df8
Fix race condition in file watcher (#9105) 2021-01-13 10:55:44 -08:00
Bert Belder
ca07bab594
Remove unnecessary boxing of tokio::time::Sleep (#9105) 2021-01-13 10:55:28 -08:00
Luca Casonato
18b3150401
build: disable cafile_* tests and use slow runners (#9089) 2021-01-13 16:48:33 +01:00
Luca Casonato
1728b3ba19
tests: disable logging of 'ok' web platform tests (#9087) 2021-01-12 17:14:17 -08:00
Bartek Iwańczuk
8142496c57
feat: stabilize Deno.shutdown() and Conn#closeWrite()
Closes: #9099
2021-01-12 16:17:31 -08:00
Hirochika Matsumoto
8d5af6ca52
feat(lsp): Add textDocument/implementation (#9071)
Ref #8643
2021-01-13 08:53:27 +11:00
Yacine Hmito
46a072c792
tests: enable .worker.js tests (#9065) 2021-01-12 14:02:13 +01:00
Bert Belder
de0ae3a12c
fix(installer): remove redundant clone (#9098) 2021-01-12 13:55:09 +01:00
Yoshiya Hinosawa
fd56fa89f3
fix(cli): dispatch unload on exit (#9088) 2021-01-12 05:32:58 -05:00
Yusuke Tanaka
5c6ab75de1
fix(watcher): keep working even when imported file has invalid syntax (#9091) 2021-01-11 23:53:58 -08:00
Bartek Iwańczuk
275a5c65a2
upgrade: tokio 1.0 (#8779)
Co-authored-by: Bert Belder <bertbelder@gmail.com>
2021-01-11 23:50:02 -08:00
Yusuke Tanaka
d8fd71afdf
chore: update copyright to 2021 (#9092) 2021-01-11 18:13:41 +01:00
Bartek Iwańczuk
d676b6c63a
upgrade: swc_bundler 0.19.2 (#9085) 2021-01-11 15:32:34 +01:00
gorogoroumaru
b0821fe9ce
fix(op_crate/web): fix atob to throw spec aligned DOMException (#8798) 2021-01-11 09:15:32 +11:00
Luca Casonato
1a6ce29f3d
feat(fetch): req streaming + 0-copy resp streaming (#9036)
* feat(fetch): req streaming + 0-copy resp streaming

* lint

* lint

* fix test

* rm test.js

* explicitly use CancelHandle::default()

* Apply review suggestions

Co-authored-by: Ben Noordhuis <info@bnoordhuis.nl>

* fix test

* Merge remote-tracking branch 'origin/master' into fetch_real_streaming

* fix test

* retrigger ci

Co-authored-by: Ben Noordhuis <info@bnoordhuis.nl>
2021-01-10 20:54:29 +01:00
Tarik Eshaq
9801858cb0
tests(wpt/console): Enables web platform tests for console (#9013) 2021-01-10 12:49:45 -05:00
Yacine Hmito
f7e09c6a55
Test crypto.getRandomValues() with wpt (#9016) 2021-01-10 11:27:15 -05:00
Ryan Dahl
ab5ecabe22
Add cargo_deps to benchmarks (#9075) 2021-01-10 08:13:38 -05:00
Luca Casonato
4361895476
fix: don't error on version and help flag (#9064) 2021-01-09 13:08:03 +01:00
Casper Beyer
6d7da6309e
tests: enable WPT for timers (#9047) 2021-01-09 07:32:04 +01:00
Yacine Hmito
9637209765
fix(web): implement DOMException#code (#9015)
Co-authored-by: Luca Casonato <lucacasonato@yahoo.com>
2021-01-09 07:27:46 +01:00
Bert Belder
f3ead9c6a7
refactor: Print cause chain when downcasting AnyError fails (#9059) 2021-01-09 01:57:37 +01:00
yonatan ben avraham
5f015eac9c
fix: Worker hangs when posting "undefined" as message (#8920)
This commit fixes hang in web workers occuring when sending
"undefined" as message value. It is a temporary band-aid
until proper structured close is implemented.

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2021-01-08 15:44:24 +01:00
Luca Casonato
a44349dfdf
feat: denort binary (#9041)
This commit adds new binary target called "denort".

It is a "lite" version of "deno" binary that can only execute
code embedded inside the binary itself.

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2021-01-08 03:08:51 +01:00
Nayeem Rahman
e61e81eb57
feat: add --location=<href> and globalThis.location (#7369) 2021-01-07 19:06:08 +01:00
Anonymous
b40d5e5e0b
ignore "use asm" (#9019)
Preventing V8 from logging erroneous line numbers. Use wasm.
2021-01-07 10:50:57 -05:00
Casper Beyer
9b3338fa2f
fix(coverage): report partial lines as uncovered (#9033) 2021-01-07 12:45:42 +01:00
Casper Beyer
f8df9938c5
fix(coverage): do not store source inline in raw reports (#9025)
When we were doing single process in-memory reports getting the source
from the runtime was practical, but now that we're writing to disk this
conflicts with the format tools taking raw v8 coverage dumps expect.
2021-01-07 05:53:57 -05:00
Nayeem Rahman
b5f1d257a3
fix: Use "none" instead of false to sandbox Workers (#9034) 2021-01-07 05:52:30 -05:00
Ryan Dahl
cb658f5ce5
Remove emoji from welcome script so it looks better on windows (#9031) 2021-01-07 05:51:15 -05:00
Steven Guerrero
adc2f08c17
feat: Add configurable permissions for Workers (#8215)
This commit adds new option to "Worker" Web API that allows to 
configure permissions.

New "Worker.deno.permissions" option can be used to define limited
permissions to the worker thread by either:
- inherit set of parent thread permissions
- use limited subset of parent thread permissions
- revoke all permissions (full sandbox)

In order to achieve this functionality "CliModuleLoader"
was modified to accept "initial permissions", which are used
for top module loading (ie. uses parent thread permission set
to load top level module of a worker).
2021-01-06 21:31:16 +01:00
Luca Casonato
2e18fcebcc
refactor: move WebSocket API to an op_crate (#9026) 2021-01-06 16:57:28 +01:00
Anonymous
3761d054d0
fix: stronger input checking for setTimeout; add function overload (#8957) 2021-01-06 08:53:30 -05:00
Kitson Kelly
54240c22af
feat(cli): support data urls (#8866)
Closes: #5059

Co-authored-by: Valentin Anger <syrupthinker@gryphno.de>
2021-01-06 13:22:38 +11:00
Luca Casonato
60c9c85758
fix: align performance API to spec using WPT (#9012) 2021-01-06 02:56:40 +01:00
Bartek Iwańczuk
bb88418221
refactor(cli): remove 'js' module, simplify compiler snapshot (#9020)
This commit removes "js" module from "cli".

It contained stuff related to TypeScript compiler (snapshot,
declaration files) and thus it was moved to "tsc" module.
2021-01-06 02:38:23 +01:00
Luca Casonato
39bbbbce70
fix: use inline source maps when present in js (#8995) 2021-01-06 00:10:36 +01:00
Bartek Iwańczuk
8d1ee3bfaf
upgrade: deno_doc, deno_lint, dprint, swc_ecmascript, swc_bundler (#9003) 2021-01-05 22:51:54 +01:00
Luca Casonato
7704839039
fix: align AbortSignal to spec using WPT (#9007) 2021-01-05 22:43:25 +01:00
Ryan Dahl
096e090576
Add rlib size benchmarks (#9005) 2021-01-05 16:28:51 -05:00
Bartek Iwańczuk
46c0cab763
refactor(core): simplify Deno.core initialisation, remove stale TODO (#8847)
This commit rewrites initialisation of the "shared queue" and
in effect prevents from double execution of "core/core.js" and
"core/error.js".

Previously both of these files were executed every time a "JsRuntime"
was created. That lead to a situation where one copy of each script
was included in the snapshot and then another copy would be
executed after loading the snapshot.

Effectively "JsRuntime::shared_init" was removed; instead execution
of those scripts and actual initialisation of shared queue
was split into two helper functions: "JsRuntime::js_init" and
"JsRuntime::share_queue_init".

Additionally stale TODO comments were removed.
2021-01-05 22:10:50 +01:00
Luca Casonato
0d41e21b0e
fix: align encoding APIs to spec using WPT (#9004) 2021-01-05 19:50:40 +01:00
Luca Casonato
a3099798c8
tests: add web platform test runner (#8990)
Co-authored-by: Kitson Kelly <me@kitsonkelly.com>
2021-01-05 12:07:27 +01:00
Nayeem Rahman
cbc2108525
feat(cli/standalone): support runtime flags for deno compile (#8738) 2021-01-05 00:15:52 +01:00
Valentin Anger
444eca80a9
fix(lsp): Respect client capabilities for config and dynamic registration (#8865) 2021-01-05 08:52:20 +11:00
Sylvain Cau
b478b06f9d
feat(installer): Add support for MSYS on Windows (#8932) 2021-01-04 08:52:43 -08:00
Casper Beyer
4ca77ad84c
fix(coverage): merge duplicate reports (#8942)
Merging multiple runs isn't quite right because we 
rely on a 0 count to signal that a block hasn't been called.

Other tools like c8 expect this to be true as-well so we 
need to do our best to merge coverage files rather 
than duplicating them.
2021-01-04 17:01:21 +01:00
Mo
3e5a3daf59
BREAKING(unstable): remove CreateHttpClientOptions.caFile (#8928) 2021-01-04 16:55:20 +01:00
Satya Rohith
1d4f8298a7
docs: meta updates to cli/tests/unit/README.md (#8969) 2021-01-04 15:55:57 +01:00
Ben Noordhuis
20babd9bfa
fix(inspector): kill child process after test (#8986)
The child process kept running and printing "hello" to stdout.

This commit also removes the dependency on reqwest and instead
switches to the re-export from the fetch crate.

Brings back commit 1a2e7741c3.
2021-01-04 15:52:22 +01:00
Bartek Iwańczuk
f4246ee1fc
chore: disable flaky test on Windows (#8987) 2021-01-04 14:27:29 +01:00
Luca Casonato
379eedc05c
Revert "fix(inspector): add back list endpoint (#8894)" (#8977)
This reverts commit 1a2e7741c3.
2021-01-04 12:19:23 +01:00
Maayan Hanin
1a6969bebb
fix: panic on invalid file:// module specifier (#8964) 2021-01-04 04:33:20 -05:00
Liam Perlaki
1a2e7741c3
fix(inspector): add back list endpoint (#8894)
This commit adds back "/json/list" endpoint to
inspector server which was erroneously removed
during server rewrite.
 
Co-authored-by: Ben Noordhuis <info@bnoordhuis.nl>
2021-01-03 21:31:52 +01:00
Bartek Iwańczuk
41a4a34aee
upgrade: Rust 1.49.0 (#8955) 2021-01-02 13:52:42 +01:00
Kitson Kelly
012f99bd9a
refactor(cli): runtime compiler APIs consolidated to Deno.emit() (#8799)
Closes: #4752
2021-01-01 08:43:54 +11:00
Kitson Kelly
587155f86d
feat(lsp): support specifying a tsconfig file (#8926) 2020-12-31 14:33:44 +11:00
Rich Trott
e568ddf996
fix(op_crates/fetch): correct regexp for fetch header (#8927)
Fix bug in regular expression and make the regular expression more
strict.

In a string passed to new RegExp(), '[\t\s]' is identical to '[ts]' and
not `/[\t\s]/`. For that, the backslash needs to be escaped in the
string. Futhermore, `\t` is the tab character and is included in the
special regexp value `\s` so is unnecessary.

That would reduce the RegExp to new RegExp(`^${value}\\s*;?`) but
there's no point in matching 0 or more space characters followed by 0 or
one semi-colons as that will match no matter what follows `value`.

To make it more strict, require one of space, semicolon, or
end-of-string after value.
2020-12-30 23:46:08 +01:00
Nayeem Rahman
22e0ee92a6
BREAKING(unstable): Use hosts for net allowlists (#8845)
Allowlist checking already uses hosts but for some reason 
requests, revokes and the runtime permissions API use URLs.

- BREAKING(lib.deno.unstable.d.ts): Change 
NetPermissionDescriptor::url to NetPermissionDescriptor::host

- fix(runtime/permissions): Don't add whole URLs to the 
allowlist on request

- fix(runtime/permissions): Harden strength semantics:
({ name: "net", host: "127.0.0.1" } is stronger than 
{ name: "net", host: "127.0.0.1:8000" }) for blocklisting

- refactor(runtime/permissions): Use tuples for hosts, make 
the host optional in Permissions::{query_net, request_net, revoke_net}()
2020-12-30 23:35:28 +01:00
Rich Trott
af222f7a7f
chore(cli/tests): fix typo in test failure message (#8935) 2020-12-30 11:00:55 -05:00
Bartek Iwańczuk
b07a0b640d
v1.6.3 2020-12-30 16:13:42 +01:00
Bartek Iwańczuk
4997f426c3
chore: release crates (#8931) 2020-12-30 15:29:17 +01:00
Kitson Kelly
b1230a85e8
fix(cli): info does not panic on missing modules (#8924)
Fixes #8918
2020-12-30 22:19:51 +11:00
Kitson Kelly
8011eced14
feat(lsp): add cache command (#8911) 2020-12-30 15:17:17 +11:00
Kitson Kelly
e8a81724bb
fix(lsp): handle ts debug errors better (#8914)
Fixes #8864
2020-12-30 12:46:58 +11:00
hrsh7th
57b0562957
feat(lsp): Implement textDocument/rename (#8910) 2020-12-30 11:58:20 +11:00
Yusuke Tanaka
d5f3a749eb
refactor(cli/flags): change allow_read/write/net types from bool to Option<Vec<T>> (#8896)
This PR refactors "cli/flags.rs" and "runtime/permissions.rs" so 
that "allow_read", "allow_write" and "allow_net" themselves
have allowlists, instead of storing them in additional fields.
2020-12-29 19:34:35 +01:00
Deepanshu Utkarsh
115de4c81a
fix(core): Fix incorrect index in Promise.all error reporting (#8913) 2020-12-29 15:24:19 +01:00
Bartek Iwańczuk
24844a0052
upgrade: dprint, swc_bundler, swc_common, swc_ecmascript (#8901) 2020-12-29 00:22:36 +01:00
Waldir Pimenta
b778f8bbff
docs(introduction): Improve wording and capitalization (#8848) 2020-12-29 10:05:29 +11:00
Casper Beyer
091059450e
feat(unstable): collect coverage from the run command (#8893)
This adds implicit coverage collection to the run command 
when a coverage collection directory is set (via an environment 
variable).
2020-12-28 16:51:26 +01:00
Luca Casonato
9419c06ab5
chore: move ProgressEvent type to deno.web lib (#8878) 2020-12-26 18:15:30 +01:00
Casper Beyer
e8587c86bf
test(cli): ensure await Promise.all does not race (#8868) 2020-12-26 08:29:46 -05:00
Yosi Pramajaya
c1fdb30394
fix: fetch bad URL will not panic (#8884) 2020-12-26 08:06:00 -05:00
Yosi Pramajaya
b15539587e
refactor(test_util): replace "warp" with "hyper" (#8846)
This commit rewrites "test_server" to use "hyper" 
instead of "warp" in an effort to reduce number of
dependencies.
2020-12-24 14:11:32 +01:00
Kitson Kelly
a4d557126e
fix(lsp): provide diagnostics for unresolved modules (#8872) 2020-12-24 21:53:03 +11:00
Bartek Iwańczuk
d199e45ad5
v1.6.2 2020-12-22 17:00:35 +01:00
Bartek Iwańczuk
6ce310fa27
chore: release crates (#8854) 2020-12-22 14:50:13 +01:00
Luca Casonato
ddda669a02
fix: implement ReadableStream fetch body handling (#8855) 2020-12-22 14:14:23 +01:00
Kitson Kelly
097c3379ba
feat(lsp): support the unstable setting (#8851) 2020-12-22 21:21:18 +11:00
Kitson Kelly
b091c6c8c9
fix(lsp): respect enable flag for requests (#8850) 2020-12-22 16:42:32 +11:00
Bartek Iwańczuk
1e144ec022
upgrade: deno_doc, deno_lint, dprint, swc (#8849) 2020-12-22 00:57:03 +01:00
Liam Murphy
4033b39036
refactor: rewrite chown_test.ts not to depend on python (#8843)
This commit rewrites "chown_test.ts" to use the GNU "id" command 
instead of python. This won't work on Windows, but these tests aren't
currently run on Windows anyway.
2020-12-21 16:30:59 +01:00
Luca Casonato
bd85d0ed42
refactor: rewrite lsp to be async (#8727)
Co-authored-by: Luca Casonato <lucacasonato@yahoo.com>
2020-12-21 08:44:26 -05:00
Casper Beyer
3078fcf55a
feat(unstable): record raw coverage into a directory (#8642) 2020-12-21 14:04:25 +01:00
Liam Murphy
d5ee168468
refactor: rewrite process_test.ts to use deno instead of python (#8841)
Rewrites all the subprocess python scripts to be Deno scripts.
2020-12-21 13:13:09 +01:00
Bartek Iwańczuk
3eec73ff90
Revert "fix: TLA in web worker (#8809)" (#8839)
This reverts commit e924bbdf36.
2020-12-20 15:14:19 +01:00
Bartek Iwańczuk
e924bbdf36
fix: TLA in web worker (#8809)
Implementors of `deno_core::JsRuntime` might want to do additional actions
during each turn of event loop, eg. `deno_runtime::Worker` polls inspector,
`deno_runtime::WebWorker` receives/dispatches messages from/to worker host.
Previously `JsRuntime::mod_evaluate` was implemented in such fashion that it 
only polled `JsRuntime`'s event loop. This behavior turned out to be wrong 
in the example of `WebWorker` which couldn't receive/dispatch messages because
its implementation of event loop was never called. 

This commit rewrites "mod_evaluate" to return a handle to receiver that resolves
when module's promise resolves. It is now implementors responsibility to poll
event loop after calling `mod_evaluate`.
2020-12-20 00:34:22 +01:00
Bartek Iwańczuk
660f75e066
upgrade: swc_ecmascript 0.15.1 (#8836) 2020-12-20 00:30:53 +01:00
yonatan ben avraham
afbd19ed9b
feat(unstable): support in memory certificate data for Deno.createHttpClient (#8739) 2020-12-19 23:13:48 +01:00
Bartek Iwańczuk
4ab1aa8877
upgrade: rustyline 7.1.0 (#8829) 2020-12-19 16:20:36 +01:00
Luca Casonato
b9165e9482
fix: atomically write files to $DENO_DIR (#8822) 2020-12-18 19:30:49 +01:00
Nayeem Rahman
ffb5f7a4e1
refactor: Rename runtime/rt to runtime/js (#8806) 2020-12-17 17:37:57 +01:00
Casper Beyer
55dc467b41
test(cli): ensure await all on stdout does not deadlock (#8802) 2020-12-17 15:01:47 +01:00
Trivikram Kamat
63e0ab99a1
upgrade TypeScript to 4.1.3 (#8785) 2020-12-16 11:46:32 -05:00
Bartek Iwańczuk
6984b63f2f
refactor: rewrite ops to use ResourceTable2 (#8512)
This commit migrates all ops to use new resource table
and "AsyncRefCell".

Old implementation of resource table was completely 
removed and all code referencing it was updated to use
new system.
2020-12-16 17:14:12 +01:00
Bartek Iwańczuk
9fe26f8ca1
refactor: remove dead code (#8781) 2020-12-15 21:45:29 +01:00
Kitson Kelly
892d6cc997
refactor(lsp): optimise static assets (#8771)
Fixes #8158
2020-12-16 06:34:39 +11:00
Kitson Kelly
63a821b78b
fix(cli): make dynamic import errors catchable (#8750)
Fixes #6259
2020-12-15 16:52:55 +11:00
Bartek Iwańczuk
b6d5ae1ecd
v1.6.1 2020-12-14 21:25:05 +01:00