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

73 commits

Author SHA1 Message Date
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
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
281c4cd8fc
feat(cli): support "types" when type checking (#10999)
Fixes #10677
2021-06-22 07:18:32 +10: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
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
59237d195f
feat(cli): upgrade to TypeScript 4.3 (#9960) 2021-05-28 09:33:11 +10: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
crowlKats
dfe528198d
feat: add WebStorage API (#7819)
This commit introduces localStorage and sessionStorage.
2021-05-10 12:02:47 +02:00
Aaron O'Mullan
1e8e44f4c3
refactor(ops): replace ZeroCopyBuf arg by 2nd generic deserializable arg (#10448) 2021-05-06 19:32:03 +02: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
46b1c653c0
refactor(deno): remove concept of bin & json ops (#10145) 2021-04-12 15:55:05 -04: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
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
crowlKats
7cd14f97c9
feat: WebGPU API (#7977)
Co-authored-by: Luca Casonato <lucacasonato@yahoo.com>
2021-03-01 11:31:13 +01:00
Divy Srivastava
4b56537ea9
chore: move crypto types to op_crates/crypto (#9609) 2021-02-26 12:06:26 -05:00
Divy Srivastava
67ca978f97
chore: simplify internal dependencies between crates (#9600) 2021-02-26 12:46:15 +01:00
Kitson Kelly
e516e4d1d5
chore(cli/runtime): use re-export serde from deno_core (#9599) 2021-02-26 07:18:35 +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
cf3202644d
fix: full commit hash in canary compile download (#9166) 2021-01-19 13:53:23 +01:00
Bartek Iwańczuk
f4dbb267c6
fix: incremental build for deno declaration files (#9138) 2021-01-17 15:12:00 +01:00
Yusuke Tanaka
d8fd71afdf
chore: update copyright to 2021 (#9092) 2021-01-11 18:13:41 +01:00
Luca Casonato
2e18fcebcc
refactor: move WebSocket API to an op_crate (#9026) 2021-01-06 16:57:28 +01:00
Bartek Iwańczuk
a19fea918f
Revert "build: Factor out common code into core/build_util.rs (#8756)" (#8763)
This reverts commit 502c77aad9.
2020-12-14 18:42:40 +01:00
Ryan Dahl
a38b6b8acc
fix: docs.rs detection (#8755) 2020-12-14 15:15:16 +01:00
Ryan Dahl
502c77aad9
build: Factor out common code into core/build_util.rs (#8756) 2020-12-14 14:28:56 +01:00
Bartek Iwańczuk
2e74f164b6
refactor: deno_runtime crate (#8640)
This commit moves Deno JS runtime, ops, permissions and
inspector implementation to new "deno_runtime" crate located
in "runtime/" directory.

Details in "runtime/README.md".

Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
2020-12-13 19:45:53 +01:00
Luca Casonato
47a16d2118
fix: don't unconditionally build canary (#8536) 2020-11-29 17:08:38 +01:00
crowlKats
a08d2eee2b
add canary versioning (#8480) 2020-11-25 05:30:14 -05:00
Kitson Kelly
276f529755
feat(cli): update to TypeScript 4.1 (#7573) 2020-11-24 09:31:10 +11:00
Divy Srivastava
d5661f677e
refactor: deno_crypto op crate (#7956)
This commit factors out "deno_crypto" op crate.

"rand" crate dependency was consequently moved to 
"deno_crypto" crate and reexported.
2020-11-13 22:01:57 +01:00
Kitson Kelly
d672e1405d
refactor(cli): cleanup compiler snapshot and tsc/module_graph (#8220) 2020-11-03 06:41:20 +11:00
Yoshiya Hinosawa
0e5c8c03ac
add commit hash and target to long_version output (#8133) 2020-11-02 12:40:33 -05:00
Bartek Iwańczuk
9b70f2f345
refactor: rename isolate to js_runtime (#7858)
This commit renames occurrences of "isolate" variable name
to "js_runtime". This was outstanding debt after renaming
deno_core::CoreIsolate to JsRuntime.
2020-10-07 17:20:20 +02: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
7845740637
refactor: deno_fetch op crate (#7524) 2020-09-18 09:20:55 -04: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
Yoshiya Hinosawa
111a2fbe3e
refactor(cli/build.rs): extract ts version (#7127) 2020-08-24 17:52:05 +02:00
Luca Casonato
1507a8cf2d
refactor(op_crates/web): move abort signal (#7117) 2020-08-19 14:43:20 +02:00
Ryan Dahl
c4d9c6aa4b
upgrade: TypeScript to 3.9.7 (#7036) 2020-08-12 20:49:02 +02:00
Paul Thompson
eed77aa020
feat(web): FileReader API (#6673) 2020-08-11 14:00:53 +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
Ryan Dahl
ca4dcb36dd
Rename cli/js2 to cli/rt (#6857) 2020-07-23 16:27:26 +02:00
Ryan Dahl
69706331a5
clean up set_binary_metadata (#6811) 2020-07-22 13:19:37 -04:00
Ryan Dahl
bf9930066d
Reduce size of TypeScript Compiler snapshot (#6809)
This PR is intentionally ugly. It duplicates all of the code in cli/js2/ into
cli/tsc/  ... because it's very important that we all understand that this code
is unnecessarily duplicated in our binary. I hope this ugliness provides the
motivation to clean it up.

The typescript git submodule is removed, because it's a very large repo and
contains all sorts of stuff we don't need. Instead the necessary files are
copied directly into the deno repo. Hence +200k lines.

COMPILER_SNAPSHOT.bin size
```
master         3448139
this branch    3320972
```

Fixes #6812
2020-07-22 12:03:46 -04:00