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

2722 commits

Author SHA1 Message Date
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