profile
viewpoint

issue openeddenoland/deno

upgrade sscache to 0.2.9

https://github.com/mozilla/sccache/releases/tag/0.2.9

created time in 4 hours

push eventdenoland/registry

Maxwell DeMers

commit sha cbcd6c729f675702617aea4b2ade697259f9ba0f

Add deno_init to database.json (#96)

view details

push time in 4 hours

PR merged denoland/registry

Add deno_init to database.json

Add new script to set up a basic deno repo. Meant to be installed with deno_isntaller. Will add to the script as things progress.

+4 -0

6 comments

1 changed file

maxuuell

pr closed time in 4 hours

push eventdenoland/registry

Axetroy

commit sha d5099a3eaba50d5f98f7a444ad281d094384d28e

fix invalid modules (#111)

view details

push time in 4 hours

PR merged denoland/registry

fix invalid module.
+9 -9

0 comment

1 changed file

axetroy

pr closed time in 4 hours

pull request commentdenoland/deno

Changes to Windows `build from source` Steps

Any idea what's wrong with 2019?

riginding

comment created time in 4 hours

pull request commentdenoland/deno

Changes to Windows `build from source` Steps

Could you run tools/format.py ?

riginding

comment created time in 5 hours

issue closeddenoland/deno

Formatting issues when tsconfig file has unsupported compiler options

The warning message "Unsupported compiler options ..." is written in yellow/gold but at the same line as the "Compiling" notice

$ echo $BASH_VERSION 
5.0.2(1)-release
$ deno --config tsconfig.json examples/db/app.ts 
[0/1] Compiling file:///Users/user/Batcave/deno/alosaur/examples/db/app.tsUnsupported compiler options in "/Users/user/Batcave/deno/alosaur/tsconfig.json"
  The following options were ignored:
    baseUrl, moduleResolution, noEmit, pretty

closed time in 5 hours

KluVerKamp

Pull request review commentdenoland/deno

fix: ModuleSpecifier resolution algo from cwd

 impl PartialEq<String> for ModuleSpecifier {     &self.to_string() == other   } }++#[cfg(test)]+mod tests {+  use super::*;++  #[test]+  fn test_absolute() {+    if cfg!(target_os = "windows") {+      assert_eq!(+        ModuleSpecifier::resolve_from_cwd(r"C:/deno/tests/006_url_imports.ts")+          .unwrap()+          .to_string(),+        "file:///C:/deno/tests/006_url_imports.ts",+      );+      assert_eq!(+        ModuleSpecifier::resolve_from_cwd(r"C:\deno\tests\006_url_imports.ts")+          .unwrap()+          .to_string(),+        "file:///C:/deno/tests/006_url_imports.ts",+      );+    } else {+      assert_eq!(+        ModuleSpecifier::resolve_from_cwd("/deno/tests/006_url_imports.ts")+          .unwrap()+          .to_string(),+        "file:///deno/tests/006_url_imports.ts",+      );+    }+  }++  #[test]+  fn test_relative() {+    // Assuming cwd is the deno repo root.+    let cwd = std::env::current_dir().unwrap();+    let cwd_string = String::from(cwd.to_str().unwrap()) + "/";+    let expected_url = format!(+      "file://{}{}",+      cwd_string.as_str(),+      "tests/006_url_imports.ts"+    ).replace("\\", "/");++    if cfg!(target_os = "windows") {+      assert_eq!(+        ModuleSpecifier::resolve_from_cwd(r"/tests/006_url_imports.ts")

"/foo/bar" is relative to the current drive, is what @piscisaureus meant.

bartlomieju

comment created time in 10 hours

Pull request review commentdenoland/deno

fix: ModuleSpecifier resolution algo from cwd

 impl PartialEq<String> for ModuleSpecifier {     &self.to_string() == other   } }++#[cfg(test)]+mod tests {+  use super::*;++  #[test]+  fn test_absolute() {+    if cfg!(target_os = "windows") {+      assert_eq!(+        ModuleSpecifier::resolve_from_cwd(r"C:/deno/tests/006_url_imports.ts")+          .unwrap()+          .to_string(),+        "file:///C:/deno/tests/006_url_imports.ts",+      );+      assert_eq!(+        ModuleSpecifier::resolve_from_cwd(r"C:\deno\tests\006_url_imports.ts")+          .unwrap()+          .to_string(),+        "file:///C:/deno/tests/006_url_imports.ts",+      );+    } else {+      assert_eq!(+        ModuleSpecifier::resolve_from_cwd("/deno/tests/006_url_imports.ts")+          .unwrap()+          .to_string(),+        "file:///deno/tests/006_url_imports.ts",+      );+    }+  }++  #[test]+  fn test_relative() {+    // Assuming cwd is the deno repo root.+    let cwd = std::env::current_dir().unwrap();+    let cwd_string = String::from(cwd.to_str().unwrap()) + "/";+    let expected_url = format!(+      "file://{}{}",+      cwd_string.as_str(),+      "tests/006_url_imports.ts"+    ).replace("\\", "/");++    if cfg!(target_os = "windows") {+      assert_eq!(+        ModuleSpecifier::resolve_from_cwd(r"/tests/006_url_imports.ts")

Should this start with ./ instead of just / ?

bartlomieju

comment created time in 13 hours

push eventdenoland/deno

Bartek Iwańczuk

commit sha 6906a2f75e428221f8b9bfa28b2c6821eb3ebe30

