Bartek Iwańczuk
73a3cc21d0
feat: dprint formatter ( #3820 )
...
* rewrite fmt_test in Rust, remove tools/fmt_test.py
* remove //std/prettier
2020-01-29 21:16:48 -05:00
Bartek Iwańczuk
161adfc51b
workers: proper TS libs, more spec-compliant APIs ( #3812 )
...
* split lib.deno_main.d.ts into:
- lib.deno.shared_globals.d.ts
- lib.deno.window.d.ts
- lib.deno.worker.d.ts
* remove no longer used libs:
- lib.deno_main.d.ts
- lib.deno_worker.d.ts
* change module loading to use proper TS library for compilation
* align to Worker API spec:
- Worker.terminate()
- self.close()
- self.name
2020-01-29 18:54:23 +01:00
Bartek Iwańczuk
f32c31a0eb
dx: descriptive permission errors ( #3808 )
...
Before:
```
▶ target/debug/deno https://deno.land/std/examples/echo_server.ts
error: Uncaught PermissionDenied: run again with the --allow-net flag
► $deno$/dispatch_json.ts:40:11
at DenoError ($deno$/errors.ts:20:5)
at unwrapResponse ($deno$/dispatch_json.ts:40:11)
at sendSync ($deno$/dispatch_json.ts:67:10)
at listen ($deno$/net.ts:170:15)
at https://deno.land/std/examples/echo_server.ts:4:23
```
```
▶ target/debug/deno --allow-read=/usr https://deno.land/std/examples/cat.ts /etc/passwd
error: Uncaught PermissionDenied: run again with the --allow-read flag
► $deno$/dispatch_json.ts:40:11
at DenoError ($deno$/errors.ts:20:5)
at unwrapResponse ($deno$/dispatch_json.ts:40:11)
at sendAsync ($deno$/dispatch_json.ts:91:10)
```
After:
```
▶ target/debug/deno https://deno.land/std/examples/echo_server.ts
error: Uncaught PermissionDenied: network access to "0.0.0.0:8080", run again with the --allow-net flag
► $deno$/dispatch_json.ts:40:11
at DenoError ($deno$/errors.ts:20:5)
at unwrapResponse ($deno$/dispatch_json.ts:40:11)
at sendSync ($deno$/dispatch_json.ts:67:10)
at listen ($deno$/net.ts:170:15)
at https://deno.land/std/examples/echo_server.ts:4:23
```
```
▶ target/debug/deno --allow-read=/usr https://deno.land/std/examples/cat.ts /etc/passwd
error: Uncaught PermissionDenied: read access to "/etc/passwd", run again with the --allow-read flag
► $deno$/dispatch_json.ts:40:11
at DenoError ($deno$/errors.ts:20:5)
at unwrapResponse ($deno$/dispatch_json.ts:40:11)
at sendAsync ($deno$/dispatch_json.ts:91:10)
```
2020-01-27 21:13:17 -05:00
Bartek Iwańczuk
ac10d79d23
refactor: isomorphic snapshot for CLI ( #3728 )
2020-01-27 21:12:25 -05:00
Kitson Kelly
f604becaba
Improve support of type definitions ( #3755 )
2020-01-26 13:59:41 -05:00
Kevin (Kun) "Kassimo" Qian
ec44be0760
lock: support lock-write for fetch command ( #3787 )
2020-01-26 13:43:59 -05:00
Ryan Dahl
9d98f0126c
Remove dead code in cli/shell.rs ( #3792 )
2020-01-26 11:40:28 -05:00
Ben Noordhuis
ba78ba69b0
fix clippy warnings ( #3798 )
2020-01-26 10:50:15 -05:00
Ben Noordhuis
97ed0c954d
feat: make eval support --v8-flags=... ( #3797 )
...
Closes #3796
2020-01-26 09:49:34 -05:00
Bartek Iwańczuk
c824eb5817
refactor: Modules and Loader trait ( #3791 )
...
* move is_dyn_import argument from Loader::resolve to Loader::load - it was always kind of strange that resolve() checks permissions.
* change argument type from &str to &ModuleSpecifier where applicable
2020-01-25 18:53:16 +01:00
Bert Belder
37a7b01d5c
Refactor error tracking and scope juggling in deno_core ( #3783 )
2020-01-25 14:31:42 +01:00
Kevin (Kun) "Kassimo" Qian
514cdd941c
Do not panic and improve error message on cache failure ( #3784 )
2020-01-24 17:16:31 -05:00
Ryan Dahl
5e32c5ea44
s/PinnedBuf/ZeroCopyBuf ( #3782 )
2020-01-24 15:10:49 -05:00
Kitson Kelly
950537e8ef
Break out runtime lib to main and worker ( #3771 )
...
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2020-01-24 14:15:01 -05:00
Ryan Dahl
8bc639a23e
v0.31.0
2020-01-24 11:07:53 -05:00
Ryan Dahl
fe427eedb1
Mark signal APIs as unstable ( #3779 )
2020-01-24 16:58:17 +01:00
Yoshiya Hinosawa
bc89f04cbf
Add signal handlers ( #3757 )
2020-01-24 08:15:31 -05:00
Ryan Dahl
74e6eb14dd
update readmes ( #3765 )
2020-01-23 22:32:52 +01:00
Bartek Iwańczuk
63293a90e1
refactor: snapshotting ( #3753 )
2020-01-22 23:58:13 +01:00
Bartek Iwańczuk
bd9561f4de
Reland "Create an old program to be used in snapshot." ( #3747 )
...
* read CLI assets from disk during snapshotting
2020-01-22 20:18:01 +01:00
Ry Dahl
fa7f34eb8c
Revert "Create an old program to be used in snapshot. ( #3644 )"
...
Ref #3712 . This change allowed the deno_typescript crate to reference
cli/js/lib.deno_runtime.d.ts which breaks "cargo package". We intend to
reintroduce a revised version of this patch later once "cargo
package" is working and tested.
This reverts commit 737ab94ea1
.
2020-01-21 14:57:56 -05:00
Ryan Dahl
7fd50065a7
v0.30.1
...
This patch release is being done only to test crate publishing, hence
lack of release notes or published binaries.
2020-01-21 12:44:05 -05:00
Yoshiya Hinosawa
9de8178c9b
feat: add AsyncUnref ops ( #3721 )
...
This is in order to support features like signal handlers, which
shouldn't prevent the program from exiting.
2020-01-21 12:01:10 -05:00
Bartek Iwańczuk
ecd1d3abb0
refactor: split cli::Worker ( #3735 )
...
* cli::Worker is base struct to create specialized workers
* add MainWorker
* add CompilerWorker
* refactor WebWorker to use Worker
2020-01-21 17:50:06 +01:00
Ry Dahl
229eb292f8
Revert "don't include assets in binary ( #3661 )"
...
Ref #3712
This reverts commit 32cbcfe4e9
.
2020-01-21 10:24:02 -05:00
Takashi Idobe
108294deeb
change copyrights from 2019 to 2020 ( #3733 )
2020-01-21 10:01:55 -05:00
Bartek Iwańczuk
5e2fd183ff
refactor: Rename JS entry functions ( #3732 )
2020-01-21 15:53:29 +01:00
Bartek Iwańczuk
0cd605515c
refactor: don't create new runtime for fs ops ( #3730 )
2020-01-21 14:26:11 +01:00
Michał Sabiniarz
21cc9cb7a7
Implemented alternative open mode in files ( #3119 )
...
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2020-01-21 10:49:42 +01:00
Bartek Iwańczuk
7966bf14c0
refactor: split worker and worker host logic ( #3722 )
...
* split ops/worker.rs into ops/worker_host.rs and ops/web_worker.rs
* refactor js/workers.ts and factor out js/worker_main.ts - entry point for WebWorker runtime
* BREAKING CHANGE: remove support for blob: URL in Worker
* BREAKING CHANGE: remove Deno namespace support and noDenoNamespace option in Worker constructor
* introduce WebWorker struct which is a stripped down version of cli::Worker
2020-01-21 09:49:47 +01:00
Bartek Iwańczuk
c90036ab88
refactor: reduce number of ErrorKind variants ( #3662 )
2020-01-20 10:50:16 -05:00
Nayeem Rahman
7f80f9db3f
refactor: Improve path handling in permission checks ( #3714 )
2020-01-20 09:45:44 -05:00
Kitson Kelly
60b53fd6b6
Use globalThis to reference global scope ( #3719 )
...
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2020-01-20 09:30:30 -05:00
Bartek Iwańczuk
23e67eb515
stabilize net Addr ( #3709 )
...
Co-authored-by: xiaoxintang <15707971810@163.com>
2020-01-18 21:49:55 +01:00
Bartek Iwańczuk
34b99fec8e
rename dial to connect and dialTLS to connectTLS ( #3710 )
2020-01-18 18:35:12 +01:00
Ryan Dahl
b2f01dcb50
v0.30.0
2020-01-18 07:58:49 -05:00
Ry Dahl
59c674fed5
Mark various APIs in window.Deno as unstable ( #3701 )
2020-01-17 19:01:24 -05:00
Bartek Iwańczuk
5fa056e53b
workers: minimal error handling and async module loading ( #3665 )
2020-01-17 18:43:53 -05:00
Klaus Hvam
35eb79610f
Fix compile and bundle api types ( #3703 )
2020-01-17 17:45:18 -05:00
Ry Dahl
aedf8721cf
Upgrade crate deps ( #3699 )
...
Remove unused tokio-executor dep
2020-01-17 13:57:56 -05:00
Andy Finch
fe5662058e
feat: support individual async handler for each op ( #3690 )
2020-01-17 08:26:11 -05:00
Kevin (Kun) "Kassimo" Qian
0a78bfb836
Add Deno.symbols and move internal fields for test ( #3693 )
2020-01-16 19:42:58 -05:00
Nayeem Rahman
f8d5f5b80e
fix: Resolve read/write whitelists from CWD ( #3684 )
2020-01-16 14:47:02 -05:00
Bartek Iwańczuk
1de02b0643
perf: share http client in file fetcher ( #3683 )
2020-01-16 16:10:01 +01:00
Kevin (Kun) "Kassimo" Qian
91757f63fd
feat(fs): add more unix-only fields to FileInfo ( #3680 )
2020-01-16 09:46:32 -05:00
Ry Dahl
a4dde552de
Revert "feat(flags): script arguments come after '--'" ( #3681 )
...
Due to complaints about ergonomics and because it breaks shebang on
linux.
This reverts commit 2d5457df15
.
BREAKING CHANGE
2020-01-15 19:21:35 -05:00
Yusuke Sakurai
b310f32e39
fix: process hangs when fetch called ( #3657 )
...
Reverts 011d485
2020-01-15 13:23:29 -05:00
Bartek Iwańczuk
32cbcfe4e9
don't include assets in binary ( #3661 )
2020-01-12 14:53:32 +01:00
uki00a
7ed018bb90
flag: upgrade std to v0.29.0 ( #3659 )
2020-01-12 06:02:03 -07:00
Kitson Kelly
737ab94ea1
Create an old program to be used in snapshot. ( #3644 )
2020-01-12 12:20:33 +01:00
Bartek Iwańczuk
8fac8ab130
upgrade: tokio 0.2.9, reqwest 0.10.1 ( #3653 )
2020-01-12 10:21:53 +01:00
EnokMan
1ea06f9c84
Add gzip, brotli and ETag support for file fetcher ( #3597 )
2020-01-11 11:11:05 +01:00
Ryan Dahl
525784e564
v0.29.0
2020-01-09 11:42:24 -07:00
Ry Dahl
d492c5abe3
feat: Deno.args now does not include script ( #3628 )
...
Previously Deno.args was ["script.js", "arg1", "arg2"]
Now it is just ["arg1", "arg2"]
BREAKING CHANGE
2020-01-09 11:37:01 -07:00
Ry Dahl
c50cab90a0
Remove xeval subcommand ( #3630 )
2020-01-08 17:40:59 -05:00
Luca Casonato
b71d5708c6
feat: Deno.create ( #3629 )
2020-01-08 17:07:03 -05:00
Ry Dahl
2d5457df15
feat(flags): script arguments come after '--' ( #3621 )
2020-01-08 14:59:53 -05:00
Kitson Kelly
d325566a7e
Runtime Compiler API ( #3442 )
...
Also restructures the compiler TypeScript files to make them easier to
manage and eventually integrate deno_typescript fully.
2020-01-08 09:17:44 -05:00
Bartek Iwańczuk
cbdf9c5009
refactor: module loading in EsIsolate ( #3615 )
...
* refactored RecursiveLoad - it was renamed to RecursiveModuleLoad, it does not take ownership of isolate anymore - a struct implementing Stream that yields SourceCodeInfo
* untangled module loading logic between RecursiveLoad and isolate - that logic is encapsulated in EsIsolate and RecursiveModuleLoad, where isolate just consumes modules as they become available - does not require to pass Arc<Mutex<Isolate>> around anymore
* removed EsIsolate.mods_ in favor of Modules and moved them inside EsIsolate
* EsIsolate now requires "loader" argument during construction - struct that implements Loader trait
* rewrite first methods on isolate as async
2020-01-08 15:06:04 +01:00
Ry Dahl
884462d615
Upgrade subcommands to 0.28.1 ( #3620 )
2020-01-08 01:05:52 +01:00
Ry Dahl
d4bf0670ce
fix: Deno.mkdir should conform to style guide ( #3617 )
2020-01-07 14:14:33 -05:00
Bartek Iwańczuk
ad9fd589d4
core: factor out EsIsolate from Isolate ( #3613 )
2020-01-07 12:45:44 +01:00
Ry Dahl
29df272133
error on warnings ( #3612 )
2020-01-06 11:38:56 -05:00
Bartek Iwańczuk
870622d3cc
merge libdeno::DenoIsolate into core::Isolate ( #3605 )
2020-01-06 16:24:44 +01:00
Bert Belder
52a0f3a5ef
Upgrade rust crates and modernize hyper_hello ( #3606 )
2020-01-05 23:12:35 +01:00
Ry Dahl
76e44ddfd0
Rename crates: 'deno' to 'deno_core' and 'deno_cli' to 'deno' ( #3600 )
2020-01-05 11:56:18 -05:00
Ry Dahl
5f1df038fb
Replace libdeno with rusty_v8 ( #3556 )
2020-01-05 09:19:29 -05:00
Luca Casonato
c41280a057
perf: TextEncoder.encode improvement ( #3596 )
2020-01-04 17:00:03 -05:00
Luca Casonato
0a900949c8
Added textencoder benchmark ( #3589 )
2020-01-04 05:21:06 -05:00
Gurwinder Singh
9f6bab6010
Use async at places, use &self instead of self: &Self ( #3594 )
2020-01-04 05:20:52 -05:00
Ryan Dahl
a61966a243
v0.28.1
2020-01-03 09:04:04 -05:00
Bartek Iwańczuk
5e61af7447
chore: disable default reqwest features ( #3586 )
2020-01-03 14:15:19 +01:00
Waldir Pimenta
2a36879e30
Add missing year ranges to copyright notices ( #3582 )
2020-01-02 18:41:59 -05:00
Ry Dahl
bfab4ed0df
Happy new year! ( #3578 )
2020-01-02 15:13:47 -05:00
Gurwinder Singh
b0761138e5
Remove unnecessary use of Pin, use ready! ( #3576 )
2020-01-02 13:11:33 -05:00
Ry Dahl
328fef9cd6
v0.28.0
2020-01-02 08:41:25 -05:00
EnokMan
d4f2fda623
fix typos ( #3573 )
2020-01-02 07:48:46 -05:00
Gurwinder Singh
55add2d366
cleanup after tokio upgrade ( #3571 )
...
tokio_util::run and tokio::run_on_current_thread should accept Future<Output=()> instead of Future<Output=Result<(), ()>>. Currently, all the passed futures have to add Ok(()) or futures::future::ok(()) unnecessarily to call this method.
2020-01-01 09:51:27 -05:00
Bartek Iwańczuk
4258ed262f
refactor: move HttpBody to cli/http_util.rs ( #3569 )
2019-12-31 15:09:58 +01:00
Bartek Iwańczuk
05dce90165
bump reqwest to 0.10.0 ( #3567 )
2019-12-30 20:14:52 +01:00
Bartek Iwańczuk
011d485ce5
use shared HTTP client ( #3563 )
...
This commit moves HTTP client to lazy_static. Effectively HTTP client is shared by whole Deno process and will reuse connections.
2019-12-30 15:58:25 +01:00
Bartek Iwańczuk
46d76a7562
upgrade: Tokio 0.2 ( #3418 )
2019-12-30 14:57:17 +01:00
Kevin (Kun) "Kassimo" Qian
df1665a8fc
net: expose shutdown TS def ( #3560 )
2019-12-30 11:30:20 +01:00
Kevin (Kun) "Kassimo" Qian
176d1ff12e
net: expose shutdown() and ShutdownMode ( #3558 )
2019-12-29 10:20:23 -05:00
Alexandre Szymocha
4d4908dde3
Fix: allow reading into a 0-length array ( #3329 )
2019-12-28 08:48:36 -05:00
Kevin (Kun) "Kassimo" Qian
43fb24f4cd
Drop unnecessary Object.assign from createResolvable() ( #3548 )
2019-12-24 21:59:46 -05:00
Axetroy
3bb15ceaea
Upgrades rust to 1.40.0 ( #3542 )
2019-12-23 09:59:44 -05:00
Nayeem Rahman
f07ffe8980
feat: Add Deno.dir("executable") ( #3526 )
2019-12-21 06:30:13 -05:00
Nayeem Rahman
f4f4c6bcb4
fix: Use sync ops when clearing the console ( #3533 )
2019-12-21 03:58:28 -05:00
Nayeem Rahman
b7b0668c78
feat: Return null on error in Deno.dir() ( #3531 )
2019-12-20 19:06:07 -05:00
Kevin (Kun) "Kassimo" Qian
9ef0b18eb0
repl: do not crash on async op reject ( #3527 )
2019-12-20 00:04:14 -05:00
Ryan Dahl
fcae4a7c0d
v0.27.0
2019-12-18 18:48:41 -05:00
Ry Dahl
077b6f7672
Reduce all directory functions to Deno.dir() ( #3518 )
2019-12-18 09:29:00 -05:00
Yoshiya Hinosawa
3115781e43
feat: show detailed version with --version ( #3507 )
2019-12-15 21:38:34 +08:00
Axetroy
de94698915
Feat: Add more dir APIs for Deno ( #3491 )
2019-12-15 13:14:20 +08:00
Gurwinder Singh
22a2afe558
Use async-await at few places, fix spelling mistake ( #3499 )
2019-12-15 06:12:34 +08:00
Axetroy
83f95fb8df
fetch support URL instance as input ( #3496 )
2019-12-14 20:49:30 +08:00
Axetroy
8cf470474f
flag: upgrade std to v0.26.0 ( #3492 )
2019-12-14 10:00:29 +08:00
Kevin (Kun) "Kassimo" Qian
ec7f3ce1c2
timer: due/now Math.max instead of min ( #3477 )
2019-12-10 12:21:30 +01:00
Luca Casonato
7144bbed34
fix: plugin ops should change op count metrics ( #3455 )
2019-12-08 04:09:09 +08:00