0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-10-31 09:14:20 -04:00
Commit graph

212 commits

Author SHA1 Message Date
Chris Knight
77f4df40f3
Fixed month reference in documented output of parseDate and parseDateTime function calls (#3859) 2020-02-02 16:46:05 -05:00
Bartek Iwańczuk
e1697421e2
chore: remove std/installer, port installer tests to Rust (#3843) 2020-01-31 17:34:50 +01:00
Kevin (Kun) "Kassimo" Qian
97b2a0bb95
bring back std/examples/xeval.ts (#3822) 2020-01-30 21:02:14 -05:00
Chris Knight
3de9540ac6
feat(std/node) Endianness (#3833) 2020-01-30 18:57:29 -05:00
Bartek Iwańczuk
de5c099b47
feat: deno install in Rust (#3806)
//std/installer couldn't be removed due to bug, but it's now deprecated.
2020-01-30 18:42:39 -05:00
Ryan Dahl
2338e7679c
Remove --current-thread flag (#3830)
This flag was added to evaluate performance relative to tokio's threaded
runtime. Although it's faster in the HTTP benchmark, it's clear the runtime
is not the only perf problem.

Removing this flag will simplify further refactors, in particular
adopting the #[tokio::main] macro. This will be done in a follow up.

Ultimately we expect to move to the current thread runtime with Isolates
pinned to specific threads, but that will be a much larger refactor. The
--current-thread just complicates that effort.
2020-01-30 10:49:33 -05:00
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
cknight
f0a6062012
Partial implementation of node os polyfill based on currently available Deno functionality (#3821) 2020-01-29 20:57:29 -05: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
Kitson Kelly
f604becaba Improve support of type definitions (#3755) 2020-01-26 13:59:41 -05:00
Takashi Idobe
c21e0008b5 add some tests for isSymbol in std/node/util_test (#3788) 2020-01-25 08:25:40 -05:00
David Asabina
86726f88f1 fix crate name in docs (#3778) 2020-01-24 14:47:11 -05:00
Carl Rosell
11a29fdb44 fix(std/http): update listenAndServe argument type (#3775)
allow same argument type for `listenAndServe` as `serve`.
fixes: #3774
2020-01-24 10:35:23 -05:00
Yoshiya Hinosawa
bc89f04cbf Add signal handlers (#3757) 2020-01-24 08:15:31 -05:00
Fabriece Sumuni
ceb7aae8ef fix typo 2020-01-23 10:40:26 -05:00
Lasse Brudeskar Vikås
159ac525ae Update manual.md (#3734)
Updated the `Deno.bundle` description to actually use the `bundle`-function.
2020-01-21 10:12:19 -05:00
Takashi Idobe
108294deeb change copyrights from 2019 to 2020 (#3733) 2020-01-21 10:01:55 -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
Brandon Kalinowski
4f1fa82d1d std(yaml): correct sortKeys type (#3708) 2020-01-18 09:19:36 -05:00
Kevin (Kun) "Kassimo" Qian
fc077cd315 std/http: allow response body to be string (#3705) 2020-01-17 18:44:35 -05:00
迷渡
34dc0ae280 doc: fix spaces of code in list (#3678) 2020-01-15 23:13:50 -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
Luca Casonato
3eab20ce42 feat(std/node): Added node timers builtin (#3634) 2020-01-15 14:13:12 -05:00
Tomofumi Chiba
8a352f7260 fix curl.ts (#3677) 2020-01-15 08:05:22 -06:00
Nayeem Rahman
9d5f0f2d23 Remove std/multipart (#3647)
since it overlaps with std/mime/multipart
2020-01-10 12:29:09 -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
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
Ry Dahl
d4bf0670ce
fix: Deno.mkdir should conform to style guide (#3617) 2020-01-07 14:14:33 -05:00
Nayeem Rahman
4e1a638bc5 doc: Add glib2.0 as a build prerequisite (#3608) 2020-01-05 19:35:45 -05:00
Ry Dahl
5f1df038fb
Replace libdeno with rusty_v8 (#3556) 2020-01-05 09:19:29 -05:00
Dreamacro
70b1be6ff4 Fix ws handshake with correctly empty search string (#3587) 2020-01-04 04:31:12 -05:00
uki00a
cbc4bbc71f fix(std/encoding/yaml): export parseAll (#3592) 2020-01-04 04:26:57 -05:00
Ry Dahl
bfab4ed0df
Happy new year! (#3578) 2020-01-02 15:13:47 -05:00
Kevin (Kun) "Kassimo" Qian
5cf2eb7d18 feat(std/http): make req.body a Reader (#3575) 2020-01-02 12:34:33 -05:00
Bartek Iwańczuk
46d76a7562
upgrade: Tokio 0.2 (#3418) 2019-12-30 14:57:17 +01:00
Nayeem Rahman
954a0c64e7 doc: Update and improve build instructions (#3547) 2019-12-24 22:00:30 -05:00
Axetroy
e88c801e76 std: remove wildcard export in uuid module (#3540) 2019-12-23 04:36:25 -05:00
Yoshiya Hinosawa
80da2ac8de fix(std/encoding/yaml): support document separator in parseAll (#3535) 2019-12-21 03:57:51 -05:00
Nayeem Rahman
e8d82a6348 feat: Add missing mod.ts files in std (#3509)
std/archive/tar.ts:
- Remove FileReader.
- Remove FileWriter.

std/encoding/csv.ts:
- ExtendedParseOptions -> ParseOptions
- HeaderOption -> HeaderOptions
- ParseOptions -> ReadOptions
- readAll() -> readMatrix()

std/encoding/yaml.ts:
- DumpOptions -> StringifyOptions

std/fmt/colors.ts:
- getEnabled() -> getColorEnabled()
- setEnabled() -> setColorEnabled()

std/testing/mod.ts:
- Re-export sibling modules.
2019-12-20 15:21:30 -05:00
Yoshiya Hinosawa
29562ed61e docs(std/encoding/yaml): add usage document (#3529) 2019-12-20 11:32:05 -05:00
Axetroy
ef30d376db fix permission errors are swallowed by fs.copy() (#3504) 2019-12-18 09:45:19 -05:00
Christian Bromann
1c09cc63c8 fix code example (#3519) 2019-12-18 09:44:30 -05:00
Yoshiya Hinosawa
ff6b514a7b Improve empty test case error messages (#3514) 2019-12-18 08:05:58 -05:00
Axetroy
bb24fb74ff fix permission errors are swallowed by fs.emptyDir (#3501) 2019-12-18 05:12:36 -05:00
Kevin (Kun) "Kassimo" Qian
33d2e3d536 std/node: better error message for read perm in require() (#3502) 2019-12-15 17:23:12 +08:00
木杉
7e116dd70d Support utf8 in file_server (#3495) 2019-12-14 16:03:30 +08:00
木杉
d8e60309d2 feat(file_server): add help & switch to flags (#3489) 2019-12-14 10:01:32 +08:00
Axetroy
8cf8a29d35 fix permission errors are swallowed by fs.exists (#3493) 2019-12-13 22:47:09 +08:00
Weijia Wang
df7d8288d9 file_server: get file and fileInfo concurrently (#3486) 2019-12-12 15:59:46 +08:00
木杉
7f27f649cc fix: file_server swallowing permission errors (#3467) 2019-12-12 13:05:26 +08:00
Kevin (Kun) "Kassimo" Qian
d146d45861 benchmark: align deno_http and node_http response (#3484) 2019-12-12 13:02:23 +08:00
dnalborczyk
ef17488398 fix v8-flags example to manual (#3470) 2019-12-12 13:02:07 +08:00
Kevin (Kun) "Kassimo" Qian
c3c69aff7e fix(std/http): close connection on .respond() error (#3475) 2019-12-12 08:46:03 +08:00
Nayeem Rahman
407195ea87 fix: Only swallow NotFound errors in std/fs/expandGlob() (#3479) 2019-12-12 08:42:21 +08:00
AleksandrukTad
31ddfd5a42 fix: decoding uri in file_server (#3187) 2019-12-10 20:11:55 +08:00
木杉
90c5aadbca fix(installer): installs to the wrong directory on Windows (#3462)
Close: #3443
2019-12-08 14:59:27 +01:00
木杉
cfa4f540ba better html for file_server (#3423) 2019-12-02 16:14:25 -08:00
Axetroy
2a348144c6 feat: add ignore parser for std/prettier (#3399) 2019-11-26 08:07:39 -08:00
Ry Dahl
c016684653
refactor: reorganize flags (#3389)
- Remove ability to specify run arguments like `--allow-net` after the
  script argument. It's too hacky to make work with clap.
- Remove `--v8-options`, instead use `--v8-flags=--help`
- Give more descriptive names to unit tests in flags.rs
- Assume argv and subcommand into DenoFlags struct so the output of
  flags module is only DenoFlags rather than the tuple (subcommand, flags,
  argv).
- Improve CLI help text
- Make `deno run` specific args like `--allow-net` only show up in 'deno
  help run' instead of as global flags in `deno help`.
- Removes `deno version` to simplify our implementation and be closer to
  clap defaults. `deno -V` now only shows Deno's version and not V8's nor
  TypeScript. `Deno.versions` can be used to see that information.
- Prevent clap from auto-detecting terminal width and attempting to wrap
  text.
2019-11-26 08:06:32 -08:00
Kitson Kelly
8d977d0117 feat: Support named exports on bundles. (#3352) 2019-11-20 11:02:08 -05:00
Kevin (Kun) "Kassimo" Qian
6708fcc386 std/node: add some Node.js polyfill to require() (#3382) 2019-11-19 16:44:59 -05:00
Kevin (Kun) "Kassimo" Qian
e73a82dc42 feat(std/node) add CommonJS require (#3380) 2019-11-19 01:54:20 -05:00
Ry Dahl
e6fdb2628f chore: improve examples (#3377) 2019-11-18 22:07:13 -08:00
罗文
00aa409ff2 support load yaml/yml prettier config (#3370) 2019-11-18 21:15:52 -05:00
Rafał Pocztarski
4ca624a355 feat: std/node/process (#3368) 2019-11-18 18:30:24 -05:00
Lilian Saget-Lethias
5671d38d8f feat: Add std/encoding/yaml module (#3361) 2019-11-18 09:39:32 -05:00
Bartek Iwańczuk
8f9a942cb9 Use futures 0.3 API (#3358) 2019-11-16 19:17:47 -05:00
罗文
cb00fd6e98 fmt: respect prettierrc and prettierignore (#3346) 2019-11-16 11:48:45 -05:00
Leo Chandra
26bf928d28 fix: std/datetime toIMF bug (#3357) 2019-11-16 08:24:07 -05:00
Bartek Iwańczuk
34ed16ed3a run std test with cargo test (#3344)
Removes three CI jobs
2019-11-15 13:31:53 -05:00
Andy Hayden
411f53f7bb Add wasm example to manual (#3353) 2019-11-15 12:42:40 -05:00
Nayeem Rahman
7901038458 fix: error handling in std/fs/walk() (#3318)
- Make assertThrows() return the Error
- Remove WalkOptions::onError()
2019-11-14 22:22:33 -05:00
Ry Dahl
4902a1cacb
Turn on TS strict mode for deno_typescript (#3330) 2019-11-14 15:05:36 -05:00
Kitson Kelly
9837d324a7 Update to TypeScript 3.7 (#3275)
and update to prettier 1.19

Also, update `assert()` and remove not null assertions where possibly
in `cli`.

Closes #3273
2019-11-13 13:42:34 -05:00
罗文
80b1371548 fmt: allow configuration of Prettier options (#3314) 2019-11-13 11:21:17 -05:00
Kitson Kelly
8d03397293 Make bundles fully standalone (#3325)
- Bundles are fully standalone. They now include the shared loader with
  `deno_typescript`.
- Refactor of the loader in `deno_typescript` to perform module
  instantiation in a more
- Change of behaviour when an output file is not specified on the CLI.
  Previously a default name was determined and the bundle written to that
  file, now the bundle will be sent to `stdout`.
- Refactors in the TypeScript compiler to be able to support the concept
  of a request type.  This provides a cleaner abstraction and makes it
  easier to support things like single module transpiles to the userland.
- Remove a "dangerous" circular dependency between `os.ts` and `deno.ts`,
  and define `pid` and `noColor` in a better way.
- Don't bind early to `console` in `repl.ts`.
- Add an integration test for generating a bundle.
2019-11-13 10:35:56 -05:00
Vincent LE GOFF
ee1b8dc883 feat: std/node (#3319) 2019-11-12 15:51:14 -05:00
木杉
b3baab6d14 fix manual (#3313)
PS C:\Users\zhbnh> git config --global core.symlinks=true
error: invalid key: core.symlinks=true
2019-11-10 09:59:17 -05:00
Nayeem Rahman
d586f119fa net: Check for closing status when iterating Listener (#3309)
std/http/server.ts: Use listener.next() instead of listener.accept()
2019-11-09 14:40:22 -05:00
罗文
9889a28008 upgrade: Prettier 1.19.1 (#3305) 2019-11-09 08:24:43 -05:00
Ryan Dahl
97ceea49f5 Add jsdoc for std/http/http_status.ts
The website documentation now supports enums
6f4fb0f5a3
2019-11-08 17:27:09 -05:00
Ry Dahl
709cb3c9ba Fix jsdoc in std/http/server.ts (#3284) 2019-11-07 11:00:27 -08:00
Ry Dahl
f466ef9706 manual: add chocolatey install instructions (#3280) 2019-11-06 21:05:37 -08:00
Liam Perlaki
ccc9f1ae5e Allow http server to take { hostname, port } argument (#3233) 2019-11-06 12:18:28 -05:00
Ry Dahl
c04ff22afe
Remove tsconfig files - they are not part of build process (#3262) 2019-11-04 18:13:28 -05:00
Kevin (Kun) "Kassimo" Qian
0644f9c1a6 std/http: add serveTLS and listenAndServeTLS (#3257) 2019-11-04 13:45:29 -05:00
James Wright
429439d198 Consolidates asserts#equal branches for keyed collections (Map/Set) and supports deep equality of Map keys (#3258) 2019-11-04 10:21:42 -05:00
Ry Dahl
86b3ac5108
feat: lockfiles (#3231)
Use --lock-write=lock.json or --lock-check=lock.json on the command
line.
2019-11-03 10:39:27 -05:00
James Wright
64957d92ef Support for deep Map equality with asserts#equal (#3236) 2019-10-29 20:23:54 -04:00
Joseph Sintum
0d41b10ade Update broken links (#3225) 2019-10-29 05:17:58 -04:00
Ry Dahl
38f01f73a4
Move prebuilt binaries to third_party (#3227) 2019-10-28 22:04:24 -04:00
Andy Hayden
f484776384 Use top-level for-await in various places (#3217) 2019-10-28 15:58:35 -04:00
Robert Jack Will
ff9df0c321 std: fix BufReader.readString to actually return Deno.EOF at end (#3191) 2019-10-28 10:28:29 -07:00
Yoshiya Hinosawa
efd7e78af3 Use web standard Permissions API (#3200) 2019-10-27 11:22:53 -04:00
Andy Hayden
aec5a646c9 feat: top-level-for-await (#3212) 2019-10-27 09:04:42 -04:00
Nayeem Rahman
51dd91a3cc Update link to schematic diagram in manual (#3211) 2019-10-26 21:15:49 -04:00
Nayeem Rahman
585993c8d5 Fix some deno.land URLs in the manual (#3205) 2019-10-26 10:40:13 -04:00
Ry Dahl
be8777de19
Change magic table-of-contents thing (#3197)
We changed our markdown parser from showdown to remark for better react
integration, and it necessitated this change.
2019-10-24 17:58:57 -04:00
Ry Dahl
1d8f3cc896
Remove old website (#3194)
Move manual.md and style_guide.md into //std so they can be accessed
from https://deno.land/std/manual.md

Code for new website is https://github.com/denoland/deno_website2

Co-authored-by: Christian Moritz <chrmoritz@gmail.com>
2019-10-24 16:14:05 -04:00
Ry Dahl
073b64bd43 Add std/examples/welcome.ts (#3181) 2019-10-23 09:57:08 -07:00
Nick Stott
5a7dffe427 Reenable std tests that were disabled during merge (#3159) 2019-10-21 11:58:45 -04:00
Rory Hart
27cd2c97f1 curl.ts example with reference in manual (#3161) 2019-10-21 10:36:01 -04:00
Nick Stott
c876d1adb4 Re-enable some tests (#3154)
Ref #3095
2019-10-19 16:55:20 -04:00
Nayeem Rahman
f51dcc12d7 std: Move fs/path to the top-level (#3100) 2019-10-16 14:39:33 -04:00
迷渡
5983507255 std/flags: Add test for multiple boolean flags (#3103) 2019-10-16 11:34:36 -04:00
Yusuke Sakurai
5f5583cf19 fix: [prettier] deno fmt should format jsx/tsx files (#3118) 2019-10-12 12:55:05 -07:00
罗文
ab63e59817 update prettier type definition (#3101) 2019-10-11 06:38:04 -07:00
Ryan Dahl
93f7f00c95
Run deno_std tests in github actions 2019-10-09 17:22:22 -04:00
Ryan Dahl
151ce0266e
Move everything into std subdir 2019-10-09 17:10:09 -04:00