ecyrbe
2a594bd3b2
feat(std/node): add os.tmpdir() implementation ( #4213 )
2020-03-01 19:05:04 -05:00
Yusuke Sakurai
9075daa2e3
[std/ws] provide default close code for ws.close() ( #4172 )
2020-02-28 11:17:00 -05:00
Yusuke Sakurai
c65d0c63e7
reduce unnecessary output on tests ( #4148 )
2020-02-27 15:12:04 -05:00
Yusuke Sakurai
942e67c00b
refactor(std/http): move io functions to http/io.ts ( #4126 )
2020-02-26 10:48:35 -05:00
Kitson Kelly
be787d09d5
upgrade: TypeScript 3.8 ( #4100 )
2020-02-25 15:33:19 -05:00
Yusuke Sakurai
22f88b9f37
fix: [http] Consume unread body and trailers before reading next request ( #3990 )
...
- Added `ServerRequest.finalize()`: consuming all unread body stream and trailers.
- This is cleanup method for reading next request from same keep-alive connection.
- Needed when handler didn't consume all body and trailers even after responding.
- refactor: `ServerRequest._bodyStream()`, `ServerRequestBody` are removed.
- Now using `bodyReader()` and `chunkedBodyReader()` instead.
- fix: Trailers should only be read `transfer-encoding` is `chunked` and `trailer` header is set and its value is valid.
- fix: use `Headers.append()` on reading trailers.
- fix: delete `trailer` field from headers after reading trailers.
- reorg: Several functions related to IO are moved into `http/io.ts`
2020-02-24 22:49:39 -05:00
João Souto
5c1ab080cd
Remove ansi_term dependency ( #4116 )
2020-02-24 19:30:17 -05:00
Ryan Dahl
4005174f6c
Revert "Remove ansi_term dependency"
...
Broke colors
https://github.com/denoland/deno/issues/4112#issuecomment-590545385
This reverts commit c250778704
.
2020-02-24 17:18:15 -05:00
Suguru Motegi
79c6e052ed
fix: createSecKey logic ( #4063 )
2020-02-24 16:37:15 -05:00
Bartek Iwańczuk
e1687c0a46
rename Deno.Err -> Deno.errors ( #4093 )
2020-02-24 15:48:35 -05:00
Nayeem Rahman
db59705595
doc: Remove old link to deno types output ( #4111 )
2020-02-24 15:02:22 -05:00
Bartek Iwańczuk
5da7c7df1d
disable std/examples/chat tests for windows ( #4109 )
2020-02-24 12:58:13 -05:00
Matthew Lennon
c74684ed90
update build instructions for windows ( #4027 )
2020-02-24 12:31:21 -05:00
João Souto
c250778704
Remove ansi_term dependency ( #4106 )
2020-02-24 10:29:56 -05:00
ecyrbe
fb08cf7005
Add missing node os.release() implementation ( #4065 )
2020-02-24 08:35:45 -05:00
uki00a
fe9ac35a65
fix(std/examples): add tests for examples ( #4094 )
2020-02-24 08:31:40 -05:00
Yusuke Sakurai
162d66d23f
fix: chat example's content-security-policy ( #4091 )
2020-02-24 08:10:00 -05:00
Ben Noordhuis
45eb2f9b37
feat(std/node): add os Symbol.toPrimitive methods ( #4073 )
...
Node's os module exports a number of methods that evaluate to themselves
when coerced to a primitive.
I.e., `"" + os.arch` and `os.arch()` evaluate to the same string, and
now Deno's shims do too.
2020-02-23 14:40:44 -05:00
Yusuke Sakurai
d9886a44d1
fix: [ws] sock shouldn't throw eof error when failed to read frame ( #4083 )
2020-02-23 11:59:36 -05:00
Yusuke Sakurai
8b646e8657
Added browser chat example ( #4022 )
2020-02-22 18:51:04 -05:00
ecyrbe
fb98556d56
feat(std/node): add os.loadavg() ( #4075 )
2020-02-22 18:46:52 -05:00
jigsaw
c34d96d865
Fix example ( #4076 )
2020-02-22 18:45:35 -05:00
Bartek Iwańczuk
bd640bc7e6
feat: Deno.fsEvents() ( #3452 )
2020-02-21 13:21:51 -05:00
ecyrbe
754b8c65ad
feat(std/node) : add os.platform ( #4064 )
2020-02-21 12:01:01 -05:00
Bartek Iwańczuk
dd8a109481
refactor: remove unneeded ErrorKinds ( #3936 )
2020-02-21 10:36:13 -05:00
Clemens Tolboom
7e49d96cbc
/std/ws: Fix args index for WS examples ( #4046 )
2020-02-20 10:19:14 -05:00
Maximilien Mellen
90125566bb
Enable TS strict mode by default ( #3899 )
...
Fixes #3324
Co-authored-by: Kitson Kelly <me@kitsonkelly.com>
2020-02-19 15:36:18 -05:00
Kitson Kelly
046bbb2691
Support loading additional TS lib files ( #3863 )
...
Fixes #3726
This PR provides support for referencing other lib files (like lib.dom.d.ts that are not
used by default in Deno.
2020-02-19 00:34:11 -05:00
Nayeem Rahman
5a3292047c
feat(std/io): Export readDelim(), readStringDelim() and readLines() from bufio.ts ( #4019 )
...
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2020-02-17 19:51:13 -05:00
Chris Knight
7b9f6e9c45
feat: Asynchronous event iteration node polyfill ( #4016 )
2020-02-17 13:22:41 -05:00
Nikolai Vavilov
1908066753
Update ws client example ( #4012 )
2020-02-17 12:49:30 -05:00
Yusuke Sakurai
621aeef836
fix: appended CRLF to end of trailer headers ( #3989 )
2020-02-13 16:05:30 -05:00
Chris Knight
a7056095a5
feat(node): add EventEmitter.errorMonitor ( #3960 )
2020-02-11 15:55:54 -05:00
木杉
92019498f6
fix(file_server): don't crash on "%" pathname ( #3953 )
2020-02-11 15:53:09 -05:00
Bartek Iwańczuk
b67f20be3b
update references to testing/mod.ts in manual ( #3973 )
2020-02-11 21:50:20 +01:00
Bartek Iwańczuk
61273085e4
refactor: rewrite tests in std/ to use Deno.test ( #3930 )
2020-02-11 17:24:27 +01:00
uki00a
5a143cdbd3
fix(std/node): support named import for EventEmitter ( #3959 )
2020-02-11 11:19:35 -05:00
Chris Knight
81905a867e
feat: Event emitter node polyfill ( #3944 )
2020-02-10 18:19:48 -05:00
Yusuke Sakurai
e6f204199b
feat: Support HTTP trailer headers for response ( #3938 )
2020-02-10 11:38:48 -05:00
Benny Shi
e8f639ce53
Add readlink, readlinkSync for std/node/fs.ts ( #3926 )
2020-02-10 03:38:05 -06:00
Nikolai Vavilov
61c5bb86db
Bump required VS version ( #3940 )
...
deno builds successfully with VS2019, so no need to require VS2017.
2020-02-09 10:07:37 -06:00
Bartek Iwańczuk
1c0ffa1383
reenable server tests ( #3928 )
2020-02-08 14:24:09 -06:00
Yusuke Sakurai
a4bb8bab44
remove non-null assertion operator from std (part2) ( #3927 )
2020-02-08 14:15:59 -06:00
Yusuke Sakurai
c2986891f6
remove non-null assertion operator from std (part1) ( #3900 )
2020-02-07 02:23:38 -05:00
Yoshiya Hinosawa
5a8ba3b114
feat: add std/signal/mod.ts ( #3913 )
2020-02-07 01:53:15 -05:00
Nayeem Rahman
971391dbaf
fix(std/path/globrex.ts): Use non-capturing groups in globrex() ( #3898 )
2020-02-06 17:25:39 -05:00
Yusuke Sakurai
699d10bd9e
fix: make WebSocket.send() exclusive ( #3885 )
2020-02-06 08:42:32 -05:00
Kitson Kelly
145188bcf7
std/http/server::serve aligned to std/http/server::serveTLS ( #3881 )
2020-02-04 15:15:23 +01:00
Rafael Vargas
55063dd8e8
fix: Deno.remove() to properly remove dangling symlinks ( #3860 )
...
For some reason, the unit tests for Deno.remove() were not being imported to
unit_tests.ts and, consequently, not being executed. Thus, I imported them,
refactored some existent ones and wrote new ones for the symlink removal case.
Since the creation of a symlink is not implemented for Windows yet, assertions
that consider this state were added when the tests are executed in this OS.
2020-02-03 08:20:15 -05:00
Kevin (Kun) "Kassimo" Qian
e8df66c12c
std/encoding: add base32 support ( #3855 )
2020-02-02 16:49:41 -05:00
Chris Knight
77f4df40f3
Fixed month reference in documented output of parseDate and parseDateTime function calls ( #3859 )
2020-02-02 16:46:05 -05:00
Bartek Iwańczuk
e1697421e2
chore: remove std/installer, port installer tests to Rust ( #3843 )
2020-01-31 17:34:50 +01:00
Kevin (Kun) "Kassimo" Qian
97b2a0bb95
bring back std/examples/xeval.ts ( #3822 )
2020-01-30 21:02:14 -05:00
Chris Knight
3de9540ac6
feat(std/node) Endianness ( #3833 )
2020-01-30 18:57:29 -05:00
Bartek Iwańczuk
de5c099b47
feat: deno install in Rust ( #3806 )
...
//std/installer couldn't be removed due to bug, but it's now deprecated.
2020-01-30 18:42:39 -05:00
Ryan Dahl
2338e7679c
Remove --current-thread flag ( #3830 )
...
This flag was added to evaluate performance relative to tokio's threaded
runtime. Although it's faster in the HTTP benchmark, it's clear the runtime
is not the only perf problem.
Removing this flag will simplify further refactors, in particular
adopting the #[tokio::main] macro. This will be done in a follow up.
Ultimately we expect to move to the current thread runtime with Isolates
pinned to specific threads, but that will be a much larger refactor. The
--current-thread just complicates that effort.
2020-01-30 10:49:33 -05:00
Bartek Iwańczuk
73a3cc21d0
feat: dprint formatter ( #3820 )
...
* rewrite fmt_test in Rust, remove tools/fmt_test.py
* remove //std/prettier
2020-01-29 21:16:48 -05:00
cknight
f0a6062012
Partial implementation of node os polyfill based on currently available Deno functionality ( #3821 )
2020-01-29 20:57:29 -05:00
Bartek Iwańczuk
f32c31a0eb
dx: descriptive permission errors ( #3808 )
...
Before:
```
▶ target/debug/deno https://deno.land/std/examples/echo_server.ts
error: Uncaught PermissionDenied: run again with the --allow-net flag
► $deno$/dispatch_json.ts:40:11
at DenoError ($deno$/errors.ts:20:5)
at unwrapResponse ($deno$/dispatch_json.ts:40:11)
at sendSync ($deno$/dispatch_json.ts:67:10)
at listen ($deno$/net.ts:170:15)
at https://deno.land/std/examples/echo_server.ts:4:23
```
```
▶ target/debug/deno --allow-read=/usr https://deno.land/std/examples/cat.ts /etc/passwd
error: Uncaught PermissionDenied: run again with the --allow-read flag
► $deno$/dispatch_json.ts:40:11
at DenoError ($deno$/errors.ts:20:5)
at unwrapResponse ($deno$/dispatch_json.ts:40:11)
at sendAsync ($deno$/dispatch_json.ts:91:10)
```
After:
```
▶ target/debug/deno https://deno.land/std/examples/echo_server.ts
error: Uncaught PermissionDenied: network access to "0.0.0.0:8080", run again with the --allow-net flag
► $deno$/dispatch_json.ts:40:11
at DenoError ($deno$/errors.ts:20:5)
at unwrapResponse ($deno$/dispatch_json.ts:40:11)
at sendSync ($deno$/dispatch_json.ts:67:10)
at listen ($deno$/net.ts:170:15)
at https://deno.land/std/examples/echo_server.ts:4:23
```
```
▶ target/debug/deno --allow-read=/usr https://deno.land/std/examples/cat.ts /etc/passwd
error: Uncaught PermissionDenied: read access to "/etc/passwd", run again with the --allow-read flag
► $deno$/dispatch_json.ts:40:11
at DenoError ($deno$/errors.ts:20:5)
at unwrapResponse ($deno$/dispatch_json.ts:40:11)
at sendAsync ($deno$/dispatch_json.ts:91:10)
```
2020-01-27 21:13:17 -05:00
Kitson Kelly
f604becaba
Improve support of type definitions ( #3755 )
2020-01-26 13:59:41 -05:00
Takashi Idobe
c21e0008b5
add some tests for isSymbol in std/node/util_test ( #3788 )
2020-01-25 08:25:40 -05:00
David Asabina
86726f88f1
fix crate name in docs ( #3778 )
2020-01-24 14:47:11 -05:00
Carl Rosell
11a29fdb44
fix(std/http): update listenAndServe argument type ( #3775 )
...
allow same argument type for `listenAndServe` as `serve`.
fixes: #3774
2020-01-24 10:35:23 -05:00
Yoshiya Hinosawa
bc89f04cbf
Add signal handlers ( #3757 )
2020-01-24 08:15:31 -05:00
Fabriece Sumuni
ceb7aae8ef
fix typo
2020-01-23 10:40:26 -05:00
Lasse Brudeskar Vikås
159ac525ae
Update manual.md ( #3734 )
...
Updated the `Deno.bundle` description to actually use the `bundle`-function.
2020-01-21 10:12:19 -05:00
Takashi Idobe
108294deeb
change copyrights from 2019 to 2020 ( #3733 )
2020-01-21 10:01:55 -05:00
Bartek Iwańczuk
23e67eb515
stabilize net Addr ( #3709 )
...
Co-authored-by: xiaoxintang <15707971810@163.com>
2020-01-18 21:49:55 +01:00
Bartek Iwańczuk
34b99fec8e
rename dial to connect and dialTLS to connectTLS ( #3710 )
2020-01-18 18:35:12 +01:00
Brandon Kalinowski
4f1fa82d1d
std(yaml): correct sortKeys type ( #3708 )
2020-01-18 09:19:36 -05:00
Kevin (Kun) "Kassimo" Qian
fc077cd315
std/http: allow response body to be string ( #3705 )
2020-01-17 18:44:35 -05:00
迷渡
34dc0ae280
doc: fix spaces of code in list ( #3678 )
2020-01-15 23:13:50 -05:00
Ry Dahl
a4dde552de
Revert "feat(flags): script arguments come after '--'" ( #3681 )
...
Due to complaints about ergonomics and because it breaks shebang on
linux.
This reverts commit 2d5457df15
.
BREAKING CHANGE
2020-01-15 19:21:35 -05:00
Luca Casonato
3eab20ce42
feat(std/node): Added node timers builtin ( #3634 )
2020-01-15 14:13:12 -05:00
Tomofumi Chiba
8a352f7260
fix curl.ts ( #3677 )
2020-01-15 08:05:22 -06:00
Nayeem Rahman
9d5f0f2d23
Remove std/multipart ( #3647 )
...
since it overlaps with std/mime/multipart
2020-01-10 12:29:09 -07:00
Ry Dahl
d492c5abe3
feat: Deno.args now does not include script ( #3628 )
...
Previously Deno.args was ["script.js", "arg1", "arg2"]
Now it is just ["arg1", "arg2"]
BREAKING CHANGE
2020-01-09 11:37:01 -07:00
Ry Dahl
c50cab90a0
Remove xeval subcommand ( #3630 )
2020-01-08 17:40:59 -05:00
Ry Dahl
2d5457df15
feat(flags): script arguments come after '--' ( #3621 )
2020-01-08 14:59:53 -05:00
Kitson Kelly
d325566a7e
Runtime Compiler API ( #3442 )
...
Also restructures the compiler TypeScript files to make them easier to
manage and eventually integrate deno_typescript fully.
2020-01-08 09:17:44 -05:00
Ry Dahl
d4bf0670ce
fix: Deno.mkdir should conform to style guide ( #3617 )
2020-01-07 14:14:33 -05:00
Nayeem Rahman
4e1a638bc5
doc: Add glib2.0 as a build prerequisite ( #3608 )
2020-01-05 19:35:45 -05:00
Ry Dahl
5f1df038fb
Replace libdeno with rusty_v8 ( #3556 )
2020-01-05 09:19:29 -05:00
Dreamacro
70b1be6ff4
Fix ws handshake with correctly empty search string ( #3587 )
2020-01-04 04:31:12 -05:00
uki00a
cbc4bbc71f
fix(std/encoding/yaml): export parseAll ( #3592 )
2020-01-04 04:26:57 -05:00
Ry Dahl
bfab4ed0df
Happy new year! ( #3578 )
2020-01-02 15:13:47 -05:00
Kevin (Kun) "Kassimo" Qian
5cf2eb7d18
feat(std/http): make req.body a Reader ( #3575 )
2020-01-02 12:34:33 -05:00
Bartek Iwańczuk
46d76a7562
upgrade: Tokio 0.2 ( #3418 )
2019-12-30 14:57:17 +01:00
Nayeem Rahman
954a0c64e7
doc: Update and improve build instructions ( #3547 )
2019-12-24 22:00:30 -05:00
Axetroy
e88c801e76
std: remove wildcard export in uuid module ( #3540 )
2019-12-23 04:36:25 -05:00
Yoshiya Hinosawa
80da2ac8de
fix(std/encoding/yaml): support document separator in parseAll ( #3535 )
2019-12-21 03:57:51 -05:00
Nayeem Rahman
e8d82a6348
feat: Add missing mod.ts files in std ( #3509 )
...
std/archive/tar.ts:
- Remove FileReader.
- Remove FileWriter.
std/encoding/csv.ts:
- ExtendedParseOptions -> ParseOptions
- HeaderOption -> HeaderOptions
- ParseOptions -> ReadOptions
- readAll() -> readMatrix()
std/encoding/yaml.ts:
- DumpOptions -> StringifyOptions
std/fmt/colors.ts:
- getEnabled() -> getColorEnabled()
- setEnabled() -> setColorEnabled()
std/testing/mod.ts:
- Re-export sibling modules.
2019-12-20 15:21:30 -05:00
Yoshiya Hinosawa
29562ed61e
docs(std/encoding/yaml): add usage document ( #3529 )
2019-12-20 11:32:05 -05:00
Axetroy
ef30d376db
fix permission errors are swallowed by fs.copy() ( #3504 )
2019-12-18 09:45:19 -05:00
Christian Bromann
1c09cc63c8
fix code example ( #3519 )
2019-12-18 09:44:30 -05:00
Yoshiya Hinosawa
ff6b514a7b
Improve empty test case error messages ( #3514 )
2019-12-18 08:05:58 -05:00
Axetroy
bb24fb74ff
fix permission errors are swallowed by fs.emptyDir ( #3501 )
2019-12-18 05:12:36 -05:00
Kevin (Kun) "Kassimo" Qian
33d2e3d536
std/node: better error message for read perm in require() ( #3502 )
2019-12-15 17:23:12 +08:00
木杉
7e116dd70d
Support utf8 in file_server ( #3495 )
2019-12-14 16:03:30 +08:00
木杉
d8e60309d2
feat(file_server): add help & switch to flags ( #3489 )
2019-12-14 10:01:32 +08:00