profile
viewpoint

nayeemrmn/deno 0

A secure JavaScript/TypeScript runtime built with V8, Rust, and Tokio

nayeemrmn/deno_install 0

Deno Binary Installer

nayeemrmn/deno_std 0

deno standard modules

nayeemrmn/deno_website2 0

deno.land website

nayeemrmn/event-type 0

A general purpose, promise based event system.

nayeemrmn/hello 0

A C library I use to store a Makefile.

nayeemrmn/render-markdown 0

A Makefile example for rendering markdown to HTML and PDF.

issue commentdenoland/deno

window.location should be removed

Yes the file URL case only breaks my initial proposal, not the current behaviour.

URL Web API resolution yields proper results...

As I've explained, there is no usable relationship between Deno's main module URL and the web's page URL. The assumed meaning of this API on the web is something Deno has no concept of. Can anyone give an isomorphic use case?

nayeemrmn

comment created time in 10 hours

issue commentdenoland/deno

window.location should be the CWD (or removed)

Hmm, we could certainly easily match the worker behaviour in either case but not handling file URLs? That's totally not going to work. Removal it is.

nayeemrmn

comment created time in 10 hours

Pull request review commentdenoland/deno

feat: fs events

+// Copyright 2019 the Deno authors. All rights reserved. MIT license.+import { sendSync, sendAsync } from "./dispatch_json.ts";+import * as dispatch from "./dispatch.ts";+import { close } from "./files.ts";++export interface FsEvent {+  kind: "any" | "access" | "create" | "modify" | "remove";+  paths: string[];+}++class FsEvents implements AsyncIterableIterator<FsEvent> {+  readonly rid: number;++  constructor(paths: string[], options: { recursive: boolean }) {+    const { recursive } = options;+    this.rid = sendSync(dispatch.OP_FS_EVENTS_OPEN, { recursive, paths });+  }++  async next(): Promise<IteratorResult<FsEvent>> {+    return await sendAsync(dispatch.OP_FS_EVENTS_POLL, {+      rid: this.rid+    });+  }++  async return(value?: FsEvent): Promise<IteratorResult<FsEvent>> {+    close(this.rid);+    return { value, done: true };+  }++  [Symbol.asyncIterator](): AsyncIterableIterator<FsEvent> {+    return this;+  }+}++export function fsEvents(+  paths: string | string[],+  options = { recursive: true }

This should be written as

{
  recursive = true
}: FsEventsOptions = {}

for full robustness.

bartlomieju

comment created time in 15 hours

issue commentdenoland/deno

discussion: error classes

Lowercase like Deno.symbols. It's not an enum in a JS sense so no need to use the enum convention.

I prefer Deno.errors... it looks a lot better. Having Deno.symbols and Deno.err is weird, it's easier to be consistent on the non-abbreviating side.

ry

comment created time in 15 hours

push eventnayeemrmn/deno

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

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

push time in 16 hours

delete branch nayeemrmn/deno

delete branch : read-delim

delete time in 16 hours

pull request commentdenoland/deno

Broken link

@papaponmx Can you use this to fix #4034 instead? Just merge master and remove that line outright.

papaponmx

comment created time in a day

issue commentdenoland/deno

Add Deno.delay as promise version of setTimeout

Only slightly better than new Promise(r => setTimeout(r, ms)).

Is it okay to encourage something non-portable for a trivial high-level convenience? I don't know if this is a good idea, at least with what I understand to be Deno's current set of philosophies.

ry

comment created time in 2 days

issue commentdenoland/deno

[bug] regression: `deno test` Cannot resolve module "<dir>/test"

@bartlomieju Can this be closed?

brandonkal

comment created time in 3 days

issue commentdenoland/deno

fetch panicked when accepting file scheme url

@ry It's not a http server. I thought browsers generated responses around files and it would work but I just tried fetching relatively from a file:/// URL in chrome and it says it's not supported.

Fetch API cannot load file:///C:/Users/Nayeem/documents/3.png. URL scheme "file" is not supported.
keroxp

comment created time in 3 days

push eventnayeemrmn/deno

Nayeem Rahman

commit sha 62461d7d32a0b92eb8d77f3812251f5926d6c029

Use try/catch blocks in Listener::{accept,next}()

view details

push time in 3 days

