push eventry/deno_std

Jimmy Cao

commit sha 0431b2f92fba69582f4412bfe9ad138838f46275

toml: remove parseFile (#361)

view details

Ryan Dahl

commit sha 51813136352de516f858691422a63ce1658ce12d

Bump CI to v0.3.10

view details

push time in 3 hours

PR opened denoland/deno_std

Bump CI to v0.3.10
+8 -9

0 comment

4 changed files

pr created time in 3 hours

create barnchry/deno_std

branch : bump4

created branch time in 3 hours

push eventaxetroy/deno_std

Ryan Dahl

commit sha df031ef577f5d779c149da8de456a748f5f4928e

trigger

view details

push time in 3 hours

push eventdenoland/deno_std

Jimmy Cao

commit sha 0431b2f92fba69582f4412bfe9ad138838f46275

toml: remove parseFile (#361)

view details

push time in 3 hours

PR merged denoland/deno_std

Remove parseFile from toml

Feel free to close if this is not the right direction

+19 -18

2 comments

3 changed files

jcao219

pr closed time in 3 hours

Pull request review commentdenoland/deno_std

Make toml parseFile async

 class Parser {   _parseDeclarationName(declaration: string): string[] {     const out = [];     let acc = [];-    let inLitteral = false;+    let inLiteral = false;     for (let i = 0; i < declaration.length; i++) {       const c = declaration[i];       switch (c) {         case ".":-          if (!inLitteral) {+          if (!inLiteral) {             out.push(acc.join(""));             acc = [];           } else {             acc.push(c);           }           break;         case `"`:-          if (inLitteral) {-            inLitteral = false;+          if (inLiteral) {+            inLiteral = false;           } else {-            inLitteral = true;+            inLiteral = true;

Ah - thanks!

jcao219

comment created time in 4 hours

Pull request review commentdenoland/deno_std

Make toml parseFile async

 export function parse(tomlString: string): object {   return new Parser(tomlString).parse(); } -export function parseFile(filePath: string): object {+export function parseFileSync(filePath: string): object {   if (!existsSync(filePath)) {     throw new Error("File not found");   }   const strFile = readFileStrSync(filePath);   return parse(strFile); }++export async function parseFile(filePath: string): Promise<object> {+  if (!(await exists(filePath))) {+    throw new Error("File not found");+  }+  const strFile = await readFileStr(filePath);+  return parse(strFile);+}

Actually I'd rather that we remove the parseFileSync and leave it up to the caller to load the data. The TOML module should only deal with parsing, not with I/O.

Would you mind a revised PR that removes parseFileSync (or just moves it to the test module - if that is needed there)?

jcao219

comment created time in 4 hours

push eventdenoland/deno

Ryan Dahl

commit sha 40d8ef1ec9f5e50017c41af8bf3b9f8454f97544

v0.3.10

view details

push time in 6 hours

PR merged denoland/deno

v0.3.10

<!-- Before submitting a PR read https://deno.land/manual.html#contributing -->

+12 -5

0 comment

4 changed files

ry

pr closed time in 6 hours

PR opened denoland/deno

Reviewers
v0.3.10

<!-- Before submitting a PR read https://deno.land/manual.html#contributing -->

+12 -5

0 comment

4 changed files

pr created time in 7 hours

create barnchry/deno

branch : bump-v0.3.10

created branch time in 7 hours

push eventdenoland/deno

Bartek Iwańczuk

commit sha aa85a4d2884e7600e0f64c457e20cd7f02b811c6

Rename CLI flags to subcommands (#2212)

view details

push time in 7 hours

PR merged denoland/deno

Rename CLI flags to subcommands

This PR changes CLI flags --help and --version to subcommands.

  • Changes to deno --version: It has been renamed to deno version subcommand, so effectively you no longer can do deno --version some_file.ts
$ deno version
deno: 0.3.9
v8: 7.4.238
typescript: 3.4.1
  • Changes to deno --help: Deno still has deno --help and deno -h. Additionally a new subcommand deno help is present which can be used two-fold:
$ deno help // works just like deno -h
deno

USAGE:
    deno [FLAGS] [OPTIONS] [SUBCOMMAND]
...

$ deno help <subcommand> // display help for subcommand

$ deno help eval
Eval script

USAGE:
    deno eval <code>

FLAGS:
    -h, --help    Prints help information

ARGS:
    <code>

@ry if #2189 is a go, I'll add it to this PR as well

+6 -9

1 comment

2 changed files

bartlomieju

pr closed time in 7 hours

push eventbartlomieju/deno

Ryan Dahl

commit sha bc3646a5e4b66730b7836865e9d2b0c351911d0a

fmt

view details

push time in 7 hours

issue closeddenoland/deno

benchmarks: Update nodeJs

As NodeJs 12 has been released it would be nice to have it in the benchmarks.

ref: https://nodejs.org/en/blog/release/v12.0.0/

closed time in 7 hours

zekth

issue commentdenoland/deno

benchmarks: Update nodeJs

Yes. And note that node_tcp with v12 has overtaken deno_core_single ... we have more work to do.

zekth

comment created time in 7 hours

pull request commentdenoland/deno

compile lib.deno_runtime.d.ts into executable

I wasn’t able to come up with a test for this issue... I think the only think we could do is scan the executable for unwanted paths. But I believe #2208 is fixed now.

ry

comment created time in 7 hours

push eventdenoland/deno

Ryan Dahl

commit sha b426ecce80a968ae77cde9e242a9014bff371f79

compile lib.deno_runtime.d.ts into executable (#2209)

view details

push time in 7 hours

PR merged denoland/deno

compile lib.deno_runtime.d.ts into executable

Fixes #2208

+1 -4

0 comment

1 changed file

ry

pr closed time in 7 hours

issue closeddenoland/deno

"deno types" broken in v0.3.9

despite this integration test: https://github.com/denoland/deno/blob/master/tests/types.test

./tools/build.py && ./tools/integration_tests.py --filter types.test

passes

closed time in 7 hours

ry

pull request commentdenoland/deno

Rename CLI flags to subcommands

Let’s do “deno run” in a different PR. That has a higher likelihood of breaking something.

bartlomieju

comment created time in 7 hours

push eventdenoland/deno

Bartek Iwańczuk

commit sha b7d8a0c6f6e90a65243264faa3f702d1a9471090

Rename deno prefetch to deno fetch (#2210)

view details

push time in 8 hours

PR merged denoland/deno

Rename deno prefetch to deno fetch

Closes #2206

+14 -14

2 comments

5 changed files

bartlomieju

pr closed time in 8 hours

issue closeddenoland/deno

Rename "deno prefetch" to "deno fetch"

cc @bartlomieju

closed time in 8 hours

ry

issue commentdenoland/deno

Rename "deno prefetch" to "deno fetch"

' i'd like to reserve 'deno compile' for bundling into an executable

ry

comment created time in 8 hours

pull request commentdenoland/deno

Rename deno prefetch to deno fetch

@bartlomieju separate PR please

bartlomieju

comment created time in 8 hours

PR opened denoland/deno

Reviewers
Use alt logos on benchmarks and manual page

<!-- Before submitting a PR read https://deno.land/manual.html#contributing -->

+2 -2

0 comment

2 changed files

pr created time in 8 hours

create barnchry/deno

branch : use_logos

created branch time in 8 hours

Pull request review commentdenoland/deno

Rename deno prefetch to deno fetch

 def prefetch_test(deno_exe):     deno_dir = mkdtemp()     try:         t = os.path.join(tests_path, "006_url_imports.ts")-        output = run_output([deno_exe, "prefetch", t],+        output = run_output([deno_exe, "fetch", t],

Could you also rename the file tools/prefetch_test.py to tools/fetch_test.py?

bartlomieju

comment created time in 8 hours

push eventdenoland/deno

David Stone

commit sha 098d6fffabb85d102b3662dacf3173c47e551d34

Fix anchor links and add spinner to the benchmarks page (#2205)

view details

push time in 9 hours

PR merged denoland/deno

Fix anchor links and add spinner to the benchmarks page

Issue: https://github.com/denoland/deno/issues/2203

+52 -3

3 comments

3 changed files

davidjamesstone

pr closed time in 9 hours

PR opened denoland/deno

compile lib.deno_runtime.d.ts into executable

Fixes #2208

+1 -4

0 comment

1 changed file

pr created time in 9 hours

create barnchry/deno

branch : fix_types

created branch time in 9 hours

issue openeddenoland/deno

"deno types" broken in v0.3.9

despite this integration test: https://github.com/denoland/deno/blob/master/tests/types.test

created time in 9 hours

issue commentdenoland/deno

Benchmark links do not work

If you reload the page once (and wait a minute) it will work. Terrible UX.

davidjamesstone

comment created time in 9 hours

issue closeddenoland/deno_install

install.sh not found

Seems that the url changed:

curl -fsSL https://deno.land/x/install/install.sh | sh -s v0.3.9
-#O#- #   #                                                                           
curl: (22) The requested URL returned error: 404 Not Found

closed time in 9 hours

rodrigopandini

issue commentdenoland/deno_install

install.sh not found

linux build died but i restarted it and it should work now.

rodrigopandini

comment created time in 9 hours

issue commentdenoland/deno

feature-request: Expose the same API in node.js

@kevinkassimo Ok sure. Does anyone want to start a repo outside of denoland for this? We can point people to it in the manual as the semi-official binding layer. I feel like things might move faster if I'm not in the loop. If it works out and is useful we can consider moving it into deno_std later.

WillAvudim

comment created time in 9 hours

issue closeddenoland/deno

Is deno going to support node?

Will node programs be able to run via deno? Will there be an adapter? I think that's pretty important if deno adaption is to increase.

closed time in 9 hours

ffMathy

issue commentdenoland/deno

Is deno going to support node?

duplicate of https://github.com/denoland/deno/issues/2184

ffMathy

comment created time in 9 hours

Pull request review commentdenoland/deno_std

http: Cookie extend

 // Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.-import { ServerRequest } from "./server.ts";+import { ServerRequest, Response } from "./server.ts";+import { assert } from "../testing/asserts.ts";+import { pad } from "../strings/pad.ts";++const SETCOOKIE = "Set-Cookie";+const COOKIE = "Cookie";  export interface Cookie {   [key: string]: string; } +export interface CookieValue {+  name: string;+  value: string;+}++export interface CookieOptions {+  Expires?: Date;+  MaxAge?: number;+  Domain?: string;+  Path?: string;+  Secure?: boolean;+  HttpOnly?: boolean;+  SameSite?: SameSite;+}++export type SameSite = "Strict" | "Lax";++function cookieStringFormat(cookie: CookieValue, opt: CookieOptions): string {+  function dtPad(v: string, lPad: number = 2): string {+    return pad(v, lPad, { char: "0" });+  }++  const out: string[] = [];+  out.push(`${cookie.name}=${cookie.value}`);++  // Fallback for invalid Set-Cookie+  // ref: https://tools.ietf.org/html/draft-ietf-httpbis-cookie-prefixes-00#section-3.1+  if (cookie.name.startsWith("__Secure")) {+    opt.Secure = true;+  }+  if (cookie.name.startsWith("__Host")) {+    opt.Path = "/";+    opt.Secure = true;+    delete opt.Domain;+  }++  if (opt.Secure) {+    out.push("Secure");+  }+  if (opt.HttpOnly) {+    out.push("HttpOnly");+  }+  if (Number.isInteger(opt.MaxAge)) {+    assert(opt.MaxAge > 0, "Max-Age must be an integer superior to 0");+    out.push(`Max-Age=${opt.MaxAge}`);+  }+  if (opt.Domain) {+    out.push(`Domain=${opt.Domain}`);+  }+  if (opt.SameSite) {+    out.push(`SameSite=${opt.SameSite}`);+  }+  if (opt.Path) {+    out.push(`Path=${opt.Path}`);+  }+  if (opt.Expires) {+    let dateString = "";+    let d = dtPad(opt.Expires.getUTCDate().toString());+    const h = dtPad(opt.Expires.getUTCHours().toString());+    const min = dtPad(opt.Expires.getUTCMinutes().toString());+    const s = dtPad(opt.Expires.getUTCSeconds().toString());+    const y = opt.Expires.getUTCFullYear();+    // See Date format: https://tools.ietf.org/html/rfc7231#section-7.1.1.1+    const days = ["Sun", "Mon", "Tue", "Wed", "Thus", "Fri", "Sat"];+    const months = [+      "Jan",+      "Feb",+      "Mar",+      "May",+      "Jun",+      "Jul",+      "Aug",+      "Sep",+      "Oct",+      "Nov",+      "Dec"+    ];+    dateString += `${days[opt.Expires.getDay()]}, ${d} ${+      months[opt.Expires.getUTCMonth()]+    } ${y} ${h}:${min}:${s} GMT`;+    out.push(`Expires=${dateString}`);+  }+  return out.join("; ");+}+ /* Parse the cookie of the Server Request */ export function getCookie(rq: ServerRequest): Cookie {-  if (rq.headers.has("Cookie")) {+  if (rq.headers.has(COOKIE)) {     const out: Cookie = {};-    const c = rq.headers.get("Cookie").split(";");+    const c = rq.headers.get(COOKIE).split(";");

I don't think this constant makes thing easier or more maintainable.

zekth

comment created time in 9 hours

push eventzekth/deno_std

Ryan Dahl

commit sha 89de70039a720ed227729ea56fd7d9319ef77706

trigger

view details

push time in 10 hours

issue openeddenoland/deno

Rename "deno prefetch" to "deno fetch"

created time in 10 hours

pull request commentdenoland/deno

dialTLS - WIP - Feedback and lifetime question

@jorsi Nice start! I've pushed a few commits - I ran ./tools/format.py and converted the address variable into an owned String so it could be passed to the callbacks (which need ownerships of variables they capture, since these callbacks are executed in the thread pool)

There's a test web server that is running during the tests at tools/http_server.py but it doesn't support HTTPS. Ideally we could modify that to also host a HTTPS server for testing.

jorsi

comment created time in 10 hours

push eventjorsi/deno

Ryan Dahl

commit sha d9ca7edb5faa4656152ad2948324f91d48d56b81

fmt

view details

Ryan Dahl

commit sha 9c9640c6f57d31f2e32a7d1a83f03e15ecee8036

fix build

view details

push time in 10 hours

push eventdenoland/deno

迷渡

commit sha 8578ed4e7fcbddcbfb87368529f629ce1aebfebb

`URLSearchParams` deleting appended multiple (#2201)

view details

push time in 12 hours

PR merged denoland/deno

`URLSearchParams` deleting appended multiple

get should method should return string


PS: I build a website for Deno's Web-Platform-Tests https://deno.dev/wpt/

+16 -1

1 comment

2 changed files

justjavac

pr closed time in 12 hours

pull request commentdenoland/deno

`URLSearchParams` deleting appended multiple

@justjavac Wow - Nice site!

justjavac

comment created time in 12 hours

PR opened denoland/deno

v0.3.9

<!-- Before submitting a PR read https://deno.land/manual.html#contributing -->

+28 -5

0 comment

4 changed files

pr created time in 12 hours

create barnchry/deno

branch : bump-v0.3.9

created branch time in 12 hours

push eventdenoland/deno

Ryan Dahl

commit sha 7fc9d7d62a864d1e6af0e77291a105726f73279c

core: Add test for snapshotting from Rust (#2197)

view details

push time in a day

PR merged denoland/deno

Add rust test for snapshotting
+78 -35

0 comment

5 changed files

ry

pr closed time in a day

push eventry/deno

Ryan Dahl

commit sha 6bece270b2719a66b564a411fc28c3b32ae0b105

Upgrade CI to Node v12 (#2193)

view details

Ryan Dahl

commit sha f6948235079b1d6050a2d3c98891844cb97595f5

Fix symlinkSyncNotImplemented (#2198)

view details

Ryan Dahl

commit sha e2d38b85f4cbbd1f112479348d6752e0aa6c390b

core: Add test for snapshotting from Rust

view details

push time in a day

push eventdenoland/deno

Ryan Dahl

commit sha f6948235079b1d6050a2d3c98891844cb97595f5

Fix symlinkSyncNotImplemented (#2198)

view details

push time in a day

PR merged denoland/deno

Fix symlinkSyncNotImplemented

<!-- Before submitting a PR read https://deno.land/manual.html#contributing -->

+4 -1

0 comment

1 changed file

ry

pr closed time in a day

push eventdenoland/deno_std

Ryan Dahl

commit sha 4f6a070e1c7cbe7aad281bb8dc0b6435239f4cdc

Bump CI to v0.3.8 (#357)

view details

push time in a day

PR merged denoland/deno_std

Bump CI to v0.3.8
+1 -1

0 comment

1 changed file

ry

pr closed time in a day

push eventdenoland/deno

Ryan Dahl

commit sha 6bece270b2719a66b564a411fc28c3b32ae0b105

Upgrade CI to Node v12 (#2193)

view details

push time in a day

PR merged denoland/deno

Upgrade CI to Node v12

<!-- Before submitting a PR read https://deno.land/manual.html#contributing -->

+3 -2

0 comment

2 changed files

ry

pr closed time in a day

PR opened denoland/deno

Fix symlinkSyncNotImplemented

<!-- Before submitting a PR read https://deno.land/manual.html#contributing -->

+4 -1

0 comment

1 changed file

pr created time in a day

create barnchry/deno

branch : symlinkSyncNotImplemented

created branch time in a day

push eventry/deno

Ryan Dahl

commit sha 30da75c72c67d21806717e7253c4603847066d41

appveyor doesn't have node12 yet

view details

push time in a day

push eventry/deno

Ryan Dahl

commit sha 15c523b15cec2c0386462bfa8c2a4100d78a61e1

lint

view details

push time in a day

push eventry/deno

Ryan Dahl

commit sha 8da4538a54ab1a90b0e73c33ada8780c27961c2a

trigger

view details

push time in a day

PR opened denoland/deno

Snapshots2

<!-- Before submitting a PR read https://deno.land/manual.html#contributing -->

+77 -35

0 comment

5 changed files

pr created time in a day

create barnchry/deno

branch : snapshots2

created branch time in a day

issue commentdenoland/deno

Provide JS API to dependency information

Yeah that works.. My only concern is that the ordering of the imports would be lost - but that might be recoverable from the object anyway(?) also the ordering of the imports is not very important info...

ry

comment created time in a day

PR opened denoland/deno

Upgrade CI to Node v12

<!-- Before submitting a PR read https://deno.land/manual.html#contributing -->

+3 -3

0 comment

2 changed files

pr created time in 2 days

create barnchry/deno

branch : node12

created branch time in 2 days

delete branch denoland/deno_std

delete branch : upgrade

delete time in 2 days

push eventry/deno_std

Ryan Dahl

commit sha aad8b69fdd842e5be786727b64eda73f9371280b

trigger

view details

push time in 2 days

push eventdenoland/deno_std

Ryan Dahl

commit sha aad8b69fdd842e5be786727b64eda73f9371280b

trigger

view details

push time in 2 days

push eventdenoland/deno_std

Vincent LE GOFF

commit sha 4543b563a9a01c8c168aafcbfd9d4634effba7fc

Eslint fixes (#356) Make warnings fail

view details

push time in 2 days

PR merged denoland/deno_std

Eslint fixes

Fixes all the eslint warnings raised by Deno 0.3.8

+949 -807

3 comments

88 changed files

zekth

pr closed time in 2 days

push eventdenoland/deno_std

Vincent LE GOFF

commit sha 1d8544788648b4c571d10b9a55cc3670a1cbf69c

http : Add cookie module (#338)

view details

push time in 2 days

PR merged denoland/deno_std

http : Add cookie module

cookie is now part of ServerRequest and can be accessed by ServerRequest.cookie Resolve https://github.com/denoland/deno_std/issues/334

+47 -0

7 comments

3 changed files

zekth

pr closed time in 2 days

issue closeddenoland/deno_std

discuss: cookie

node use cookie

req.headers.cookie && req.headers.cookie.split(';').forEach(function (Cookie) { var parts = Cookie.split('='); Cookies[parts[0].trim()] = (parts[1] || '').trim(); });

How does deno read the cookie ?

closed time in 2 days

runnerSnail

push eventzekth/deno_std

Ryan Dahl

commit sha e46d0bd3c5c5516d8ec7515bb69a1fce91702451

trigger

view details

push time in 2 days

push eventzekth/deno_std

Ryan Dahl

commit sha e5ddd6dfd74bd17d2c75decf3ba951126727e822

trigger

view details

push time in 2 days

create barnchdenoland/deno_std

branch : upgrade

created branch time in 2 days

PR opened denoland/deno_std

Bump CI to v0.3.8
+1 -1

0 comment

1 changed file

pr created time in 2 days

create barnchry/deno_std

branch : upgrade

created branch time in 2 days

issue commentdenoland/

feature-request: Expose the same API in node.js

@kevinkassimo I'm not opposed to doing it in a separate repo - but why do they need to different kind of issue trackers?

WillAvudim

comment created time in 2 days

issue commentdenoland/

feature-request: Expose the same API in node.js

@kevinkassimo I'm not opposed to doing it in a separate repo - but why do they need to different kind of issue trackers?

WillAvudim

comment created time in 2 days

pull request commentdenoland/deno_std

http/server : add cookie property on ServerRequest

Ok, but do we still keep the cache handling of the cookies in the ServerRequest class?

No. I think it's fine to keep this in the external modules. It's an extra import, but frameworks can make that easier for people. Many users of http/server.ts will not need cookies, if we can keep some functionality out we should.

zekth

comment created time in 2 days

pull request commentdenoland/deno_std

http/server : add cookie property on ServerRequest

@zekth Ideally just a function.

import { getCookies } from "https://deno.land/std/http/cookies.ts"

getCookies(request);

Something like this?

zekth

comment created time in 2 days

pull request commentdenoland/deno_std

http/server : add cookie property on ServerRequest

Can this moved into a separate module? I’d rather http/server.ts stay lean

zekth

comment created time in 2 days

IssuesEvent

issue commentdenoland/deno

Refactor stringified Perm from unit test

@zekth @hayd I mean - the scheme of using command-line arguments to filter the tests isn't necessarily necessary. What if we start js/unit_tests.ts with full permissions and use revokePermission()? I'm not sure that works - but I'm suggesting that we think outside the box, and refactor this entire system, rather than bike shedding on how to represent the test filter in a string.

A helpful first step towards this (and to better understand the problem) would be to port tools/unit_tests.py to Deno.

zekth

comment created time in 2 days

push eventdenoland/deno

Ryan Dahl

commit sha d68b44b6b2fad6c321aa01a039030bb98c5be88d

core: make Isolate concrete, remove Dispatch trait (#2183) Op dispatch is now dynamically dispatched, so slightly less efficient. The immeasurable perf hit is a reasonable trade for the API simplicity that is gained here.

view details

push time in 2 days

PR merged denoland/deno

core: Add struct Config and make Isolate not generic

Dispatch is now dynamic dispatch, slightly less efficent. The immeasurable perf hit is a reasonable trade the API simplicity that is gained here.

<!-- Before submitting a PR read https://deno.land/manual.html#contributing -->

+191 -195

0 comment

5 changed files

ry

pr closed time in 2 days

Pull request review commentdenoland/deno

core: Add struct Config and make Isolate not generic

 pub enum StartupData<'a> {   None, } -/// Defines the how Deno.core.dispatch() acts.-pub trait Dispatch {+#[derive(Default)]+pub struct Config {+  dispatch: Option<Arc<Fn(&[u8], deno_buf) -> (bool, Box<Op>) + Send + Sync>>,

If the dispatcher isn't set in Config currently Deno.core.dispatch() causes a panic. But I think it would be cool, in the future, to have Deno.core.dispatch() throw a JS error instead.

ry

comment created time in 2 days

Pull request review commentdenoland/deno

core: Add struct Config and make Isolate not generic

 pub enum StartupData<'a> {   None, } -/// Defines the how Deno.core.dispatch() acts.-pub trait Dispatch {+#[derive(Default)]+pub struct Config {+  dispatch: Option<Arc<Fn(&[u8], deno_buf) -> (bool, Box<Op>) + Send + Sync>>,

I think there are many cases where you would want to use the deno crate but not want to implement ops.. For example if you wanted to make a very simple d8 style program. It's also nice to have small examples of using the isolate without having to also implement dispatch.

ry

comment created time in 2 days

Pull request review commentdenoland/deno

core: Add struct Config and make Isolate not generic

 pub enum StartupData<'a> {   None, } -/// Defines the how Deno.core.dispatch() acts.-pub trait Dispatch {+#[derive(Default)]+pub struct Config {+  dispatch: Option<Arc<Fn(&[u8], deno_buf) -> (bool, Box<Op>) + Send + Sync>>,+}++impl Config {+  /// Defines the how Deno.core.dispatch() acts.   /// Called whenever Deno.core.dispatch() is called in JavaScript. zero_copy_buf   /// corresponds to the second argument of Deno.core.dispatch().-  fn dispatch(-    &mut self,-    control: &[u8],-    zero_copy_buf: deno_buf,-  ) -> (bool, Box<Op>);+  pub fn dispatch<F>(&mut self, f: F)+  where+    F: Fn(&[u8], deno_buf) -> (bool, Box<Op>) + Send + Sync + 'static,

F is called on random threads, so it needs to be thread safe

ry

comment created time in 2 days

push eventdenoland/deno_std

Axetroy

commit sha 0a6180016383b9d527bb96556ae0bcdabe5161eb

fs utils getFileInfoType() return undefined when not found (#341)

view details

push time in 2 days

PR merged denoland/deno_std

fs utils getFileInfoType() return undefined when not found

make it same with Deno.symlink(). It `s my mistake.

Possible value:

  • 'dir'
  • 'file'
  • 'symlink'
  • ~null~ undefined
/** Creates `newname` as a symbolic link to `oldname`. The type argument can be
 * set to `dir` or `file` and is only available on Windows (ignored on other
 * platforms).
 *
 *       await Deno.symlink("old/name", "new/name");
 */
export function symlink(
  oldname: string,
  newname: string,
  type?: string
): Promise<void>;
+20 -20

0 comment

3 changed files

axetroy

pr closed time in 2 days

issue openeddenoland/deno

Add run subcommand: "deno run script.ts" instead of "deno script.ts"

It's becoming clear that Deno is going to have several distinct tools as subcommands, like "info" and "prefetch" each with (potentially) their own options. I suggest we not have a default command, as it introduces complexity at the flag parsing layer and makes it unclear what flags belong to "run" vs other subcommands.

What do people think? It's slightly less ergonomic, but I think we can address that in other ways.

cc @bartlomieju

created time in 2 days

push eventdenoland/deno

Ryan Dahl

commit sha 675919e915650cd1c88a1cdb4f67310133b8a05e

Use tokio_threadpool's new panic_handler (#2188)

view details

push time in 2 days

PR merged denoland/deno

Use tokio_threadpool's new panic_handler

Fixes https://github.com/denoland/deno/issues/1311

Ref https://github.com/tokio-rs/tokio/pull/1052 Ref https://github.com/tokio-rs/tokio/pull/1055

+19 -21

0 comment

2 changed files

ry

pr closed time in 2 days

more