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

19 commits

Author SHA1 Message Date
Ryan Dahl
c9614d86c1
Move //libdeno to //core/libdeno (#2015)
Fixes some sed errors introduced in c43cfe.

Unfortunately moving libdeno required splitting build.rs into two parts,
one for cli and one for core.

I've also removed the arm64 build - it's complicating things at this
re-org and we're not even testing it. I need to swing back to it and get
tools/test.py running for it.
2019-03-30 14:45:36 -04:00
Bartek Iwańczuk
597ee38ef2 Rewrite readFile and writeFile (#2000)
Using open/read/write
2019-03-27 23:29:36 -04:00
Kitson Kelly
034e2cc028 Migrate from tslint to eslint for linting (#1905) 2019-03-09 12:30:38 -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
c468be64ed Cleanup Deno namespace (#1765) 2019-02-13 08:50:15 -05:00
Kitson Kelly
a21a5ad2fa Add Deno global namespace (#1748)
Resolves #1705

This PR adds the Deno APIs as a global namespace named `Deno`. For backwards
compatibility, the ability to `import * from "deno"` is preserved. I have tried
to convert every test and internal code the references the module to use the
namespace instead, but because I didn't break compatibility I am not sure.

On the REPL, `deno` no longer exists, replaced only with `Deno` to align with
the regular runtime.

The runtime type library includes both the namespace and module. This means it
duplicates the whole type information. When we remove the functionality from the
runtime, it will be a one line change to the library generator to remove the
module definition from the type library.

I marked a `TODO` in a couple places where to remove the `"deno"` module, but
there are additional places I know I didn't mark.
2019-02-12 10:08:56 -05:00
Yoshiya Hinosawa
77114fbda4 chore: update license lines (#1557) 2019-01-21 13:03:30 -06:00
Kevin (Kun) "Kassimo" Qian
2cb52cc4d1 Fix deno.open permission check (#1336) 2018-12-13 16:20:37 -05:00
Bartek Iwańczuk
c2b91a3ef6 Flesh out open() modes (#1282) 2018-12-12 12:05:58 -05:00
Ryan Dahl
1f2c92c7c8 Reader/Writer should use Uint8Array not ArrayBufferView
Because many Reader/Writer implementations (e.g. bufio) assume their
able to use subarray() with byte indexes and often ask for byte values,
it makes sense to simply restrict all implementations to Uint8Array.
2018-11-09 07:22:05 -08:00
ztplz
b809a82fd9 Add missing copyrights (#1024) 2018-10-19 15:25:29 -04:00
Ryan Dahl
213885a9d0 Optimization: Reuse ArrayBuffer during serialization. 2018-10-17 20:20:06 -04:00
Kitson Kelly
10a97679ac Align JSDoc to style guide. 2018-10-14 17:38:23 -04:00
J2P
c99207bf39 Rename fd to rid 2018-10-10 12:21:01 -04:00
Ryan Dahl
818ad37678 Rename fbs to msg. 2018-10-04 00:25:55 -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
Ryan Dahl
42c5b103ec Rename FdTable to ResourceTable.
Add docs to src/resources.rs.
2018-10-01 22:30:57 -04:00
Ryan Dahl
bcbbee7399 Adds basic File I/O and FD table.
Adds deno.stdin, deno.stdout, deno.stderr, deno.open(), deno.write(),
deno.read(), deno.Reader, deno.Writer, deno.copy().

Fixes #721. tests/cat.ts works.
2018-09-28 20:53:33 -04:00