push eventnayeemrmn/deno

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

Nayeem Rahman

commit sha 0e9a00389ad9df684f8ab1a986ff7075ab507760

refactor(std/http): Replace async iterator multiplexer

view details

Nayeem Rahman

commit sha 46157d0d8f825cf70693718f8a27429454bfea47

Short-circuit readRequest() and OP_ACCEPT

view details

Nayeem Rahman

commit sha b9ad7793a792f12da1431c790001103a7d30fe0a

Remove condition from request loop

view details

Nayeem Rahman

commit sha c2dc1ea9c183678ddbff0e8b7760a46f3e85c832

Remove incorrect request error handling

view details

Nayeem Rahman

commit sha 6c933da30946d4bb92982e31f3c517f0862e017a

Move conn.close() to the iterator

view details

Nayeem Rahman

commit sha cf01e1cbdcdc4d650aa23f2374d12f9714411f3c

Remove procError check

view details

Nayeem Rahman

commit sha 2b261113bce6c8e876bf91299636234517787322

Don't use Promise::then() to get Deno.EOF

view details

push time in 3 days

Pull request review commentdenoland/deno

Support additional libs via compiler API

 command line: $ deno types ``` +The file is the concatenation of three library files that are built into Deno:

The old link is still there.

kitsonk

comment created time in 3 days

issue commentdenoland/deno

Problems with using async interators for HTTP server in std

I like them because they have very transparent semantics that belong directly to the language and provide much more control. I think this is just the more idiomatic way of doing it now. Why implement our own listener registries and things like that instead of doing async the JS way?

If preferable it's easy to adapt an async iterator to a callback API, but the same can't be said of the reverse. This is the more minimal choice in a sense.

It's true that doing things like this will require getting used to being careful about what's blocking what. Ref #3555. FWIW, your second solution would normally be written by actually extracting a non-anonymous async function and calling it without await.

async function respond(req) {
  const data = await fetchDataFromSomewhere();
  req.respond({ body: data });
};

for await (const req of s) {
  respond(req);
}
dd-pardal

comment created time in 4 days

push eventnayeemrmn/deno

Nayeem Rahman

commit sha 72bac705e675ecb55d0f08886b3fb33de4f1382e

Fix xeval_test.ts

view details

push time in 5 days

push eventnayeemrmn/deno

Nayeem Rahman

commit sha 8df3e3ecbceaf766afe867186fde547e1e9ebce0

Improve doc

view details

push time in 5 days

PR opened denoland/deno

feat(std/io): Export readDelim(), readStringDelim() and readLines() from bufio.ts

Continues from #3497.

cc @bartlomieju @kevinkassimo

+136 -96

0 comment

3 changed files

pr created time in 5 days

push eventnayeemrmn/deno

Nayeem Rahman

commit sha 81bc78c63bb310ff82a3632c716fbaa70dc464ee

Improve doc

view details

push time in 5 days

push eventnayeemrmn/deno

Nayeem Rahman

commit sha 43c8b6151adadf4ee86501fbd91ecdd4892c51b5

Rename chunks() to readStringDelim() and lines() to readLines()

view details

Nayeem Rahman

commit sha 93ef74c5fd549b36b35d48a4c360270f52017b3c

Extract readDelim() from readStringDelim()

view details

push time in 5 days

push eventnayeemrmn/deno

Nayeem Rahman

commit sha 00e402c1c81222a6594bc22eccd2fa9370b3bfa0

fixup! Rename chunks() to readStringDelim() and lines() to readLines()

view details

Nayeem Rahman

commit sha 0279920047b2bc830a8576d6f279f343f238393b

Extract readDelim() from readStringDelim()

view details

push time in 5 days

push eventnayeemrmn/deno

Nayeem Rahman

commit sha 03f4b56f53f749e4fee8fb6faa5628269f219972

Rename chunks() to readStringDelim() and lines() to readLines()

view details

push time in 5 days

create barnchnayeemrmn/deno

branch : read-delim

created branch time in 5 days

push eventnayeemrmn/deno

push time in 5 days

push eventnayeemrmn/deno

Nayeem Rahman

commit sha a468cf181cdb76b3e6d19e42bf630000ce50b1dd

Return instead of yield*

view details

push time in 5 days

push eventnayeemrmn/deno

push time in 5 days

push eventnayeemrmn/deno

Nayeem Rahman

commit sha 7f152294537cc6cd35015c5e67de9b6a34dc0843

Close connections asynchronously

view details

push time in 5 days

push eventnayeemrmn/deno

Nayeem Rahman

commit sha 389e30aefa04984faf0dfac1353b04f999b3cf5c

Close connections asynchronously

view details

push time in 5 days

push eventnayeemrmn/deno

Nayeem Rahman

commit sha ea7efb2eec6faa3085d6c0854ccb8b44d6dd11c2

Close connections asynchronously

view details

push time in 5 days

push eventnayeemrmn/deno

Nayeem Rahman

commit sha 0ccc9dab0c4b6139067f8bfad80c913d76d362fe

Dispatch requests and close connections asynchronously

view details

push time in 5 days

push eventnayeemrmn/deno

Nayeem Rahman

commit sha e7efd9746d559c5286331499f1fb2c3168d3a5b6

Make EventType::dispatch() async

view details

push time in 5 days

push eventnayeemrmn/deno

push time in 5 days

Pull request review commentdenoland/deno

[WIP] deno test dirs 2

 mod tests {     assert_eq!(resolve_from_cwd(expected).unwrap(), expected);   } }++pub fn files_in_subtree<F>(root: PathBuf, filter: F) -> Vec<PathBuf>

Could this be renamed to just walk or something?

bartlomieju

comment created time in 6 days

push eventnayeemrmn/deno

Nayeem Rahman

commit sha 12d7deda3ccd0da6f9597c1034bf69e69a3afba7

Use deferred() for EventType

view details

push time in 6 days

push eventnayeemrmn/deno

Nayeem Rahman

commit sha 7a272028f24ff66d09f89a84103e787df6cb98cf

Reset CI

view details

push time in 6 days

push eventnayeemrmn/deno

Nayeem Rahman

commit sha 00c6d92be7f14dac0871c379d82f06a026b6dc54

Use try/catch blocks in Listener::{accept,next}()

view details

push time in 7 days

push eventnayeemrmn/deno

Nayeem Rahman

commit sha e5ab5a4d89b6266105621bcdba6be0d18ed54d73

Don't use Promise::then() to get Deno.EOF

view details

push time in 7 days

push eventnayeemrmn/deno

Nayeem Rahman

commit sha eec8b0b3b46b3063fcff7a63415c4009f68d7963

Don't use Promise::then() to get Deno.EOF

view details

push time in 7 days

push eventnayeemrmn/deno

Nayeem Rahman

commit sha b64363a7429ff856393729e4b4b045daa7d15676

Catch readRequest() errors with Deno.EOF

view details

push time in 7 days

push eventnayeemrmn/deno

Nayeem Rahman

commit sha a6c038469acba949db5392958c2ca681515e657e

Reset CI

view details

push time in 7 days

push eventnayeemrmn/deno

Nayeem Rahman

commit sha ea342b557b8346ea0802550e0df9742df43f9ef2

Reset CI

view details

push time in 7 days

push eventnayeemrmn/deno

Nayeem Rahman

commit sha b6ffc4bfb8a65e5d045c56a9d43e935074e1e3b9

Reset CI

view details

push time in 7 days

push eventnayeemrmn/deno

Nayeem Rahman

commit sha 8a818fb925b21757c504e03586fdb30bbc1f0ef0

Remove procError check

view details

push time in 7 days

push eventnayeemrmn/deno

Nayeem Rahman

commit sha 0a86f05e518bca1757c6d3b798178cd883144cf1

Reset CI

view details

push time in 7 days

issue commentdenoland/deno

Dynamic import requires file access permissions

@fakoua See #2761. It definitely does need read permissions for local modules and especially net permissions for remote modules.

fakoua

comment created time in 7 days

push eventnayeemrmn/deno

Nayeem Rahman

commit sha a5040da23dd2d5baf3b2611c0a9ed15cc27764e5

Reset CI

view details

push time in 7 days

push eventnayeemrmn/deno

Nayeem Rahman

commit sha bcce3a534268b594d4d132ac9869a4fe41078992

Reset CI

view details

push time in 7 days

push eventnayeemrmn/deno

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

Bartek Iwańczuk

commit sha a0f015b1a39463ec0e98ec204ca727a5f023b200

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

view details

Nayeem Rahman

commit sha f145af9d847f37475b5688e7f756d646a324ff19

refactor(std/http): Replace async iterator multiplexer

view details

Nayeem Rahman

commit sha ad12ef3cf60c1a5f3bace5f0dcbdba0bd8c3d60b

Short-circuit readRequest() and OP_ACCEPT

view details

Nayeem Rahman

commit sha 1c3730ee214b7944bb8e023fb2b32690b6ac0462

Remove condition from request loop

view details

Nayeem Rahman

commit sha 4ca458eecdc55364c3319613f09f1178c07e8d93

Remove incorrect request error handling

view details

Nayeem Rahman

commit sha c5c96b0c76a941b8f912e03f7489bf12f07fd941

Move conn.close() to the iterator

view details

Nayeem Rahman

commit sha c45c4929bd586707a0ee8b5a8831eda4e662213d

Remove procError check

view details

push time in 7 days

push eventnayeemrmn/deno

Nayeem Rahman

commit sha fa60437892cfebb8cf6d9bd5ef543d5b9789b082

Reset CI

view details

push time in 7 days

push eventnayeemrmn/deno

Nayeem Rahman

commit sha 39e03a136769f1c36640052472a8488355376bee

Remove procError check

view details

push time in 7 days

push eventnayeemrmn/deno

Nayeem Rahman

commit sha e3adadf233c3a1976352f385983a3e240f9989fa

Move conn.close() to the iterator

view details

push time in 7 days

push eventnayeemrmn/deno

Nayeem Rahman

commit sha 7e7896bb82b1f80f9b7e3798e8290e53170d891f

Remove incorrect request error handling

view details

push time in 7 days

push eventnayeemrmn/deno

Nayeem Rahman

commit sha 921de9e80c6e47405ab9d2a770b0340b11ccd4d6

Remove incorrect request error handling

view details

push time in 7 days

push eventnayeemrmn/deno

Nayeem Rahman

commit sha f9d4720ca1c2b925ac3d569ee494b88dc488b9e6

Remove incorrect request error handling

view details

push time in 7 days

push eventnayeemrmn/deno

Nayeem Rahman

commit sha f4c3457bff5fb3b334aae8a60cf99be3a03e2c28

Remove condition from request loop

view details

push time in 7 days

push eventnayeemrmn/deno

Nayeem Rahman

commit sha 649d7d53c35ff392f1d1e450eb822008ab6bffdc

Remove condition from request loop

view details

push time in 7 days

Pull request review commentdenoland/deno

deno test should support directories as arguments

 use crate::installer::is_remote_url; use deno_core::ErrBox; use std;+use std::path::Path; use std::path::PathBuf; use url::Url; +fn is_supported(p: &Path) -> bool {+  let s = p.as_os_str().to_string_lossy();+  s.ends_with("test.ts") || s.ends_with("test.js")

This is too loose.

ry

comment created time in 8 days

Pull request review commentdenoland/deno

deno test should support directories as arguments

 use crate::installer::is_remote_url; use deno_core::ErrBox; use std;+use std::path::Path; use std::path::PathBuf; use url::Url; +fn test_file_filter(p: &Path) -> bool {+  let s = p.as_os_str().to_string_lossy();+  s.ends_with("_test.ts")+    || s.ends_with("_test.js")+    || s.ends_with(".test.ts")+    || s.ends_with(".test.js")
    || s == "test.ts"
    || s == "test.js"
ry

comment created time in 8 days

Pull request review commentdenoland/deno_website2

WIP: Redirect with explicit git references in the registry

 export function getEntry(name, branch = "master") {   }   return null; }++async function getGithubLatestVersion(owner, repo) {+  const response = await fetch(+    `https://api.github.com/repos/${owner}/${repo}/releases/latest`+  );

