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

5727 commits

Author SHA1 Message Date
Aaron O'Mullan
8377957666
refactor(runtime): use Extensions (#10461) 2021-05-02 19:22:57 -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
Aaron O'Mullan
948d7dd287
cleanup(runtime): re-export deno_timers like all other deno crates (#10464) 2021-05-02 08:28:36 -04:00
Casper Beyer
b48ceb69a1
docs: remove wasm and wasi as prerequisites (#10465)
ref: #7512
2021-05-02 17:36:15 +09:00
crowlKats
da911e741c
fix(extension/websocket): better websocket errors (#10458) 2021-05-01 20:52:13 +02:00
Aditya Pandit
012da3ae1e
fix(core): fix typo in error message of print function (#10456) 2021-05-01 23:20:20 +09: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
Aaron O'Mullan
c5be20aa67
cleanup(core): use ZeroCopyBuf for serialize & encode bindings (#10435) 2021-04-30 21:09:58 -04:00
Aaron O'Mullan
578f2ba45e
refactor(core): provide builtins as an Extension (#10449) 2021-04-30 21:08:29 -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
crowlKats
6804b2f889
refactor(websocket): use ZeroCopyBuf to return binary data (#10446) 2021-04-30 11:03:50 -04:00
Aaron O'Mullan
fc9c7de94b
cleanup(core): replace OpResponse with OpResult (#10434)
Drop the Value/Buffer enum since #10432 allows buffers to be serialized rust => v8
2021-04-30 10:51:54 -04:00
Aaron O'Mullan
5ec478b5fa
refactor(core): initialize extensions in runtime constructor (#10421)
This ensures that provided extensions are all correctly setup and ready to use once the JsRuntime constructor returns

Note: this will also initialize ops for to-be-snapshotted runtimes
2021-04-30 10:38:35 -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
Aaron O'Mullan
4e6790a5fa
feat(serde_v8): ZeroCopyBuf (#10432)
Bidirectional zero-copy serialization of buffers between v8 & rust
that can be nested in structs/tuples/etc.
2021-04-30 08:42:09 -04:00
Aaron O'Mullan
8922639c1d
refactor(core.js): provide window.__bootstrap (#10423) 2021-04-30 08:13:23 -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
Ryan Dahl
b9a136c868
Revert "ci: build only lib and bins (#10401)" (#10415) 2021-04-29 10:33:46 +09:00
Zeshan Aslam
4e434d43e6
docs: update configuration to include noUncheckedIndexedAccess (#10324)
Fixes: #10305 

Co-authored-by: Kitson Kelly <me@kitsonkelly.com>
2021-04-29 09:33:15 +10:00
Aaron O'Mullan
e89295b176
refactor(extensions): reintroduce builder (#10412) 2021-04-28 18:16:45 -04:00
Ryan Dahl
e63c533154
enable error-on-warning (#10410)
Only on linux and osx. Fixes one warning.
2021-04-28 15:10:44 -04: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
dev-nicolaos
6a33d2073f
docs: edit wording for consistency/grammar (#10375) 2021-04-28 12:03:27 -04:00
Yoshiya Hinosawa
48659c374d
ci: build only lib and bins (#10401)
Currently we specify --all-targets when building. It's equivalent of 
--lib --bins --tests --benches --examples, but in test release jobs,
we don't need to build everything. So this PR reduces build target to only 
--bin deno --bin test_server in build phase, and reduces test targets to 
--bins --lib --tests.

This skips the building of benches and examples in test release jobs.
2021-04-28 10:42:00 -04: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
87c055b371
docs: remove --lite command line flag (#10386) 2021-04-27 07:39:42 +10: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
Aaron O'Mullan
801244027d
flamebench: streamline profiling benches (#10121) 2021-04-26 16:41:53 +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
Luca Casonato
cdd2355f0f
tests: enable idlharness wpt (#10371)
This enables more test cases that expose issues in our implementation.
2021-04-26 13:02:49 +02: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