feat: deno completions command (#2577)

view details

push time in 13 hours

PR merged denoland/deno

feat: deno completions command
+83 -16

3 comments

3 changed files

bartlomieju

pr closed time in 13 hours

push eventdenoland/deno_install

Ryan Dahl

commit sha 45f30e6ce6f06a5a6f629ac18f21066ce862e1f7

Update homebrew, to fix error (#64) See https://travis-ci.com/denoland/deno_install/jobs/210669310

view details

push time in 13 hours

PR merged denoland/deno_install

Update homebrew, to fix error

See https://travis-ci.com/denoland/deno_install/jobs/210669310

+1 -0

0 comment

1 changed file

ry

pr closed time in 13 hours

push eventdenoland/deno_std

Ryan Dahl

commit sha 53949c1eb6aedb68af6a9301cd49d28db204b885

ci: bump deno to v0.10.0

view details

push time in 13 hours

PR merged denoland/deno_std

ci: bump deno to v0.10.0

merge on approval

+1 -1

0 comment

1 changed file

ry

pr closed time in 13 hours

pull request commentdenoland/deno

feat: deno completions command

Can you apply these adjustments:

commit a7a4b5672359d1349bd66d45bdb1fc40d0eddb73
Author: Ryan Dahl <ry@tinyclouds.org>
Date:   Tue Jun 25 17:56:49 2019 -0400

    adjust

diff --git a/cli/flags.rs b/cli/flags.rs
index e7fb83ca..f7444f8d 100644
--- a/cli/flags.rs
+++ b/cli/flags.rs
@@ -392,12 +392,12 @@ To change installation directory use -d/--dir flag
           AppSettings::DisableVersion,
         ]).about("Generate shell completions")
         .long_about(
-"Generate and output completion script for shell of choice to standard output.
+"Output shell completion script to standard output.
 
-  deno completions bash > /usr/local/etc/bash_completion.d/deno.bash
+Example:
 
-  source /usr/local/etc/bash_completion.d/deno.bash
-        ")
+  deno completions bash > /usr/local/etc/bash_completion.d/deno.bash
+  source /usr/local/etc/bash_completion.d/deno.bash")
         .arg(
           Arg::with_name("shell")
           .possible_values(&Shell::variants())
diff --git a/third_party b/third_party
index c29d758c..62b961e7 160000
--- a/third_party
+++ b/third_party
@@ -1 +1 @@
-Subproject commit c29d758cd2ca6fd275f141239d59560157ac4535
+Subproject commit 62b961e7d4c40114ffafd728875689918c372e47
diff --git a/website/manual.md b/website/manual.md
index 005a7a57..58f13f42 100644
--- a/website/manual.md
+++ b/website/manual.md
@@ -650,11 +650,11 @@ boolean constant `Deno.noColor`.
 
 ### Shell completion
 
-You can generate completion script for your shell using
-`deno completions <shell>` command. Command outputs to standard output so you
-should redirect it to an appropriate file.
+You can generate completion script for your shell using the
+`deno completions <shell>` command. The command outputs to stdout so you should
+redirect it to an appropriate file.
 
-Currently supported shells are:
+The supported shells are:
 
 - zsh
 - bash
@@ -664,9 +664,9 @@ Currently supported shells are:
 
 Example:
 
-```
-$ deno completions bash > /usr/local/etc/bash_completion.d/deno.bash
-$ source /usr/local/etc/bash_completion.d/deno.bash
+```shellsession
+deno completions bash > /usr/local/etc/bash_completion.d/deno.bash
+source /usr/local/etc/bash_completion.d/deno.bash

V8 flags

bartlomieju

comment created time in a day

issue commentdenoland/deno

installed programs should be able to take --reload argument

Maybe we can hack clap? I don't like the bash solution.

ry

comment created time in a day

Pull request review commentdenoland/deno

feat: deno completions command

 To change installation directory use -d/--dir flag           // this is a fake subcommand - it's used in conjunction with           // AppSettings:AllowExternalSubcommand to treat it as an           // entry point script-          SubCommand::with_name("<script>").about("Script URL"),+          SubCommand::with_name("[SCRIPT]").about("Script URL"),         ),     ).subcommand(+      SubCommand::with_name("completions")+        .settings(&[+          AppSettings::DisableHelpSubcommand,

also an entry in the manual

bartlomieju

comment created time in a day

Pull request review commentdenoland/deno

feat: deno completions command

 To change installation directory use -d/--dir flag           // this is a fake subcommand - it's used in conjunction with           // AppSettings:AllowExternalSubcommand to treat it as an           // entry point script-          SubCommand::with_name("<script>").about("Script URL"),+          SubCommand::with_name("[SCRIPT]").about("Script URL"),         ),     ).subcommand(+      SubCommand::with_name("completions")+        .settings(&[+          AppSettings::DisableHelpSubcommand,

It would be good to have some help text

bartlomieju

comment created time in a day

Pull request review commentdenoland/deno

feat: deno completions command

 pub fn flags_from_vec(       argv.extend(vec![source_file.to_string(), out_file.to_string()]);       DenoSubcommand::Bundle     }+    ("completions", Some(completions_match)) => {+      let shell: &str = completions_match.value_of("shell").unwrap();+      create_cli_app().gen_completions_to(+        "deno",+        Shell::from_str(shell).unwrap(),+        &mut std::io::stdout(),+      );+      std::process::exit(0);

Is it necessary to exit forcefully here?

bartlomieju

comment created time in a day

Pull request review commentdenoland/deno

Feature: Native plugins

 const { openPlugin, pluginFilename, env } = Deno;  const plugin = openPlugin(-  env().DENO_BUILD_PATH + "/" + pluginFilename("test_plugin")+  env().DENO_BUILD_PATH + "/rust_crates/" + pluginFilename("test_plugin")

This is unfortunate...

afinch7

comment created time in a day

Pull request review commentdenoland/deno

Feature: Native plugins

 script: - ./tools/lint.py - ./tools/test_format.py - ./tools/build.py -C target/release-- DENO_BUILD_MODE=release ./tools/test.py+- cargo build -p test_plugin --release --locked

I've added the BUILD.gn file... it's a bit hacky. PTAL @afinch7

afinch7

comment created time in a day

push eventafinch7/deno

Ryan Dahl

commit sha 15f53d91f2ad002753f6d85b8ce375dff0a9ef7d

Add //tests/plugin/BUILD.gn

view details

push time in a day

Pull request review commentdenoland/deno

Feature: Native plugins

 script: - ./tools/lint.py - ./tools/test_format.py - ./tools/build.py -C target/release-- DENO_BUILD_MODE=release ./tools/test.py+- cargo build -p test_plugin --release --locked

I don't like that this breaks my usual ./tools/build.py && ./tools/test.py

Let me see if I can whip up a BUILD.gn to do this...

afinch7

comment created time in a day

Pull request review commentdenoland/deno

Feature: Native plugins

 install:   # Clone the third_party submodule.   - ps: |-       try {-        Exec { & git submodule update --init --force --depth 1 }+        Exec { & git submodule update --init --force --recursive --depth 2 }       } catch {         # Git will fail if the `third_party` directory was restored from cache,         # but the `.git/modules` directory wasn't. Rebuild it from scratch.         Delete-Tree $env:DENO_THIRD_PARTY_PATH-        Exec -NoNewLines { & git submodule update --init --force --depth 1 }+        Exec -NoNewLines { & git submodule update --init --force --recursive --depth 2 }

Why is this being changed?

afinch7

comment created time in a day

Pull request review commentdenoland/deno

Feature: Native plugins

+const { openPlugin, pluginFilename, env } = Deno;++const plugin = openPlugin(+  env().DENO_BUILD_PATH + "/" + pluginFilename("test_plugin")+);+const testOp = plugin.loadOp("test_op");++interface TestOptions {+  // eslint-disable-next-line @typescript-eslint/no-explicit-any+  data: any;+  // eslint-disable-next-line @typescript-eslint/no-explicit-any+  zeroCopyData: any;+}++interface TestResponse {+  data: Uint8Array;+}++const textEncoder = new TextEncoder();++// eslint-disable-next-line @typescript-eslint/no-explicit-any+function encodeTestOp(args: any): Uint8Array {+  return textEncoder.encode(JSON.stringify(args));+}++const textDecoder = new TextDecoder();++// eslint-disable-next-line @typescript-eslint/no-explicit-any+function decodeTestOp(data: Uint8Array): any {

Shouldn't this return string ?

afinch7

comment created time in a day

Pull request review commentdenoland/deno

WIP feat: deno completions command

 pub fn flags_from_vec(       argv.extend(vec![source_file.to_string(), out_file.to_string()]);       DenoSubcommand::Bundle     }+    ("completions", Some(_completions_match)) => {+      create_cli_app().gen_completions_to(+        "deno",+        Shell::Bash,+        &mut std::io::stdout(),+      );+      std::process::exit(1);

Why exit(1) ?

bartlomieju

comment created time in a day

issue commentdenoland/deno

Use forward slashes for paths on Windows

@bartlomieju https://github.com/denoland/deno/pull/987#issuecomment-438573356

Does this block my idea to use forward slashes internally for DenoDir?

No, I think that's fine... I mean, ideally we would use URLs which have saner semantics.

ry

comment created time in a day

push eventdenoland/deno

Evgeniy Karagodin

commit sha d089f9797830a2729cbd45cb4ea6312eb43a28de

Add homeDir to Deno namespace (#2578)

view details

push time in a day

PR merged denoland/deno

Add userHomeDir to Deno namespace

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

+69 -2

2 comments

5 changed files

ekaragodin

pr closed time in a day

Pull request review commentdenoland/deno

Apply source maps to non thrown errors.

+// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.+// Some of the code here is adapted directly from V8 and licensed under a BSD+// style license available here: https://github.com/v8/v8/blob/24886f2d1c565287d33d71e4109a53bf0b54b75c/LICENSE.v8++import * as msg from "gen/cli/msg_generated";+import * as flatbuffers from "./flatbuffers";+import * as dispatch from "./dispatch";+import { assert } from "./util";++export interface Location {+  /** The full url for the module, e.g. `file://some/file.ts` or+   * `https://some/file.ts`. */+  filename: string;++  /** The line number in the file.  It is assumed to be 1-indexed. */+  line: number;++  /** The column number in the file.  It is assumed to be 1-indexed. */+  column: number;+}++function req(+  filename: string,+  line: number,+  column: number+): [flatbuffers.Builder, msg.Any.ApplySourceMap, flatbuffers.Offset] {+  const builder = flatbuffers.createBuilder();+  const filename_ = builder.createString(filename);+  const inner = msg.ApplySourceMap.createApplySourceMap(+    builder,+    filename_,+    // On this side, line/column are 1 based, but in the source maps, they are+    // 0 based, so we have to convert back and forth+    line - 1,+    column - 1+  );+  return [builder, msg.Any.ApplySourceMap, inner];+}++function res(baseRes: msg.Base | null): Location {+  assert(baseRes != null);+  assert(baseRes!.innerType() === msg.Any.ApplySourceMap);+  const res = new msg.ApplySourceMap();+  assert(baseRes!.inner(res) != null);+  const filename = res.filename()!;+  assert(filename != null);+  return {+    filename,+    // On this side, line/column are 1 based, but in the source maps, they are+    // 0 based, so we have to convert back and forth+    line: res.line() + 1,+    column: res.column() + 1+  };+}++/** Given a current location in a module, lookup the source location and+ * return it.+ *+ * When Deno transpiles code, it keep source maps of the transpiled code.  This+ * function can be used to lookup the original location.  This is automatically+ * done when accessing the `.stack` of an error, or when an uncaught error is+ * logged.  This function can be used to perform the lookup for creating better+ * error handling.+ *+ * **Note:** `line` and `column` are 1 indexed, which matches display+ * expectations, but is not typical of most index numbers in Deno.+ *+ * An example:+ *+ *       const orig = Deno.apply({+ *         location: "file://my/module.ts",+ *         line: 5,+ *         column: 15+ *       });+ *       console.log(`${orig.filename}:${orig.line}:${orig.column}`);+ *+ */+export function applySourceMap(location: Location): Location {+  const { filename, line, column } = location;+  return res(dispatch.sendSync(...req(filename, line, column)));+}++/** Mutate the call site so that it returns the location, instead of its+ * original location.+ */+function patchCallSite(callSite: CallSite, location: Location): CallSite {+  return {+    getThis(): unknown {+      return callSite.getThis();+    },+    getTypeName(): string {+      return callSite.getTypeName();+    },+    getFunction(): Function {+      return callSite.getFunction();+    },+    getFunctionName(): string {+      return callSite.getFunctionName();+    },+    getMethodName(): string {+      return callSite.getMethodName();+    },+    getFileName(): string {+      return location.filename;+    },+    getLineNumber(): number {+      return location.line;+    },+    getColumnNumber(): number {+      return location.column;+    },+    getEvalOrigin(): string | null {+      return callSite.getEvalOrigin();+    },+    isToplevel(): boolean {+      return callSite.isToplevel();+    },+    isEval(): boolean {+      return callSite.isEval();+    },+    isNative(): boolean {+      return callSite.isNative();+    },+    isConstructor(): boolean {+      return callSite.isConstructor();+    },+    isAsync(): boolean {+      return callSite.isAsync();+    },+    isPromiseAll(): boolean {+      return callSite.isPromiseAll();+    },+    getPromiseIndex(): number | null {+      return callSite.getPromiseIndex();+    }+  };+}++/** Return a string representations of a CallSite's method call name+ *+ * This is adapted directly from V8.+ */+function getMethodCall(callSite: CallSite): string {+  let result = "";++  const typeName = callSite.getTypeName();+  const methodName = callSite.getMethodName();+  const functionName = callSite.getFunctionName();++  if (functionName) {+    if (typeName) {+      const startsWithTypeName = functionName.startsWith(typeName);+      if (!startsWithTypeName) {+        result += `${typeName}.`;+      }+    }+    result += functionName;++    if (methodName) {+      if (!functionName.endsWith(methodName)) {+        result += ` [as ${methodName}]`;+      }+    }+  } else {+    if (typeName) {+      result += `${typeName}.`;+    }+    if (methodName) {+      result += methodName;+    } else {+      result += "<anonymous>";+    }+  }++  return result;+}++/** Return a string representations of a CallSite's file location+ *+ * This is adapted directly from V8.+ */+function getFileLocation(callSite: CallSite): string {+  if (callSite.isNative()) {+    return "native";+  }++  let result = "";++  const fileName = callSite.getFileName();+  if (!fileName && callSite.isEval()) {+    const evalOrigin = callSite.getEvalOrigin();+    assert(evalOrigin != null);+    result += `${evalOrigin}, `;+  }++  if (fileName) {+    result += fileName;+  } else {+    result += "<anonymous>";+  }++  const lineNumber = callSite.getLineNumber();+  if (lineNumber != null) {+    result += `:${lineNumber}`;++    const columnNumber = callSite.getColumnNumber();+    if (columnNumber != null) {+      result += `:${columnNumber}`;+    }+  }++  return result;+}++/** Convert a CallSite to a string.+ *+ * This is adapted directly from V8.+ */+function callSiteToString(callSite: CallSite): string {+  let result = "";+  const functionName = callSite.getFunctionName();++  const isTopLevel = callSite.isToplevel();+  const isAsync = callSite.isAsync();+  const isPromiseAll = callSite.isPromiseAll();+  const isConstructor = callSite.isConstructor();+  const isMethodCall = !(isTopLevel || isConstructor);++  if (isAsync) {+    result += "async ";+  }+  if (isPromiseAll) {+    result += `Promise.all (index ${callSite.getPromiseIndex})`;+    return result;+  }+  if (isMethodCall) {+    result += getMethodCall(callSite);+  } else if (isConstructor) {+    result += "new ";+    if (functionName) {+      result += functionName;+    } else {+      result += "<anonymous>";+    }+  } else if (functionName) {+    result += functionName;+  } else {+    result += getFileLocation(callSite);+    return result;+  }++  result += ` (${getFileLocation(callSite)})`;+  return result;+}++/** A replacement for the default stack trace preparer which will op into Rust+ * to apply source maps to individual sites+ */+function prepareStackTrace(+  error: Error,+  structuredStackTrace: CallSite[]+): string {+  return (+    `${error.name}: ${error.message}\n` ++    structuredStackTrace+      .map(+        (callSite): CallSite => {+          const filename = callSite.getFileName();+          const line = callSite.getLineNumber();+          const column = callSite.getColumnNumber();+          if (filename && line != null && column != null) {+            return patchCallSite(+              callSite,+              applySourceMap({+                filename,+                line,+                column+              })+            );+          }+          return callSite;+        }+      )+      .map((callSite): string => `    at ${callSiteToString(callSite)}`)+      .join("\n")+  );+}++/** Sets the `prepareStackTrace` method on the Error constructor which will+ * op into Rust to remap source code for caught errors where the `.stack` is+ * being accessed.+ */+// @internal+export function setPrepareStackTrace(ErrorConstructor: typeof Error): void {

Link https://v8.dev/docs/stack-trace-api here

kitsonk

comment created time in a day

PR opened denoland/deno_install

Update homebrew, to fix error

See https://travis-ci.com/denoland/deno_install/jobs/210669310

+1 -0

0 comment

1 changed file

pr created time in a day

create barnchdenoland/deno_install

branch : fix-homebrew

created branch time in a day

issue commentdenoland/deno

installed programs should be able to take --reload argument

I mean that the --reload flag should be passed through to deno, in order to download a new version of the code.

ry

comment created time in a day

Pull request review commentdenoland/deno

Feature: Native plugins

+use crate::isolate::Op;+use crate::libdeno::PinnedBuf;+use std::fmt;+use std::io;++pub type PluginResult<T> = std::result::Result<T, PluginError>;++#[derive(Debug)]+pub struct PluginError {+  repr: Repr,+}++#[derive(Debug)]+enum Repr {+  Simple(String),+  IoErr(io::Error),+}++pub fn new_plugin_error(msg: String) -> PluginError {+  PluginError {+    repr: Repr::Simple(msg),+  }+}++impl fmt::Display for PluginError {+  fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {+    match self.repr {+      Repr::Simple(ref err_str) => f.pad(err_str),+      Repr::IoErr(ref err) => err.fmt(f),+    }+  }+}++impl std::error::Error for PluginError {+  fn description(&self) -> &str {+    match self.repr {+      Repr::Simple(ref msg) => msg.as_str(),+      Repr::IoErr(ref err) => err.description(),+    }+  }++  fn cause(&self) -> Option<&dyn std::error::Error> {+    match self.repr {+      Repr::Simple(ref _msg) => None,+      Repr::IoErr(ref err) => Some(err),+    }+  }+}++impl From<io::Error> for PluginError {+  #[inline]+  fn from(err: io::Error) -> Self {+    Self {+      repr: Repr::IoErr(err),+    }+  }+}++/// Base result type for a plugin op represents either a Sync or Async value+pub type PluginOp = Op<PluginError>;++/// Complete return type for a plugin op including Sync errors+pub type PluginOpResult = PluginResult<PluginOp>;++/// Funciton type for plugin ops+pub type PluginDispatchFn =+  fn(is_sync: bool, data: &[u8], zero_copy: Option<PinnedBuf>)+    -> PluginOpResult;

sendInternal() is a private function called from sendAsync() or sendSync()

Only some ops are both sync and async. For example Deno.isTTY() is strictly sync https://github.com/denoland/deno/blob/c56df45355c8e68eabbfa62021e7ca7484115c0b/js/os.ts#L30-L33

afinch7

comment created time in a day

PR opened denoland/deno_std

ci: bump deno to v0.10.0
+1 -1

0 comment

1 changed file

pr created time in a day

create barnchry/deno_std

branch : bump-v0.10.0

created branch time in a day

Pull request review commentdenoland/deno

Feature: Native plugins

+use crate::isolate::Op;+use crate::libdeno::PinnedBuf;+use std::fmt;+use std::io;++pub type PluginResult<T> = std::result::Result<T, PluginError>;++#[derive(Debug)]+pub struct PluginError {+  repr: Repr,+}++#[derive(Debug)]+enum Repr {+  Simple(String),+  IoErr(io::Error),+}++pub fn new_plugin_error(msg: String) -> PluginError {+  PluginError {+    repr: Repr::Simple(msg),+  }+}++impl fmt::Display for PluginError {+  fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {+    match self.repr {+      Repr::Simple(ref err_str) => f.pad(err_str),+      Repr::IoErr(ref err) => err.fmt(f),+    }+  }+}++impl std::error::Error for PluginError {+  fn description(&self) -> &str {+    match self.repr {+      Repr::Simple(ref msg) => msg.as_str(),+      Repr::IoErr(ref err) => err.description(),+    }+  }++  fn cause(&self) -> Option<&dyn std::error::Error> {+    match self.repr {+      Repr::Simple(ref _msg) => None,+      Repr::IoErr(ref err) => Some(err),+    }+  }+}++impl From<io::Error> for PluginError {+  #[inline]+  fn from(err: io::Error) -> Self {+    Self {+      repr: Repr::IoErr(err),+    }+  }+}++/// Base result type for a plugin op represents either a Sync or Async value+pub type PluginOp = Op<PluginError>;++/// Complete return type for a plugin op including Sync errors+pub type PluginOpResult = PluginResult<PluginOp>;++/// Funciton type for plugin ops+pub type PluginDispatchFn =+  fn(is_sync: bool, data: &[u8], zero_copy: Option<PinnedBuf>)+    -> PluginOpResult;

The user should encode this into the buffers somehow.

afinch7

comment created time in a day

created tagdenoland/deno

tagv0.10.0

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

created time in a day

push eventdenoland/deno

Ryan Dahl

commit sha c56df45355c8e68eabbfa62021e7ca7484115c0b

v0.10.0

view details

push time in a day

PR merged denoland/deno

v0.10.0

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

+34 -5

0 comment

4 changed files

ry

pr closed time in a day

issue openeddenoland/deno

installed programs should be able to take --reload argument

If I install a program

deno install catj https://deno.land/std/examples/catjson.ts --allow-read

I want to be able to use flags like --reload or -L=info with the newly installed program:

catj --reload

^-- does not work as intended.

created time in a day

Pull request review commentdenoland/deno

Feature: Native plugins

+use crate::isolate::Op;+use crate::libdeno::PinnedBuf;+use std::fmt;+use std::io;++pub type PluginResult<T> = std::result::Result<T, PluginError>;++#[derive(Debug)]+pub struct PluginError {+  repr: Repr,+}++#[derive(Debug)]+enum Repr {+  Simple(String),+  IoErr(io::Error),+}++pub fn new_plugin_error(msg: String) -> PluginError {+  PluginError {+    repr: Repr::Simple(msg),+  }+}++impl fmt::Display for PluginError {+  fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {+    match self.repr {+      Repr::Simple(ref err_str) => f.pad(err_str),+      Repr::IoErr(ref err) => err.fmt(f),+    }+  }+}++impl std::error::Error for PluginError {+  fn description(&self) -> &str {+    match self.repr {+      Repr::Simple(ref msg) => msg.as_str(),+      Repr::IoErr(ref err) => err.description(),+    }+  }++  fn cause(&self) -> Option<&dyn std::error::Error> {+    match self.repr {+      Repr::Simple(ref _msg) => None,+      Repr::IoErr(ref err) => Some(err),+    }+  }+}++impl From<io::Error> for PluginError {+  #[inline]+  fn from(err: io::Error) -> Self {+    Self {+      repr: Repr::IoErr(err),+    }+  }+}++/// Base result type for a plugin op represents either a Sync or Async value+pub type PluginOp = Op<PluginError>;++/// Complete return type for a plugin op including Sync errors+pub type PluginOpResult = PluginResult<PluginOp>;++/// Funciton type for plugin ops+pub type PluginDispatchFn =+  fn(is_sync: bool, data: &[u8], zero_copy: Option<PinnedBuf>)+    -> PluginOpResult;

I think errors should be handled by the plugin itself.

I see you're concerned about the ergonomics of implementing the op ... having access to ? operator and whatnot. But those things can be shoehorned into this model with some utilities.

afinch7

comment created time in a day

issue commentdenoland/deno

Major features necessary for 1.0

@geglock Thanks - I will add it to the list.

ry

comment created time in a day

PR opened denoland/deno

v0.10.0

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

+34 -5

0 comment

4 changed files

pr created time in a day

create barnchry/deno

branch : bump-v0.10

created branch time in a day

push eventdenoland/deno_third_party

Bert Belder

commit sha 4c9d6c9f133cae292528d3b68e55249acd8c1b16

Add rust crate 'termcolor'

view details

Ryan Dahl

commit sha 159c954ab0e11f655c7cb2a36302c0261c3e121b

Add fwdansi

view details

push time in a day

push eventdenoland/deno

Ryan Dahl

commit sha 046cbef4f0f11e37d6ffb8b01c6362c8ce0b750d

simplify check_net test

view details

Bert Belder

commit sha 89216c7baaab8ade3daf9103572647addeb404f3

third_party: add rust crate 'termcolor'

view details

Ryan Dahl

commit sha 3a4d88475b40a17f2ce17b775a3f07c78be83d79

Port code from Cargo and use for progress A lot of its functionality is unused still, but the goal it to slowly migrate logging functionality to it. There is also a useful progress bar which can be ported over later - it depends on this module. https://github.com/rust-lang/cargo/blob/4c1fa54d10f58d69ac9ff55be68e1b1c25ecb816/src/cargo/util/progress.rs

view details

push time in a day

PR merged denoland/deno

Port code from Cargo and use for progress
+689 -223

0 comment

12 changed files

ry

pr closed time in a day

issue closeddenoland/deno

loading modules from HTTP sometimes results in multiple downloads

Here's a minimal example: Run the test http server (tools/http_server.py) in the background and call

./target/debug/deno run --reload http://localhost:4545/tests/003_relative_import.ts

You'll see this:

> ./tools/http_server.py
Deno test server http://localhost:4545/
redirect server http://localhost:4546/ -> http://localhost:4545/
redirect server http://localhost:4547/ -> http://localhost:4545/
redirect server http://localhost:4548/ -> http://localhost:4546/
127.0.0.1 - - [14/May/2019 00:08:10] "GET /tests/003_relative_import.ts HTTP/1.1" 200 -
127.0.0.1 - - [14/May/2019 00:08:10] "GET /tests/003_relative_import.ts HTTP/1.1" 200 -
127.0.0.1 - - [14/May/2019 00:08:10] "GET /tests/subdir/print_hello.ts HTTP/1.1" 200 -
127.0.0.1 - - [14/May/2019 00:08:12] "GET /tests/subdir/print_hello.ts HTTP/1.1" 200 -
127.0.0.1 - - [14/May/2019 00:08:12] "GET /tests/subdir/print_hello.ts HTTP/1.1" 200 -

Somehow we need to in code this into a Rust unit test. Potentially by using the Progress bar history (easy) or by mocking out the server (hard)

The actual bug is likely in op_fetch_module_meta_data(). It's probably a one line fix. The challenge is to test for this well.

closed time in a day

ry

issue closeddenoland/deno

Use forward slashes for paths on Windows

The backslash vs forward slash difference between Unix and Windows is one of the oldest yet continually painful parts of making cross-platform software.

Windows itself accepts forward slashes in most (all?) of its API at this point.

I suggest that Deno always output forward slash paths on Windows.

For example, deno.cwd() might return "/C:/Documents/Foo".

If we ensure that all APIs in Deno return forward slashes, we can alleviate this cross-platform issue from our users.

Issues:

  • In the Windows command line, arguments are specified using forward slash instead of dash. To solve this we will provide deno.pathBackwards(string): string. This will allow users to convert any forward slash path to the backward slash variety. This confines path portability issues to users who interact with such command line programs.
  • Paths may come from sources other than deno, and these paths may very well be using backslashes. To solve this we will ensure any Deno APIs that take paths do accept the backslash variety. Furthermore we will provide deno.pathForwards(string): string to convert into the forward slash variety.

cc @piscisaureus

closed time in a day

ry

issue commentdenoland/deno

Use forward slashes for paths on Windows

Closing this because @piscisaureus objects.

ry

comment created time in a day

issue closeddenoland/deno

Cache miss when running in container

Consider this simple multi-stage build:

FROM debian:stretch-slim as build

ENV DENO_VERSION 0.1.9
ENV DENO_DIR /build
RUN mkdir -p /build

RUN apt-get update && apt-get install -y --no-install-recommends \
    ca-certificates \
    curl \
    && apt-get clean -y \
    && rm -rf /var/lib/apt/lists/* \
    && curl -fsSLO --compressed "https://github.com/denoland/deno/releases/download/v$DENO_VERSION/deno_linux_x64.gz" \
    && gunzip -c deno_linux_x64.gz > /build/deno \
    && chmod u+x /build/deno \
    && rm deno_linux_x64.gz

COPY hello.ts /build
WORKDIR /build
RUN ./deno hello.ts


FROM debian:stretch-slim
COPY --from=build /build/deno /app/deno
COPY --from=build /build/deps /app/deps
COPY --from=build /build/gen /app/gen
COPY --from=build /build/hello.ts /app/
WORKDIR /app
ENV DENO_DIR /app
CMD ./deno hello.ts

The expectation is deno's compile cache will be hit when the resulting image is launched. However, this doesn't happen:

$ docker run hellodeno
Compiling /app/hello.ts
Compiling https://gist.githubusercontent.com/ry/f12b2aa3409e6b52645bc346a9e22929/raw/79318f239f51d764384a8bded8d7c6a833610dde/print_hello.ts
--- Hello from hello.ts ---

$ docker run hellodeno
Compiling /app/hello.ts
Compiling https://gist.githubusercontent.com/ry/f12b2aa3409e6b52645bc346a9e22929/raw/79318f239f51d764384a8bded8d7c6a833610dde/print_hello.ts
--- Hello from hello.ts ---
# RUN ./deno -D hello.ts

$ docker run hellodeno 2>&1 | grep -i cache
DEBUG RS - load_cache /app/gen/4e4584381ac19c16f9e1c6ae4db535f7521c99bd.js
DEBUG RS - load_cache /app/gen/790f0b07cf14ce8eda5eaab841b453acaf2e4da3.js
DEBUG JS - os.ts codeCache /app/hello.ts // tslint:disable-next-line:max-line-length
DEBUG RS - msg_from_js CodeCache sync true
DEBUG JS - os.ts codeCache /app/deps/gist.githubusercontent.com/ry/f12b2aa3409e6b52645bc346a9e22929/raw/79318f239f51d764384a8bded8d7c6a833610dde/print_hello.ts export function printHello(): void {
DEBUG RS - msg_from_js CodeCache sync true

^^ Not sure how to read that, some cache was loaded but not used?

If i exec (docker run -it image_name bash) inside the container, then the second time i run ./deno hello.ts, the cache is hit, so i guess DENO_DIR works.

There seems to be some other state outside deps and gen that i'm failing to copy over. Where's that state?

I see some calls to /dev/urandom with strace, if that's saved somewhere and then reused.. it could explain the cache miss.

closed time in a day

snobu

issue closeddenoland/deno

Split flatbuffers messages into Requests and Responses

https://github.com/denoland/deno/blob/c1de50b0ca9c6e1c8cd06347d19dd3db50db36d8/src/msg.fbs#L1-L60

Currently we have a union of all message types called Any. The union is included in the Base message as an element called inner.

However there are two distinct types of messages: Requests and Responses. It would be better for type-checking and organizationally if we had two unions.

As an additional note: it seems many of our "table" messages could instead be "struct" messages. It would be interesting to explore that.

closed time in a day

ry

issue closeddenoland/deno

Issue importing external library

Not sure if this should be possible yet in Deno, but for s* and giggles I tried importing a TypeScript library that does SSR and the import didn't go well. I attempted:

import { Inferno } from 'https://raw.githubusercontent.com/infernojs/inferno/master/packages/inferno/src/index.ts'

It retrieved the index but seems to have failed with the first dependency:

Downloading https://raw.githubusercontent.com/infernojs/inferno/master/packages/inferno/src/index.ts...
Downloading https://raw.githubusercontent.com/infernojs/inferno/master/packages/inferno/src/core/types... NOT FOUND
Uncaught NotFound: Cannot resolve module "./core/types" from "/Users/ddibiase-macbook/Library/Caches/deno/deps/https/raw.githubusercontent.com/infernojs/inferno/master/packages/inferno/src/index.ts"

The dependency is definitely available: https://raw.githubusercontent.com/infernojs/inferno/master/packages/inferno/src/core/types.ts. It also looks like it resolved the path properly but then just failed to retrieve it.

Not sure if this is a bug or if I'm not supposed/can't use the import this way.

closed time in a day

ddibiase

issue commentdenoland/deno

Potential hash collision by using v8::Module::GetIdentityHash()

@zbendefy I've had no problems with it.

ry

comment created time in a day

pull request commentdenoland/deno

Add userHomeDir to Deno namespace

Cool thanks!

ekaragodin

comment created time in a day

Pull request review commentdenoland/deno

Add userHomeDir to Deno namespace

 union Any {   StatRes,   Symlink,   Truncate,+  UserHomeDir,+  UserHomeDirRes,

s/UserHomeDir/HomeDir/

ekaragodin

comment created time in a day

Pull request review commentdenoland/deno

Add userHomeDir to Deno namespace

 export function start(source?: string): msg.StartRes {    return startResMsg; }++/**+ * Returns the current user's home directory.+ */+export function userHomeDir(): string {

Can we call it homeDir instead of userHomeDir ?

Note in the jsdoc that this does not require elevated privileges.

ekaragodin

comment created time in a day

push eventry/deno

Ryan Dahl

commit sha d1482c6b8abfdd8201f8d1845a5de75105f3cbc4

Upgrade deno_std (#2565)

view details

Ryan Dahl

commit sha aa34a5f08ab9e2fbb6eda72183ad6c83d552bcf4

simplify check_net test

view details

Bert Belder

commit sha 1da9602b4f7263d4c94532586b638000120b052c

third_party: add rust crate 'termcolor'

view details

Ryan Dahl

commit sha e835e0a8b2e923cf58fb5bb369c86e2d310289e4

Port code from Cargo and use for progress A lot of its functionality is unused still, but the goal it to slowly migrate logging functionality to it. There is also a useful progress bar which can be ported over later - it depends on this module. https://github.com/rust-lang/cargo/blob/4c1fa54d10f58d69ac9ff55be68e1b1c25ecb816/src/cargo/util/progress.rs

view details

push time in 2 days

push eventry/deno

Ryan Dahl

commit sha 8911ff473b039fb8293fd0a4a1a95067bb348ca1

simplify check_net test

view details

push time in 2 days

push eventry/deno

Ryan Dahl

commit sha 8b979a1b797d6183c0b18f5b07a5f7353d5656e7

fix

view details

push time in 2 days

push eventry/deno

Ryan Dahl

commit sha 711c2454fdb312ca4c1bb489c703b48760c9e82d

fix

view details

push time in 2 days

push eventry/deno

Ryan Dahl

commit sha 13b2ace75bd69f7da8eb2b64345acb724cb11a6b

fmt

view details

push time in 2 days

push eventdenoland/deno

Ryan Dahl

commit sha d1482c6b8abfdd8201f8d1845a5de75105f3cbc4

Upgrade deno_std (#2565)

view details

push time in 2 days

PR merged denoland/deno

Upgrade deno_std
+1 -1

0 comment

1 changed file

ry

pr closed time in 2 days

PR closed denoland/deno

Replace progress messages with module from cargo

Testing with

./tools/build.py deno && ./target/debug/deno --allow-read -r https://deno.land/std/examples/catjson.ts tsconfig.json

It looks like this: Screen Shot 2019-06-22 at 9 59 10 AM

+618 -32

1 comment

12 changed files

ry

pr closed time in 2 days

pull request commentdenoland/deno

Replace progress messages with module from cargo

closed in favor of #2576

ry

comment created time in 2 days

PR opened denoland/deno

Port code from Cargo and use for progress
+621 -32

0 comment

12 changed files

pr created time in 2 days

create barnchry/deno

branch : progress5

created branch time in 2 days

Pull request review commentdenoland/deno

Feature: Native plugins

+// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.+const { dlname, dlopen } = Deno;++let localPath: any = import.meta.url.split("/");+localPath.pop();+localPath = localPath.join("/");++const dLib = dlopen(env().DL_PATH_TEST_BINDING + "/" + dlname("test_plugin"));

dlname can be implemented purely in TS.

afinch7

comment created time in 2 days

Pull request review commentdenoland/deno

Feature: Native plugins

+// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.+const { dlname, dlopen } = Deno;++let localPath: any = import.meta.url.split("/");+localPath.pop();+localPath = localPath.join("/");++const dLib = dlopen(env().DL_PATH_TEST_BINDING + "/" + dlname("test_plugin"));

We should use either "plugin" or "dlopen" but not both.

I think Deno.openPlugin() ?

afinch7

comment created time in 2 days

Pull request review commentdenoland/deno

Feature: Native plugins

+use crate::isolate::Op;+use crate::libdeno::PinnedBuf;+use std::fmt;+use std::io;++pub type PluginResult<T> = std::result::Result<T, PluginError>;++#[derive(Debug)]+pub struct PluginError {+  repr: Repr,+}++#[derive(Debug)]+enum Repr {+  Simple(String),+  IoErr(io::Error),+}++pub fn new_plugin_error(msg: String) -> PluginError {+  PluginError {+    repr: Repr::Simple(msg),+  }+}++impl fmt::Display for PluginError {+  fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {+    match self.repr {+      Repr::Simple(ref err_str) => f.pad(err_str),+      Repr::IoErr(ref err) => err.fmt(f),+    }+  }+}++impl std::error::Error for PluginError {+  fn description(&self) -> &str {+    match self.repr {+      Repr::Simple(ref msg) => msg.as_str(),+      Repr::IoErr(ref err) => err.description(),+    }+  }++  fn cause(&self) -> Option<&dyn std::error::Error> {+    match self.repr {+      Repr::Simple(ref _msg) => None,+      Repr::IoErr(ref err) => Some(err),+    }+  }+}++impl From<io::Error> for PluginError {+  #[inline]+  fn from(err: io::Error) -> Self {+    Self {+      repr: Repr::IoErr(err),+    }+  }+}++/// Base result type for a plugin op represents either a Sync or Async value+pub type PluginOp = Op<PluginError>;++/// Complete return type for a plugin op including Sync errors+pub type PluginOpResult = PluginResult<PluginOp>;++/// Funciton type for plugin ops+pub type PluginDispatchFn =+  fn(is_sync: bool, data: &[u8], zero_copy: Option<PinnedBuf>)+    -> PluginOpResult;

I think this should be

pub type PluginDispatchFn =
  fn(control_data: &[u8], zero_copy: Option<PinnedBuf>) -> Op<()>;
afinch7

comment created time in 2 days

Pull request review commentdenoland/deno

Feature: Native plugins

+// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.+use deno::{PinnedBuf, Buf};+use deno::plugins::{PluginOpResult, new_plugin_error};+use deno::Op;++#[macro_use]+extern crate deno;++pub fn op_test_op(+  is_sync: bool,+  data: &[u8],+  zero_copy: Option<PinnedBuf>,+) -> PluginOpResult {+    if !is_sync {

rustfmt isn't be applied here.

afinch7

comment created time in 2 days

Pull request review commentdenoland/deno

Feature: Native plugins

+# Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.

mv test_plugin tests/plugin

afinch7

comment created time in 2 days

Pull request review commentdenoland/deno

Feature: Native plugins

 fn add_run_args<'a, 'b>(app: App<'a, 'b>) -> App<'a, 'b> {       Arg::with_name("allow-hrtime")         .long("allow-hrtime")         .help("Allow high resolution time measurement"),+    ).arg(+      Arg::with_name("allow-dlopen")+        .long("allow-dlopen")

s/allow-dlopen/allow-plugins/

afinch7

comment created time in 2 days

push eventafinch7/deno

Ryan Dahl

commit sha 6bad3b6c9e90828986d80e0f289b5c6bbfc41e3a

fix

view details

push time in 2 days

push eventafinch7/deno

Ryan Dahl

commit sha 84a6c3691bdbecbc90ebc53b91c05f8bf51e2f08

Fix third_party commit

view details

push time in 2 days

create barnchdenoland/deno_third_party

branch : 20190624_dlopen

created branch time in 2 days

push eventafinch7/deno

Bartek Iwańczuk

commit sha 77a00aef4cef31e1e76549b3fcef25f389c0ab84

feat: upgrade installer and add docs (#2551)

view details

Matt Harrison

commit sha 20f41e719d2cb5add8e9168d00f239843fd56d31

Fix comment (#2555)

view details

andy finch

commit sha eb93dc58a11d9e9a295eff31f9c2c6a3a4c5170b

add encodeInto to TextEncoder (#2558)

view details

Bartek Iwańczuk

commit sha 642eaf97c67c6070935a2977014c743ba59deff8

feat: redirect process stdio to file (#2554)

view details

Yoshiya Hinosawa

commit sha 201ddd29a7908d457ed43b030476707d32848868

fmt_test: resolve old absolute path issue (#2562)

view details

Yoshiya Hinosawa

commit sha 988bcbb8842d12202f278808698a6b546718e764

fetch: make body async iterable (#2563)

view details

Bartek Iwańczuk

commit sha b9fbd552149c1fe61b662c9b1a1ed1b42e5487ae

feat: log permission access (#2518) Replaces -D/--log-debug flag with --log-level=debug --log-level=info displays permission access

view details

Gurwinder Singh

commit sha 6fa6828e5f0f7abac20ec342ee5ec57654a425d0

Minor tweaks (#2569) 1. Separate Snapshot and Script StartupData functions based on cfg "no-snapshot-init" 2. Replace deprecated Once::ONCE_INIT with Once::new (https://github.com/rust-lang/rust/pull/61757) 3. Elide lifetime 4. Fix typos

view details

JaePil Jung

commit sha d82089ca358b7fa4d5e2b7a357f651364643de7a

Update manual.md (#2571)

view details

Long(Tony) Lian

commit sha 1d0d54247c0a5a69207f8e0b948d3b60287467eb

feat: fetch() now handles redirects (#2561)

view details

Bartek Iwańczuk

commit sha 3c81cca0374c96ff4759ec9305eb5529dd29a4d8

fix: prevent multiple downloads of modules (#2477)

view details

Bartek Iwańczuk

commit sha 70a9859adce478180a15d43877fe239a44379556

refactor: use Path/PathBuf in deno dir (#2559)

view details

Ryan Dahl

commit sha 42008b2dd75072c2da875cc61ecc950e94299ef8

Merge branch 'master' into native_bindings

view details

push time in 2 days

push eventry/deno

Ryan Dahl

commit sha afedc620124b82e6fd6aba938f795aef70f63731

fix

view details

push time in 2 days

push eventry/deno

Bartek Iwańczuk

commit sha 70a9859adce478180a15d43877fe239a44379556

refactor: use Path/PathBuf in deno dir (#2559)

view details

Bert Belder

commit sha 9b072f2765ed86edf87974cdea63557d98bea592

third_party: add rust crate 'termcolor'

view details

Ryan Dahl

commit sha 5a094f63844fe687bc086cc4e388e5b63a5be246

Import modules from cargo unchanged The only thing changed is to apply our formatting and add copyright headers.

view details

Ryan Dahl

commit sha 5c5a5da34be7697d6953282178b2d518e39eb266

Use CargoShell status for progress

view details

Ryan Dahl

commit sha 2c1629be063a76798f3fbbb9f084b464a7f1f542

Remove unused module

view details

Ryan Dahl

commit sha 5552f963eb75b73b4769d6088708787d7944031e

Add some todos regarding terminal colors

view details

Ryan Dahl

commit sha 0253dc05be14b0878dba8927adc8196dbd20240b

Add fwdansi to cli/Cargo.tml

view details

Ryan Dahl

commit sha 8438d91daec2a42ba8cf8f7d8497de2143b19624

fwdansi gn integration

view details

Ryan Dahl

commit sha cec1405cbaad0d635247a2f1f7facebf0c450b3e

clippy

view details

Ryan Dahl

commit sha 11435989fbba4cb4625a4efa46eb0c1c163e68c7

allow irrefutable_let_patterns

view details

push time in 2 days

PR closed denoland/deno

WIP steals progress bar code from cargo

only building with cargo atm

to test:

#  run tools/http_server.py in the background
cargo build && ./target/debug/deno run --reload tests/019_media_types.ts
+1239 -96

2 comments

14 changed files

ry

pr closed time in 2 days

pull request commentdenoland/deno

WIP steals progress bar code from cargo

closed in favor of #2564

ry

comment created time in 2 days

push eventdenoland/deno

Bartek Iwańczuk

commit sha 70a9859adce478180a15d43877fe239a44379556

refactor: use Path/PathBuf in deno dir (#2559)

view details

push time in 2 days

PR merged denoland/deno

refactor: use Path/PathBuf in deno dir

This is preliminary work towards #2057

Refactoring //cli/deno_dir.rs to use more concrete types, because there is a hell lot of &str arguments

+312 -376

5 comments

9 changed files

bartlomieju

pr closed time in 2 days

push eventry/deno

andy finch

commit sha eb93dc58a11d9e9a295eff31f9c2c6a3a4c5170b

add encodeInto to TextEncoder (#2558)

view details

Bartek Iwańczuk

commit sha 642eaf97c67c6070935a2977014c743ba59deff8

feat: redirect process stdio to file (#2554)

view details

Yoshiya Hinosawa

commit sha 201ddd29a7908d457ed43b030476707d32848868

fmt_test: resolve old absolute path issue (#2562)

view details

Yoshiya Hinosawa

commit sha 988bcbb8842d12202f278808698a6b546718e764

fetch: make body async iterable (#2563)

view details

Bartek Iwańczuk

commit sha b9fbd552149c1fe61b662c9b1a1ed1b42e5487ae

feat: log permission access (#2518) Replaces -D/--log-debug flag with --log-level=debug --log-level=info displays permission access

view details

Gurwinder Singh

commit sha 6fa6828e5f0f7abac20ec342ee5ec57654a425d0

Minor tweaks (#2569) 1. Separate Snapshot and Script StartupData functions based on cfg "no-snapshot-init" 2. Replace deprecated Once::ONCE_INIT with Once::new (https://github.com/rust-lang/rust/pull/61757) 3. Elide lifetime 4. Fix typos

view details

JaePil Jung

commit sha d82089ca358b7fa4d5e2b7a357f651364643de7a

Update manual.md (#2571)

view details

Long(Tony) Lian

commit sha 1d0d54247c0a5a69207f8e0b948d3b60287467eb

feat: fetch() now handles redirects (#2561)

view details

Bartek Iwańczuk

commit sha 3c81cca0374c96ff4759ec9305eb5529dd29a4d8

fix: prevent multiple downloads of modules (#2477)

view details

Bert Belder

commit sha 3658ef48bb92dcd4259b92fb25fb0912928838dd

third_party: add rust crate 'termcolor'

view details

Ryan Dahl

commit sha 67855c77e57b1ae811cdd299616419134bf673f1

Import modules from cargo unchanged The only thing changed is to apply our formatting and add copyright headers.

view details

Ryan Dahl

commit sha cf950afd1629eca4ed1e74d57a182b1f158cbad5

Use CargoShell status for progress

view details

Ryan Dahl

commit sha 547e03873f674bf68f660907afd2abce775c493a

Remove unused module

view details

Ryan Dahl

commit sha 82dd82385cd95699658dd4446291f8a20bc4a9f6

Add some todos regarding terminal colors

view details

Ryan Dahl

commit sha a2cd0793c4882c3c741879a895c4e767807e8434

Add fwdansi to cli/Cargo.tml

view details

Ryan Dahl

commit sha d02d4b4c1da68eaff84d83c4a75338bfcd8f911c

fwdansi gn integration

view details

push time in 2 days

create barnchdenoland/deno_third_party

branch : 20190624_fwdansi

created branch time in 2 days

pull request commentdenoland/deno

refactor: use Path/PathBuf in deno dir

@bartlomieju Please merge with master

bartlomieju

comment created time in 2 days

push eventdenoland/deno

Bartek Iwańczuk

commit sha 3c81cca0374c96ff4759ec9305eb5529dd29a4d8

fix: prevent multiple downloads of modules (#2477)

view details

push time in 2 days

PR merged denoland/deno

fix: prevent multiple downloads of same file

This PR is proof-of-concept to prevent multiple downloads of same file as described in #2442.

For example given in #2442, here's downloads before this patch:

deno_dev run --reload --allow-read test.ts
[192/192] Compiling https://raw.githubusercontent.com/denoland/deno_std/v0.7.0/http/server.ts

And after patch:

deno_dev run --reload --allow-read test.ts
[39/39] Compiling https://raw.githubusercontent.com/denoland/deno_std/v0.7.0/media_types/mod.ts

It builds on idea of State.compiled - once file is downloaded it's placed in HashSet to prevent another download of same file. Code is hacky to prevent necessity of huge changes in DenoDir - I don't intend this to be merged but rather be another POV for refactor of DenoDir.

CC @kitsonk

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

+166 -68

3 comments

1 changed file

bartlomieju

pr closed time in 2 days

issue closeddenoland/deno

deno run --reload infinite loop

I haven't been able to pin it down specifically yet, but I think there is a logic error somewhere in the caching logic with the new compiler. I seem to be getting into an infinite loop when trying deno run --reload.

For example with oak, if you clone https://github.com/oakserver/oak/ and run:

$ deno run --allow-read test.ts

Everything should work fine and the tests pass. Then if you run:

$ deno run --reload --allow-read test.ts

I have noticed that it seems to be an ever increasing amount of files being downloaded, and you will start to see several of the modules repeating themselves.

closed time in 2 days

kitsonk

pull request commentdenoland/deno_std

Add userHomeDir

@axetroy I was thinking that too. We would be able to avoid the env access by adding an op.

ekaragodin

comment created time in 2 days

PR merged denoland/registry

Additional HTML renderer improvements
  • Support Markdown files (fixes #108)
  • Return a 404 when the original file can’t be retrieved (fixes #107)
  • Highlight files based on their extension (fixes #105)
  • Refactor the server into multiple files
+951 -373

6 comments

17 changed files

j-f1

pr closed time in 2 days

push eventdenoland/registry

Jed Fox

commit sha 82d0d716e5f06ea041e9eec91cdefbcc4ed8c027

Additional HTML renderer improvements (#109) - Support Markdown files (fixes #108) - Return a 404 when the original file can’t be retrieved (fixes #107) - Highlight files based on their extension (fixes #105) - Refactor the server into multiple files

view details

push time in 2 days

issue closeddenoland/registry

non-JS files look odd

https://deno.land/std/LICENSE

Screen Shot 2019-06-20 at 2 14 58 PM

closed time in 2 days

ry

issue closeddenoland/registry

server improperly returns 200 when it should return 404

> curl -I  -H "Accept: text/html" https://deno.land/std/foo/bar
HTTP/1.1 200 OK
Content-Type: text/html
Content-Length: 6869
Connection: keep-alive
Server: CloudFront
Date: Thu, 20 Jun 2019 18:37:29 GMT
Age: 12
X-Cache: Hit from cloudfront
Via: 1.1 bdfe34c94134f86b07ebb7714d12d095.cloudfront.net (CloudFront)
X-Amz-Cf-Pop: EWR52-C1
X-Amz-Cf-Id: T4fY2S-PltzB34kiQYcOxepJK6OWIFuZP_cWiL1O2kWO9g1mNepOGA==

closed time in 2 days

ry

issue closeddenoland/registry

render markdown

for https://deno.land/std/README.md

closed time in 2 days

ry

push eventdenoland/deno_std

Evgeniy Karagodin

commit sha ff7fb5a5d696256b232f8435c53087d5b12848ab

Add userHomeDir (#521)

view details

push time in 2 days

more