isn't the hack to parse the releases rss feed: e.g. https://github.com/denoland/deno/releases.atom

I can't fetch that page from another site due to the CORS policy, try await (await fetch("https://github.com/denoland/deno/releases.atom")).text(). Know a good workaround?

nayeemrmn

comment created time in 8 days

issue commentdenoland/deno

Non-code resources in modules

The import system shouldn't be used for this, but being able to use the cache system for non-code resources is a very good point (may as well change the title). That would be applicable to suggestions in #3448.

seishun

comment created time in 8 days

issue commentdenoland/deno

Can't run tests from command line for entire directory

@David-Else FYI, the old test runner is still available in std (and should be until people are satisfied with the new one). That means deno -A https://deno.land/std@v0.33.0/testing/runner.ts src/ will work like you're used to.

David-Else

comment created time in 8 days

issue commentdenoland/deno

Use null instead of Deno.EOF for read return types

Wait, why is there a Body::read()? That's not standard.

https://github.com/denoland/deno/blob/87c329c45ac0e3382c115793094317df15cbe5bf/cli/js/fetch.ts#L38?

nayeemrmn

comment created time in 8 days

pull request commentdenoland/deno

fix: shebangs

#!/usr/bin/env deno -x

Which platforms does this work on? The Linux limitation is one interpreter /usr/bin/env one arg to that interpreter "deno -x" and then the script name is the next arg.

