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

64 commits

Author SHA1 Message Date
Nayeem Rahman
93c2164673
Fix URL encoding (#5557) 2020-05-18 09:47:45 -04:00
Tomasz Gałkowski
8440d765d5
fix: setTimeout and friends have too strict types (#5412) 2020-05-15 09:51:49 -04:00
Chris Knight
8c45d3a06d
doc: add stream api (#5418) 2020-05-15 09:35:50 -04:00
Kitson Kelly
d16c7394cb
fix: Expose ErrorEvent globally (#5222) 2020-05-11 14:28:13 +02:00
Kitson Kelly
670d01d012
fix: Allow multiple Set-Cookie headers (#5100) 2020-05-09 19:20:18 +02:00
Chris Knight
5fea4e826c
fix: correct type error text (#5150) 2020-05-08 14:28:46 +02:00
Nikolai Vavilov
76c77bb32c
Check destination length in encodeInto (#5078) 2020-05-06 13:10: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
Daniel Lenksjö
1500547afa
fix: URL constructor throws confusing error on invalid scheme (#5057) 2020-05-04 10:06:47 -04:00
木杉
58d0c4f9d6
fix(console): formatting misalignment on console.table (#5046) 2020-05-04 13:36:26 +02:00
Kitson Kelly
7e32269f3f
Add TransformStream and TransformStreamController (#5042) 2020-05-03 15:10:52 -04:00
Bartek Iwańczuk
6661e7e287
BREAKING: remove window.location and self.location (#5034)
This commit removes "location" global available on "window",
"globalThis" and "self".
2020-05-01 20:15:28 +02:00
Ryan Dahl
5d3c49082f
Correct copyright in cli/js/web/decode_utf8.ts (#5035) 2020-05-01 13:29:00 -04:00
Kitson Kelly
81c75332fb
feat: Add WritableStreams (and enable ReadableStreams piping) (#4980) 2020-04-30 10:40:10 -04: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
Bartek Iwańczuk
6ee00e4da3
refactor: change InspectOptions, make Deno.inspect stable (#4967) 2020-04-28 20:11:50 +02: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
Marcos Casagrande
927a771fa4
url: Make zero a valid port (#4963) 2020-04-28 10:40:17 -04:00
Bartek Iwańczuk
b508e84567
refactor: remove combined io interface like ReadCloser (#4944)
This commit removes "combined" interfaces from cli/js/io.ts; in the
like of "ReadCloser", "WriteCloser" in favor of using intersections
of concrete interfaces.
2020-04-28 12:32:43 +02:00
Marcos Casagrande
2fc5878668
Change URL.port implementation to match WHATWG specifications (#4954)
Changed `URL.port` implementation to match [WHATWG
specifications](https://url.spec.whatwg.org/#port-state).

This PR matches the behaviour of other browsers:

1.  a `TypeError` must be thrown when passing an URL with an invalid
port to the constructor.

2. When setting an invalid port, using property setter, I haven't found
what should happen in this case, so I mimic **Firefox** & **Node**
behaviour. If an invalid port is set, it will use the previous value.
**Chrome** sets the value to `'0'` if an invalid port is set. I prefer
to keep the previous valid value.  (I can use Chrome's behaviour if you
think it's better, it's a simple value change)

```
url.port = '3000'; // valid
url.port = 'deno'; // invalid
assertEquals(url.port, '3000');
```

3. If the port value equals the current protocol default port value,
`port` will be an empty string.
2020-04-28 01:23:06 -04:00
Nayeem Rahman
4041a7b857
BREAKING: Remove Deno.symbols namespace (#4936) 2020-04-28 01:06:03 +02:00
uki00a
d440495b6b
fix(console): don't throw RangeError when an invalid date is passed (#4929) 2020-04-27 13:39:39 -04:00
Bartek Iwańczuk
8e9ab9e33e
refactor: decouple Console implementation from stdout (#4899)
When creating a console instance, one must pass "printFunc" arg
which is used internally by Console to output messages.

Due to numerous refactors there was a single method ("console.clear()")
that used "Deno.stdout" instead of "printFunc".

This commit unifies how "Console" outpus message, by using 
"printFunc" in all methods; consequently "Deno.stdout" is no longer
imported in "cli/js/console.ts" making it a standalone module that doesn't
depend on any CLI-specific APIs.
2020-04-27 15:40:47 +02:00
Nayeem Rahman
b33685e94b
fix(cli/js/symbols): Update symbol descriptions (#4878)
Don't use Symbol.for() to define Deno.symbols.customInspect.
2020-04-25 10:53:26 -04:00
Bartek Iwańczuk
912a57f6a2
change type of stdio handles in JS api (#4891) 2020-04-25 01:01:25 +02:00
Fenzland
cb935a375c
fix(#2142) make URLSearchParams more standardized (#4695) 2020-04-23 10:30:32 -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
Kitson Kelly
8bcfc03d71
Rewrite streams (#4842) 2020-04-22 10:06:51 -04:00
Bartek Iwańczuk
d359789c52
feat: support Deno namespace in Worker API (#4784) 2020-04-16 23:40:29 +02:00
Kitson Kelly
cb64cf3ce2
Add support for AbortController/AbortSignal (#4757) 2020-04-15 10:10:49 -04:00
Ryan Dahl
ff60b31129
dedup various type definitions (#4741)
FormData FilePropertyBag DomFile BlobPropertyBag RequestCache 
RequestCredentials RequestDestination RequestMode RequestRedirect 
ResponseType
2020-04-14 09:23:07 -04:00
Ryan Dahl
360c05ffe7
dedup Headers types (#4736) 2020-04-13 22:46:23 -04:00
crowlKats
25bd6868e5
feat(worker): add MessageEvent, ErrorEvent and handling to Worker API (#4391)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2020-04-13 18:34:32 +02:00
Bartek Iwańczuk
5105c68399
workers: update postMessage and location types (#4734) 2020-04-13 16:48:12 +02: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
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
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
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
Yusuke Sakurai
2426174485
feat: Expose ReadableStream and make Blob more standardized (#4581)
Co-authored-by: crowlkats <crowlkats@gmail.com>
2020-04-03 14:55:23 -04:00
Bartek Iwańczuk
e99374a0a3
make Worker.poll private (#4603) 2020-04-03 18:01:45 +02:00
crowlKats
7b675a332c
fix: invalid blob type (#4536) 2020-03-31 14:42:18 -04:00
Michał Sabiniarz
30fdf6dc83
console: print promise details (#4524) 2020-03-30 19:01:19 -04:00
Michał Sabiniarz
4b71ac550e
console: iterable printing improvements (#4472)
1. Array elements are now grouped the same as in Node.js
2. Limit to 100 (Node.js default) elements to display in iterable
3. Print each element in new line if excessing max line length (same as in Node.js)
4. Print length of the TypedArray
5. Print information about empty items in Array
2020-03-30 13:45:37 -04:00
Kitson Kelly
bced52505f
Update to Prettier 2 and use ES Private Fields (#4498) 2020-03-28 13:03:49 -04:00
Chris Knight
a053462566
refactor: rename ConsoleOptions to InspectOptions (#4493) 2020-03-25 20:48:47 -04:00
Michał Sabiniarz
2e5e5fe393
console: replace object abbreviation with line breaking (#4425) 2020-03-24 00:57:05 -04:00