Tim Wang
07369a6270
Fix typo in errors.ts JSDoc
2018-12-13 15:36:15 -05:00
Bartek Iwańczuk
c2b91a3ef6
Flesh out open() modes ( #1282 )
2018-12-12 12:05:58 -05:00
F001
e976b3e041
use byte array instead of string for code fetch ( #1307 )
2018-12-12 04:43:42 -05:00
Kevin (Kun) "Kassimo" Qian
8502cb0ccb
Avoid Uint8Array.prototype throwing type error in console.log ( #1327 )
2018-12-12 02:32:24 -05:00
Kevin (Kun) "Kassimo" Qian
585de35b1d
readDir entry mode ( #1326 )
2018-12-12 02:31:18 -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
Kevin (Kun) "Kassimo" Qian
1548792fb3
Add more console types formatting support ( #1299 )
2018-12-10 12:01:02 -05:00
binaryta
c427c2df42
Add TooLarge error code for buffers ( #1298 )
...
In collaboration with @yushimatenjin
2018-12-09 15:38:30 -05:00
Bartek Iwańczuk
ba429ccde8
Add benchmark for net/http ( #1289 )
2018-12-07 16:36:16 -05:00
Ryan Dahl
c113df1bb8
Process source maps in Rust instead of JS ( #1280 )
...
- Improves speed and binary size significantly.
- Makes deno_last_exception() output a JSON structure.
- Isolate::execute and Isolate::event_loop now return
structured, mapped JSError objects on errors.
- Removes libdeno functions:
libdeno.setGlobalErrorHandler()
libdeno.setPromiseRejectHandler()
libdeno.setPromiseErrorExaminer()
In collaboration with Ryan Dahl.
2018-12-06 23:05:36 -05:00
Kitson Kelly
568ac0c902
Add ASCII support to TextDecoder
2018-12-06 18:45:10 -05:00
Kitson Kelly
6cc89b9e27
Use alternate TextEncoder/TextDecoder implementation ( #1281 )
...
This is faster and smaller.
2018-12-06 10:01:15 -08:00
Kevin (Kun) "Kassimo" Qian
f6c841a6cd
Turn off kPromiseResolvedAfterResolved warning
2018-12-03 16:30:08 -08:00
kyraNET
7c6479e28f
feat: Support for bigints in console
2018-11-30 22:37:26 -08:00
Ryan Dahl
b7178e1704
Upgrade Prettier to support BigInt syntax in TS
2018-11-30 16:26:53 -08:00
DanSnow
d43a4be0d2
Add Process.output ( #1235 )
2018-11-30 10:44:05 -08:00
DanSnow
e749b37b7c
Add deno.readAll() ( #1234 )
2018-11-30 09:58:31 -08:00
Kitson Kelly
17994d4542
Upgrade to TypeScript 3.2
2018-11-29 23:37:28 -08:00
Kevin (Kun) "Kassimo" Qian
09aa9b9698
REPL unblock event loop AND fix REPL setTimeout fire problems
2018-11-28 15:25:30 -08:00
Bartek Iwańczuk
b183b01c8e
add test for Buffer edge case
2018-11-27 13:14:24 -08:00
Ryan Dahl
a25497fb66
Disable flaky fetch tests.
2018-11-27 11:33:23 -08:00
Kitson Kelly
3d03f5b0cb
Split Runner from Compiler
2018-11-20 08:46:56 -08:00
Bert Belder
48bf4062e4
First pass at running subprocesses ( #1156 )
2018-11-16 12:07:40 +08:00
Ryan Dahl
eaec5a8780
Support uploading data from fetch()
...
Does not yet support streaming, only strings and TypedArrays for now.
2018-11-16 11:44:25 +08:00
Ryan Dahl
f88fa2dcf8
Support shebang
2018-11-16 08:05:13 +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
Kitson Kelly
34b6b86c76
Ensure global type instances are available.
2018-11-09 08:39:49 -08:00
Kitson Kelly
172f5a5133
Cleanups for runtime lib declarations.
2018-11-09 08:36:31 -08: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
Ryan Dahl
a18e51fd61
build: Use target/ instead of out/ ( #1153 )
2018-11-08 10:38:20 -08:00
Andy Hayden
e9327be831
Support repl multiline input ( #1165 )
2018-11-06 11:19:16 -08:00
Kitson Kelly
f477b45a0a
Improve preparing stack traces
2018-11-06 06:37:16 -08:00
Ryan Dahl
b3400d822f
Decode main.js.map during snapshotting.
...
Pro:
time ./out/debug/deno tests/error_001.ts 3.0s -> 0.4s
Con:
time ./tool/build.py snapshot 33s -> 1m52s
out/debug/gen/snapshot_deno.bin 39M -> 121M
2018-11-05 13:26:54 -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
bd88e56cbc
Add deno.Buffer ( #1121 )
...
Do not confuse this with Node's Buffer. This is a direct port of Go's
bytes.Buffer - it allows buffering of Reader and Writer objects.
2018-11-04 15:36:46 -08:00
Kyra
e93d686e9d
Web APIs: File
and FormData
( #1056 )
2018-11-04 10:05:02 -08:00
Ryan Dahl
6446bc5328
Move fetch headers into its own file.
2018-11-02 20:50:01 -07:00
Ryan Dahl
ee24254bad
Rename EnvPair to KeyValue.
2018-11-02 20:50:01 -07:00
Kitson Kelly
7f8284addf
Fix performance regression with JSON Modules
2018-11-01 19:33:18 -07:00
Bartek Iwańczuk
162eeca373
Add helper to turn deno.Reader into async iterator ( #1130 )
2018-10-31 07:29:13 -07:00
Kitson Kelly
2422e52625
Add ability to load JSON as modules ( #1065 )
2018-10-30 20:50:40 -07:00
Ryan Dahl
80b5c61460
Rename FetchReq op to Fetch.
2018-10-30 17:42:19 -07:00
Kitson Kelly
3b4dfd8bb5
Remove unused asset.
2018-10-30 13:19:12 -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
Ryan Dahl
882a323811
Minor sorting not handled by format.
2018-10-27 08:08:51 -07:00
Ryan Dahl
50d6593f6a
Fix race condition in chmod test
2018-10-27 08:08:51 -07:00
Ryan Dahl
7f204b9803
Remove broken feature: trace()
2018-10-26 13:07:33 -07:00
Ryan Dahl
6bbf0777b1
Remove broken feature: --deps
2018-10-26 13:07:33 -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
2cfa608324
Support CheckJS
2018-10-24 15:29:30 -07:00
Ryan Dahl
0501330607
Add libdeno.shared global shared ArrayBuffer.
2018-10-24 14:52:38 -07:00
Joseph
d2df67e822
fix typos ( #1083 )
2018-10-24 08:54:34 -07:00
Ryan Dahl
5cf37c2f20
Revert "Support CheckJS"
...
Broken in master.
This reverts commit dd230d520b
.
2018-10-23 07:07:17 -07:00
Kitson Kelly
dd230d520b
Support CheckJS
2018-10-23 06:01:11 -07:00
Kitson Kelly
8ef7da2611
Enforce media types
2018-10-23 04:48:00 -07:00
Kitson Kelly
c0492ef061
Make Headers more idiomatic ( #1062 )
2018-10-23 04:43:43 -07:00
ztplz
de85f94435
improve file_info.ts
2018-10-23 04:42:22 -07:00
Kitson Kelly
64f0dfd50e
Improve globals for runtime type library
2018-10-22 19:37:38 -07:00
ztplz
c4bddc4651
Implemente clone for FetchResponse ( #1054 )
2018-10-21 14:42:18 -07:00
Kyra
fbb3f05b6f
Add URLSearchParams ( #1049 )
2018-10-21 08:07:29 -07:00
Ryan Dahl
09e011b389
Format.
2018-10-20 01:19:59 -04:00
ztplz
b809a82fd9
Add missing copyrights ( #1024 )
2018-10-19 15:25:29 -04:00
ztplz
7210e7b33b
Make fetch header compliant with the current spec ( #1019 )
2018-10-19 12:12:36 -04:00
Bert Belder
d0b859ec37
format
2018-10-19 00:29:09 +02:00
Bartek Iwańczuk
3a226f166f
add test case for metrics
2018-10-18 05:08:49 -04:00
Ryan Dahl
213885a9d0
Optimization: Reuse ArrayBuffer during serialization.
2018-10-17 20:20:06 -04:00
Jinho Bang
32f0797128
Fix a bug that copyFile reports different error codes
...
This is a workaroud. Once the issue is resolved in Rust side, we should
remove it.
Fixes #895
2018-10-17 08:24:31 -04:00
Jinho Bang
1322f3de9f
deno -v
should report typescript version
...
Fixes #993
2018-10-15 22:16:55 -04:00
Kitson Kelly
10a97679ac
Align JSDoc to style guide.
2018-10-14 17:38:23 -04:00
Shiva Prasanth
bbf88c5295
Add cwd() and chdir() ( #907 )
2018-10-13 16:03:27 -04:00
Kevin (Kun) "Kassimo" Qian
45d3b8955d
Fix promise reject issue ( #936 )
2018-10-12 14:22:52 -04:00
Ryan Dahl
c9f95d51da
perf: Increase copy() buffer to 32k
...
This will improve the threshold benchmark. Using 32k because that's what
Go uses, but we should explore the value in the future.
a0d6420d8b/src/io/io.go (L391)
2018-10-12 08:58:17 -04:00
Kitson Kelly
298d755152
Add support for --types
2018-10-11 20:29:43 -04:00
Kitson Kelly
ec402c6932
Replace globals.d.ts with lib.deno_runtime.d.ts
2018-10-11 20:29:43 -04:00
Bartek Iwańczuk
51f9331ecb
Add deno.metrics()
2018-10-11 15:45:51 -04:00
Li Hao
951e5def98
timers: align unit tests with others
2018-10-11 13:21:25 -04:00
J2P
c99207bf39
Rename fd to rid
2018-10-10 12:21:01 -04:00
ztplz
8ada28716a
Add counts for ignored , measured, filtered
2018-10-10 08:03:59 -04:00
Bert Belder
5b66f28fa3
timers: add test for clearTimer bug #942
2018-10-08 19:54:32 +02:00
Li Hao
3fe6530f11
timers: fix clearTimer bug
2018-10-08 19:53:53 +02:00
Bert Belder
f60cc5730a
Format
2018-10-08 18:10:27 +02:00
Kevin (Kun) "Kassimo" Qian
2b8cee9a49
Check thrown type, print String(...) if not instance of error ( #939 )
...
Fixes #935
2018-10-08 11:36:09 -04:00
Kitson Kelly
ffb41e61f1
Updates to js to clean up default library
2018-10-07 22:52:27 -04:00
ns
8e82fa0af6
Export missing io types from deno
2018-10-06 22:16:42 -04:00
Ryan Dahl
8fba254c7a
Temporarily disable shutdown tests.
...
The fix for these wasn't immediately obvious - they seem to have been
broken already but were skipped as reported in #919 .
2018-10-06 20:24:47 -04:00
Kevin (Kun) "Kassimo" Qian
3c212ddd1e
Remove race condition from netCloseReadSuccess test
2018-10-05 21:06:01 -04:00
Ryan Dahl
899a62d5b0
Print test name before it fails.
2018-10-05 14:27:47 -04:00
Ryan Dahl
ab952e3340
Format
2018-10-05 14:27:47 -04:00
Kevin (Kun) "Kassimo" Qian
941e27d8c1
Implement closeRead/closeWrite using TcpStream::shutdown ( #903 )
2018-10-05 12:16:23 -04:00
Kitson Kelly
6c42ded097
Hide compiler module ( #909 )
...
Fixes #876
2018-10-05 10:13:22 -04:00
Chris Bystrek
6a649012bc
Changed tools/lint.py to lint the entire js and tests directories. ( #900 )
...
* Changed tools/lint.py to lint the entire js and tests directorys and sub directories, currently it was pointing at tsconfig and would only lint files that were part of js/main.ts or node_modules/typescript/lib/lib.esnext.d.ts and their dependencies
* Broke the typescript linting out into separate steps for the main typescript programing and tests.
* Fixed linting issues in ts tests.
2018-10-05 07:29:55 -04:00
Kitson Kelly
ce9148943c
Move Platform from types to platform
2018-10-04 12:31:39 -04:00
Bert Belder
b9cdf088e7
format
2018-10-04 02:03:29 -07:00
Ryan Dahl
1331a4882c
Better color output in JS unit tests.
2018-10-04 00:25:55 -04:00
Ryan Dahl
2f44db6756
Use underscores in filenames.
2018-10-04 00:25:55 -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
Kevin (Kun) "Kassimo" Qian
3c080ca39a
Reenable copyFile tests
2018-10-03 16:22:32 -07:00
Andy Hayden
47508c7207
Update timer test to use #497 test case
...
This behavior was fixed by #885 .
2018-10-03 16:05:00 -07:00
J2P
ea87034e26
Implemented readDirSync, readDir
2018-10-03 18:22:57 -04:00
Ryan Dahl
d39055d79b
Clean up deno.platform
...
Renames:
deno.platform -> deno.platform.os
deno.arch -> deno.platform.arch
Removes unsupported operating systems and CPU architectures from the
types. Uses the string "win" instead of "win32".
2018-10-03 16:59:00 -04:00
Ryan Dahl
0cdf1f451d
Rename tsconfig.generated.json to tsconfig.declarations.json
2018-10-03 16:59:00 -04:00
Bert Belder
6cfc6b5d51
test: disable incorrect tests
...
These tests weren't running because with the old timer implementation
time-outs were sometimes lost, and the test harness uses setTimeout
to throw errors after a test has failed.
2018-10-03 13:28:00 -07:00
Li Hao
99e2c42d16
timers: add some more unit tests
...
Closes #682 .
2018-10-03 13:27:59 -07:00
Bert Belder
aa691ea26c
timers: implement timers in javascript
2018-10-03 13:27:55 -07:00
Ryan Dahl
42c5b103ec
Rename FdTable to ResourceTable.
...
Add docs to src/resources.rs.
2018-10-01 22:30:57 -04:00
Ryan Dahl
393f751a27
Format.
2018-10-01 22:30:57 -04:00
Kevin (Kun) "Kassimo" Qian
3a6d4e6260
Bind this
to console methods ( #873 )
...
Fixes #872
2018-10-01 12:41:37 -04:00
Yingbo (Max) Wang
bcdbfc00f0
Limit depth of output in console.log for nested objects, and add console.dir ( #826 )
2018-09-30 18:10:20 -04:00
Kevin (Kun) "Kassimo" Qian
50a9c2b575
Add copyFile/copyFileSync ( #863 )
2018-09-30 18:06:41 -04:00
Ryan Dahl
cec82263c1
Format
2018-09-30 16:35:12 -04:00
ztplz
062b22fe56
Add deno.truncate ( #805 )
2018-09-30 15:06:20 -04:00
ztplz
b635553fd7
Improve fetch headers ( #853 )
2018-09-30 10:31:50 -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
Ryan Dahl
b1d9014b5b
Print 'Compiling' when compiling TS.
2018-09-27 17:34:51 -04:00
Ryan Dahl
d38ccfc6dc
Support zero-copy data in libdeno.send(). ( #838 )
...
This is a large API refactor of deno.h which replaces
deno_send() and deno_set_response() with deno_respond().
It also adds a req_id parameter to the deno_recv_cb.
Make writeFile/writeFileSync use it.
2018-09-27 17:33:10 -04:00
Kevin (Kun) "Kassimo" Qian
1e390e69cd
Error pretty print (print stack)
2018-09-26 19:30:43 -04:00
Ryan Dahl
b088b58f76
Add SetGlobalTimeout().
...
To be used for a timers implementation soon.
2018-09-25 17:02:49 -04:00
Ryan Dahl
4fd2b19f64
Make Deno multithreaded.
...
By using the tokio default runtime.
This patch makes all of the ops thread safe.
Adds libdeno to JS globals to make for easier testing.
Preliminary work for #733 .
2018-09-25 17:02:49 -04:00
Ryan Dahl
7fb2821937
format
2018-09-25 17:02:49 -04:00
J2P
3c24b9f724
Fix trace test code
2018-09-25 12:47:13 -04:00
Kevin (Kun) "Kassimo" Qian
f156a86024
console.warn goes to stderr ( #810 )
2018-09-25 01:27:02 -04:00
Mani Maghsoudlou
ad5065e23e
Implement deno.readlink() ( #797 )
2018-09-25 00:20:49 -04:00
Kevin (Kun) "Kassimo" Qian
be8f49b332
Add toString
for CallSite of eval origin ( #809 )
2018-09-24 15:42:09 -04:00
Bartek Iwańczuk
3fe4be07ca
Add flag --recompile ( #801 )
2018-09-24 15:33:50 -04:00
Yoshiya Hinosawa
17a7b03d1b
Start testing website ( #813 )
2018-09-24 11:31:14 -04:00
Kevin (Kun) "Kassimo" Qian
c124db4701
[console] Use constructor.name to print out function type ( #664 )
2018-09-24 10:06:48 -04:00
ztplz
f3684c28e5
Rename deno.argv, libdeno::DenoC and deno_set_flags ( #796 )
2018-09-22 08:47:44 -04:00
Kevin (Kun) "Kassimo" Qian
7a0670a951
Implement deno.trace() ( #795 )
2018-09-22 03:59:26 -04:00
Kevin (Kun) "Kassimo" Qian
4d16d54ff8
Add atob() and btoa() ( #776 )
2018-09-20 18:53:29 -04:00
Kevin (Kun) "Kassimo" Qian
fab4bdf40d
Add deno.arch/deno.platform ( #773 )
2018-09-20 02:13:59 -04:00
Mani Maghsoudlou
017ef096df
Implement deno.symlink() ( #742 )
2018-09-18 21:38:24 -07:00
Bert Belder
7553bcb74f
format
2018-09-17 22:54:39 -07:00
Kevin (Kun) "Kassimo" Qian
e3d634eb21
Make mode always u32 and switch to has_mode for StatRes fbs ( #761 )
2018-09-17 16:53:55 -07:00
ztplz
0260aaf8c2
Change FileInfo to interface ( #765 )
2018-09-17 12:00:57 -07:00
Kevin (Kun) "Kassimo" Qian
b0958073ba
Remove remove_timer asserts ( #760 )
...
* Remove remove_timer asserts
* Add clearTimeout invalid id no-panic test
* Move timer test to its file AND some lint side-effects
2018-09-16 13:35:16 -07:00
J2P
0040486539
Fix comments in stat.ts file
2018-09-16 09:12:00 -07:00
Kitson Kelly
0ef28bec4d
Improve integration of dom_types
2018-09-16 09:10:36 -07:00
Parsa Ghadimi
4b1eb855bf
Make fetch.blob() work
2018-09-14 12:50:32 -07:00
Kevin (Kun) "Kassimo" Qian
662e57b20a
[fs] Enable mode for mkdir
on unix ( #746 )
2018-09-14 12:30:43 -07:00
Parsa Ghadimi
66c09de967
Rename fetch_types.d.ts to dom_types.d.ts
2018-09-14 12:27:32 -07:00
Parsa Ghadimi
7b7052e1ab
Implement Blob
2018-09-14 10:04:10 -07:00
justjavac
aaf70ca092
fix command line flag in the comment
2018-09-14 08:25:45 -04:00
Yoshiya Hinosawa
0ca7301a2d
feat: add deno.makeTempDir
2018-09-12 22:33:11 -07:00
qti3e
41c70b154f
Add support for fetch() headers ( #727 )
2018-09-12 15:16:42 -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