I tried this and it calls /usr/bin/env "deno -x" <script>, which is wrong.

brandonkal

comment created time in 8 days

issue openeddsherret/dprint

typescript: No semicolon on last field of inline interface

input:

let a: { b: number; c: number };

prettier: (preserves)

dprint:

let a: { b: number; c: number; };

(For multiline

let a: {
  b: number;
  c: number;
}

the behaviour already matches.)

created time in 8 days

issue commentdenoland/deno

Server request error handling, is this correct?

If readRequest() refuses to return a malformed request, it should be internally responsible for responding.

nayeemrmn

comment created time in 8 days

issue openeddenoland/deno

Server request error handling, is this correct?

https://github.com/denoland/deno/blob/621aeef8364fcbd2da93b208971c51a4fbf08903/std/http/server.ts#L442-L454 ... https://github.com/denoland/deno/blob/621aeef8364fcbd2da93b208971c51a4fbf08903/std/http/server.ts#L469-L475

Let's say readRequest() in the first snippet fails, then the binding to req is not made, err is set, the loop breaks, and we eventually reach the second snippet. So which req are we sending 400 to? Isn't that the previous request, which was good and yielded to the user? Please check if I'm wrong.

cc @bartlomieju

created time in 8 days

push eventnayeemrmn/deno

