1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-02 09:34:19 -04:00
Commit graph

1055 commits

Author SHA1 Message Date
Ergenekon Yiğit
4fa69e890e
fix: atob should throw dom exception (#5730) 2020-05-22 21:52:50 -04:00
Bartek Iwańczuk
526c9196e2
v1.0.2 2020-05-22 20:00:28 +02:00
Bartek Iwańczuk
960f9ccb2e
fix: SWC lexer settings and silent errors (#5752)
This commit changes how error occurring in SWC are handled.
Changed lexer settings to properly handle TS decorators.
Changed output of SWC error to annotate with position in file.
2020-05-22 19:23:35 +02:00
Bartek Iwańczuk
e191c70989
fix: ts type imports (#5733) 2020-05-22 19:05:18 +02:00
Chris Knight
4b06e35765
doc: clarify and warn on Deno.read/write behaviour (#5743) 2020-05-22 12:56:12 -04:00
Bartek Iwańczuk
f9e45114b9
fix: redirects handling in module analysis (#5726)
This commit fixes a bug introduced in #5029 that caused bad 
handling of redirects during module analysis. 

Also ensured that duplicate modules are not downloaded.
2020-05-22 16:01:00 +02:00
David Sherret
ee71099492
fix(fmt): Do not panic on new expr with no parens. (#5734)
Closes #5567
2020-05-21 20:43:32 -04:00
Bartek Iwańczuk
491feb859f
fix: --inspect flag working like --inspect-brk (#5697) 2020-05-21 20:34:25 +02:00
Bhumij Gupta
88e8c32652
docd: Replace obsolete Deno.homeDir() with Deno.dir('home') (#5708) 2020-05-21 14:06:42 +02:00
Colin Harrington
aea5b12bae
ci: Errors in benchmarks should fail CI (#5422) 2020-05-21 13:08:43 +02:00
Bartek Iwańczuk
5f9c1c7da6
fix: disallow http imports for modules loaded over https (#5680) 2020-05-21 13:06:12 +02:00
Maple Miao
9fdc6dc435
docs: fix test glob pattern (#5661) 2020-05-21 01:02:32 -04:00
Marcos Casagrande
47b089ffa8
fix: streams hwm validation (#5681) 2020-05-20 20:18:43 -04:00
Ryan Dahl
30702e2678
move js unit tests to cli/tests (#5678) 2020-05-20 17:52:51 -04:00
Ryan Dahl
49dda23f6b
v1.0.1 2020-05-20 12:40:26 -04:00
David Sherret
91d576aa5a
Update dprint 0.18.4 (#5671)
Fixes trailing comma issue
2020-05-20 10:30:33 -04:00
Bartek Iwańczuk
8799855fdc
refactor: reorganize TS compiler (#5603) 2020-05-20 16:25:40 +02:00
Ryan Dahl
0fb5f23466
fix(doc): crash on formatting type predicate (#5651) 2020-05-19 18:55:06 -04:00
Speykious
9752b853dd
Provide better ANSI colorized output when inspecting objects (#5404) 2020-05-19 14:19:26 -04:00
uki00a
cdc9323ccc
fix: REPL does not exit properly when close() is called (#5451) 2020-05-19 13:33:11 -04:00
buckle2000
1be7ec47ac
Mark Deno.pid and Deno.noColor as const (#5593) 2020-05-18 21:51:54 -04:00
Ali Hasani
6072755ead
Implement Deno.symlink() for windows (#5533) 2020-05-19 00:46:02 +02:00
Nayeem Rahman
93c2164673
Fix URL encoding (#5557) 2020-05-18 09:47:45 -04:00
Ali Hasani
c3ec16535f
Make Deno.remove() work with directory symlinks on windows (#5488) 2020-05-18 14:50:44 +02:00
Ryan Dahl
2a038eafcd
Revert "Fix definition of URL constructor (#5521)" (#5564)
This reverts commit 63bc468365.
2020-05-18 08:46:56 -04:00
Bartek Iwańczuk
f6caf4883d
fix: disable test using 019_media_types (#5589)
This commit disabled flaky test in cli/module_graph.rs.

The test uses 019_media_types.ts which was known to be flaky
for some time. Test should be reenabled once test HTTP server
is rewritten to Rust.
2020-05-18 14:00:08 +02:00
Bartek Iwańczuk
9d63772fe5
refactor: rewrite TS dependency analysis in Rust (#5029)
This commit completely overhauls how module analysis is 
performed in TS compiler by moving the logic to Rust.

In the current setup module analysis is performed using 
"ts.preProcessFile" API in a special TS compiler worker 
running on a separate thread.

"ts.preProcessFile" allowed us to build a lot of functionality
in CLI including X-TypeScript-Types header support 
and @deno-types directive support. Unfortunately at the 
same time complexity of the ops required to perform 
supporting tasks exploded and caused some hidden 
permission escapes.

This PR introduces "ModuleGraphLoader" which can parse
source and load recursively all dependent source files; as 
well as declaration files. All dependencies used in TS 
compiler and now fetched and collected upfront in Rust 
before spinning up TS compiler.

To achieve feature parity with existing APIs this commit 
includes a lot of changes:

* add "ModuleGraphLoader"
  - can fetch local and remote sources
  - parses source code using SWC and extracts imports, exports, file references, special 
     headers
  - this struct inherited all of the hidden complexity and cruft from TS version and requires 
     several follow up PRs
* rewrite cli/tsc.rs to perform module analysis upfront and send all required source code to 
  TS worker in one message
* remove op_resolve_modules and op_fetch_source_files from cli/ops/compiler.rs
* run TS worker on the same thread
2020-05-18 12:59:29 +02:00
Bert Belder
36fde75d77
Miscellaneous documentation and spelling improvements (#5527)
* Extended/updated documentation on code editor setup and plugins.
* Moved documentation to the right file.
* Fixed spelling errors in documentation and code.
* Updated broken links.

Co-authored-by: 迷渡 <justjavac@gmail.com>
Co-authored-by: AlfieriChou <alfierichou@gmail.com>
Co-authored-by: Anil Seervi <anil13112000@gmail.com
Co-authored-by: Bert Belder <bertbelder@gmail.com>
Co-authored-by: Fernando Basso <fernandobasso.br@gmail.com>
Co-authored-by: József Sallai <jozsef@sallai.me>
Co-authored-by: S4ltyGo4t <mario.weidner@gmx.de>
Co-authored-by: Tommy May <tommymay37@gmail.com>
Co-authored-by: Turbinya <wownucleos@gmail.com>
Co-authored-by: ᴜɴвʏтᴇ <i@shangyes.net>
2020-05-17 19:24:39 +02:00
Ali Hasani
eddb916883
Implement Deno.kill for windows (#5347) 2020-05-17 19:11:24 +02:00
David Sherret
a054250a2c
Update to dprint 0.18.3 and the latest version of swc (#5509) 2020-05-17 18:56:22 +02:00
Bartek Iwańczuk
e16eb9e108
chore: capture stderr in integration tests (#5549)
This commit removes "check_stderr" setting from itest! macro used
to generate integration tests. Without this setting on tests discarded
output of stderr making it very hard to debug the problem in test.

Numerous tests were changed by adding "--quiet" flag to not display
"Compile"/"Download" prompts.
2020-05-17 17:42:39 +02:00
Masahiro Miyashiro (3846masa)
63bc468365
Fix definition of URL constructor (#5521) 2020-05-17 11:37:16 -04:00
Ali Hasani
6ffb8ee2c3
docs: update cli/js/tests README (#5531) 2020-05-17 12:14:37 +02:00
Yiyu Lin
c4fe58d8df
Return error if more than one listener calls WorkerHandle::get_event() (#5461) 2020-05-17 06:50:38 +02:00
Yiyu Lin
f12dffca9f
tsc: use serde to (de)serialize CompiledFileMetadata (#5481)
Co-authored-by: Bert Belder <bertbelder@gmail.com>
2020-05-16 21:47:26 +02:00
Siddharth Parmar
bfd4baf2d3
Fix formatting of example code in typescript declaration files (#5475) 2020-05-16 21:23:48 +02:00
Yiyu Lin
0b9942da84
fix some unwrap() in Rust (#5485) 2020-05-16 09:41:32 -04:00
Bert Belder
76a6a1ff46
Fix a bunch of spelling errors (#5314) 2020-05-16 00:36:49 +02:00
Yiyu Lin
871a0c9c0e
fix some clippy warning (#5462) 2020-05-15 15:26:16 -04:00
Bartek Iwańczuk
89fe81168e
fix: panic if $DENO_DIR is a relative path (#5375)
This commit fixes panic occurring if $DENO_DIR is set to a relative
path, eg. "DENO_DIR=denodir deno run main.ts".

Before creating DenoDir instance given path is checked and if necessary
resolved against current working directory.

Additional sanity checks were put in place to ensure all caches
receive absolute path for the location.
2020-05-15 16:32:52 +02:00
uki00a
c5a54e44bc
chore: port deno_dir_test to Rust (#5408) 2020-05-15 10:22:28 -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
Valentin Anger
5b76f7a838
Remove debug prints introduced in e18aaf49c (#5356) 2020-05-14 14:10:54 -04:00
Kevin (Kun) "Kassimo" Qian
7de86ab605
cli: don't panic on Deno.close invalid argument (#5320) 2020-05-14 06:59:56 -04:00
Dante Calderón
c3a205bae8
Fix typos across the repo (#5295)
Corrections made:
* cli/js/tests/README.md:44:7: corrected "discoveres" to "discovers"
* cli/js/tests/chown_test.ts:111:37: corrected "priviledge" to "privilege"
* cli/worker.rs:231:56: corrected "decendants" to "descendants"
* deno_typescript/lib.rs:136:50: corrected "emmited" to "emitted"
* core/es_isolate.rs:492:67: corrected "registerd" to "registered"
* core/isolate.rs:103:28: corrected "initalize" to "initialize"
* docs/runtime.md:29:14: corrected "ect" to "etc"
* docs/tools/debugger.md:122:16: corrected "implementes" to "implements"
* std/encoding/_yaml/dumper/dumper_state.ts:57:63: corrected "everwhere" to "everywhere"
* std/encoding/csv.ts:37:43: corrected "referal" to "referral"
* std/fmt/sprintf.ts:209:20: corrected "unusuable" to "unusable"
* std/fmt/README.md:21:40: corrected "Alternativly" to "Alternatively"
* std/fmt/README.md:35:68: corrected "seperated" to "separated"
* std/fmt/README.md:179:59: corrected "provded" to "provided"
* std/mime/multipart.ts:581:46: corrected "writen" to "written"
* std/path/_globrex.ts:19:52: corrected "equivelant" to "equivalent"
* std/node/events_test.ts:447:9: corrected "asyncronous" to "asynchronous"
* std/node/events_test.ts:475:9: corrected "asyncronous" to "asynchronous"
* std/node/events_test.ts:500:29: corrected "asyncronous" to "asynchronous"
* std/node/events_test.ts:530:40: corrected "asyncronous" to "asynchronous"
* std/node/events_test.ts:555:9: corrected "asyncronous" to "asynchronous"
* tools/deno_tcp_proxy.ts:1:42: corrected "perfromance" to "performance"
* std/node/module.ts:1003:18: corrected "existend" to "existed"
2020-05-14 06:38:42 +02:00
Bartek Iwańczuk
55d2c6bd10
v1.0.0 2020-05-13 18:07:15 -04:00
Pavan Kumar
9c01403865
default to 0.0.0.0 for Deno.listen (#5203) 2020-05-13 09:18:41 -04:00
Kitson Kelly
3d7552af2e
Update to TypeScript 3.9 (#4510) 2020-05-13 08:03:04 -04:00
Bert Belder
e34a3b61f4
Make --inspect-brk pause on the first line of _user_ code (#5250) 2020-05-13 00:12:46 +02:00