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

88 commits

Author SHA1 Message Date
Ryan Dahl
fa3c35301a
Rename //src/ to //cli/ (#1962)
To better distinguish the deno_core crate from the executable deno,
which will now be called "the cli" internally.
2019-03-19 12:18:05 -04:00
Ryan Dahl
44773c9b0f Integrate //core into existing code base
This disables a few tests which are broken still:
- tests/error_004_missing_module.test
- tests/error_005_missing_dynamic_import.test
- tests/error_006_import_ext_failure.test
- repl_test test_set_timeout
- repl_test test_async_op
- repl_test test_set_timeout_interlaced
- all of permission_prompt_test
2019-03-18 17:17:08 -04:00
Ryan Dahl
58cc69f672 Make timers act like normal ops
This is in preperation for core integration.
2019-03-12 19:25:57 -04:00
Ryan Dahl
9691d7b53b Sort ops 2019-03-12 19:25:57 -04:00
Simon Menke
77d7ad61f3 Allow inspection and revocation of permissions (#1875) 2019-03-04 11:04:19 -05:00
Ryan Dahl
42408febe8 Add window.location 2019-02-18 23:04:59 -05:00
Kevin (Kun) "Kassimo" Qian
077af20ceb Add seek and implement Seeker on File (#1797)
This patch contains a special hack that circumvents the current tokio
seek problem.

tokio `seek` is implemented to take ownership of the original File and
emit a new one in its future, which conflicts with the design of
ResourceTable.

To avoid the problem, the current hack makes the FsFile resource
an Option which we could `take` the value ownership out of it. We then
convert the tokio File into a Rust std File, perform the seek, and then
put it back into the resource.

This might be able to drop this hack after
https://github.com/tokio-rs/tokio/pull/785 lands.
2019-02-18 18:26:41 -05:00
Kitson Kelly
54094c7510 Rationalise compiler ops (#1740) 2019-02-18 10:42:15 -05:00
Dmitry Sharshakov
4dc4329e27 Add execPath function (#1743) 2019-02-15 11:22:02 -05:00
Yoshiya Hinosawa
2241049c34 feat: env option in run api (#1773) 2019-02-15 10:37:04 -05:00
Kevin (Kun) "Kassimo" Qian
1d36eb47eb Support scoped variables, unblock REPL async op, and REPL error colors (#1721) 2019-02-09 16:55:40 -05:00
Ryan Dahl
526497bc29
Adds deno.noColor (#1716) 2019-02-08 22:13:04 -05:00
Dmitry Sharshakov
181b03273c Add isTTY function (#1622) 2019-02-02 22:05:30 -05:00
Kitson Kelly
efa1eeb8b3 Compiler cleanups and minor improvements (#1656) 2019-02-02 18:27:53 -05:00
Kevin (Kun) "Kassimo" Qian
0b082c4361 Clarify writeFile options and avoid unexpected perm modification (#1643) 2019-02-02 14:26:18 -05:00
Dmitry Sharshakov
16ed1f2545 Add performance.now (#1633) 2019-02-02 01:27:42 -05:00
bokuweb
aaaa35548e timers: use int instead of double for timeout type (#1469) 2019-01-26 22:10:38 +01:00
Ryan Dahl
315e4abd7e
mkdir should not be recursive by default (#1530)
It should return an error if a file with the given path exists and
recursive isn't specified.

Because mode is not used on windows and rarely used in unix, it is made
to the last parameter.

In collaboration with Stefan Dombrowski <sdo451@gmail.com>
2019-01-17 23:39:06 -05:00
Ryan Dahl
0ceb554343
Native ES modules (#1460)
* Native ES modules

This is a major refactor of internal compiler.

Before: JS and TS both were sent through the typescript compiler where
their imports were parsed and handled. Both compiled to AMD JS and
finally sent to V8

Now: JS is sent directly into V8. TS is sent through the typescript
compiler, but tsc generates ES modules now instead of AMD. This
generated JS is then dumped into V8.

This should much faster for pure JS code. It may improve TS compilation
speed.

In the future this allows us to separate TS out of the runtime heap and
into its own dedicated snapshot. This will result in a smaller runtime
heap, and thus should be faster.

Some tests were unfortunately disabled to ease landing this patch:
1. compiler_tests.ts which I intend to bring back in later commits.
2. Some text_encoding_test.ts tests which made the file invalid utf8.
   See PR for a discussion.
Also worth noting that this is necessary to support WASM
2019-01-09 12:59:46 -05:00
Ryan Dahl
6f79ad721a
Minimal Worker support (#1476)
This adds the ability to spawn additional Isolates from Rust and send
and receive messages from them. This is preliminary work to support
running the typescript compiler in a separate isolate and thus support
native ES modules. Ref #975.
2019-01-08 14:44:06 -05:00
Ryan Dahl
57301909cd
Add deno.pid (#1464) 2019-01-06 14:16:42 -05:00
Ryan Dahl
ea6c9f2f36
Revert "use byte array instead of string for code fetch (#1307)" (#1455)
This reverts commit e976b3e041.

There is nothing technically wrong with this commit, but it's adding
complexity to a big refactor (native ES modules #975). Since it's not
necessary and simply a philosophical preference, I will revert for now
and try to bring it back later.
2019-01-03 22:11:01 -05:00
Kevin (Kun) "Kassimo" Qian
e4be1209b6 Avoid fetch segfault on empty Uri (#1394) 2018-12-21 04:47:09 -05:00
Bartek Iwańczuk
c2b91a3ef6 Flesh out open() modes (#1282) 2018-12-12 12:05:58 -05:00
Tnarita0000
e31866a60d Change default to false Base.bool 2018-12-12 11:44:56 -05:00
F001
e976b3e041 use byte array instead of string for code fetch (#1307) 2018-12-12 04:43:42 -05:00
Ryan Dahl
52079b26db Minor rename for CodeFetch parameters
This bring it inline with terminology used in V8
See ResolveCallback in v8.h
2018-12-11 15:06:56 -05:00
binaryta
c427c2df42 Add TooLarge error code for buffers (#1298)
In collaboration with @yushimatenjin
2018-12-09 15:38:30 -05:00
Bert Belder
48bf4062e4 First pass at running subprocesses (#1156) 2018-11-16 12:07:40 +08:00
Ryan Dahl
3c8d2bde68
Support request method and headers in fetch() (#1188)
Adds a general HttpHeader flatbuffer message for serializing requests
and responses.
2018-11-14 17:36:34 -08:00
Ryan Dahl
b1579460ce Support streaming response bodies from fetch()
Also Buffer.readFrom in fetch() to buffer response.
2018-11-13 21:44:38 -08:00
Andy Hayden
13e1eb2b87 Fix many of the clippy::pedantic warnings 2018-11-06 06:43:02 -08:00
Andy Hayden
27ecfc1617 Add repl (#998)
- Running repl from js side.
- Add tests for repl behavior.
- Handle ctrl-C and ctrl-D.
2018-11-05 09:55:59 -08:00
Ryan Dahl
ee24254bad Rename EnvPair to KeyValue. 2018-11-02 20:50:01 -07:00
Ryan Dahl
80b5c61460 Rename FetchReq op to Fetch. 2018-10-30 17:42:19 -07:00
Bartek Iwańczuk
946acbc559 Add resources op (#1119) 2018-10-30 12:58:55 -07:00
Kitson Kelly
8b39d2c99e Separate source map from output code. 2018-10-29 08:16:35 -07:00
Kevin (Kun) "Kassimo" Qian
a99aaf5def Add chmod/chmodSync on unix (and fix Cargo.toml) (#1088)
Initial implementation by Srijan Reddy (@srijanreddy98, #672).
2018-10-26 13:01:45 -07:00
Kitson Kelly
8ef7da2611 Enforce media types 2018-10-23 04:48:00 -07:00
Jinho Bang
1322f3de9f deno -v should report typescript version
Fixes #993
2018-10-15 22:16:55 -04:00
Shiva Prasanth
bbf88c5295 Add cwd() and chdir() (#907) 2018-10-13 16:03:27 -04:00
Kitson Kelly
298d755152 Add support for --types 2018-10-11 20:29:43 -04:00
Bartek Iwańczuk
51f9331ecb Add deno.metrics() 2018-10-11 15:45:51 -04:00
J2P
7cc9b64ff7 Rename BadFileDescriptor 2018-10-10 12:21:01 -04:00
Kevin (Kun) "Kassimo" Qian
941e27d8c1 Implement closeRead/closeWrite using TcpStream::shutdown (#903) 2018-10-05 12:16:23 -04:00
Ryan Dahl
f774953011 Rename flatbuffer base.msg to base.inner
This better disambiguates with the msg_generated.ts module, which in JS
we call "fbs", but would be better called "msg".
2018-10-04 00:25:55 -04:00
Ryan Dahl
0422b224e8
First pass at support for TCP servers and clients. (#884)
Adds deno.listen(), deno.dial(), deno.Listener and deno.Conn.
2018-10-03 23:58:29 -04:00
J2P
ea87034e26 Implemented readDirSync, readDir 2018-10-03 18:22:57 -04:00
Bert Belder
4eeda9ea27
timers: remove the old timer implementation
Fixes #878.
2018-10-03 13:27:59 -07:00
Bert Belder
aa691ea26c
timers: implement timers in javascript 2018-10-03 13:27:55 -07:00