Nayeem Rahman

commit sha 22518de6a29e519b65052cdbdbf702e9c84ed140

Reset CI

view details

push time in 9 days

push eventnayeemrmn/deno

Nayeem Rahman

commit sha 74c3577723a60ccd331fb1bd3a7c01f808d7bfbe

Reset CI

view details

push time in 9 days

push eventnayeemrmn/deno

Nayeem Rahman

commit sha cf22841a63098d7a25aacd614329e0b02241d1f7

refactor(std/http): Replace async iterator multiplexer

view details

Nayeem Rahman

commit sha 10f657831399579526dff18fbead5e77327e51c5

Short-circuit readRequest() and OP_ACCEPT

view details

push time in 9 days

push eventnayeemrmn/deno

Chris Knight

commit sha 700f5e45ef0af01558d7619e9ca08ae130ca7263

Fix: jsDoc for Deno.dir() (#3888)

view details

Ryan Dahl

commit sha ed680552a24b7d4b936b7c16a63b46e0f24c0e60

fix: basic web worker message passing (#3893) Removes OP_HOST_GET_WORKER_LOADED, OP_HOST_POLL_WORKER, OP_HOST_RESUME_WORKER and ready/messageBuffer in cli/js/workers.ts.

view details

Yusuke Sakurai

commit sha 699d10bd9e5f19ad2f4ffb82225c86690a092c07

fix: make WebSocket.send() exclusive (#3885)

view details

Nayeem Rahman

commit sha 971391dbaf8f5273eb2f16edd22b0c6cf694be46

fix(std/path/globrex.ts): Use non-capturing groups in globrex() (#3898)

view details

Ryan Dahl

commit sha 5e8581ff4b7bd4a58f1e7d16544ca6498952b5b1

fix 015_duplicate_parallel_import (#3904)

view details

Seungho Kim

commit sha 522e856347b27b939dac92eb592ce64d86a96c03

fix(cli/flags.rs): Prevent providing --allow-env flag twice (#3906)

view details

Ryan Dahl

commit sha d9c84eb91eecdf1225091e4d2bea8e4c6a076504

Rename ThreadSafeGlobalState to GlobalState (#3907) simplify

view details

Yoshiya Hinosawa

commit sha 5a8ba3b114bbacf10f03abc0335a753585861c97

feat: add std/signal/mod.ts (#3913)

view details

Kitson Kelly

commit sha ea6179f7dce89416f1586ee18c2f437e68eabd38

Improve support for diagnostics from runtime compiler APIs (#3911) - Exports diagnostic items from `diagnostics.ts` which are missing at runtime. - Returns an array of diagnostics, instead of an object with a property of `items`. This is because of the way Rust deals with certain structures, and shouldn't be exposed in the APIs.

view details

Yusuke Sakurai

commit sha c2986891f6aac87cec98232735945af756e6643f

remove non-null assertion operator from std (part1) (#3900)

view details

Ryan Dahl

commit sha 98fc7db47d2ae1d817ac595d7f21138678515474

Fix deno types | head (#3910)

view details

Ryan Dahl

commit sha 99186dbaa25c5715103f6a0e0df9fae9488470b3

Remove conditionals from installer (#3909)

view details

Ryan Dahl

commit sha 724e39f13f2f144703ce00e156cacfc653d8e209

Enable thread pool for blocking ops (#3912)

view details

Brad Dunbar

commit sha d7edf393b6f1178bc91ec9113412f23f5dbd61e1

toAsyncIterable: Remove unnecessary EOF check (#3914) In denoland/deno#2335 a conditional was added to make sure toAsyncIterator didn't skip chunks because the reader returned data and EOF in a single call, fixing #2330. Later, in denoland/deno#2591, the `Reader` interface changed to `Promise<number | EOF>`. Since the reader no longer returns data and EOF in a single call, this conditional is not necessary. We can just return `{ done: true }` when we get `EOF`. Co-authored-by: Arun Srinivasan <rulfzid@gmail.com> Co-authored-by: Arun Srinivasan <rulfzid@gmail.com>

view details

Bert Belder

commit sha 25467aa7c7852c3695091a547ffac4857478c037

Add blanket impl for the 'Resource' trait (#3903)

view details

Bert Belder

commit sha f650c3edb3081ac0433b338c0c99418171656dd1

Refactor deno_core_http_bench and make it single-threaded (#3903)

view details

Kevin (Kun) "Kassimo" Qian

commit sha 619a24390ff15d5ea5e577a4d0391823f94e8592

install: add --force flag and remove yes/no prompt (#3917)

view details

Bartek Iwańczuk

commit sha cdba5ab6fc633606aaa6f95d0825832c3ac6fe5c

refactor: rename ThreadSafeState, use RefCell for mutable state (#3931) * rename ThreadSafeState to State * State stores InnerState wrapped in Rc and RefCell

view details

Yusuke Sakurai

commit sha a4bb8bab44cc778e6e455f19fdae9f3e4acc809b

remove non-null assertion operator from std (part2) (#3927)

view details

Bartek Iwańczuk

commit sha 1c0ffa138355c7eb90fd5d3c01f799245636bcc0

reenable server tests (#3928)

view details

push time in 9 days

issue closedmicrosoft/vscode

Ability to name workspace files '.code-workspace'

  • VSCode Version: 1.36.1
  • OS Version: Windows 10 1903

Steps to Reproduce:

  1. Save a workspace as '.code-workspace'.
  2. Try to open this workspace through either 'File > Open Workspace...' or code path/to/.code-workspace on a CLI.

No workspace will open, '.code-workspace' will be opened as a file in both cases.

It doesn't seem like VSCode is at all prepared for workspace files to be named like this. For example if you bring up the recents menu with Ctrl+R, the workspace name on the left is set to the part of the workspace file name before the extension. This menu would look strange if it included workspaces named as above. Some redesign would be needed if this is implemented.

closed time in 9 days

nayeemrmn

issue commentmicrosoft/vscode

Ability to name workspace files '.code-workspace'

@gjsjohnmurray Your solution has been working great for me, thanks! It's not ideal but I can live with it.

Since this isn't going to get 20 upvotes, I won't give the bot the satisfaction 😀

nayeemrmn

comment created time in 9 days

pull request commentdenoland/deno_website2

Redirect with explicit git references in the registry

Also redirecting to some canonical URL for any given module is essential to avoiding cache duplication, even if it was master by default.

nayeemrmn

comment created time in 9 days

pull request commentdenoland/deno_website2

Redirect with explicit git references in the registry

I think it's important for things like the manual to point to latest release. e.g. https://github.com/denoland/deno/issues/3987. Maybe this is less of a problem when there is stability but in general the latest release is the "correct" version.

nayeemrmn

comment created time in 9 days

push eventnayeemrmn/deno

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

Nayeem Rahman

commit sha 3563ab4c53689480ac47871fe928ae7c78a2fcc3

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

view details

push time in 10 days

delete branch nayeemrmn/deno

delete branch : cached-only-error

delete time in 10 days

PR opened denoland/deno

fix: Correctly determine a --cached-only error

https://gitter.im/denolife/Lobby?at=5e4375e219597421f3c33fef.

No longer get a --cached-only error message for any cache permission error. Also use NotFound for --cached-only errors.

+10 -8

0 comment

1 changed file

pr created time in 10 days

create barnchnayeemrmn/deno

branch : cached-only-error

created branch time in 10 days

issue commentdenoland/deno

deno install path/to/target_exe <URL>

Then users can do deno install $URL > /usr/local/bin/myprogram.sh

deno install takes some args after the URL to pass to the script at runtime. I don't think that exact syntax would always work. Maybe with a - in place of the executable name.

But there is an issue with making an "install" command ever do something like that... it seems like it needs to hit the fs.

nayeemrmn

comment created time in 11 days

Pull request review commentdenoland/deno

feat: Remove deno install's --dir, use shell-like specifier for exe

 fn get_installer_dir() -> Result<PathBuf, Error> {  pub fn install(   flags: DenoFlags,-  installation_dir: Option<PathBuf>,-  exec_name: &str,-  module_url: &str,+  exe_specifier: &str,+  module: &str,   args: Vec<String>,   force: bool, ) -> Result<(), Error> {-  let installation_dir = if let Some(dir) = installation_dir {-    dir.canonicalize()?-  } else {-    get_installer_dir()?+  let exe_path = PathBuf::from(exe_specifier);+  let installation_dir = match exe_path.parent() {+    Some(parent) => {

PathBuf::from("foo").parent() is "". PathBuf::from("/").parent() is None, the error case further below.

https://doc.rust-lang.org/std/path/struct.PathBuf.html#method.parent

nayeemrmn

comment created time in 11 days

pull request commentdenoland/deno

refactor: rewrite tests in std/ to use Deno.test

There are some references to std/testing/mod.ts in the manual.

bartlomieju

comment created time in 11 days

push eventnayeemrmn/deno

Nayeem Rahman

commit sha 87bc0de64d62ec60c60ad00ee709acc486d6f70f

Lint

view details

push time in 11 days

PR opened denoland/deno

feat: Remove deno install's --dir, use shell-like specifier for exe

Closes #3969.

+73 -88

0 comment

4 changed files

pr created time in 11 days

create barnchnayeemrmn/deno

branch : install-exe-dir

created branch time in 11 days

push eventnayeemrmn/deno

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

push time in 11 days

issue commentdenoland/deno

[bug] regression: `deno test` Cannot resolve module "<dir>/test"

@brandonkal Yeah, "smart" flag error messages are commonly suggested. Another one is where a perm error occurs and the relevant perm flag is detected in the script args. Could you open a new issue?

brandonkal

comment created time in 11 days

issue commentdenoland/deno

[Codeing Style] for variable description use /** */ comment style over //

Sorry, I wasn't sure what change is being proposed. I meant that the style guide shouldn't say that private fields require JSDoc since we're already using TS and most things are self-explanatory.

Of course I agree if there is a comment it should be written correctly... that much should be a given though, If not then maybe with small changes in wording.

saostad

comment created time in 11 days

issue openeddenoland/deno

deno install path/to/target_exe <URL>

I think the syntax deno install --dir /path/to target_exe is annoying if you just want to create a local alias. It can be improved by detecting a path separator in the exe name and treating it as a path in that case, just like when running executables in the shell.

deno install target_exe <URL> -> ~/.deno/bin/target_exe deno install ./target_exe <URL> -> ./target_exe deno install path/to/target_exe <URL> -> ./path/to/target_exe deno install /usr/local/bin/target_exe <URL> -> /usr/local/bin/target_exe

created time in 11 days

delete branch nayeemrmn/deno

delete branch : path-handling

delete time in 11 days

issue commentdsherret/dprint

typescript: Option for not wrapping lines at template string substitution

For complex expressions (arrays and objects),

input:

console.log(
  `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa${[1]}aaaaaa`
);

prettier:

console.log(
  `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa${[
    1
  ]}aaaaaa`
);

dprint:

console.log(
  `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa${
    [1]}aaaaaa`
);

Just wanted to point this out for completeness. I don't know if providing the options to completely match prettier is a priority.

nayeemrmn

comment created time in 12 days

issue openeddsherret/dprint

typescript: Option for not wrapping lines at template string substitution

Column limit of 80:

input:

console.log(
  `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa${123}aaaaaa`
);

prettier: (preserves)

dprint:

console.log(
  `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa${
    123}aaaaaa`
);

In other words, it might be desirable for simple expression substitutions to not be used as a wrapping point.

created time in 12 days

push eventnayeemrmn/deno

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

push time in 12 days

issue commentdenoland/deno

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

@kevinkassimo Is the intention that it gets run in your local main module and not by remote libs? That would mean https://deno.land/x/lodash_require/mod.ts is authored wrong.

frankhale

comment created time in 12 days

issue commentdenoland/deno

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

cc @kevinkassimo

It seems createRequire(root) needs a file:/// root, that obviously won't work for remote modules.

Also, https://deno.land/x/lodash_require/mod.ts's dependency https://deno.land/x/lodash_require/lodash-npm doesn't exist?

frankhale

comment created time in 12 days

Pull request review commentdenoland/deno

refactor: Use PathBuf for paths in flag parsing and whitelists

 fn get_matching_files(glob_paths: Vec<String>) -> Vec<PathBuf> { /// First argument supports globs, and if it is `None` /// then the current directory is recursively walked. pub fn format_files(-  maybe_files: Option<Vec<String>>,+  maybe_files: Option<Vec<PathBuf>>,   check: bool, ) -> Result<(), ErrBox> {   // TODO: improve glob to look for tsx?/jsx? files only-  let glob_paths = maybe_files.unwrap_or_else(|| vec!["**/*".to_string()]);+  let glob_paths = maybe_files.unwrap_or_else(|| vec![PathBuf::from("**/*")]);

As far as I've seen it's normal for glob patterns to be stored as "paths". They have distinctly separated segments (since any special syntax is limited to a segment), absoluteness, parent paths, it's useful to join() them, normalize() them, etc. Are you sure this is a problem?

nayeemrmn

comment created time in 12 days

push eventnayeemrmn/deno

Nayeem Rahman

commit sha 3f6db61a59b5d4f69d2453df1c48b61d6663c203

Lint

view details

push time in 12 days

PR opened denoland/deno

refactor: Use PathBuf for paths in flag parsing and whitelists

Follows from #3714.

+69 -67

0 comment

7 changed files

pr created time in 12 days

push eventnayeemrmn/deno

Nayeem Rahman

commit sha 45dc1564384db2adf3115fd8b22b2ff4d909d48e

Use PathBuf for read/write whitelists

view details

push time in 12 days

pull request commentdenoland/deno

Broken link

This is incorrect. It will be fixed in https://github.com/denoland/deno/pull/3863/files#diff-478b888629f0f5d205e8cffec562d0b9.

papaponmx

comment created time in 12 days

push eventnayeemrmn/deno

Nayeem Rahman

commit sha b2565f1e2d0f7b1f55ccb8fa27cba57b2a13a5ba

Use PathBuf for DenoSubcommand::Format's files

view details

Nayeem Rahman

commit sha 2075fb4bf779069694174fecc6f8f1574ee6d2c2

Use PathBuf for DenoSubcommand::Install's dir

view details

push time in 12 days

push eventnayeemrmn/deno

Nayeem Rahman

commit sha eb5ce2483a0476003a2ce0c05986e0748fb540ff

Use PathBuf for DenoSubcommand::Bundle's out_file

view details

push time in 12 days

more