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

26 commits

Author SHA1 Message Date
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
Luca Casonato
c867c1aa47
fix: enable FileReader wpt and align to spec (#10063)
This adds some algorithms from the whatwg mimesniff, whatwg infra, and
whatwg encoding specs that FileReader needs to use internally.
2021-04-08 15:05:08 +02:00
Luca Casonato
00e63306cb
refactor: add deno_file op crate (#10019)
Also enables WPT for FileReader.
2021-04-06 12:55:05 +02:00
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
Nayeem Rahman
badc88b78a
refactor(op_crates/web): Move URL parsing to Rust (#9276) 2021-03-02 02:30:24 +01:00
Luca Casonato
af460fc464
fix: webidl utils and align Event to spec (#9470) 2021-02-13 15:58:12 +01:00
ali ahmed
973c33c899
feat(web): add utf-16 and big5 to TextEncoder/TextDecoder (#8108) 2021-01-19 21:58:57 +01:00
Yusuke Tanaka
d8fd71afdf
chore: update copyright to 2021 (#9092) 2021-01-11 18:13:41 +01:00
Nayeem Rahman
e61e81eb57
feat: add --location=<href> and globalThis.location (#7369) 2021-01-07 19:06:08 +01:00
Nayeem Rahman
7aba07cc77
fix(cli/worker): Print error stacks from the origin Worker (#7987)
Fixes #4728
2020-10-20 15:05:42 +11:00
Bartek Iwańczuk
527628e186
reland JsRuntime/Worker is not a Future (#7924) 2020-10-11 13:20:40 +02:00
Ryan Dahl
08bb8b3d53
Fix 100% CPU idling problem by reverting #7672 (#7911)
* Revert "refactor: Worker is not a Future (#7895)"

This reverts commit f4357f0ff9.

* Revert "refactor(core): JsRuntime is not a Future (#7855)"

This reverts commit d8879feb8c.

* Revert "fix(core): module execution with top level await (#7672)"

This reverts commit c7c7677825.
2020-10-10 11:41:11 +02:00
Bartek Iwańczuk
d8879feb8c
refactor(core): JsRuntime is not a Future (#7855)
This commit rewrites deno_core::JsRuntime to not implement Future
trait.

Instead there are two separate methods:
- JsRuntime::poll_event_loop() - does single tick of event loop
- JsRuntime::run_event_loop() - runs event loop to completion
2020-10-07 22:30:06 +02:00
Bartek Iwańczuk
290da280a8
refactor: improve op crate interfaces for other consumers (#7745) 2020-09-30 10:51:01 -04:00
Bartek Iwańczuk
68fd7a927b
refactor(core): support error stack, remove js_check (#7629)
This commit adds support for stack traces in "deno_core".

Implementation of "Display" trait for "JsError" has been updated
and in consequence "deno_core::js_check" became obsolete and
removed.
2020-09-22 23:30:03 +02:00
Bartek Iwańczuk
ec174170ba
refactor: move FileReader to op_crates/web (#7554) 2020-09-18 16:01:50 +02:00
Bartek Iwańczuk
6453cb7567
refactor: Move URL to op_crates/web (#7544) 2020-09-17 19:13:20 +02:00
Bartek Iwańczuk
0d1f626edd
refactor(core): JsRuntime initialization (#7415)
Removes:
- "deno_core::StartupData"
- "deno_core::Script"
- "deno_core::OwnedScript"

Changes to "JsRuntime":
- remove "new_with_loader()"
- remove "with_heap_limits()"
- rename "IsolateOptions" to "RuntimeOptions" and make public
- "JsRuntime::new()" takes "RuntimeOptions" as a single param
2020-09-11 15:18:49 +02:00
Ryan Dahl
7c2e7c6608
Use gotham-like state for ops (#7385)
Provides a concrete state type that can be dynamically added. This is necessary for op crates.
* renames BasicState to OpState
* async ops take `Rc<RefCell<OpState>>`
* sync ops take `&mut OpState`
* removes `OpRegistry`, `OpRouter` traits
* `get_error_class_fn` moved to OpState
* ResourceTable moved to OpState
2020-09-10 09:57:45 -04:00
Nayeem Rahman
b17a5fbcfa
fix(op_crates/web): Use "deno:" URLs for internal script specifiers (#7383) 2020-09-09 14:23:57 +02:00
Bartek Iwańczuk
f57a2c1e85
refactor(core): rename CoreIsolate to JsRuntime (#7373)
deno_core/
- rename core_isolate.rs to runtime.rs
- rename CoreIsolate to JsRuntime
- rename JSError to JsError
- rename JSStackFrame to JsStackFrame

cli/
- update references from deno_core::CoreIsolate to deno_core::JsRuntime
- rename deno_core::JSError to deno_core::JsError
- rename fmt_errors::JSError to fmt_errors::JsError
2020-09-06 21:44:29 +02:00
Bert Belder
c821e8f2f1
Move JSON ops to deno_core (#7336) 2020-09-06 02:34:02 +02:00
Ryan Dahl
ce63806c64
simplify deno_web init (#7313) 2020-09-01 16:32:07 -04:00
Ryan Dahl
fee6f79330
Remove unused crate_modules feature (#7311) 2020-09-01 13:55:40 -04:00
Luca Casonato
1507a8cf2d
refactor(op_crates/web): move abort signal (#7117) 2020-08-19 14:43:20 +02:00
Bartek Iwańczuk
41215eb29c
Op crate for Web APIs (#6906)
Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
2020-08-07 16:55:02 +02:00