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

271 commits

Author SHA1 Message Date
Bert Belder
c8b5f1e454
Simplify ErrBox-to-class mapping & hook it up to core json ops (#7195) 2020-08-26 18:48:04 +02:00
Bert Belder
aead9dc91e
Remove some more unnecessary 'to_string()' calls (#7190) 2020-08-26 01:13:20 +02:00
Bert Belder
9bfb0df805
refactor: remove OpError, use ErrBox everywhere (#7187)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2020-08-26 00:22:15 +02:00
Bert Belder
27f4aeb924
Make Rc/Arc wrapper around State/GlobalState visible (#7104) 2020-08-19 02:01:48 +02:00
Nayeem Rahman
015fa0bd41
refactor: permissions (#7074) 2020-08-18 16:29:32 -04:00
Bert Belder
f6e9150b33
Async op dispatcher support with 'stateful_json_op_(a)sync()' (#7095)
Closes: #7020
2020-08-18 20:50:52 +02:00
Ryan Dahl
f5a4f1fdc0
Undo JsonOpDispatcher and OpDispatcher traits (#7023)
This reverts commit f83d672ffa.
This reverts commit d51972377c.
2020-08-12 16:44:58 +02:00
Nayeem Rahman
52c1017a74
feat: Stabilize Deno.mainModule (#6993) 2020-08-10 16:41:51 -04:00
Bartek Iwańczuk
59ca66a207
Encode op errors as strings instead of numbers (#6977) 2020-08-07 16:47:18 -04:00
Luca Casonato
ce7808baf0
feat(cli): custom http client for fetch (#6918) 2020-08-05 20:44:03 +02:00
Bartek Iwańczuk
b449964d1a
refactor: remove more compiler runtime code (#6841) 2020-07-23 15:29:36 +02:00
Ryan Dahl
2460689b1a
Remove deno_typescript (#6813) 2020-07-20 19:49:57 -04:00
Luca Casonato
071a6e284a
Share reqwest client between fetch calls (#6792) 2020-07-18 15:05:08 -04:00
Gurwinder Singh
f83d672ffa
refactor: new trait JsonOpDispatcher (#6742) 2020-07-14 14:22:02 -04:00
Gurwinder Singh
d51972377c
refactor: Make OpDispatcher a trait (#6736) 2020-07-13 16:19:51 -04:00
Nayeem Rahman
69e0886362
fix(URL): Implement spec-compliant host parsing (#6689) 2020-07-10 15:51:24 -04:00
Sebastien Filion
1bcc35b84a
feat(unstable): add Deno.consoleSize (#6520) 2020-07-10 10:07:12 -04:00
Maayan Hanin
edb7a0eead
fix(cli): panic when stdio is null on windows (#6528)
Fixes: #6409
2020-07-09 21:06:51 +02:00
Valentin Anger
be7e0f2d49
BREAKING(core): Remove control slice from ops (#6048) 2020-07-08 11:23:50 -04:00
uki00a
a2bf61d1ae
feat(unstable): Deno.ppid (#6539) 2020-07-08 10:35:45 -04:00
dubiousjim
6b78729ba8
feat: Deno.chown() make uid, gid args optional (#4612) 2020-07-06 13:15:13 +02:00
Casper Beyer
aeadf8189a
fix(cli): change seek offset type from i32 to i64 (#6518) 2020-06-27 15:58:35 -04:00
Bert Belder
0c735ebdc7
Fix clippy warning (#6503) 2020-06-26 20:16:49 +02:00
Casper Beyer
e278c90d8a
feat(unstable): add Deno.fdatasyncSync and fdatasync (#6403) 2020-06-26 08:36:35 -04:00
Luca Casonato
4102a19585
fix: panic when process stdio rid is 0 or invalid (#6405) 2020-06-25 12:38:19 -04:00
Casper Beyer
6b3be01a00
feat(unstable): add Deno.fstatSync and fstat (#6425) 2020-06-22 08:58:52 -04:00
Casper Beyer
40866d7cd5
feat(unstable): add Deno.fsyncSync and fsync (#6411) 2020-06-21 09:29:44 -04:00
Ryan Dahl
0a81ec6b1e
Remove Deno.dir and dirs dependency (#6385) 2020-06-20 23:49:27 -04:00
Casper Beyer
86f92e04c7
feat(unstable): add Deno.ftruncate and ftruncateSync (#6243) 2020-06-20 09:46:10 -04:00
Bartek Iwańczuk
826a3135b4
refactor(compiler): split code paths for compile and bundle (#6304)
* refactor "compile" and "runtimeCompile" in "compiler.ts" and factor out
separate methods for "compile" and "bundle" operations

* remove noisy debug output from "compiler.ts"
 
* provide "Serialize" implementations for enums in "msg.rs"

* rename "analyze_dependencies_and_references" to "pre_process_file" and
move it to "tsc.rs"

* refactor ModuleGraph to use more concrete types and properly annotate
locations where errors occur

* remove dead code from "file_fetcher.rs" - "SourceFile.types_url" is no
longer needed, as type reference parsing is done in "ModuleGraph"

* remove unneeded field "source_path" from ".meta" files stored for
compiled source file (towards #6080)
2020-06-19 12:27:15 +02:00
Peter Evers
fc850b11e5
unixpacket should also return byte length on send (#6291) 2020-06-15 12:20:45 -04:00
Kermit Xuan
77545219a6
fix: DatagramConn.send should return bytes sent (#6265) 2020-06-13 10:14:31 -04:00
Ryan Dahl
e9424bf6b5
Revert "feat: add Deno.osName()" (#6261)
Deno.build.os provides the same functionality

This reverts commit 6ccf9037a6.
2020-06-12 09:53:53 -04:00
Rubin Bhandari
6ccf9037a6
feat: add Deno.osName() (#5714) 2020-06-11 13:11:26 -04:00
John Gardner
ca5b5ba530
feat: Add Deno.mainModule (#6180) 2020-06-10 23:00:29 -04:00
Ryan Dahl
54c3f8e27f
fix udp BorrowMutError (#6221) 2020-06-10 11:26:28 -04:00
Casper Beyer
1e0808d501
fix: Deno.readSync on stdin (#6126)
Currently sync operations on stdin are failing because tokio::Stdin
cannot be converted to a std::File.

This commit replaces tokio::stdin with a raw file descriptor 
wrapped in a std::fs::File which can be converted to a 
tokio::File and back again making the synchronous version 
of op_read actually work.
2020-06-09 18:29:12 +02:00
Tuan Le
878f306a39
feat(cli): Add Deno.env.delete() (#5859) 2020-06-09 14:58:30 +02:00
Nayeem Rahman
44251ce8ea
fix(cli/js/web/worker): Disable relative module specifiers (#5266) 2020-06-09 14:33:52 +02:00
Valentin Anger
becbb56b19
feat(core): Ops can take several zero copy buffers (#4788) 2020-06-01 14:20:47 -04:00
uki00a
64bd2768f7
fix(#4850): Deno.remove() fails to remove unix socket (#5967) 2020-05-30 14:48:26 -04:00
Ryan Dahl
dad551a3a7
upgrade: Rust crates (#5959) 2020-05-30 11:35:44 +02:00
Ryan Dahl
d4b05dd89e
refactor: Split isolate and state using safe get_slot() (#5929) 2020-05-29 17:41:39 -04:00
Nayeem Rahman
8e39275429
fix(cli/permissions): Fix CWD and exec path leaks (#5642) 2020-05-29 17:27:43 +02:00
Valentin Anger
b7f0b073bb
Add unstable checks for unix transport (#5818)
Also remove the unix example from the stable documentation
to stay in line with the `Deno.listen` one
2020-05-24 09:43:40 -04:00
Ali Hasani
6072755ead
Implement Deno.symlink() for windows (#5533) 2020-05-19 00:46:02 +02:00
Ali Hasani
c3ec16535f
Make Deno.remove() work with directory symlinks on windows (#5488) 2020-05-18 14:50:44 +02:00
Bartek Iwańczuk
9d63772fe5
refactor: rewrite TS dependency analysis in Rust (#5029)
This commit completely overhauls how module analysis is 
performed in TS compiler by moving the logic to Rust.

In the current setup module analysis is performed using 
"ts.preProcessFile" API in a special TS compiler worker 
running on a separate thread.

"ts.preProcessFile" allowed us to build a lot of functionality
in CLI including X-TypeScript-Types header support 
and @deno-types directive support. Unfortunately at the 
same time complexity of the ops required to perform 
supporting tasks exploded and caused some hidden 
permission escapes.

This PR introduces "ModuleGraphLoader" which can parse
source and load recursively all dependent source files; as 
well as declaration files. All dependencies used in TS 
compiler and now fetched and collected upfront in Rust 
before spinning up TS compiler.

To achieve feature parity with existing APIs this commit 
includes a lot of changes:

* add "ModuleGraphLoader"
  - can fetch local and remote sources
  - parses source code using SWC and extracts imports, exports, file references, special 
     headers
  - this struct inherited all of the hidden complexity and cruft from TS version and requires 
     several follow up PRs
* rewrite cli/tsc.rs to perform module analysis upfront and send all required source code to 
  TS worker in one message
* remove op_resolve_modules and op_fetch_source_files from cli/ops/compiler.rs
* run TS worker on the same thread
2020-05-18 12:59:29 +02:00
Yiyu Lin
c4fe58d8df
Return error if more than one listener calls WorkerHandle::get_event() (#5461) 2020-05-17 06:50:38 +02:00
Yiyu Lin
0b9942da84
fix some unwrap() in Rust (#5485) 2020-05-16 09:41:32 -04:00