1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-23 15:16:54 -05:00
Commit graph

372 commits

Author SHA1 Message Date
Nayeem Rahman
e74a83a715
fix(std/encoding/yaml): Correct exports (#5191) 2020-05-10 17:17:54 -04:00
Ryan Dahl
d5dd5ae87d
std/0.50.0
Add std/version.ts and document unstableness of std.
2020-05-09 09:15:26 -04:00
Ryan Dahl
5de077ab65
Move style guide to docs dir (#5174) 2020-05-09 09:05:23 -04:00
Nayeem Rahman
f184332c09
BREAKING(std): reorganization (#5087)
* Prepend underscores to private modules
* Remove collectUint8Arrays() It would be a misuse of Deno.iter()'s result.
* Move std/_util/async.ts to std/async
* Move std/util/sha*.ts to std/hash
2020-05-09 08:34:47 -04:00
Oliver Lenehan
7d3728e3f4
feat(std/fmt): 8bit and 24bit ANSI colors (#5168) 2020-05-09 06:29:44 -04:00
Andrey Trebler
c42ad381ad
revert PR #5002 (#5141) 2020-05-08 10:32:09 -04:00
zjopy
761b7efb3b
fix(docs): add missing "deno run" (#5126) 2020-05-07 13:48:48 +02:00
Luca Casonato
34ec3b2254
Multi page manual (#5110) 2020-05-06 18:21:13 -04:00
Ryan Dahl
846c049c9b
Remove flaky and useless tests (#5116) 2020-05-06 17:04:52 -04:00
Tomofumi Chiba
6e287d9518
update manual with "deno run" (#5082) 2020-05-05 09:45:51 -04:00
Marcos Casagrande
f0aea98c85
feat(std/node): fs.writefile / fs.promises.writeFile (#5054) 2020-05-04 18:59:37 -04:00
David Sherret
60f2d57fb7
feat(fmt): Add deno-fmt-ignore and deno-fmt-ignore-file comment support (#5075) 2020-05-04 15:17:15 -04:00
Nayeem Rahman
8c509bd885
feat(URL): Support drive letters for file URLs on Windows (#5074)
refactor: Parse URLs more sequentially. This makes it easier to change matching behaviour depending on the protocol.
fix: Fail when a host isn't given for certain protocols.
fix: Convert back-slashes info forward-slashes.
2020-05-04 14:32:54 -04:00
Ryan Dahl
6c02b061ce
stabilize Deno.cwd and require --allow-read (#5068) 2020-05-04 14:23:06 -04:00
Andrey Trebler
796fc9bc3e
BREAKING: make WebSocket directly implement AsyncIterable (#5044) (#5045) 2020-05-04 12:27:06 -04:00
Bartek Iwańczuk
a913b7a1ba
BREAKING: remove CLI 'deno script.ts' hack (#5026)
This PR removes the hack in CLI that allows to run scripts with shorthand: deno script.ts.

Removing this functionality because it hacks around short-comings of clap our CLI parser. We agree that this shorthand syntax is desirable, but it needs to be rethinked and reimplemented. For 1.0 we should go with conservative approach that is correct.
2020-05-04 13:03:30 +02:00
Kitson Kelly
bd3b9cc7d9
Add sha256 and sha224 support (along with HMAC variants) (#5066) 2020-05-04 06:10:57 -04:00
Ali Hasani
5cc0f056d1
[std/node] add the ability to path argument to be URL type (#5055) 2020-05-03 15:14:38 -04:00
Kitson Kelly
1560af2b6e
Move std/util/sha1.ts to ES private fields (#5053) 2020-05-03 14:45:40 +02:00
Ryan Dahl
03d0ee60b4
Add hint on how to install gist program (#5041) 2020-05-02 18:35:25 -04:00
Nayeem Rahman
96fd0f4692
BREAKING: feat(cli/installer): Support guessing the executable name (#5036) 2020-05-01 15:33:11 -04:00
Bert Belder
fa396c0a22
fix std/fs/walk example (#5030) 2020-05-01 12:37:32 -04:00
木杉
e57f0749e7
fix(std/http): avoid directly modifying the headers object (#5024) 2020-05-01 10:35:18 -04:00
john gravois
be65f6692f
docs(std): typo fix (#5023) 2020-05-01 12:33:03 +02:00
Marcos Casagrande
9ded17d722
BREAKING: reorder std/io/utils copyBytes arguments (#5022) 2020-04-30 16:39:25 -04:00
张超杰
21f4c7f35c
doc(std/fs): README.md (#4913) 2020-04-30 14:32:44 -04:00
Nikolai Vavilov
898773d3f8
std/node: toString for globals (#5013) 2020-04-30 13:58:40 -04:00
Luca Casonato
80e2211141
Unstable methods should not appear in runtime or d.ts (#4957)
Co-authored-by: Kitson Kelly <me@kitsonkelly.com>
2020-04-30 11:23:40 -04:00
Nikolai Vavilov
84d687e958
std/node: make process global (#4985) 2020-04-30 10:00:02 -04:00
Tomofumi Chiba
5f8c4d9b68
fix(manual): Deno.copy args order (#4999) 2020-04-30 13:01:16 +02:00
Ali Hasani
c569d958aa
fix(std): use fromFileUrl (#5005) 2020-04-30 12:47:53 +02:00
Andrey Trebler
8ec36681dd
feat: Make WebSocket Reader/Writer (#5001) (#5002) 2020-04-30 03:09:48 -04:00
Marcos Casagrande
12c6055855
Cleanup std/node/fs functions (#5000) 2020-04-29 21:36:44 -04:00
Ryan Dahl
bc792c0267
make camel case readDir, readLink, realPath (#4995) 2020-04-29 16:39:37 -04:00
Marcos Casagrande
78e0ae643c
Fix MultipartReader for big files (#4865) 2020-04-29 16:38:24 -04:00
Bartek Iwańczuk
d308e8d0c0
BREAKING: remove custom implementation of Deno.Buffer.toString() (#4992)
Keep in mind Buffer.toString() still exists, but returns [object Object]. 

Reason for removal of Buffer.toString() was that it implicitly used 
TextDecoder with fixed "utf-8" encoding and no way to customize 
the encoding.
2020-04-29 22:38:10 +02:00
Nayeem Rahman
b51c863550
feat(std/path): Add fromFileUrl() (#4993)
Fix: URL constructor accepts a URL object which is not a base
2020-04-29 16:20:55 -04:00
Bert Belder
3e6ea62841
BREAKING: Include limited metadata in 'DirEntry' objects (#4941)
This change is to prevent needed a separate stat syscall for each file
when using readdir.

For consistency, this PR also modifies std's `WalkEntry` interface to
extend `DirEntry` with an additional `path` field.
2020-04-29 16:00:31 -04:00
Valentin Anger
721a4ad59d
BREAKING: Map-like interface for Deno.env (#4942) 2020-04-29 14:48:19 -04:00
张超杰
17cf2ecdac
adjust docs for std/log (#4984) 2020-04-29 09:38:44 -04:00
Marcos Casagrande
ec41fb69cc
fix: Make std/io copyN write the whole read buffer (#4978) 2020-04-29 12:25:40 +02:00
David Sherret
6fd754fba0
Move the docs like @param [obj.prop] to the interface. (#4974) 2020-04-28 23:26:31 +02:00
Ryan Dahl
ea28a088a4
Remove Conn.closeRead (#4970) 2020-04-28 15:17:55 -04:00
Nayeem Rahman
678313b176
BREAKING: Remove Deno.EOF, use null instead (#4953) 2020-04-28 12:40:43 -04:00
Ryan Dahl
e0ca60e770
BREAKING: Use LLVM target triple for Deno.build (#4948)
Deno.build.os values have changed to correspond to standard LLVM target triples
"win" -> "windows"
"mac" -> "darwin"
2020-04-28 12:35:23 -04:00
迷渡
5a03e42117
typo (#4962) 2020-04-28 09:05:14 -04:00
Bartek Iwańczuk
2cb875bcfb
refactor: rename sync io interfaces (#4945)
This commit renames sync io interfaces:
* SyncReader -> ReaderSync
* SyncWriter -> WriterSync
* SyncSeeker -> SeekerSync
2020-04-28 13:23:30 +02:00
Bartek Iwańczuk
8feb30e325
BREAKING: remove overload of Deno.test() (#4951)
This commit removes overload of Deno.test() that accepted named
function.
2020-04-28 12:33:09 +02:00
Bert Belder
ee4e6a1ef9
Rename FileInfo time fields and represent them as Date objects (#4932)
This patch also increases the resolution of reported file times to
sub-millisecond precision.
2020-04-27 21:13:32 +02:00
Marcos Casagrande
c190a0dbc4
Improve std/http/io.ts parseHTTPVersion (#4930) 2020-04-27 14:08:20 -04:00
underfin
df0000ff0a
feat(std/uuid): Implement uuid v5 (#4916) 2020-04-27 08:49:34 -04:00
Ali Hasani
516d970fd3
bug fix and tests for std/node/fs/mkdir (#4917) 2020-04-27 08:48:54 -04:00
张超杰
e10ee045ed
fix: typo fs readme.md (#4903) 2020-04-27 13:03:13 +02:00
Marcos Casagrande
128dce0d8a
Increase copyN buffer size to match go implementation (#4904) 2020-04-26 16:29:51 -04:00
张超杰
49cad79fb1
fix(std/fs): move dest if not exists and overwrite (#4910) 2020-04-26 16:27:24 -04:00
Akshat Agarwal
4f9bb11444
reorder copyN arguments to match Deno.copy (#4900) 2020-04-26 16:26:02 -04:00
Christopher Dieringer
b28e60ecaf
refactor(std/log): support enum log level (#4859) 2020-04-25 11:13:26 +02:00
Bartek Iwańczuk
4a8d25646a
BREAKING CHANGE: remove Deno.OpenMode (#4884)
This commit removes Deno.OpenMode along with overloaded variants
of Deno.open() and Deno.openSync() that used OpenMode.
2020-04-25 00:45:55 +02:00
Bartek Iwańczuk
0cb1bb98cc
BREAKING CHANGE: change order of args in Deno.copy() (#4885) 2020-04-25 00:09:14 +02:00
Bartek Iwańczuk
824329f0da
BREAKING CHANGE: rename Deno.fsEvents() to Deno.watchFs() (#4886) 2020-04-24 23:40:29 +02:00
Bartek Iwańczuk
6a37e4426e
BREAKING CHANGE: rename TLS APIs to camel case (#4888)
This commit renames all APIs containing "TLS" to use camel case
(connectTLS -> connectTls, etc.)
2020-04-24 23:29:14 +02:00
Ali Hasani
6efdacddf3
create readme for std/bytes (#4876) 2020-04-24 14:24:29 -04:00
Bartek Iwańczuk
68d287eed5
BREAKING CHANGE: rename Deno.toAsyncIterator() to Deno.iter() (#4848)
* rename Deno.toAsyncIterator() to Deno.iter()
* adds sync version Deno.iterSync()
* adds optional second argument for buffer size
2020-04-22 21:30:45 +02:00
Nikolai Vavilov
f72f045de5
std/node: require_ -> require (#4828) 2020-04-20 14:30:52 -04:00
Ali Hasani
437e35ca52
Add no-async-promise-executor lint rule (#4809) 2020-04-20 11:29:37 +02:00
Bartek Iwańczuk
e2fd729a0b
fix(std): existsFile test 2020-04-18 22:29:39 +02:00
Chris Knight
957050cd02
feature: synchronous buffered writer (#4693) 2020-04-17 16:12:14 -04:00
Nayeem Rahman
5bfe3eb8f4
feat(cli/installer.rs): Add DENO_INSTALL_ROOT (#4787) 2020-04-16 18:15:42 -04:00
Chris Knight
1cd1f7de70
refactor: proper Node polyfill directory iteration now that Deno supports this (#4783) 2020-04-16 15:45:30 -04:00
uki00a
f2d1bc3af3
docs(std): update links to documents (#4777) 2020-04-16 11:57:49 -04:00
Nayeem Rahman
5ac728a5f1
refactor(cli/js/ops/fs): Improve readdir() and FileInfo interfaces (#4763) 2020-04-16 01:40:30 -04:00
Steven Guerrero
6441852a1d
Migrate std/types to x/types (#4771) 2020-04-16 01:27:10 -04:00
Ali Hasani
7cfd094359
Implement UUID v1 (#4758) 2020-04-15 10:38:05 -04:00
Nayeem Rahman
926db017d9
Remove std/testing/format.ts (#4749) 2020-04-15 10:12:42 -04:00
Steven Guerrero
8397cd52a5
Refactor std/types (#4713) 2020-04-13 13:15:18 -04:00
Jake Gordon
a5f7ff7200
manual.md tweaks (#4730) 2020-04-13 10:47:14 -04:00
Ali Hasani
e23f33de7b
add copyFile & copyFileSync to std/node/fs (#4726) 2020-04-12 14:34:16 -04:00
Yusuke Sakurai
6e0c9a0c32
refactor(std/multipart): make readForm() return value more type safe (#4710) 2020-04-12 01:24:58 -04:00
Chris Knight
3e51e67f8a
remove unnecessary delay in std/signal tests (#4703) 2020-04-10 22:03:41 -04:00
木杉
195ad4c626
fix(std/http): verify cookie name & update SameSite type (#4685) 2020-04-10 10:12:42 -04:00
Chris Knight
85c61bff1c
fix(std/testing/asserts): change left/right to actual/expected (#4697) 2020-04-10 10:10:45 -04:00
Chris Knight
5bf1e4de3b
feat(std/signal): add utility for listening to signal events (#4696) 2020-04-10 10:05:56 -04:00
Ryan Dahl
02bc58d832
BREAKING: Make fetch API more web compatible (#4687)
- Removes the __fetch namespace from `deno types`
- Response.redirect should be a static.
- Response.body should not be AsyncIterable.
- Disables the deno_proxy benchmark
- Makes std/examples/curl.ts buffer the body before printing to stdout
2020-04-10 09:51:17 -04:00
Ryan Dahl
ac215a2461
Fix build - 2becae broke CI (#4686) 2020-04-09 13:45:10 -04:00
Chris Knight
475a47cfb7
feat(std/log): improvements and new log handler (#4674) 2020-04-09 13:45:24 +02:00
Ali Hasani
90d6831271
feat(std/node): add isPrimitive (#4673) 2020-04-08 18:44:39 -04:00
Ali Hasani
68bde7a0c6
feat(std/node): add fs.mkdir functions and fs.exists tests (#4660) 2020-04-08 18:43:35 -04:00
Akshat Agarwal
caff550b6c
BREAKING: Rename 'deno fetch' subcommand to 'deno cache' (#4656) 2020-04-07 11:24:47 -04:00
木杉
481fcfc8bd
file_server: use text/typescript instead of application/typescript (#4620)
I just tried it and found that using application/typescript, the browser will download 
the file directly, I think that .ts should be mapped to application/javascript or 
text/typescript
2020-04-07 10:06:22 -04:00
Nayeem Rahman
e586d0c8b8
feat(std/http/server): Respond with 400 on request parse failure (#4614) 2020-04-07 12:34:18 +02:00
Ali Hasani
47a580293e
Add exists and existsSync to std/node (#4655) 2020-04-06 23:43:14 -04:00
Ali Hasani
f5d505332e
Remove media_types from std/README.md (#4650) 2020-04-06 19:16:18 -04:00
Bartek Iwańczuk
ee126eb4a7
remove std/testing/runner.ts (#4649) 2020-04-06 18:50:56 +02:00
Andrew Stucki
1e478d73e3
Drop headers with trailing whitespace in header name (#4642)
This relates directly to [an
issue](https://github.com/denoland/deno_std/issues/620) that I initially
raised in `deno_std` awhile back, and was reminded about it today when
the `oak` project popped up on my github recommended repos.

As of now Deno's http servers are vulnerable to the same underlying
issue of go CVE-2019-16276 due to the fact that it's based off of ported
go code from their old standard library. [Here's the commit that fixed
the
CVE.](6e6f4aaf70)

Long story short, some off the shelf proxies and caching servers allow
for passing unaltered malformed headers to backends that they're
fronting. When they pass invalid headers that they don't understand this
can cause issues with HTTP request smuggling. I believe that to this
date, this is the default behavior of AWS ALBs--meaning any server that
strips whitespace from the tail end of header field names and then
interprets the header, when placed behind an ALB, is susceptible to
request smuggling.

The current behavior is actually specifically called out in [RFC
7230](https://tools.ietf.org/html/rfc7230#section-3.2.4) as something
that MUST result in a rejected message, but the change corresponding to
this PR, is more lenient and what both go and nginx currently do, and is
better than the current behavior.
2020-04-06 09:58:46 -04:00
Andreas
703c0b7c17
feat(std/flags): pass key and value to unknown (#4637) 2020-04-06 09:27:10 -04:00
Khải
788a6abfd3
fix(std/testing): formatting bigint (#4626) 2020-04-04 13:13:37 -04:00
Nayeem Rahman
faa0f520cf
doc: Improve the style guide (#4627) 2020-04-04 13:11:43 -04:00
dubiousjim
a5fc505edb
fix erroneous assert (#4608) 2020-04-03 13:49:05 -04:00
Ryan Dahl
13db64fbc6
Remove /std/media_types (#4594) 2020-04-03 12:11:52 -04:00
Ryan Dahl
c8fc29fcca
Revert "Respond with 400 on request parse failure" (#4593)
readRequest should not write a response.

This reverts commit 017a611131.
2020-04-02 15:20:17 -04:00