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

6832 commits

Author SHA1 Message Date
Bartek Iwańczuk
eb4a8fc8a0
build: don't publish canary verion from non-main branch (#12986) 2021-12-07 14:49:20 +01:00
Bartek Iwańczuk
622bff4ebc
chore: add CODEOWNERS file (#13008) 2021-12-07 14:00:33 +01:00
Andreu Botella
33da15ae5a
refactor(timers): refactor timers to use one async op per timer (#12862)
This change also makes the timers implementation closer to the spec, and
sets up the stage to implement AbortSignal.timeout() (whatwg/dom#1032).

Fixes #8965
Fixes #10974
Fixes #11398
2021-12-07 13:39:58 +01:00
Bartek Iwańczuk
5027826a64
build: pin dependencies in cli crate (#12967) 2021-12-07 01:43:09 +01:00
Ryan Dahl
a2f1357fe8
chore: upgrade to rustls 0.20 (#12488)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: Bert Belder <bertbelder@gmail.com>
2021-12-07 00:48:11 +01:00
Andreu Botella
b91e6fd02f
chore: Update WPT (#12987) 2021-12-06 16:03:09 +01:00
Divy Srivastava
d31378726e
feat(ext/crypto): implement unwrapKey (#12539) 2021-12-05 04:55:11 +01:00
Bartek Iwańczuk
c59f90d01f
chore: upgrade to Rust 1.57.0 (#12968) 2021-12-04 14:19:06 +01:00
Luca Casonato
72e9720e91
chore: merge v1.16.4 into main (#12984) 2021-12-04 01:26:54 +01:00
Luca Casonato
27ef275d27
chore: update to rusty v8 0.36.0 (#12979) 2021-12-03 15:56:04 +01:00
Leo Kettmeir
46794d4e43
refactor(ext/fetch): pass opstate in FetchHandler::fetch_file 2021-12-03 14:25:16 +01:00
Nikita Sobolev
1947f891db
chore(ci): update setup-python action version (#12965) 2021-12-03 12:00:25 +01:00
Aaron O'Mullan
f6d4a63c7f
fix(core): throw on invalid callConsole args (#12973)
Instead of panicking via asserts, since JS-callable code (even Deno.core ...) should not cause process crashes/panics
2021-12-03 11:55:14 +01:00
Ryan Dahl
14f4102ece
refactor: deno_tls does not depend on reqwest (#12961) 2021-12-01 13:20:34 -05:00
Ryan Dahl
084caffc08
refactor: cli doesn't need to depend on deno_tls (#12952)
also move create_http_client to deno_fetch
2021-12-01 11:13:11 -05:00
KnorpelSenf
4c36fa1fdf
chore: Fix typo in no-pending-ops error message (#12948) 2021-12-01 15:22:11 +01:00
Yoshiya Hinosawa
7ef76c1dc3
ci: fix sysroot setup (#12958) 2021-12-01 22:02:33 +09:00
Andreu Botella
9a10668694
fix(test): Improve reliability of deno test's op sanitizer with timers (#12934)
Although not easy to replicate in the wild, the `deno test` op sanitizer
can fail when there are intervals that started before a test runs, since
the op sanitizer can end up running in the time between the timer op for
an interval's run resolves and the op for the next run starts.

This change fixes that by adding a new macrotask callback that will run
after the timer macrotask queue has drained. This ensures that there is
a timer op if there are any timers which are unresolved by the time the
op sanitizer runs.
2021-11-30 01:27:30 +01:00
Andreu Botella
48c57001c8
fix(core): Wake up the runtime if there are ticks scheduled (#12933) 2021-11-30 00:31:12 +01:00
Kitson Kelly
18a63dd977
feat: add --no-check=remote flag (#12766)
Closes #11970
2021-11-30 09:23:30 +11:00
Ryan Dahl
f3b74350da
refactor: remove deno_fetch::HttpClientDefaults (#12931)
More clean up that should have been in cc83ad3
2021-11-29 10:29:41 -05:00
Zheyu Zhang
bd989143e1
refactor(cli): simplify lint/format resolver logic (#12898) 2021-11-29 09:17:57 -05:00
Andreu Botella
4a13c320d7
fix(workers): Make worker.terminate() not immediately kill the isolate (#12831)
Due to a bug in V8, terminating an isolate while a module with top-level
await is being evaluated would crash the process. This change makes it
so calling `worker.terminate()` will signal the worker to terminate at
the next iteration of the event loop, and it schedules a proper
termination of the worker's isolate after 2 seconds.
2021-11-29 13:37:44 +01:00
Bartek Iwańczuk
5178e093ed
Revert "fix(test): Improve reliability of deno test's op sanitizer with timers (#12908)" (#12929)
This reverts commit d335343a79.
2021-11-29 12:07:47 +01:00
Michael Busby
6c09e02304
feat(ext/net): enable sending to broadcast address (#12860)
You can now send UDP datagrams to the broadcast address.
2021-11-29 11:14:46 +01:00
DjDeveloper
3881e2e7bf
chore: re-export deno_core from deno_runtime (#12923) 2021-11-28 13:07:32 -05:00
Ryan Dahl
cc83ad39ce
refactor: add deno_fetch::Options for init (#12904)
deno_fetch::init has a lot of parameters and generic on two types 
that keeps expanding over time. This refactor adds deno_fetch::Options 
struct for more clearly defining the various parameters.
2021-11-28 13:07:03 -05:00
Divy Srivastava
96d02deed6
feat(ext/crypto): support importing exporting AES JWK keys (#12444) 2021-11-28 16:48:49 +01:00
Andreu Botella
d335343a79
fix(test): Improve reliability of deno test's op sanitizer with timers (#12908)
Although not easy to replicate in the wild, the `deno test` op sanitizer
can fail when there are intervals that started before a test runs, since
the op sanitizer can end up running in the time between the timer op for
an interval's run resolves and the op for the next run starts.

This change fixes that by adding a new macrotask callback that will run
after the timer macrotask queue has drained. This ensures that there is
a timer op if there are any timers which are unresolved by the time the
op sanitizer runs.
2021-11-28 16:40:38 +01:00
Andreu Botella
1974eb1021
fix(websocket): bad rid on WebSocketStream abort(#12913)
Fix a bad resource ID error when aborting a WebSocketStream immediately
after its creation.
2021-11-28 12:25:49 +01:00
Ben Noordhuis
2d830c263b
feat(core): intercept unhandled promise rejections (#12910)
Provide a programmatic means of intercepting rejected promises without a
.catch() handler. Needed for Node compat mode.

Also do a first pass at uncaughtException support because they're
closely intertwined in Node. It's like that Frank Sinatra song:
you can't have one without the other.

Stepping stone for #7013.
2021-11-28 00:46:12 +01:00
Ben Noordhuis
993a1dd41a
feat(runtime): add op_set_exit_code (#12911)
Set the exit code to use if none is provided to Deno.exit(), or when
Deno exits naturally.

Needed for process.exitCode Node compat. Paves the way for #12888.
2021-11-28 00:45:38 +01:00
Yury Selivanov
1d3f734e18
feat(ext/net): ALPN support in Deno.connectTls() (#12786) 2021-11-26 19:59:53 +01:00
Andreu Botella
d763633781
feat(etc/fetch): Support WebAssembly.instantiateStreaming for file fetches (#12901)
Fetching of local files, added in #12545, returns a response with no
headers, including the `Content-Type` header. This currently makes it
not work with the WebAssembly streaming APIs, which require the response
to have a content type of `application/wasm`.

Since the only way to obtain a `Response` object with a non-empty `url`
field is via `fetch()`, this change changes the content type requirement
to only apply to responses whose url has the `file:` scheme.
2021-11-26 19:52:41 +11:00
David Sherret
6a780543a4
refactor(repl): move rustyline sync channel communication into struct (#12900) 2021-11-25 14:05:12 -05:00
Bartek Iwańczuk
f3c0f0565b
feat(core): Add ability to "ref" and "unref" pending ops (#12889)
This commit adds an ability to "ref" or "unref" pending ops.

Up to this point Deno had a notion of "async ops" and "unref async ops";
the former keep event loop alive, while the latter do not block event loop
from finishing. It was not possible to change between op types after
dispatching, one had to decide which type to use before dispatch.

Instead of storing ops in two separate "FuturesUnordered" collections,
now ops are stored in a single collection, with supplemental "HashSet"
storing ids of promises that were "unrefed".

Two APIs were added to "Deno.core":

"Deno.core.refOp(promiseId)" which allows to mark promise id
to be "refed" and keep event loop alive (the default behavior)
"Deno.core.unrefOp(promiseId)" which allows to mark promise
id as "unrefed" which won't block event loop from exiting
2021-11-25 19:49:09 +01:00
Luca Casonato
2853e37604
fix(ext/crypto): throw on key & op algo mismatch (#12838) 2021-11-25 15:57:01 +01:00
Ben Noordhuis
47cf7b0b2e
fix(cli): fix slow test, unbreak ci (#12897)
Reduce the number of iterations from 1,024 to 128.

On my big bruiser of a desktop machine it already takes up close to a
minute to complete when nothing else is running so no way it's going to
finish in the allotted time on the CI.

The fact that the test used to pass may be indicative of a performance
regression somewhere but it's not clear to me when or where that would
have been introduced.

Fixes #12887.
2021-11-25 14:25:22 +01:00
Bartek Iwańczuk
1193d46485
tests: add 'await' to all invocations of 'assertRejects' (#12893) 2021-11-25 02:23:03 +01:00
Bartek Iwańczuk
e68a241946
chore: upgrade lspower to 1.4.0 (#12894) 2021-11-25 12:10:12 +11:00
Bert Belder
c6f3493f18
chore: merge v1.16.3 into main (#12892) 2021-11-24 15:56:18 -08:00
David Sherret
adc5974333
fix(lsp): lsp should respect include/exclude files in format config (#12876) 2021-11-24 15:14:19 -05:00
Abdfn
88000b5feb
chore: upgrade Rust version to 1.56.1 (#12870) 2021-11-24 13:26:18 -05:00
Bartek Iwańczuk
1117d2db39
compat: support compat mode in REPL (#12882)
This commit introduces "ProcState::maybe_resolver" field, which
stores a single instance of resolver for the whole lifetime of the
process, instead of creating these resolvers for each creation
of module graph. As a result, this resolver can be used in fallback
case where graph is not constructed (REPL, loading modules using
"require") unifying resolution logic.
2021-11-24 16:55:10 +01:00
Bartek Iwańczuk
1a51f2392d
chore: speed up compat tests (#12884)
This commit speeds up compat tests by using local copy of "deno_std"
instead of downloading it from https://deno.land for each test.
Additionally type checking is skipped.
2021-11-24 12:24:13 +01:00
Bartek Iwańczuk
e68420f960
chore: update std submodule to 0.115.1 (#12883) 2021-11-24 12:05:43 +01:00
David Sherret
0f90b4665a
chore(lsp): fix possible race condition with tests expecting 3 publishDiagnostics messages (#12868)
The tests expect 3 publish notifications. It was possible for less than 3 to occur if two or more tasks set the diagnostics in the collection, exited the lock at the same time, then called `publish_diagnostics`
2021-11-23 20:04:27 -05:00
Zheyu Zhang
fd6d0e309c
fix(cli/compile): skip bundling for pre-bundled code (#12687) 2021-11-23 23:59:17 +01:00
Nayeem Rahman
63fc73c491
refactor(cli): deduplicate source cache for redirected specifiers (#12795) 2021-11-24 08:30:52 +11:00
Nayeem Rahman
7413c96985
fix(cli): don't cache .tsbuildinfo unless emitting (#12830)
Fixes #12755
Fixes #12807
Fixes #12832
2021-11-24 08:20:30 +11:00