profile
viewpoint
Kevin (Kun) "Kassimo" Qian kevinkassimo @google (intern) UCLA → Stanford ksm.sh Yes I AM an IDIOT. @google Software Engineering Intern 2018/2019/2020; worked on @ampproject / Search. Contributor to Deno @denoland

kevinkassimo/buhtig 8

Find and Go to first commit OR N-th commit OR view commits one by one (sequentially) of any github repository (THIS IS OLD SITE, still usable if you don't prefer OAuth) Use buhtig.com instead

kevinkassimo/CryptoUpdate 2

A small update app that tracks profit of Cryptocurrency (GUI for Mac only)

kevinkassimo/denoland.org 2

[Deprecated] This domain has been donated to https://deno.land

acm-learnjs-sp18/react 1

React workshop

bartlomieju/deno 1

A secure TypeScript runtime on V8

kevinkassimo/amper 1

Insane thoughts on functional testing with webdriver

kevinkassimo/buhtig-redesign 1

Find and Go to first commit OR N-th commit OR view commits one by one (sequentially) of any github repository (Redesigned)

kevinkassimo/catchla 1

[OBSOLETE] UCLA Class Scanner and Course Auto-enrollment

kevinkassimo/Danger-Zone 1

All the files in this repository is powerful--and dangerous

startedfacebookexperimental/rome

started time in 5 hours

push eventkevinkassimo/deno

Kevin (Kun) Kassimo Qian

commit sha 298b22a8cb60d1b8047fd45e27ffd14d4ba459c1

Merge master

view details

push time in 8 hours

push eventkevinkassimo/deno

Kevin (Kun) Kassimo Qian

commit sha 8529d3e1d346e35ed97bde07f51f1033eb607863

Merge master

view details

push time in 8 hours

push eventkevinkassimo/deno

Bartek Iwańczuk

commit sha 0e37184ca8084c257948d466c066fdb875ee44f3

add window.self read-only property (#4131)

view details

Ryan Dahl

commit sha 3d03d7e83b855a0eaef083f9ba249b1927eba51c

Fix flaky tests (#4134)

view details

Ryan Dahl

commit sha 3eebef39c55ead92d17bdf8016c3c58118b49936

upgrade: dprint 0.7.0 (#4130) * upgrade: dprint 0.7.0 Also make deno fmt less verbose (like cargo fmt)

view details

Ryan Dahl

commit sha 9a8d6fbd984d2c0f9775d90af64b3e95231dd21d

DenoFlags -> Flags (#4136)

view details

Yusuke Sakurai

commit sha 942e67c00b8ebdf6671fc8bb2e6c78c3ad8b3ff8

refactor(std/http): move io functions to http/io.ts (#4126)

view details

Kitson Kelly

commit sha 671f0b83be5cf9f9b6b1d667d41fd7779896a21a

Bundles can be sync or async based on top level await (#4124) Previously, bundles always utilised top level await, even if the bundled modules didn't require top level await. Now, analysis of the bundle is done and if none of the bundled modules are asynchronously executed, then the bundle as a whole will be synchronously executed. Fixes #4055 Fixes #4123

view details

Bartek Iwańczuk

commit sha 9adcdabd6592e05d0196119deaaf642480a14a90

stream output of js unit tests (#4146)

view details

Bert Belder

commit sha 1a8ef36b71838bfabc633efe6ccf8d32748d7060

Upgrade to rusty_v8 v0.3.3 (#4119)

view details

Bartek Iwańczuk

commit sha 7fff2d2d1e73b4b7cece9c8e3c58763f5f257303

remove Read/Write futures, use poll_fn instead (#4150)

view details

Ryan Dahl

commit sha fb1075da6e33a65daaa3e9c2ecf1d7a9a5021f58

Remove impl Send for Isolate and EsIsolate (#4151)

view details

Bartek Iwańczuk

commit sha daf7617f42e2e7520344ec98db3d60016b85fd73

rewrite normalize_path (#4143) Rewrite "normalize_path()" to remove all intermediate components from the path, ie. "./" and "../". It's very similar in functionality to fs::canonicalize(), however "normalize_path() doesn't resolve symlinks.

view details

Kevin (Kun) Kassimo Qian

commit sha b82c068342d83ae69148bdaa4aceb812a69416ef

Merge master

view details

push time in 9 hours

push eventkevinkassimo/deno

Kevin (Kun) Kassimo Qian

commit sha 113611f3c0749d52ef21b9c2d5b780777ad0e8b5

Add -T/--ts flag to turn of TS

view details

push time in 9 hours

pull request commentdenoland/deno

Actually support TypeScript for deno eval

@bartlomieju I don’t think any heuristic of detection would be reliable and might generate a lot of false positives/negatives (maybe 2 pass TS-then-JS execution is an option, but it is annoying when a program both JS/TS to go through the slower TS compilation attempt first). I think we can do a flag like deno eval -t for TypeScript (this should be similarly done with REPL in the future)

kevinkassimo

comment created time in 9 hours

pull request commentdenoland/deno

Actually support TypeScript for deno eval

@bartlomieju could you review this? (I cannot find the button to request review)

kevinkassimo

comment created time in 11 hours

issue commentdenoland/deno

Recommended in documentation "file_server" compiles with error

I feel it would be nice to have https://deno.land/std/ pointing to the last tagged version, and make master located at https://deno.land/std@dev or similar.

balajahe

comment created time in 16 hours

push eventkevinkassimo/deno

Kevin (Kun) Kassimo Qian

commit sha e9735cdc38cdec1da487f59c5364f0adab204f75

fix test and lint

view details

push time in a day

PR opened denoland/deno

Actually support TypeScript for deno eval
$ ./target/debug/deno eval "interface A {}; console.log(123)"
Compile file:///Users/kun/Projects/Deno/deno/__$deno$eval.ts
123
+42 -2

0 comment

4 changed files

pr created time in a day

create barnchkevinkassimo/deno

branch : eval/ts

created branch time in a day

pull request commentdenoland/deno

tty: Deno.setRaw(rid, mode) to turn on/off raw mode

Is this PR considered ready? Have been resolving conflicts with master updates for quite a few times 😅

kevinkassimo

comment created time in a day

push eventkevinkassimo/deno

Ryan Dahl

commit sha f4fd433e1aa6c8c086c38df39c39bec23c56a29c

Add Deno.Err change missing from previous commit (#4113)

view details

Suguru Motegi

commit sha 79c6e052ed29b9b78c31f2e01da3b91f76b6a017

fix: createSecKey logic (#4063)

view details

Ryan Dahl

commit sha 4005174f6c584fd5200dbe450b269a7f0de487ce

Revert "Remove ansi_term dependency" Broke colors https://github.com/denoland/deno/issues/4112#issuecomment-590545385 This reverts commit c250778704a4e0065e54e6bf6ca6c39d556a6d8d.

view details

João Souto

commit sha ac933dd1b89a20b2e63b5d6edc5b3d0c549335bc

port tools/repl_test.py to Rust (#4096) ref #2988

view details

João Souto

commit sha 5c1ab080cd8989c3ac2b3a8c919fe14052feac79

Remove ansi_term dependency (#4116)

view details

Kevin (Kun) Kassimo Qian

commit sha 3daf3c3dbe729ca018ebff4e00cec39268bbcb48

Merge branch 'master' into tty/raw_mode_2

view details

Yusuke Sakurai

commit sha 22f88b9f37b7e233fd4f15b73d5a2096224e56dc

fix: [http] Consume unread body and trailers before reading next request (#3990) - Added `ServerRequest.finalize()`: consuming all unread body stream and trailers. - This is cleanup method for reading next request from same keep-alive connection. - Needed when handler didn't consume all body and trailers even after responding. - refactor: `ServerRequest._bodyStream()`, `ServerRequestBody` are removed. - Now using `bodyReader()` and `chunkedBodyReader()` instead. - fix: Trailers should only be read `transfer-encoding` is `chunked` and `trailer` header is set and its value is valid. - fix: use `Headers.append()` on reading trailers. - fix: delete `trailer` field from headers after reading trailers. - reorg: Several functions related to IO are moved into `http/io.ts`

view details

Kitson Kelly

commit sha 805992b14a65a6dbfb857dea6d9b657477de043d

Fix issues with JavaScript importing JavaScript. (#4120) Fixes #3852 Fixes #4117

view details

Ryan Dahl

commit sha 91b606aaae23bcb790b55adc5fe70a182a37d564

Clean up how we use opIds (#4118)

view details

Nayeem Rahman

commit sha 14e7e1e3af43b2322a26fcc542428c8f1af4460d

fix: Resolve makeTemp* paths from CWD (#4104)

view details

Ryan Dahl

commit sha fe181e2b4850a83344f0aa5840fffe97c8cb8839

ci: Use fetch-depth: 5 (#4127)

view details

Ryan Dahl

commit sha f47f3f96726a94dd2df5d68e3c786b5079089dd4

Remove _async from method names since _sync are gone (#4128)

view details

Kitson Kelly

commit sha be787d09d537d6c1a6846168613dd0defe069448

upgrade: TypeScript 3.8 (#4100)

view details

João Souto

commit sha e53064c4f22efeb8a4eda2712e15c77d2699a686

Port permission_prompt_tests to Rust (#4129)

view details

Kevin (Kun) Kassimo Qian

commit sha 9e2a8d56de0d4d18413e6fd3892bebefb84486f7

Merge with master

view details

Kevin (Kun) Kassimo Qian

commit sha 49cc79bd4eb7a1250c9160e6e668346ad8eb3118

Fix with new master... again

view details

push time in a day

Pull request review commentdenoland/deno

Add global "quiet" flag

 impl Default for DenoSubcommand {   } } +#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord)]+pub enum DenoVerbosity {

Can you remove the Deno prefix?

codeflo

comment created time in a day

Pull request review commentdenoland/deno

Add global "quiet" flag

 fn test_subcommand<'a, 'b>() -> App<'a, 'b> {         .help("Stop on first error")         .takes_value(false),     )-    .arg(-      Arg::with_name("quiet")

I feel the functionality between these 2 flags is not exactly the same... I wonder if you should give one of them a different name.

codeflo

comment created time in a day

Pull request review commentdenoland/deno

Add global "quiet" flag

 fn clap_root<'a, 'b>() -> App<'a, 'b> {         .possible_values(&["debug", "info"])         .global(true),     )+    .arg(+      Arg::with_name("quiet")+        .short("q")+        .long("quiet")+        .help("Reduce verbosity")

We need a better description (and long description) for this flag

codeflo

comment created time in a day

pull request commentdenoland/deno

feat(ResourceTable): randomize rid generation

@ecyrbe I knew that. I mean the case where colliding multiple times before finding a free rid (e.g. the unrealistic scenario where only 1 rid is free and all others occupied, under which basically spending all the time colliding) (which is unlikely as I said before)

ecyrbe

comment created time in 2 days

pull request commentdenoland/deno

feat(ResourceTable): randomize rid generation

@ecyrbe Well, it is not that hard for a long running process such as a server to give code enough time to iterate. Once malicious code gets its way to the server, it can be patient, and rid space smaller than 2^64 provides no benefit IMO (cryptographically often 2^80 is the starting point where stuff can be viewed as secure).

I do agree that making code less dependent on specific rid numbers is a good idea. Generating random number should not be too huge a performance cost so I am okay with it (I guess we don't need to worry wasting too much time on collisions, since maintaining a huge set of rids is unlikely)

ecyrbe

comment created time in 2 days

pull request commentdenoland/deno

feat(ResourceTable): randomize rid generation

Actually out of curiosity, is there a reason we want to make rid generation random?

I feel that from 0 to 0x7FFFFFFF is actually not that hard to fully iterate, so from security point of view this does not bring too much of a benefit if we would ever want to use the rid as a mechanism to avoid unwanted access to resources by malicious code.

ecyrbe

comment created time in 2 days

push eventkevinkassimo/deno

Kitson Kelly

commit sha 2b7e28b591a6947f76ddf9a53f49eec8f1accc0f

feat: Add Deno.formatDiagnostics (#4032)

view details

Nayeem Rahman

commit sha db597055958a9dbc9c8e633e01d9229b55d1d6ef

doc: Remove old link to deno types output (#4111)

view details

Bartek Iwańczuk

commit sha e1687c0a4616e90d4bbde42b13a0356a7f6a1e7d

rename Deno.Err -> Deno.errors (#4093)

view details

Kevin (Kun) Kassimo Qian

commit sha ec41b6fd54a9d822104e999e164c9fa6c744d435

Merge branch 'master' into tty/raw_mode_2

view details

Kevin (Kun) Kassimo Qian

commit sha dde70398c7fba47e9465fc6e78c988d6113cb03d

Err -> errors

view details

push time in 3 days

issue commentdenoland/deno

Windows terminal colors broken after removal of ansi_term

On macOS, color also broken: Screen Shot 2020-02-24 at 12 58 14 PM

ry

comment created time in 3 days

issue commentdenoland/deno

file_fetcher::tests::* always failing for local testing

@ry I tried it and it does not really make any difference. Also I have checked there are no other python servers running. I'll investigate a bit more

kevinkassimo

comment created time in 3 days

issue commentdenoland/deno

discussion: adopt baretest-like testing API

@ecyrbe Deno core should offer a set of bare minimal utilities, instead of being too opinionated IMO

bartlomieju

comment created time in 4 days

push eventkevinkassimo/deno

Kevin (Kun) Kassimo Qian

commit sha c6c9bb754d1008ca6ff30b938c6516a3ffd2bc3c

isTTY uses isatty; add some unit test

view details

push time in 4 days

PR opened denoland/deno

fetch_cached_remote_source support redirect URL without base

e.g. for https://unpkg.com/mocha/mocha.js, the redirect URL is /mocha@7.0.1/mocha.js, which would fail under Url::parse. Construct URL using absolute path + original module URL if this happens.

Will add a test later.

+11 -1

0 comment

1 changed file

pr created time in 4 days

create barnchkevinkassimo/deno

branch : redirect/no-base

created branch time in 4 days

issue commentdenoland/deno

discussion: adopt baretest-like testing API

@bartlomieju Actually I just noticed that deno is panicking if you try to import https://unpkg.com/mocha/mocha.js due to redirect to an absolute URL: https://unpkg.com/mocha/mocha.js redirects to /mocha@7.0.1/mocha.js, which cannot be parsed correctly. I'll see if I can do a quick fix for this.

bartlomieju

comment created time in 4 days

push eventkevinkassimo/deno

Kevin (Kun) Kassimo Qian

commit sha f1fbe6f3769de370fb65faf9ffa11bbc273f366b

isTTY uses isatty; add some unit test

view details

push time in 4 days

issue commentdenoland/deno

file_fetcher::tests::* always failing for local testing

@bartlomieju Different ones fail during different runs (I haven't been able to ). Failing ones I have seen so far (they sometimes pass, but then other breaks)

thread 'file_fetcher::tests::test_get_source_code_2' panicked at 'assertion failed: result.is_ok()', cli/file_fetcher.rs:826:5

thread 'file_fetcher::tests::test_get_source_cached_only' panicked at 'assertion failed: result.is_ok()', cli/file_fetcher.rs:1134:5

thread 'file_fetcher::tests::test_get_source_code_1' panicked at 'assertion failed: result.is_ok()', cli/file_fetcher.rs:743:5

thread 'file_fetcher::tests::test_fetch_source_2' panicked at 'assertion failed: result.is_ok()', cli/file_fetcher.rs:1233:5

thread 'file_fetcher::tests::test_get_source_code_multiple_downloads_of_same_file' panicked at 'assertion failed: r.is_ok()', cli/file_fetcher.rs:889:5
kevinkassimo

comment created time in 4 days

issue commentdenoland/deno

discussion: adopt baretest-like testing API

@nayeemrmn IMHO I don't think adding a separate Deno.TestSuite can be that much of a cost. If we were to really only forced to maintain a single set of API, I would rather have Deno.TestSuite.default.test(), maintaining a static instance of TestSuite instead of keeping Deno.test.

bartlomieju

comment created time in 4 days

issue commentdenoland/deno

discussion: adopt baretest-like testing API

Bringing these hooks to Deno itself is fine I believe since they are truly minimal.

@nayeemrmn I think your proposal could be confusing, since there is no clear association between Deno.test() with the TestSuite instance s, and using s.start()/end() marker does not provide any enforcements pre-runtime. (and it is just so easy to forget to call s.end())

@ecyrbe Jest is just too huge a framework to port. To be honest I would rather put such effort to std/node polyfills than for Jest itself :) (maybe with enough Node polyfills we can get it work)

bartlomieju

comment created time in 4 days

push eventkevinkassimo/deno

EnokMan

commit sha 14129b6c8f3335b215a2d9614c4523e8e3200e82

feat: support brotli compression for fetch API (#4082)

view details

Kevin (Kun) "Kassimo" Qian

commit sha bf48f5fa5a15e01d6f8b7eb7c3e70f6ecc91fa23

Move WebAsssembly namespace to shared_globals (#4084)

view details

Kevin (Kun) "Kassimo" Qian

commit sha e9fff02e9681f3eb2edee9f94db66b140e179899

fetch: proper error for unsupported protocol (#4085)

view details

Yusuke Sakurai

commit sha d9886a44d107de48b312ba71833709494b5ade5e

fix: [ws] sock shouldn't throw eof error when failed to read frame (#4083)

view details

Ben Noordhuis

commit sha 45eb2f9b37c2c7498c58eb45f76667aaa4a7d731

feat(std/node): add os Symbol.toPrimitive methods (#4073) Node's os module exports a number of methods that evaluate to themselves when coerced to a primitive. I.e., `"" + os.arch` and `os.arch()` evaluate to the same string, and now Deno's shims do too.

view details

Bartek Iwańczuk

commit sha 4e1abb4f3a1fbdac25b1e7db0588572e4d5a6579

refactor: use OpError instead of ErrBox for errors in ops (#4058) To better reflect changes in error types in JS from #3662 this PR changes default error type used in ops from "ErrBox" to "OpError". "OpError" is a type that can be sent over to JSON; it has all information needed to construct error in JavaScript. That made "GetErrorKind" trait useless and so it was removed altogether. To provide compatibility with previous use of "ErrBox" an implementation of "From<ErrBox> for OpError" was added, however, it is an escape hatch and ops implementors should strive to use "OpError" directly.

view details

Kevin (Kun) Kassimo Qian

commit sha f9de475e96f0590b389c29be9de06b00ac43dff9

tty: Deno.stdin.setRaw()

view details

Kevin (Kun) Kassimo Qian

commit sha 0ec22bd6ca82c8731762ad0bfa286d1a04685356

Re-call safe

view details

Kevin (Kun) Kassimo Qian

commit sha b7803c4cfb9a50c5dbc9ee9858b4ec207ef7608e

types

view details

Kevin (Kun) Kassimo Qian

commit sha c68ea392d6981ac49c3cc63f014654b1bd7120f4

windows 1

view details

Kevin (Kun) Kassimo Qian

commit sha a54a3173b412127626fffb1e3125dbf7b03c3b72

windows 2

view details

Kevin (Kun) Kassimo Qian

commit sha c732193132b178f55fce46287ec65de792e63890

windows 3

view details

Kevin (Kun) Kassimo Qian

commit sha 2dec632d7f743bff3b050a1d26c6ba9fcff39f6e

Start option 2

view details

Kevin (Kun) Kassimo Qian

commit sha 87d5eb701da8a7c5e3fbe21d10ba1f0e5634bf14

Deno.setRaw(rid, mode)

view details

Kevin (Kun) Kassimo Qian

commit sha 6b48c391750f303c12182a24bb2a71444b160e80

Add basic test (unix only)

view details

Kevin (Kun) Kassimo Qian

commit sha 482271b86c9dc088e6f9968a9a58868083e56b78

Move pty to dev deps

view details

Kevin (Kun) Kassimo Qian

commit sha dcc832d0d99d0b4d58225473c39b98201aca406e

De-flake test

view details

Kevin (Kun) Kassimo Qian

commit sha b4643e52e77580442044a543277798a1eb391832

isTTY uses isatty; add some unit test

view details

push time in 4 days

issue openeddenoland/deno

file_fetcher::tests::* always failing for local testing

Unable to run tests locally due to at least one of the file_fetcher::tests::* almost always failing.

created time in 4 days

pull request commentdenoland/deno

tty: Deno.stdin.setRaw(), Option 2

@ry I can probably update isTTY to use isatty. I was originally thinking about deprecating isTTY since the 2 has very similar names while isTTY only handles stdin/stdout/stderr

kevinkassimo

comment created time in 4 days

pull request commentdenoland/deno

fetch: proper error for unsupported protocol

@ecyrbe they are 2 separate problems. That’s why this PR does not intend to close that issue.

We also had another discussion about fetch local before: #2150

kevinkassimo

comment created time in 4 days

PR opened denoland/deno

fetch: proper error for unsupported protocol

Related to #4038

Don't panic. Throw a proper error when fetching a protocol not support/not yet supported

+31 -1

0 comment

3 changed files

pr created time in 4 days

push eventkevinkassimo/deno

Kevin (Kun) Kassimo Qian

commit sha 704b44ff7e55b36f552ba763a978bc8383ce5e4f

fetch: proper error for unsupported protocol

view details

push time in 4 days

create barnchkevinkassimo/deno

branch : fetch/scheme-error

created branch time in 4 days

pull request commentdenoland/deno

WIP: feat(std/node): Added querystring builtin

Oh as to escape and unescape, I believe we already have implementation available from window.escape and window.unescape.

lucacasonato

comment created time in 4 days

PR opened denoland/deno

Move WebAsssembly namespace to shared_globals

Closes #4077

+172 -171

0 comment

2 changed files

pr created time in 4 days

create barnchkevinkassimo/deno

branch : dts/wasm-shared

created branch time in 4 days

issue commentdenoland/deno

discussion: error classes

@evenstensberg You should pin your dependency, e.g. import { createRequire } from "https://deno.land/std@v0.34.0/node/module.ts";. Without explicit version number, you'll be using the master branch, which is unstable (since it changes along with the lastest Deno source itself, which might use features that have not yet been released).

ry

comment created time in 4 days

push eventkevinkassimo/deno

jigsaw

commit sha c34d96d86557d434bdf124063e4eec4662067c1e

Fix example (#4076)

view details

ecyrbe

commit sha fb98556d56d0defa325fab1296077627cce31aab

feat(std/node): add os.loadavg() (#4075)

view details

Yusuke Sakurai

commit sha 8b646e8657309e57bd4e907f911529e33e3a05fb

Added browser chat example (#4022)

view details

Kevin (Kun) "Kassimo" Qian

commit sha 3916556aa222995b36dbf09134035358a05544e6

Merge branch 'master' into tty/raw_mode_2

view details

push time in 4 days

push eventkevinkassimo/deno

Kevin (Kun) Kassimo Qian

commit sha ec5e10013fab367368b937249181e3e1037b6118

De-flake test

view details

push time in 5 days

push eventkevinkassimo/deno

Kevin (Kun) Kassimo Qian

commit sha 9cc2e0585d395bf10cc199c75d898bf2bf47bc31

De-flake test

view details

push time in 5 days

push eventkevinkassimo/deno

Kevin (Kun) Kassimo Qian

commit sha 60ffdd68cb822e986411667f869a8d055310beaf

Move pty to dev deps

view details

push time in 5 days

pull request commentdenoland/deno

WIP: feat(std/node): Added querystring builtin

Note a similar attempt was made in https://github.com/denoland/deno/pull/3485 . That PR is closed due to being stale. Note I do agree for pure compatibility concerns we should polyfill it anyways.

lucacasonato

comment created time in 5 days

issue commentdenoland/deno

test_permission_request_net is flaky on macOS

Encountered this quite often. Also sometimes test_permissions_request_read

bartlomieju

comment created time in 5 days

pull request commentdenoland/deno

[WIP] tty: Deno.stdin.setRaw(), Option 2

Added a basic test (unix only, I have no access to Windows). Added pty crate as a dev dependency.

permissions::tests::test_permissions_request_read and permissions::tests::test_permission_request_net seems to be badly flaky

kevinkassimo

comment created time in 5 days

push eventkevinkassimo/deno

Bartek Iwańczuk

commit sha bd640bc7e6a946dec4477afc64d8083e372660f6

feat: Deno.fsEvents() (#3452)

view details

Kevin (Kun) Kassimo Qian

commit sha 5e93e554f151842b1d39a9c0786b3e3eef427b63

tty: Deno.stdin.setRaw()

view details

Kevin (Kun) Kassimo Qian

commit sha 0745cf8a051d92e46d5a5f9827d9683d9b137684

Re-call safe

view details

Kevin (Kun) Kassimo Qian

commit sha 2e31a1331ea6178c5414604331933644b4c689b0

types

view details

Kevin (Kun) Kassimo Qian

commit sha 887ff6a4d3d33f78695920f76a888309bd02c580

windows 1

view details

Kevin (Kun) Kassimo Qian

commit sha 20ccd48d1ab44cffcd7ba4bd2bcd6ab9f993a53d

windows 2

view details

Kevin (Kun) Kassimo Qian

commit sha 321ee7b64cf988d5369d6482dfc3ba128846c4a1

windows 3

view details

Kevin (Kun) Kassimo Qian

commit sha 61c6fa8a6fd564f246d8d0efedc99445fb39251d

Start option 2

view details

Kevin (Kun) Kassimo Qian

commit sha f00cbaeeb879d722ab63f9f18bc1aa17ad3e3982

Deno.setRaw(rid, mode)

view details

Kevin (Kun) Kassimo Qian

commit sha 05e00584147bebc572523268bdb998f3d36fb2fe

Add basic test (unix only)

view details

Kevin (Kun) Kassimo Qian

commit sha dc4cdddebc7d402fdacdda1ef13052963cabdf52

Move pty to dev deps

view details

push time in 5 days

push eventkevinkassimo/deno

Bartek Iwańczuk

commit sha a0f015b1a39463ec0e98ec204ca727a5f023b200

refactor: replace Arc<Box<..>> with Rc<..> (#3996)

view details

Ben Noordhuis

commit sha 503d8bfef208178be847cd9d80c62462e0a0d417

fix: skip non-UTF-8 dir entries in Deno.readDir() (#4004) Example: $ python2 -c 'open("\x80\x7F", "w")' $ deno eval 'Deno.readDirSync(".")' thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', cli/ops/fs.rs:373:16 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace fatal runtime error: failed to initiate panic, error 5 Aborted (core dumped) Before this commit they made deno panic, now they are silently skipped. Not ideal but arguably better than panicking. No test because what characters are and aren't allowed in filenames is highly file system-dependent. Closes #3950

view details

Kitson Kelly

commit sha 98e585a284f6b8bb568cec52ca3599612b663ef3

Fix issue with detecting AMD like imports (#4009)

view details

geoFlux

commit sha 2e7d449623b7faee8feb0a2970e0d6bb7c66b409

feat: add --cert flag for http client (#3972)

view details

Nikolai Vavilov

commit sha 19080667534954ac75caa1bcf34e3a55d5d55e4c

Update ws client example (#4012)

view details

Bartek Iwańczuk

commit sha 95563476f604c33e91d66e164e7a804c356c0802

fix(deno test): support directories as arguments (#4011)

view details

Chris Knight

commit sha 7b9f6e9c456175fd8a6c11049a2f5f723e909d03

feat: Asynchronous event iteration node polyfill (#4016)

view details

Nayeem Rahman

commit sha 5a3292047c42b8a65d164f127fc57e57046fadf7

feat(std/io): Export readDelim(), readStringDelim() and readLines() from bufio.ts (#4019) Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>

view details

Bartek Iwańczuk

commit sha 302debebb3a3b765b3d13f3244eb4625d7d610c2

refactor: cleanup cli/lib.rs (#4006) * rename methods on Worker related to module loading * reorganize cli/lib.rs * remove cli/progress.rs and cli/shell.rs

view details

Ryan Dahl

commit sha f0f807c524f76bbf91c31f13f79d60a272e1fe3f

upgrade: dprint 0.6.0 (#4026)

view details

Kevin (Kun) "Kassimo" Qian

commit sha 08dcf6bff73bbe579769ccd0f135ed4af919ea48

feat: Deno.makeTempFile (#4024)

view details

Bartek Iwańczuk

commit sha 3d5bed35e032ee20e4fe34cad925202c6f0c0d3e

refactor: remove run_worker_loop (#4028) * remove run_worker_loop, impl poll for WebWorker * store JoinHandle to worker thread

view details

Kitson Kelly

commit sha 046bbb26913f9da58b0d23ae331e9dab9dc19e59

Support loading additional TS lib files (#3863) Fixes #3726 This PR provides support for referencing other lib files (like lib.dom.d.ts that are not used by default in Deno.

view details

Bartek Iwańczuk

commit sha 852823fa505d75d61e70e1330bbf366aa248e650

refactor: rewrite HTTP cache for file fetcher (#4030)

view details

Maximilien Mellen

commit sha 90125566bbaed8b5c6e55ca8dbc432e3433fb73c

Enable TS strict mode by default (#3899) Fixes #3324 Co-authored-by: Kitson Kelly <me@kitsonkelly.com>

view details

Bartek Iwańczuk

commit sha 742a16b5069b2a6dee200d908df54fab77408581

refactor: rewrite file_fetcher to use async fns, lift blocking call (#4037)

view details

Kitson Kelly

commit sha 0e579ee9dce917c1b783cea5506315f78b1e0a00

fix: emit when bundle contains single module (#4042) Fixes #4031 When a bundle contains a single module, we were incorrectly determining the module name, resulting in a non-functional bundle. This PR corrects that determination.

view details

Kitson Kelly

commit sha 6431622a6debc0443f9269fe0157571ec54701c0

fix: mis-detecting imports on JavaScript when there is no checkJs (#4040) This PR fixes an issue where we recursively analysed imports on plain JS files in the compiler irrespective of "checkJs" being true. This caused problems where when analysing the imports of those files, we would mistake some import like structures (AMD/CommonJS) as dependencies and try to resolve the "modules" even though the compiler would not actually look at those files.

view details

Clemens Tolboom

commit sha 7e49d96cbcde1e8eb89d0fdd499be473822b725b

/std/ws: Fix args index for WS examples (#4046)

view details

Ryan Dahl

commit sha a0d3b4ebc509d9e5dfca555084fd1100e114664a

v0.34.0

view details

push time in 5 days

issue openeddenoland/deno

Use similar caching strategy for compiled files

We recently updated our caching logic to use hashes for paths under same host in #4030 (to avoid invalid URL character in file path issue)

We have not yet updated the strategy for compiled files yet. This might be a TODO item.

created time in 6 days

issue commentdenoland/deno

Deno.sh domain

@zhmushan has been a long time contributor to Deno and related projects (e.g. https://github.com/zhmushan/abc). I believe he is recently very busy with his personal stuff. I can contact him and see what he thinks, but I believe we should not force him.

Worth mentioning deno.dev is also owned by another Deno contributor.

JerryGreen

comment created time in 7 days

issue commentdenoland/deno

Problems with using async interators for HTTP server in std

@dd-pardal There is another API you could use: listenAndServe

dd-pardal

comment created time in 9 days

PR opened denoland/deno

fs: Deno.makeTempFile

Deno.makeTempFile creates a temporary file. It takes the same option as makeTempDIr, thus the option is renamed to Deno.MakeTempOptions

Naming debatable. Maybe we can do mktemp and mkdtemp to replace the 2 names

+208 -47

0 comment

9 changed files

pr created time in 9 days

create barnchkevinkassimo/deno

branch : fs/make_temp_file

created branch time in 9 days

issue commentdenoland/deno

Inconsistent camel case usage in Deno API

To be fair I kind of think readdir/readDir readlink/readLink is not that much an issue, but I indeed do not like the fact that makeTempDir and mkdir differs too much.

cknight

comment created time in 9 days

pull request commentdenoland/deno

Fix issue with detecting AMD like imports

This actually was one of the issues I had with require() polyfill in std/node before, that I have to call the function require_(). I guess now we can finally update the docs to normal require()

kitsonk

comment created time in 10 days

issue commentdenoland/deno

global `Deno` API in worker

I do personally prefer an option to expose Deno namespace on Worker creation, like new Worker(..., { type: "module", withDenoNamespace: true }) or similar (extra option is not a violation of Worker spec anyways). Also the ability to share resource table can be an important feature for Deno to have. (I wonder if recent decisions to shift things to use Rc<...> is making this harder)

Fenzland

comment created time in 10 days

push eventkevinkassimo/deno

Kevin (Kun) Kassimo Qian

commit sha 4999c68a494ae59e992f5cc82efb452b37884ce9

Deno.setRaw(rid, mode)

view details

push time in 13 days

PR closed denoland/deno

Reviewers
[WIP] tty: Deno.stdin.setRaw()

Basic implementation of raw mode for stdin. Implementation is tentative (op names unsure), and code is mostly lifted from crossterm or rustyline (without introducing more deps)

Likely won't work properly on Windows since I cannot test it locally.

// Returns a function that when called, restores original mode.
// I do not want to expose other tty flags, so this hides away the flags' existence
let restore = Deno.stdin.setRaw();
restore = Deno.stdin.setRaw(); // Safe to call again before restore.

const buf = new Uint8Array(6);
for (let i = 0; i < 6; i++) {
  const nread = await Deno.stdin.read(buf);
  if (nread === Deno.EOF) {
    break;
  } else {
    console.log(`READ ${nread} bytes:`, new TextDecoder().decode(buf.subarray(0, nread)));
  }
}

restore(); // restores old mode. Can be safely called multiple times
restore(); // safe to call multiple times

Sample run (assume imput is is raw):

$ ./target/debug/deno raw_mode.ts
READ 1 bytes: i
READ 1 bytes: s
READ 1 bytes:
READ 1 bytes: r
READ 1 bytes: a
READ 1 bytes: w
+227 -4

3 comments

6 changed files

kevinkassimo

pr closed time in 13 days

pull request commentdenoland/deno

[WIP] tty: Deno.stdin.setRaw()

Closed in favor of #3958

kevinkassimo

comment created time in 13 days

push eventkevinkassimo/deno

Nayeem Rahman

commit sha 3563ab4c53689480ac47871fe928ae7c78a2fcc3

fix: Correctly determine a --cached-only error (#3979)

view details

Kitson Kelly

commit sha 6bd846a780bec8a60d0a251ed1fb43e3add81be5

Improvements to bundling. (#3965) Moves to using a minimal System loader for bundles generated by Deno. TypeScript in 3.8 will be able to output TLA for modules, and the loader is written to take advantage of that as soon as we update Deno to TS 3.8. System also allows us to support `import.meta` and provide more ESM aligned assignment of exports, as well as there is better handling of circular imports. The loader is also very terse versus to try to save overhead. Also, fixed an issue where abstract classes were not being re-exported. Fixes #2553 Fixes #3559 Fixes #3751 Fixes #3825 Refs #3301

view details

Ryan Dahl

commit sha 9325744a9426241a2826a6fb5516269227e26efa

Clean up fmt flags and path handling (#3988)

view details

Yusuke Sakurai

commit sha 621aeef8364fcbd2da93b208971c51a4fbf08903

fix: appended CRLF to end of trailer headers (#3989)

view details

Ryan Dahl

commit sha 87c329c45ac0e3382c115793094317df15cbe5bf

v0.33.0

view details

Kevin (Kun) Kassimo Qian

commit sha 864b6c620a5c678af4ccb621f553588177839a77

tty: Deno.stdin.setRaw()

view details

Kevin (Kun) Kassimo Qian

commit sha a2df11cb8827e8c4d5c086141f1f2ea28c0481b9

Re-call safe

view details

Kevin (Kun) Kassimo Qian

commit sha 3d18e5297d44bd0f213f486fb488fe9949499677

types

view details

Kevin (Kun) Kassimo Qian

commit sha ecd9029b20fecf245a436b8b88ba212a2ac0ec88

windows 1

view details

Kevin (Kun) Kassimo Qian

commit sha 645c6b99bdb628a52be31c5dd5c32eaf9823f618

windows 2

view details

Kevin (Kun) Kassimo Qian

commit sha d4865d4b0fe1907a429e6183ead2967f3da5db60

windows 3

view details

Kevin (Kun) Kassimo Qian

commit sha f22a9383ae250ddc522ac4cf68b80dedac5d4f54

Start option 2

view details

Kevin (Kun) Kassimo Qian

commit sha b4429f4231eb3e60bbe88dc7620d3824ba34e95a

Deno.setRaw(rid, mode)

view details

push time in 13 days

Pull request review commentdenoland/deno

[WIP] tty: Deno.stdin.setRaw(), Option 2

 declare namespace Deno {     /** Read-write. Behaves like `x` and allows to read from file. */     | "x+"; +  // @url js/tty.d.ts++  /** Check if a given resource is TTY. */+  export function isatty(rid: number): boolean;+  /** Extended file abstraction for TTY input */+  export class TTYInput extends File {+    /** Is TTY under raw mode. */+    get isRaw(): boolean;+    /** Set TTY to be under raw mode. */+    setRaw(mode: boolean): void;+  }+  /** An instance of `TTYInput` for stdin. */+  export const stdin: TTYInput;+  /** An instance of `File` for stdout. */+  export const stdout: File;+  /** An instance of `File` for stderr. */+  export const stderr: File;

The slight annoyance is that we will need to accompany StreamResource (including FsFile) with such optional data. I'll see where would be the best place for me to place this piece of info.

kevinkassimo

comment created time in 14 days

Pull request review commentdenoland/deno

[WIP] tty: Deno.stdin.setRaw(), Option 2

 declare namespace Deno {     /** Read-write. Behaves like `x` and allows to read from file. */     | "x+"; +  // @url js/tty.d.ts++  /** Check if a given resource is TTY. */+  export function isatty(rid: number): boolean;+  /** Extended file abstraction for TTY input */+  export class TTYInput extends File {+    /** Is TTY under raw mode. */+    get isRaw(): boolean;+    /** Set TTY to be under raw mode. */+    setRaw(mode: boolean): void;+  }+  /** An instance of `TTYInput` for stdin. */+  export const stdin: TTYInput;+  /** An instance of `File` for stdout. */+  export const stdout: File;+  /** An instance of `File` for stderr. */+  export const stderr: File;

I don't think they can with current API (unless we expose a full representation <termios>) if we do not store for them? And there is the discrepancy between Unix and Windows here

Node does not provide the API for direct restoration either. I believe with tty.ReadStream::setRaw(false) libuv simply sets back to the saved original mode

kevinkassimo

comment created time in 14 days

Pull request review commentdenoland/deno

[WIP] tty: Deno.stdin.setRaw(), Option 2

 declare namespace Deno {     /** Read-write. Behaves like `x` and allows to read from file. */     | "x+"; +  // @url js/tty.d.ts++  /** Check if a given resource is TTY. */+  export function isatty(rid: number): boolean;+  /** Extended file abstraction for TTY input */+  export class TTYInput extends File {+    /** Is TTY under raw mode. */+    get isRaw(): boolean;+    /** Set TTY to be under raw mode. */+    setRaw(mode: boolean): void;+  }+  /** An instance of `TTYInput` for stdin. */+  export const stdin: TTYInput;+  /** An instance of `File` for stdout. */+  export const stdout: File;+  /** An instance of `File` for stderr. */+  export const stderr: File;

Do you think the original returning a restoration function after calling Deno.setRaw(rid) works here? (In case I want to store the information for restoring without exposing? This would be a pure TS side change, and similar to what I did in the old PR, but without wrapping in a class)

kevinkassimo

comment created time in 14 days

push eventkevinkassimo/deno

Benny Shi

commit sha e8f639ce53c5a232c84d499b0d6375a2d2ad7131

Add readlink, readlinkSync for std/node/fs.ts (#3926)

view details

Yusuke Sakurai

commit sha e6f204199b1a1f6c5d963da2b8cdfc5992656147

feat: Support HTTP trailer headers for response (#3938)

view details

Ryan Dahl

commit sha e1105a159406d8b64a833fa3266fd4ac7fc47a00

upgrade: dprint-plugin-typescript 0.5.0 (#3952)

view details

Chris Knight

commit sha 81905a867ea3f942619229e330840d132c57a5da

feat: Event emitter node polyfill (#3944)

view details

Bartek Iwańczuk

commit sha 79b3bc05d6de520f1df73face1744ae3d8be0bb8

workers: basic event loop (#3828) * establish basic event loop for workers * make "self.close()" inside worker * remove "runWorkerMessageLoop() - instead manually call global function in Rust when message arrives. This is done in preparation for structured clone * refactor "WorkerChannel" and use distinct structs for internal and external channels; "WorkerChannelsInternal" and "WorkerHandle" * move "State.worker_channels_internal" to "Worker.internal_channels" * add "WorkerEvent" enum for child->host communication; currently "Message(Buf)" and "Error(ErrBox)" variants are supported * add tests for nested workers * add tests for worker throwing error on startup

view details

Nayeem Rahman

commit sha 701ce9b3342647cf01cb23c4fc28bc99ce0aa8c1

refactor: Use PathBuf for paths in flag parsing and whitelists (#3955) * Use PathBuf for DenoSubcommand::Bundle's out_file * Use PathBuf for DenoSubcommand::Format's files * Use PathBuf for DenoSubcommand::Install's dir * Use PathBuf for read/write whitelists

view details

Bartek Iwańczuk

commit sha a3bfbcceade3d359f677106399562b461b4af01a

refactor: rewrite deno test, add Deno.test() (#3865) * rewrite test runner in Rust * migrate "test" and "runTests" functions from std to "Deno" namespace * use "Deno.test()" to run internal JS unit tests * remove std downloads for Deno subcommands

view details

uki00a

commit sha 5a143cdbd34df590a24ec756a6319a89d7656e5c

fix(std/node): support named import for EventEmitter (#3959)

view details

Bartek Iwańczuk

commit sha e0bcecee6042b219c6626172851af5a25362b948

refactor: Remove atomics from metrics (#3968) * replace "AtomicUsize" with "u64" for field type on "Metrics" * move "compiler_starts" field from "Metrics" to "GlobalState"

view details

Bartek Iwańczuk

commit sha 61273085e40fb4d992eef4b1b5601e3567c80664

refactor: rewrite tests in std/ to use Deno.test (#3930)

view details

Bartek Iwańczuk

commit sha b67f20be3b5234bad2565c1770fa89d49942b342

update references to testing/mod.ts in manual (#3973)

view details

木杉

commit sha 92019498f6361c31ad24decfc14e81660959f6cb

fix(file_server): don't crash on "%" pathname (#3953)

view details

Chris Knight

commit sha a7056095a5c9dd000c3c9468d63d695d029969bd

feat(node): add EventEmitter.errorMonitor (#3960)

view details

Bartek Iwańczuk

commit sha 63718ab305f61e7b196380f15ef2b4bba3c533fa

dont use env vars in multiple installer tests (#3967)

view details

Bartek Iwańczuk

commit sha e6167c78134182c45689bda7bcb12af05009349c

chore: share HTTP server between tests (#3966)

view details

Kevin (Kun) "Kassimo" Qian

commit sha 6c964867ed62b0f0b615414cbbd2f6a3c196dd2b

Merge branch 'master' into tty/raw_mode_2

view details

push time in 16 days

Pull request review commentdenoland/deno

Add UDP support

 export interface ListenOptions {  *     listen({ hostname: "[2001:db8::1]", port: 80 });  *     listen({ hostname: "golang.org", port: 80, transport: "tcp" })  */-export function listen(options: ListenOptions): Listener {+export function listen(options: ListenOptions): Listener | Receiver {

TypeScript supports function overloading so this should actually work I believe, just ensure that the first 2 function signatures do not have a body.

hazae41

comment created time in 16 days

Pull request review commentdenoland/deno

Add UDP support

 export interface ListenOptions {  *     listen({ hostname: "[2001:db8::1]", port: 80 });  *     listen({ hostname: "golang.org", port: 80, transport: "tcp" })  */-export function listen(options: ListenOptions): Listener {+export function listen(options: ListenOptions): Listener | Receiver {

Maybe it would be nice to deduce return type from input:

function listen(options: ListenOptions & { transport: "tcp" }): Listener;
function listen(options: ListenOptions & { transport: "udp" }): Receiver;
function listen(options: ListenOptions): Listener | Receiver { /* ... */ }
hazae41

comment created time in 16 days

pull request commentdenoland/deno

[WIP] tty: Deno.stdin.setRaw()

Also #3958 over option 2

kevinkassimo

comment created time in 16 days

issue commentdenoland/deno

Lodash - Uncaught Error: Protocol has to be file://

To implement this, I think there are at least some features we need to implement directly to Deno

Either

  • Ability to fetch synchronously or readSync/writeSync on connections, and API to retrieve Deno caching location (DENO_DIR or default) Or
  • Expose an API to request download and caching of URL, like deno fetch but exposed as a function call. Also this call has to have a synchronous version.
frankhale

comment created time in 16 days

push eventkevinkassimo/deno

Kevin (Kun) Kassimo Qian

commit sha 8776116613285e7fc0b8f22b46c59e75916286c5

Start option 2

view details

push time in 16 days

push eventkevinkassimo/deno

Kevin (Kun) Kassimo Qian

commit sha 7a553aeaecc2899e452de1491e827f18d4f3ceec

Start option 2

view details

push time in 16 days

push eventkevinkassimo/deno

Kevin (Kun) Kassimo Qian

commit sha 0b44d14a6bc4fab4448754df2a1220eb66e6bfcd

Start option 2

view details

push time in 16 days

PR opened denoland/deno

[WIP] tty: Deno.stdin.setRaw(), Option 2

Difference from the first option:

  • Deno.stdin.setRaw(mode) now takes a boolean mode argument.
  • Added Deno.isatty(rid) that can test any resources.
Deno.stdin.setRaw(true);
Deno.stdin.setRaw(true); // safe

const buf = new Uint8Array(6);
for (let i = 0; i < 6; i++) {
  const nread = await Deno.stdin.read(buf);
  if (nread === Deno.EOF) {
    break;
  } else {
    console.log(`READ ${nread} bytes:`, new TextDecoder().decode(buf.subarray(0, nread)));
  }
}

Deno.stdin.setRaw(false);
Deno.stdin.setRaw(false); // safe
+357 -17

0 comment

10 changed files

pr created time in 16 days

create barnchkevinkassimo/deno

branch : tty/raw_mode_2

created branch time in 16 days

issue commentdenoland/deno

Lodash - Uncaught Error: Protocol has to be file://

@nayeemrmn the reason is very simple: it is ported from Node and Node does not support remote URL loading.

I wonder if adding that support is a good idea or not, since it technically is outside of the scope of Node compatibility

frankhale

comment created time in 17 days

push eventkevinkassimo/deno

Kevin (Kun) Kassimo Qian

commit sha dede7f117bb5abec1419616ef41d11159da1e148

windows 3

view details

push time in 17 days

push eventkevinkassimo/deno

Kevin (Kun) Kassimo Qian

commit sha 467e40595f49a4f8d25dffe6cc444a5eaeb3980a

windows 3

view details

push time in 17 days

push eventkevinkassimo/deno

Kevin (Kun) Kassimo Qian

commit sha f0e47a63a5bb241e9a7074600c2f18cf71c1e42f

windows 3

view details

push time in 17 days

push eventkevinkassimo/deno

Kevin (Kun) Kassimo Qian

commit sha f139d214e566379973a2ade0752e18f263bd2a86

windows 2

view details

push time in 17 days

push eventkevinkassimo/deno

Kevin (Kun) Kassimo Qian

commit sha 5eaeb7b0a5168494a3ddd2fb7171fa41226a8a5e

windows 1

view details

push time in 17 days

push eventkevinkassimo/deno

Kevin (Kun) Kassimo Qian

commit sha 09274e0fa5805e800c32686c78f6475a66e9a70f

types

view details

push time in 17 days

push eventkevinkassimo/deno

Kevin (Kun) Kassimo Qian

commit sha 52e062f8cb35f3074bfab0a0b5a3f74b5734302d

Re-call safe

view details

push time in 17 days

PR opened denoland/deno

[WIP] tty: Deno.stdin.setRaw()

Basic implementation of raw mode for stdin. Implementation is tentative (op names unsure), and code is mostly lifted from crossterm or rustyline (without introducing more deps)

Likely won't work properly on Windows since I cannot test it locally.

// Returns a function that when called, restores original mode.
// I do not want to expose other tty flags, so this hides away the flags' existence
let restore = Deno.stdin.setRaw();
restore = Deno.stdin.setRaw(); // Safe to call again before restore.

const buf = new Uint8Array(6);
for (let i = 0; i < 6; i++) {
  const nread = await Deno.stdin.read(buf);
  if (nread === Deno.EOF) {
    break;
  } else {
    console.log(`READ ${nread} bytes:`, new TextDecoder().decode(buf.subarray(0, nread)));
  }
}

restore(); // restores old mode. Can be safely called multiple times
restore(); // safe to call multiple times

Sample run (assume imput is is raw):

$ ./target/debug/deno raw_mode.ts
READ 1 bytes: i
READ 1 bytes: s
READ 1 bytes:
READ 1 bytes: r
READ 1 bytes: a
READ 1 bytes: w
+216 -5

0 comment

6 changed files

pr created time in 17 days

push eventkevinkassimo/deno

Kevin (Kun) Kassimo Qian

commit sha b40be8d3664a1c11abd68b3960dcebfbd8951ce6

Re-call safe

view details

push time in 17 days

create barnchkevinkassimo/deno

branch : tty/raw_mode

created branch time in 17 days

push eventkevinkassimo/deno

Kevin (Kun) Kassimo Qian

commit sha 56de22fe9d52c830d10d580fa758f33edab724b2

--stdin to single -

view details

push time in 18 days

push eventkevinkassimo/deno

Kevin (Kun) Kassimo Qian

commit sha d55a5b9ad9550daf4ced7a410ab3e3f8099797e0

--stdin to single -

view details

push time in 18 days

issue commentdenoland/deno

Use null instead of Deno.EOF for read return types

Past discussions: https://github.com/denoland/deno_std/pull/444 (There was quite a bit discussion on null)

nayeemrmn

comment created time in 18 days

Pull request review commentdenoland/deno

Add readlink, readlinkSync for std/node/fs.ts

 test(function readFileEncodeUtf8Success() {   assertEquals(typeof data, "string");   assertEquals(data as string, "hello world"); });++if (Deno.build.os !== "win") {+  run({

You don't really need run for system dependent tests here. You can just directly use APIs under Deno namespace for creating the links and removing them

flyyuan

comment created time in 19 days

Pull request review commentdenoland/deno

fmt: add --stdin flag to format stdin

 fn fmt_subcommand<'a, 'b>() -> App<'a, 'b> {         .help("Check if the source files are formatted.")         .takes_value(false),     )+    .arg(+      Arg::with_name("stdin")+        .long("stdin")+        .help("Read the code from stdin.")

@nayeemrmn - can be a valid filename. (nah I'm just joking + bikeshedding here)

Yeah --stdin is a bit long to type and its implicit effect on stdout is definitely slightly confusing... If @bartlomieju also thinks - is better then it is a very easy change to make.

kevinkassimo

comment created time in 19 days

issue commentdenoland/deno

read waits for process end rather return what is available

It turns out simply Python does not flush after the first print. Inserting a sys.stdout.flush() fixes the problem.

This should not be a bug of Deno itself. I believe we could close this

hayd

comment created time in 19 days

issue commentdenoland/deno

read waits for process end rather return what is available

Quite a while since the problem, but I noticed that if we switch python with a simple shell script or even Deno itself, the problem becomes not reproducible:

Shell:

const p = Deno.run({
  args: [
    "bash",
    "-c",
    "echo 'hello'; sleep 2; echo 'kill before this'"
  ],
  stdout: "piped"
});

console.log("waiting...");
await new Promise(resolve => setTimeout(resolve, 1000));

console.log("reading");
const buf = new Uint8Array(100);
const n = Number(await p.stdout.read(buf)); // Ignore EOF.
console.log(`read ${n} bytes from stdout`);

const dec = new TextDecoder();
console.log("read:", JSON.stringify(dec.decode(buf.slice(0, n))));

p.kill(9);
console.log(await p.status());
console.log("killed");

Deno:

const p = Deno.run({
  args: [
    "deno",
    "eval",
    "console.log('hello'); setTimeout(() => console.log('kill before this'), 2000);"
  ],
  stdout: "piped"
});

console.log("waiting...");
await new Promise(resolve => setTimeout(resolve, 1000));

console.log("reading");
const buf = new Uint8Array(100);
const n = Number(await p.stdout.read(buf)); // Ignore EOF.
console.log(`read ${n} bytes from stdout`);

const dec = new TextDecoder();
console.log("read:", JSON.stringify(dec.decode(buf.slice(0, n))));

p.kill(9);
console.log(await p.status());
console.log("killed");

Both outputs

waiting...
reading
read 6 bytes from stdout
read: "hello\n"
{ signal: 9, success: false }
killed
hayd

comment created time in 19 days

push eventkevinkassimo/deno

Kevin (Kun) Kassimo Qian

commit sha 53ea7cd49588bf7d5a5e76b0654ed82031b69b9a

unreachable

view details

push time in 19 days

Pull request review commentdenoland/deno

fix: shebangs

-#!/usr/bin/env -S deno run --reload --allow-run+#!/bin/sh+":"; //; exec /usr/bin/env deno run --reload --allow-run "$0" "$@"

I know this is for the Prettier situation, but essentially this first ; renders ":" useless. Maybe just remove it altogether.

Also maybe // 2> /dev/null; just in case for garbage generated

brandonkal

comment created time in 19 days

push eventkevinkassimo/deno

Kevin (Kun) Kassimo Qian

commit sha 19d98de170d8df1d6537c9ea99e946ce8d08d223

Update help

view details

push time in 19 days

pull request commentdenoland/deno

fmt: add --stdin flag to format stdin

@dplewis Currently if we don't have any arguments, we implicitly push **/* https://github.com/denoland/deno/blob/f650c3edb3081ac0433b338c0c99418171656dd1/cli/fmt.rs#L162

kevinkassimo

comment created time in 19 days

pull request commentdenoland/deno

fmt: add --stdin flag to format stdin

@nayeemrmn That’s also an option. Love to get more feedback also from others

kevinkassimo

comment created time in 19 days

pull request commentdenoland/deno

fmt: warn if glob matches nothing

@hayd I believe this might be debatable? We can add a flag to turn this warning into an error, or if more people think it is a good default, invert the flag to turn error (default) into warning

kevinkassimo

comment created time in 19 days

more