1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-26 16:09:27 -05:00
Commit graph

786 commits

Author SHA1 Message Date
Yoshiya Hinosawa
0ca7301a2d
feat: add deno.makeTempDir 2018-09-12 22:33:11 -07:00
Bert Belder
28812b8337
appveyor: verify that js/ts files are listed in BUILD.gn 2018-09-12 22:25:03 -07:00
Bert Belder
410ea92e32
build: rebuild bundle when npm packages are added/removed/updated 2018-09-12 21:25:43 -07:00
Ryan Dahl
d38b3b585c v0.1.4
- Support headers in fetch()
- Adds many async fs functions:
  deno.rename() deno.remove(), deno.removeAll(), deno.removeSync(),
  deno.removeAllSync(), deno.mkdir(), deno.stat(), deno.lstat()
  deno.readFile() and deno.writeFile().
- Add mode in FileInfo
- Access error codes via error.kind
- Check --allow-net permissions when using fetch()
- Add deno --deps for listing deps of a script.
2018-09-12 20:45:47 -04:00
JaePil Jung
5bea62ac32 Small handers.rs cleanup (#735) 2018-09-12 15:17:17 -04:00
qti3e
41c70b154f Add support for fetch() headers (#727) 2018-09-12 15:16:42 -04:00
Ryan Dahl
cb6c78c6d2 Dedup js source list in BUILD.gn 2018-09-12 14:19:57 -04:00
Mani Maghsoudlou
88d42f0b18 Implement deno.rename() (#731) 2018-09-12 11:44:58 -04:00
Kevin (Kun) "Kassimo" Qian
26081a32df Add unix-only mode for FileInfo (#732) 2018-09-12 10:28:48 -04:00
Kevin (Kun) "Kassimo" Qian
1ffae65165 Add remove(), removeAll().
and removeSync(), removeAllSync().
2018-09-12 10:24:17 -04:00
Sajjad Hashemian
7c50c11f40 Implement deno.stat() and deno.lstat() 2018-09-11 16:05:00 -04:00
Parsa Ghadimi
806385543c Improve global types 2018-09-11 12:19:44 -04:00
Kevin (Kun) "Kassimo" Qian
05f87a0cf2 Move writeFileSync to write_file.ts, add writeFile and tests (#728) 2018-09-11 12:00:57 -04:00
Sajjad Hashemian
c2663e1d82 Implement deno.mkdir() 2018-09-10 15:02:07 -04:00
Ryan Dahl
e293c204a0 Support async futures that have empty response. 2018-09-10 15:02:07 -04:00
Ryan Dahl
35bc9ddf63 Implement deno.readFile()
As an example of how to implement ops that have both sync and async
versions.
2018-09-10 00:14:28 -04:00
Ryan Dahl
c29392b25f create_msg -> serialize_response 2018-09-10 00:14:28 -04:00
Ryan Dahl
9bb0627a88 Remove null_buf() 2018-09-10 00:14:28 -04:00
Ryan Dahl
3afc0b8482 fbs_util.ts -> dispatch.ts
And send() -> sendSync()
2018-09-10 00:14:28 -04:00
Ryan Dahl
e2a285b871 Better NotFound error handling in CodeFetch
throwResolutionError was swallowing unrelated errors.
2018-09-09 23:12:22 -04:00
Ryan Dahl
8090fb252b Expose deno.ErrorKind
Originally we planned to have a JS class for each error code. But it
seems better to just have a single DenoError class with a "kind"
property. One nice thing about using an enum instead of classes for
errors is that switch() can be used during error handling instead of a
bunch of instanceof branches.
2018-09-09 23:12:22 -04:00
Ryan Dahl
a4f1b367b9 Remove namespace from src/msg.fbs 2018-09-09 23:12:22 -04:00
Bert Belder
3574c7a5d3
tools/setup: on windows, make env vars not affect gn gen output 2018-09-10 04:29:18 +02:00
Bert Belder
8ace0f142f
tools/format: don't format files in third_party on Windows 2018-09-10 02:20:21 +02:00
Ryan Dahl
0d03fafbfe Map promises onto futures.
Refactors handlers.rs

The idea is that all Deno "ops" (aka bindings) should map onto
a Rust Future. By setting the "sync" flag in the Base message
users can determine if the future is executed immediately or put
on the event loop.

In the case of async futures, a promise is automatically created.
Errors are automatically forwarded and raised.

TODO:

- The file system ops in src/handler.rs are not using the thread pool
  yet. This will be done in the future using tokio_threadpool::blocking.
  That is, if you try to call them asynchronously, you will get a promise
  and it will act asynchronous, but currently it will be blocking.
- Handlers in src/handler.rs returned boxed futures. This was to make
  it easy while developing. We should try to remove this allocation.
2018-09-09 18:47:22 -04:00
Ryan Dahl
ff6eefdf87 Add better assert message for CodeFetchRes 2018-09-09 18:47:22 -04:00
Ryan Dahl
e226a67948 Add missing ts files to BUILD.gn 2018-09-09 18:47:22 -04:00
Ryan Dahl
ac0910e03c Add milestone 2 to roadmap 2018-09-09 18:47:22 -04:00
Yoshiya Hinosawa
8020f5fc0b docs: add contributing guide 2018-09-09 12:08:40 -04:00
Daniel Ramos
b7ebc1b699 Add type aliases for sourceCode and outputCode 2018-09-09 10:51:15 -04:00
Bert Belder
9b052ace09
tools/setup: replace generated args.gn unless handcrafted 2018-09-08 23:55:18 +02:00
Bert Belder
30b268dd7d
build: override host_toolchain on windows to use sccache with v8 2018-09-08 23:55:18 +02:00
J2P
3deaf99a92 Format msg.fbs 2018-09-07 20:36:18 -04:00
J2P
d814949896 Add and edit comments 2018-09-07 12:01:43 -04:00
Kitson Kelly
9101fd1493 Cleanup public API of DenoCompiler 2018-09-06 18:31:32 -04:00
Kitson Kelly
11aef6e107 Integrate format diagnostic host in DenoCompiler 2018-09-06 18:31:32 -04:00
Bert Belder
63c2fc8d1f
appveyor: small fixes
* Add forgotten --eol argument to 'git ls-files'. Without it, in certain
  edge cases, files might have their mtime restored when it shouldn't.
* Don't parse ls-files output into fields; it's unnecessary.
* Disable the pip cache dir, and stop saving it to the appveyor cache.
* Leverage the 'git -C «dir»' flag to make a script shorter.
* Fix some factually and/or grammatically incorrect comments.
2018-09-06 17:07:25 +02:00
Parsa Ghadimi
1052f8d0c9 Check allow-net in fetch 2018-09-06 11:07:10 -04:00
Kitson Kelly
1e709aa348 Fix TypeScript exports in bundle 2018-09-06 11:04:56 -04:00
Mirko Jotic
fcdfacc2de Implementing --deps flag
- Adding a ModuleId type alias to specify original url or local file of
dependency
- Modifying ModuleMetaData class to contain ModuleId
- Adding a --deps flag
2018-09-06 10:42:07 -04:00
Ryan Dahl
7784b0e17e Move installer to its own repo.
https://github.com/denoland/deno_install

1. This allows the installer to use a more aggressive CI build matrix
   with different version of python.

2. Running the installer during tools/test.py artificially inflates our
   download stats.

3. Running the installer during tools/test.py makes the test script
   dependent on having an internet connection.

4. Running the installer during tools/test.py introduces a race
   condition during release - where it tries and fails to download the
   latest release in build process that should be uploading that release.
2018-09-06 10:22:15 -04:00
Ryan Dahl
59f3fca166 v0.1.3
* Fixes module resolution error #645
* Better flag parsing
* lStatSync -> lstatSync
* Added deno.renameSync()
* Added deno.mkdirSync()
* Fix circular dependencies #653
* Added deno.env() and --allow-env
2018-09-05 23:08:20 -04:00
Bert Belder
49c0cb578d
appveyor: cache modification times for files in the main repo
This fixes that a lot of targets were being rebuilt unnecessarily.
2018-09-06 04:34:23 +02:00
Ryan Dahl
43aead854f Add --reload to JS unit tests.
Fixes #677
2018-09-05 22:27:47 -04:00
Ryan Dahl
e7741ab97f Rename src/binding.rs -> src/libdeno.rs 2018-09-05 22:27:47 -04:00
Ryan Dahl
32f0c37a42 Format 2018-09-05 22:27:47 -04:00
Ryan Dahl
e4990804fa Improve module resolution.
Windows can't handle ":" in path names, so we use a special directory
format .deno/deps/localhost_PORT4545/ to represent hosts with
non-default ports.

Fixes #645.
2018-09-05 22:27:23 -04:00
Kitson Kelly
10dc71133a Mark APIs at internal and include JSDoc in types 2018-09-05 08:45:55 -04:00
Bert Belder
2c0d00840d
tools/build: skip build path detection when given '-C «dir»' ninja arg 2018-09-05 01:24:55 +02:00
Ryan Dahl
131a8a9b0e Upgrade Flatbuffers (now using master) 2018-09-04 19:11:41 -04:00