Ryan Dahl
eff7a1484e
Upgrade deno_std to bef7ba ( #1609 )
2019-01-31 18:11:37 -05:00
Masashi Hirano
02b9046a0e
Fix example code of writeFile ( #1626 )
...
According to spec, `TextEncoder()` takes no parameters. However `TextEncoder("utf-8")` is written in example codes.
Spec of TextEncoder: https://www.w3.org/TR/encoding/#interface-textencoder
MDN: https://developer.mozilla.org/ja/docs/Web/API/TextEncoder/TextEncoder#Parameters
2019-01-30 10:44:40 -05:00
Sergey Golovin
240ca25617
Add repl functions "help" and "exit" ( #1563 )
2019-01-29 14:41:12 -05:00
bdistin
457e65bc2f
docs/typo: readerIterator -> toAsyncIterator as exported ( #1620 )
2019-01-29 13:24:40 -05:00
Kitson Kelly
ee9c627cc5
Split out compiler snapshot ( #1566 )
...
Speeds up startup time, reduces runtime heap size.
2019-01-28 20:41:28 -05:00
Jan Lo
f7c0f49443
Combine deno.removeAll into deno.remove ( #1596 )
2019-01-28 17:54:52 -05:00
Sergey Golovin
f05fd7a1f3
Add console.table ( #1608 )
2019-01-28 16:41:29 -05:00
bokuweb
aaaa35548e
timers: use int instead of double for timeout type ( #1469 )
2019-01-26 22:10:38 +01:00
binaryta
4a0a47dcde
Add console.clear() ( #1562 )
2019-01-24 13:24:39 -05:00
迷渡
6904628aaa
console output with format ( #1565 )
2019-01-24 12:07:08 -05:00
jingweicai
2547f0296f
fix: set env,key for string and value for string ( #1567 )
2019-01-23 20:29:18 -05:00
thefliik
41cf82870b
Minor optimization to repl.ts ( #1561 )
2019-01-23 20:23:25 -05:00
Adam Conrad
e470f31d32
Web API: CustomEvent ( #1505 )
2019-01-23 06:20:53 -06:00
Yoshiya Hinosawa
77114fbda4
chore: update license lines ( #1557 )
2019-01-21 13:03:30 -06:00
Ryan Dahl
7eb74ba0d6
Revert "Use the same parse processing at contractor of URL with setters ( #1549 )"
...
Right now every instance of URL which has a basePath passed will share
the same instance of parts, so a change to one of them will change them
all.
https://github.com/denoland/deno/pull/1549#issuecomment-455896081
This reverts commit 9e1f5ccb8b
.
2019-01-21 08:28:13 -06:00
Daijiro Wachi
9e1f5ccb8b
Use the same parse processing at contractor of URL with setters ( #1549 )
2019-01-20 09:24:29 -06:00
Ryan Dahl
315e4abd7e
mkdir should not be recursive by default ( #1530 )
...
It should return an error if a file with the given path exists and
recursive isn't specified.
Because mode is not used on windows and rarely used in unix, it is made
to the last parameter.
In collaboration with Stefan Dombrowski <sdo451@gmail.com>
2019-01-17 23:39:06 -05:00
Kevin (Kun) "Kassimo" Qian
d06c95637a
Unflake test netConcurrentAccept ( #1544 )
2019-01-17 18:10:34 -05:00
Ryan Dahl
d787713908
Revert "fix: fix fetch tests ( #1535 )"
...
This reverts commit dd08165528
.
These tests are still flaky:
https://travis-ci.com/denoland/deno/jobs/171240240
https://travis-ci.com/denoland/deno/jobs/170775382
2019-01-17 17:33:50 -05:00
Yoshiya Hinosawa
f19622e768
Rewrite tools/format.py in deno ( #1528 )
...
Note: findFiles and findFilesWalk are borrowed from the previous
attempt of @pseudo-su (#1434 )
2019-01-17 15:09:44 -05:00
Kitson Kelly
00b655add1
Add globalThis definition to runtime ( #1534 )
2019-01-16 17:57:15 -05:00
Yoshiya Hinosawa
dd08165528
fix: fix fetch tests ( #1535 )
2019-01-16 01:18:01 -05:00
Kevin (Kun) "Kassimo" Qian
431e455642
Kill all pending accepts when TCP listener is closed ( #1517 )
2019-01-15 20:36:51 -05:00
Kitson Kelly
7d08db2191
Fix JSON Modules ( #1514 )
2019-01-14 00:18:42 -05:00
Kitson Kelly
de9c67a702
Cleanup compiler and re-enable tests ( #1512 )
2019-01-13 23:44:11 -05:00
Ryan Dahl
3c1a0ad19e
Properly parse network addresses. ( #1515 )
2019-01-13 22:14:59 -05:00
Joshua Flancer
fda604ff05
Added rid to Conn interface ( #1513 )
2019-01-13 19:54:30 -05:00
Yoshiya Hinosawa
3b59323e42
chore: re-enable test of website ( #1508 )
2019-01-13 10:42:08 -05:00
JaePil Jung
02792d58d4
Remove unnecessary async keyword in test file ( #1507 )
2019-01-13 09:39:23 -05:00
JaePil Jung
6c9695a528
Remove unused imports ( #1503 )
2019-01-12 09:16:18 -05:00
Ryan Dahl
cca3a9562b
Re-enable --recompile ( #1492 )
2019-01-09 20:52:13 -05:00
Ryan Dahl
26bc251c58
Upgrade deno_std submodule.
2019-01-10 02:45:18 +01:00
Ryan Dahl
0ceb554343
Native ES modules ( #1460 )
...
* Native ES modules
This is a major refactor of internal compiler.
Before: JS and TS both were sent through the typescript compiler where
their imports were parsed and handled. Both compiled to AMD JS and
finally sent to V8
Now: JS is sent directly into V8. TS is sent through the typescript
compiler, but tsc generates ES modules now instead of AMD. This
generated JS is then dumped into V8.
This should much faster for pure JS code. It may improve TS compilation
speed.
In the future this allows us to separate TS out of the runtime heap and
into its own dedicated snapshot. This will result in a smaller runtime
heap, and thus should be faster.
Some tests were unfortunately disabled to ease landing this patch:
1. compiler_tests.ts which I intend to bring back in later commits.
2. Some text_encoding_test.ts tests which made the file invalid utf8.
See PR for a discussion.
Also worth noting that this is necessary to support WASM
2019-01-09 12:59:46 -05:00
Ryan Dahl
6f79ad721a
Minimal Worker support ( #1476 )
...
This adds the ability to spawn additional Isolates from Rust and send
and receive messages from them. This is preliminary work to support
running the typescript compiler in a separate isolate and thus support
native ES modules. Ref #975 .
2019-01-08 14:44:06 -05:00
Yoshiya Hinosawa
cae71ed841
Implement console.groupCollapsed ( #1452 )
...
This implementation of groupCollapsed is intentionally different
from the spec defined by whatwg. See the conversation in #1355
and #1363 .
2019-01-06 16:34:52 -05:00
Ryan Dahl
1b7938e3aa
Add libdeno.builtinModules ( #1463 )
...
This is needed to support builtin modules like
import { open } from "deno"
2019-01-06 16:32:21 -05:00
Ryan Dahl
f37d67e809
Revert "Split Runner from Compiler" ( #1462 )
...
This reverts commit 3d03f5b0cb
.
2019-01-06 14:17:13 -05:00
Ryan Dahl
57301909cd
Add deno.pid ( #1464 )
2019-01-06 14:16:42 -05:00
Adam Conrad
f44322128b
Add Event web API ( #1059 )
2019-01-05 10:02:44 -05:00
Ryan Dahl
ea6c9f2f36
Revert "use byte array instead of string for code fetch ( #1307 )" ( #1455 )
...
This reverts commit e976b3e041
.
There is nothing technically wrong with this commit, but it's adding
complexity to a big refactor (native ES modules #975 ). Since it's not
necessary and simply a philosophical preference, I will revert for now
and try to bring it back later.
2019-01-03 22:11:01 -05:00
Satya Rohith
6be1164d89
Remove assertion for empty modules ( #1450 )
2019-01-03 22:09:07 -05:00
Ryan Dahl
4f62a56f90
Move testing module to deno_std ( #1451 )
...
Upgrades deno_std submodule.
2019-01-03 14:55:22 -05:00
Kevin (Kun) "Kassimo" Qian
8d452d74fa
Support more fetch init body types ( #1449 )
2019-01-03 06:41:20 -05:00
bokuweb
0834478154
fix: use unknown instead of any in testing
2019-01-02 20:22:44 -05:00
Ryan Dahl
2c477dd7cb
Happy new year!
2019-01-02 02:37:08 +01:00
Ryan Dahl
68e009d1d8
Upgrade deno_std
2018-12-31 19:38:52 +00:00
迷渡
48e29c3c86
make Headers
follow spec ( #1427 )
2018-12-29 12:30:11 +00:00
Yoshihisa Mochihara
3d9f46a6cf
Rename file.ts to dom_file.ts ( #1423 )
2018-12-27 09:45:58 +00:00
迷渡
5e518b7417
check runtime FormData
and Headers
params ( #1415 )
2018-12-27 02:12:55 +00:00
Ryan Dahl
32e1641628
deno_net -> deno_std rename
...
Also don't format external js/deps
2018-12-24 11:31:17 -05:00
迷渡
c002ea10fa
fix FormData.name ( #1412 )
2018-12-24 11:18:01 -05:00
迷渡
7d0e1050d3
runtime arg check URLSearchParams
( #1390 )
2018-12-23 23:07:58 -05:00
Ryan Dahl
6cc998f28b
Remove support for extensionless import ( #1396 )
2018-12-23 11:44:08 -05:00
Kevin (Kun) "Kassimo" Qian
cbee2895b3
Implement Body.formData
for fetch ( #1393 )
2018-12-21 17:09:53 -05:00
Kitson Kelly
317fddbbf8
Improve handling of non-coercable objects in assertEqual ( #1385 )
2018-12-21 06:03:27 -05:00
Kevin (Kun) "Kassimo" Qian
e4be1209b6
Avoid fetch segfault on empty Uri ( #1394 )
2018-12-21 04:47:09 -05:00
Kevin (Kun) "Kassimo" Qian
419000d556
Expose deno.inspect ( #1378 )
2018-12-19 22:08:49 -05:00
Kevin (Kun) "Kassimo" Qian
57338d98be
Add illegal header name and value guards ( #1375 )
2018-12-19 02:57:23 -05:00
迷渡
3dbd18af09
Fix URLSearchParams set() and constructor() ( #1368 )
2018-12-18 20:14:59 -05:00
Kitson Kelly
91a41ca124
Add URL implementation ( #1359 )
2018-12-17 20:07:47 -05:00
迷渡
04076465cf
Add console.count and console.time ( #1358 )
2018-12-17 11:54:33 -05:00
迷渡
769994bd4e
console.assert
should not throw error (#1335 )
2018-12-14 14:36:08 -05:00
Kevin (Kun) "Kassimo" Qian
2cb52cc4d1
Fix deno.open permission check ( #1336 )
2018-12-13 16:20:37 -05:00
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