1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-01 09:24:20 -04:00
Commit graph

3150 commits

Author SHA1 Message Date
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
迷渡
3a5dae4303
docs: highlight NO_COLOR (#4723) 2020-04-11 23:12:42 -04:00
Ryan Dahl
637a9ecd6a
dedup URLSearchParams, URL, Location, DOMStringList (#4719) 2020-04-11 17:19:36 -04:00
Ryan Dahl
da28fc1e7b
dedup type declarations (#4718)
Blob, BlobPart, BufferSource, ReferrerPolicy, BlobPart, AbortSignal, AbortSignalEventMap
2020-04-11 16:25:31 -04:00
David Yamnitsky
0641ad0d9b
deno install should also accept log level flags for installed script (#4714) 2020-04-11 11:47:27 -04:00
Kitson Kelly
fc4819e1e0
refactor: Event and EventTarget implementations (#4707)
Refactors Event and EventTarget so that they better encapsulate their
non-public data as well as are more forward compatible with things like
DOM Nodes.

Moves `dom_types.ts` -> `dom_types.d.ts` which was always the intention,
it was a legacy of when we used to build the types from the code and the
limitations of the compiler.  There was a lot of cruft in `dom_types`
which shouldn't have been there, and mis-alignment to the DOM standards.
This generally has been eliminated, though we still have some minor
differences from the DOM (like the removal of some deprecated
methods/properties).

Adds `DOMException`.  Strictly it shouldn't inherit from `Error`, but
most browsers provide a stack trace when one is thrown, so the behaviour
in Deno actually better matches the browser.

`Event` still doesn't log to console like it does in the browser.  I
 wanted to get this raised and that could be an enhancement later on (it
 currently doesn't either).
2020-04-11 11:42:02 -04:00
Nayeem Rahman
2b362bef85
refactor(cli/fmt_errors): Format stack frames in prepareStackTrace() (#4706) 2020-04-11 02:08:11 -04:00
gewoonwoutje
2feb661b85
Replace panic with invalid_utf8 OpError (#4704)
Co-authored-by: Wout Elstgeest <w.elstgeest@inepro.com>
2020-04-10 22:14:16 -04:00
Chris Knight
3e51e67f8a
remove unnecessary delay in std/signal tests (#4703) 2020-04-10 22:03:41 -04:00
Ryan Dahl
2af9f5f2cf
Remove __domTypes namespace (#4698) 2020-04-10 14:24:42 -04:00
Nayeem Rahman
8b4508338b
fix(core/js_error): Get frame data from prepareStackTrace() (#4690)
Fixes: #2703
Fixes: #2710
Closes: #4153
Closes: #4232

Co-authored-by: Kevin (Kun) Kassimo Qian <kevinkassimo@gmail.com>
2020-04-10 18:26:52 +02: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
Bartek Iwańczuk
be71885628
implement Worker.terminate() and self.close() (#4684) 2020-04-10 00:15:17 +02:00
Ryan Dahl
ac215a2461
Fix build - 2becae broke CI (#4686) 2020-04-09 13:45:10 -04:00
Chris Knight
2becae884e
BREAKING: Remove deprecated mkdir, mkdirSync APIs (#4615) 2020-04-09 11:15:56 -04:00
Nayeem Rahman
71ac552249
feat(cli/doc): Support doc for runtime built-ins (#4635) 2020-04-09 14:34:24 +02:00
Chris Knight
475a47cfb7
feat(std/log): improvements and new log handler (#4674) 2020-04-09 13:45:24 +02:00
Ryan Dahl
198a045dbe
Remove __event, __eventTarget, __customEvent namespaces (#4683) 2020-04-09 12:03:44 +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
Ryan Dahl
0cf4ac91e6
v0.40.0 2020-04-08 14:59:06 -04:00
Ryan Dahl
b7e673ba93
upgrade: rust crates (#4679) 2020-04-08 14:29:42 -04:00
Ryan Dahl
dd2d19b22d
Remove __blob and __console namespaces (#4677) 2020-04-08 13:21:04 -04:00
Bartek Iwańczuk
491b8e1cea
feat(doc): handle function params and type params (#4672) 2020-04-08 17:03:42 +02:00
Ryan Dahl
fe17496831
Remove extra copy of URLSearchParams (#4675) 2020-04-08 10:32:08 -04:00
Ryan Dahl
efff39a3ac
Remove panic catch around dprint calls (#4676)
dprint seems to be stable enough to not panic on our own source code
now.
2020-04-08 10:31:48 -04:00
Ryan Dahl
b4836be57e
Remove __io namespace (#4669) 2020-04-08 01:30:51 +02:00
Ryan Dahl
f07fcfcc80
Remove __url namespace (#4668) 2020-04-07 17:11:38 -04:00
Ryan Dahl
6660fb25c9
Remove __workers namespace (#4665) 2020-04-07 15:03:14 -04:00
Bartek Iwańczuk
86fd0c66a6
feat(doc): handle basic reexports (#4625) 2020-04-07 19:47:06 +02:00
Ryan Dahl
51f5276e8c
Remove __textEncoding and __performanceUtil namespaces (#4663) 2020-04-07 13:27:37 -04:00
Akshat Agarwal
caff550b6c
BREAKING: Rename 'deno fetch' subcommand to 'deno cache' (#4656) 2020-04-07 11:24:47 -04:00
Ryan Dahl
62726430be
Remove __timers namespace (#4662) 2020-04-07 11:12:31 -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
Bartek Iwańczuk
dd3a94933a
feat: add --importmap flag to deno bundle (#4651) 2020-04-07 12:32:09 +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
Giorgi Rostomashvili
f82b9ba329
fix: fetch reference types for JS files (#4652)
Fixes #4000 and fixes #4476. Now always tries to fetch reference types
for JS files. Does not throw if it fails, since Typescript compiler will
complain if the file is not there(it will try to fetch it again first)
and people who just use JS should not be bothered by this error.

Not sure about my test, it passes and catches the bug but maybe there is
a better way to express it.
2020-04-06 16:52:25 -04:00
Bartek Iwańczuk
ee126eb4a7
remove std/testing/runner.ts (#4649) 2020-04-06 18:50:56 +02:00
Yusuke Sakurai
b9e5e4c7ec
fix: test_create_cache_if_dir_not_exit (#4636)
This test doesn't remove created directory after test. It will fail on next run.
2020-04-06 10:08:53 -04: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
Ondřej Žára
0ea9562933
docs: add README to cli/js/web/ (#4578) 2020-04-06 13:06:11 +02:00
crowlKats
6720a0dc02
feat: Add File support in FormData (#4632) 2020-04-05 15:49:04 -04:00
Andres Villegas
2911fcc78d
Enable inspector tests (#4628) 2020-04-04 14:46:09 -04:00