profile
viewpoint
Chris Knight cknight UK Web and Android App Dev, Contributor to Deno @denoland

cknight/deno 1

A secure JavaScript and TypeScript runtime

issue closeddenoland/doc_website

feature request: inline expandable source

[src] opens in a new tab/window which can be a slightly jarring experience and may mean going back and forth between the source and the docs. One suggestion would be to have [src] expand an inline iframe with the source in it. Example:

Screenshot at 2020-04-09 10:09:23

Having another link to open in a new tab/window would also be good.

closed time in 9 hours

cknight

issue commentdenoland/doc_website

feature request: inline expandable source

Perhaps a better title for this suggestion would have been "Better source integration" which is what I'm really looking for, but we developers do like to go into solution mode. As the support for this idea is evenly split, I don't see a strong enough reason to keep this issue open. Let's see how #54 pans out and we can iterate from there.

cknight

comment created time in 9 hours

PR opened denoland/deno

refactor: clearer variable names

While working on another PR, I needed to understand how BufWriter worked. In the process I renamed many of the variables from single (or short) characters to give them more functional meaning to aid my understanding. In the end I thought this may be of use to others. Take it or leave it. There are no functional changes in this PR, it is variable renames only.

+36 -34

0 comment

1 changed file

pr created time in 9 hours

create barnchcknight/deno

branch : renameVariablesBufioWrite

created branch time in 9 hours

push eventcknight/deno

Kitson Kelly

commit sha f5274072870558973f70b7fad30c078647790d6c

clippy (#4618)

view details

Lorran Rosa

commit sha b017409dcdbcaa5d3522f0efb191522240a6e757

on init create disk_cache directory if it doesn't already exists (#4617)

view details

Nayeem Rahman

commit sha faa0f520cf3ad03eef51d9a236202e181fe4ea69

doc: Improve the style guide (#4627)

view details

Khải

commit sha 788a6abfd391b8899d28552a9f192d9aaee91347

fix(std/testing): formatting bigint (#4626)

view details

Andres Villegas

commit sha 2911fcc78de4624c0086e6458eff3b33465c8b5b

Enable inspector tests (#4628)

view details

crowlKats

commit sha 6720a0dc02dc5a93472520e6d23ca033d7ec9d88

feat: Add File support in FormData (#4632)

view details

Ondřej Žára

commit sha 0ea9562933874526e84e39eaff675854cbe8690b

docs: add README to cli/js/web/ (#4578)

view details

Andreas

commit sha 703c0b7c172c57353ed61b16966c4ff7072d47f3

feat(std/flags): pass key and value to unknown (#4637)

view details

Andrew Stucki

commit sha 1e478d73e3e031c78a170b195021aeb22fd45feb

Drop headers with trailing whitespace in header name (#4642) This relates directly to [an issue](https://github.com/denoland/deno_std/issues/620) that I initially raised in `deno_std` awhile back, and was reminded about it today when the `oak` project popped up on my github recommended repos. As of now Deno's http servers are vulnerable to the same underlying issue of go CVE-2019-16276 due to the fact that it's based off of ported go code from their old standard library. [Here's the commit that fixed the CVE.](https://github.com/golang/go/commit/6e6f4aaf70c8b1cc81e65a26332aa9409de03ad8) Long story short, some off the shelf proxies and caching servers allow for passing unaltered malformed headers to backends that they're fronting. When they pass invalid headers that they don't understand this can cause issues with HTTP request smuggling. I believe that to this date, this is the default behavior of AWS ALBs--meaning any server that strips whitespace from the tail end of header field names and then interprets the header, when placed behind an ALB, is susceptible to request smuggling. The current behavior is actually specifically called out in [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2.4) as something that MUST result in a rejected message, but the change corresponding to this PR, is more lenient and what both go and nginx currently do, and is better than the current behavior.

view details

Yusuke Sakurai

commit sha b9e5e4c7ec9e044f014f2b8a5cfd469f92091ec2

fix: test_create_cache_if_dir_not_exit (#4636) This test doesn't remove created directory after test. It will fail on next run.

view details

Bartek Iwańczuk

commit sha ee126eb4a72ba757cc819dc3656f1ab89666ce81

remove std/testing/runner.ts (#4649)

view details

Giorgi Rostomashvili

commit sha f82b9ba329856b9b52c831b456e4823fad62f858

fix: fetch reference types for JS files (#4652) Fixes #4000 and fixes #4476. Now always tries to fetch reference types for JS files. Does not throw if it fails, since Typescript compiler will complain if the file is not there(it will try to fetch it again first) and people who just use JS should not be bothered by this error. Not sure about my test, it passes and catches the bug but maybe there is a better way to express it.

view details

Ali Hasani

commit sha f5d505332e862b21e650324e7013c8f6f27e06c4

Remove media_types from std/README.md (#4650)

view details

Ali Hasani

commit sha 47a580293eb5c176497264f1c3f108bf6b2c480d

Add exists and existsSync to std/node (#4655)

view details

Bartek Iwańczuk

commit sha dd3a94933a82975b0827e1c15d2c0d37d8c9c013

feat: add --importmap flag to deno bundle (#4651)

view details

Nayeem Rahman

commit sha e586d0c8b813c276cd5a1ba30582022b3c2be2eb

feat(std/http/server): Respond with 400 on request parse failure (#4614)

view details

木杉

commit sha 481fcfc8bd291c678d14b20c7c34a925503b8507

file_server: use text/typescript instead of application/typescript (#4620) I just tried it and found that using application/typescript, the browser will download the file directly, I think that .ts should be mapped to application/javascript or text/typescript

view details

Ryan Dahl

commit sha 62726430bedba7cca4d98e7714f3a8b49db3e89e

Remove __timers namespace (#4662)

view details

Akshat Agarwal

commit sha caff550b6c6edf7f26ca9e2aa57e042479c36704

BREAKING: Rename 'deno fetch' subcommand to 'deno cache' (#4656)

view details

Ryan Dahl

commit sha 51f5276e8cbce89f396458e754d8f31c11fbf1ec

Remove __textEncoding and __performanceUtil namespaces (#4663)

view details

push time in 10 hours

pull request commentdenoland/deno

Log improvements and new log handler

Thanks for the review @bartlomieju. That's my review changes now uploaded.

cknight

comment created time in 19 hours

Pull request review commentdenoland/deno

Log improvements and new log handler

 export class ConsoleHandler extends BaseHandler {  export abstract class WriterHandler extends BaseHandler {   protected _writer!: Writer;-  private _encoder = new TextEncoder();-+  #encoder = new TextEncoder();++  /** @deprecated - `this._writer.write()` is an async call.  Under heavy load+   * testing has shown a significant loss of log messages being written.  Also,+   * if the process terminates while writing a log, that log message is also+   * lost.  It is recommended that handlers override this method with a+   * synchronous implementation (see FileHandler).+   */   log(msg: string): void {-    this._writer.write(this._encoder.encode(msg + "\n"));+    this._writer.write(this.#encoder.encode(msg + "\n"));   } }  interface FileHandlerOptions extends HandlerOptions {   filename: string;+  mode?: LogMode; }  export class FileHandler extends WriterHandler {-  private _file!: File;-  private _filename: string;+  protected _file!: File;+  protected _filename: string;+  protected _mode: LogMode;+  #encoder = new TextEncoder();    constructor(levelName: string, options: FileHandlerOptions) {     super(levelName, options);     this._filename = options.filename;+    // default to append mode, write only+    this._mode = options.mode ? options.mode : "a";   }    async setup(): Promise<void> {-    // open file in append mode - write only-    this._file = await open(this._filename, "a");+    this._file = await open(this._filename, this._mode);     this._writer = this._file;   } +  log(msg: string): void {

Yes, I considered this too. This definitely needs more thought though as I think the async implementation isn't straightforward, at least to get something robust which can handle high throughput. Something for another PR I think.

cknight

comment created time in 19 hours

Pull request review commentdenoland/deno

Log improvements and new log handler

 export class ConsoleHandler extends BaseHandler {  export abstract class WriterHandler extends BaseHandler {   protected _writer!: Writer;-  private _encoder = new TextEncoder();-+  #encoder = new TextEncoder();++  /** @deprecated - `this._writer.write()` is an async call.  Under heavy load+   * testing has shown a significant loss of log messages being written.  Also,+   * if the process terminates while writing a log, that log message is also+   * lost.  It is recommended that handlers override this method with a+   * synchronous implementation (see FileHandler).+   */

As the WriteHandler class is abstract, I've removed the @deprecated comment and changed this log method to be abstract too. This will generate compile errors for anyone currently subclassing WriterHandler with a custom implementation rather than if I removed it entirely, which would cause log() fall back to BaseHandler with a noop log method which could confuse or cause issues.

cknight

comment created time in 19 hours

Pull request review commentdenoland/deno

Log improvements and new log handler

 unknownLogger.info("foobar"); // no-op  ### Loggers -Loggers are objects that you interact with. When you use logger method it+Loggers are objects that you interact with. When you use a logger method it constructs a `LogRecord` and passes it down to its handlers for output. To-create custom loggers speficify them in `loggers` when calling `log.setup`.+create custom loggers, specify them in `loggers` when calling `log.setup`.  #### `LogRecord`  `LogRecord` is an object that encapsulates provided message and arguments as well some meta data that can be later used when formatting a message.  ```ts-interface LogRecord {-  msg: string;-  args: any[];-  datetime: Date;-  level: number;-  levelName: string;+class LogRecord {+  readonly msg: string;+  readonly args: any[];+  readonly datetime: Date;+  readonly level: number;+  readonly levelName: string; } ```  ### Handlers -Handlers are responsible for actual output of log messages. When handler is-called by logger it firstly checks that `LogRecord`'s level is not lower than+Handlers are responsible for actual output of log messages. When a handler is+called by a logger, it firstly checks that `LogRecord`'s level is not lower than level of the handler. If level check passes, handlers formats log record into string and outputs it to target. -`log` module comes with two built-in handlers:+`log` module comes with three built-in handlers: -- `ConsoleHandler` - (default)-- `FileHandler`+#### `ConsoleHandler` -#### Custom message format+This is the default logger. It will output color coded log messages to the+console via `console.log()`. This logger takes `HandlerOptions`:++```typescript+type FormatterFunction = (logRecord: LogRecord) => string;++interface HandlerOptions {+  formatter?: string | FormatterFunction; //see `Custom message format` below+}+```++#### `FileHandler`++This handler will output to a file using an optional mode (default is `a`, e.g.+append). The file will grow indefinitely. This logger takes `FileOptions`:++```typescript+interface FileHandlerOptions {+  formatter?: string | FormatterFunction; //see `Custom message format` below+  filename: string;+  mode?: LogMode; // 'a', 'w', 'x'+}+```++Behavior of the log modes is as follows:++- `'a'` - Default mode. Appends new log messages to the end of an existing log+  file, or create a new log file if none exists+- `'w'` - Upon creation of the handler, any existing log file will be removed+  and a new one created.+- `'x'` - This will create a new log file and throw an error if one already+  exists

now added

cknight

comment created time in 19 hours

push eventcknight/deno

Chris Knight

commit sha 6dbf6f0041b6b7a5d75afe61c1e842f8cc8fcd18

refactor: remove deprecated write method and call out permissions in docs

view details

push time in 19 hours

issue commentdenoland/doc_website

discussion: make page more like pkg.go.dev

Great ideas. A one stop shop for all documentation and information on a module would be excellent.

lucacasonato

comment created time in 21 hours

issue openeddenoland/doc_website

feature request: incorporate README.md

The API docs are really useful for developers when working with a module. However, this is only part of the picture. Having access to the README.md in the same place as the API docs will give a fuller picture of the capabilities of the API and how to use the API. For example, some of our APIs have no documentation in the code but are well documented in the README.md (example). If a README.md is present in the same directory as the mod.ts, it should linked to somehow.

Some options to include this could be:

  • README.md is the default view of the module with the left hand nav links to all the API details (as is)
  • Prominently highlight the README.md at the top of the left hand navigation
  • Prominently highlight the README.md at the top of the primary display pane

created time in 21 hours

issue openeddenoland/doc_website

feature request: inline expandable source

[src] opens in a new tab/window which can be a slightly jarring experience and may mean going back and forth between the source and the docs. One suggestion would be to have [src] expand an inline iframe with the source in it. Example:

Screenshot at 2020-04-09 10:09:23

created time in 21 hours

push eventcknight/deno

Chris Knight

commit sha 940c8880920c6f6b8b7aa00b1e232db481abe393

doc: Add wording on default file modes

view details

push time in 2 days

Pull request review commentdenoland/deno

Log improvements and new log handler

 unknownLogger.info("foobar"); // no-op  ### Loggers -Loggers are objects that you interact with. When you use logger method it+Loggers are objects that you interact with. When you use a logger method it constructs a `LogRecord` and passes it down to its handlers for output. To-create custom loggers speficify them in `loggers` when calling `log.setup`.+create custom loggers, specify them in `loggers` when calling `log.setup`.  #### `LogRecord`  `LogRecord` is an object that encapsulates provided message and arguments as well some meta data that can be later used when formatting a message.  ```ts-interface LogRecord {-  msg: string;-  args: any[];-  datetime: Date;-  level: number;-  levelName: string;+class LogRecord {+  readonly msg: string;+  readonly args: any[];+  readonly datetime: Date;+  readonly level: number;+  readonly levelName: string; } ```  ### Handlers -Handlers are responsible for actual output of log messages. When handler is-called by logger it firstly checks that `LogRecord`'s level is not lower than+Handlers are responsible for actual output of log messages. When a handler is+called by a logger, it firstly checks that `LogRecord`'s level is not lower than level of the handler. If level check passes, handlers formats log record into string and outputs it to target. -`log` module comes with two built-in handlers:+`log` module comes with three built-in handlers: -- `ConsoleHandler` - (default)-- `FileHandler`+#### `ConsoleHandler` -#### Custom message format+This is the default logger. It will output color coded log messages to the+console via `console.log()`. This logger takes `HandlerOptions`:++```typescript+type FormatterFunction = (logRecord: LogRecord) => string;++interface HandlerOptions {+  formatter?: string | FormatterFunction; //see `Custom message format` below+}+```++#### `FileHandler`++This handler will output to a file using an optional mode (default is `a`, e.g.+append). The file will grow indefinitely. This logger takes `FileOptions`:++```typescript+interface FileHandlerOptions {+  formatter?: string | FormatterFunction; //see `Custom message format` below+  filename: string;+  mode?: LogMode; // 'a', 'w', 'x'+}+```++Behavior of the log modes is as follows:++- `'a'` - Append new log messages to the end of an existing log file, or create+  a new log file if none exists+- `'w'` - Upon creation of the handler, any existing log file will be removed+  and a new one created.+- `'x'` - This will create a new log file and throw an error if one already+  exists++#### `RotatingFileHandler`++This handler extends the functionality of the `FileHandler` by "rotating" the+log file when it reaches a certain size. `maxBytes` specifies the maximum size+in bytes that the log file can grow to before rolling over to a new one. If the+size of the new log message plus the current log file size exceeds `maxBytes`+then a roll over is triggered. When a roll over occurs, before the log message+is written, the log file is renamed and appended with `.1`. If a `.1` version+already existed, it would have been renamed `.2` first and so on. The maximum+number of log files to keep is specified by `maxBackupCount`. After the renames+are complete the log message is written to the original, now blank, file.++Example: Given `log.txt`, `log.txt.1`, `log.txt.2` and `log.txt.3`, a+`maxBackupCount` of 3 and a new log message which would cause `log.txt` to+exceed `maxBytes`, then `log.txt.2` would be renamed to `log.txt.3` (thereby+discarding the original contents of `log.txt.3` since 3 is the maximum number of+backups to keep), `log.txt.1` would be renamed to `log.txt.2`, `log.txt` would+be renamed to `log.txt.1` and finally `log.txt` would be created from scratch+where the new log message would be written.++Options for this handler are:++```typescript+interface RotatingFileHandlerOptions {+  maxBytes: number;+  maxBackupCount: number;+  formatter?: string | FormatterFunction; //see `Custom message format` below+  filename: string;+  mode?: LogMode; // 'a', 'w', 'x'+}+```++Additional notes on `mode` as described above:++- `'w'` in addition to starting with a clean `filename`, this mode will also+  cause any existing backups (up to `maxBackupCount`) to be deleted on setup+  giving a fully clean slate.+- `'x'` requires that neither `filename`, nor any backups (up to+  `maxBackupCount`), exist before setup

As mentioned above, 2 sections on file modes are necessary as the behaviour is different between the two file handlers.

cknight

comment created time in 2 days

Pull request review commentdenoland/deno

Log improvements and new log handler

 unknownLogger.info("foobar"); // no-op  ### Loggers -Loggers are objects that you interact with. When you use logger method it+Loggers are objects that you interact with. When you use a logger method it constructs a `LogRecord` and passes it down to its handlers for output. To-create custom loggers speficify them in `loggers` when calling `log.setup`.+create custom loggers, specify them in `loggers` when calling `log.setup`.  #### `LogRecord`  `LogRecord` is an object that encapsulates provided message and arguments as well some meta data that can be later used when formatting a message.  ```ts-interface LogRecord {-  msg: string;-  args: any[];-  datetime: Date;-  level: number;-  levelName: string;+class LogRecord {+  readonly msg: string;+  readonly args: any[];+  readonly datetime: Date;+  readonly level: number;+  readonly levelName: string; } ```  ### Handlers -Handlers are responsible for actual output of log messages. When handler is-called by logger it firstly checks that `LogRecord`'s level is not lower than+Handlers are responsible for actual output of log messages. When a handler is+called by a logger, it firstly checks that `LogRecord`'s level is not lower than level of the handler. If level check passes, handlers formats log record into string and outputs it to target. -`log` module comes with two built-in handlers:+`log` module comes with three built-in handlers: -- `ConsoleHandler` - (default)-- `FileHandler`+#### `ConsoleHandler` -#### Custom message format+This is the default logger. It will output color coded log messages to the+console via `console.log()`. This logger takes `HandlerOptions`:++```typescript+type FormatterFunction = (logRecord: LogRecord) => string;++interface HandlerOptions {+  formatter?: string | FormatterFunction; //see `Custom message format` below+}+```++#### `FileHandler`++This handler will output to a file using an optional mode (default is `a`, e.g.+append). The file will grow indefinitely. This logger takes `FileOptions`:++```typescript+interface FileHandlerOptions {+  formatter?: string | FormatterFunction; //see `Custom message format` below+  filename: string;+  mode?: LogMode; // 'a', 'w', 'x'+}+```++Behavior of the log modes is as follows:++- `'a'` - Append new log messages to the end of an existing log file, or create+  a new log file if none exists+- `'w'` - Upon creation of the handler, any existing log file will be removed+  and a new one created.+- `'x'` - This will create a new log file and throw an error if one already+  exists

Thanks for the feedbavck @Drunpy. For info, the section above you've suggested a change for sits within the FileHandler docs. Therefore, references to maxBackupCount don't apply, as it is only used for the new RotatingFileHandler. However, I like your suggestion for the 'Default' mode. and have incorporated this.

cknight

comment created time in 2 days

push eventcknight/deno

Chris Knight

commit sha c26296a1f75a05cff69378b7c725cfbd591e0798

test: make expected error message cross-platform compatible

view details

push time in 2 days

PR opened denoland/deno

Log improvements and new log handler

This PR brings a number of improvements to the std logger:

  • LogRecord is now immutable
  • Significant updates to README
  • Introduce new RotatingFileHandler
  • Introduce 'x' and 'w' file modes on log creation (in addition to 'a')
  • Fix issue with async log writes for FileHandler by making it synchronous, as the async version was dropping log messages in heavy load scenarios (and even hanging the process)

cc @bartlomieju

+450 -69

0 comment

6 changed files

pr created time in 2 days

push eventcknight/deno

Chris Knight

commit sha ba28cc627e58b2ec8fc0eff5dccee7503dd9489f

fix: improve speed of filesize lookup by 20 percent

view details

push time in 2 days

push eventcknight/deno

Chris Knight

commit sha c94dd032138cda0ede78b31130f8afab8f382551

Added tests and formatted code

view details

push time in 2 days

create barnchcknight/deno

branch : logImprovements

created branch time in 3 days

pull request commentdenoland/deno

BREAKING CHANGE: Remove deprecated mkdir, mkdirSync APIs

@ry - ready for review. Feel free to close without merge if you'd prefer to keep this deprecated API longer.

cknight

comment created time in 5 days

PR opened denoland/deno

BREAKING CHANGE: Remove deprecated mkdir, mkdirSync APIs

While updating the API documentation, I noticed that mkdir and mkdirSync were the only APIs with deprecated variants. This PR removes these deprecated variants to clean up the API in advance of the Deno 1.0 release. The variants removed have been deprecated since 0.29.0.

+10 -40

0 comment

2 changed files

pr created time in 6 days

create barnchcknight/deno

branch : removeDeprecation

created branch time in 6 days

push eventcknight/deno

Nayeem Rahman

commit sha 017a611131a35ccf5dbfce6a2a665fa569e32ec1

feat(std/http/server): Respond with 400 on request parse failure (#4551)

view details

Nayeem Rahman

commit sha 270e87d9db48e983671848257eb360b4c7405d31

refactor(cli/js/testing): Reduce testing interfaces (#4451) * Reduce "testing" interfaces * Use a callback instead of a generator for Deno.runTests() * Default RunTestsOptions::reportToConsole to true * Compose TestMessage into a single interface

view details

木杉

commit sha 6291ac82ee75481f04cf6ce3da782e5dd20cf693

fix(#4554): use --inspect in repl & eval (#4562)

view details

木杉

commit sha 5ac2c4aa2e3018b9b997af432e6fb4803383b4d8

fix(#4550): setCookie should append cookies (#4558)

view details

Khải

commit sha fa7929ad2c05c5d04106800adbe944c54bd443d7

fix(file_server): use media_types for Content-Type header (#4555)

view details

Chris Knight

commit sha 1c30d755bf5600b4abda8c24564b2003c74ccee4

better parameter names for a couple functions (#4559)

view details

Ryan Dahl

commit sha 578138a930b70057de61d257afad3011db15b1b1

Remove std/strings/pad.ts because String.prototype.padStart exists (#4564)

view details

木杉

commit sha 3a0b617503f4c81fb9773bd99c898270b98b9b5a

std(media_types): change .ts content type to application/typescript (#4563)

view details

Ryan Dahl

commit sha 12c6b2395be2bd1371284adf03e4826ba5edc761

Move encode, decode helpers to /std/encoding/utf8.ts, delete /std/strings/ (#4565) also removes std/encoding/mod.ts and std/archive/mod.ts which are useless.

view details

Marcus Weiner

commit sha 2ff8012dccf648916212918c69f6b5d7b6dedc56

Expose global state publicly (#4572)

view details

Kitson Kelly

commit sha 2e24385c487d5471aceae7d7e7de9da4c7d87064

Support dynamic import in bundles. (#4561)

view details

Luca Casonato

commit sha 3d56f3afcadf04cc082a77fa0ec2fcd9d76e039f

Added 'declare' handling to 'deno doc' (#4573)

view details

Ryan Dahl

commit sha ff0b32f81d4cdbae9fe868a16a8b19227d79c8b1

upgrade: rusty_v8 v0.3.10 (#4576)

view details

Ryan Dahl

commit sha c738797944bc7e373b51a04e4332c98010135545

feat: deno test --filter (#4570)

view details

Luca Casonato

commit sha 470681cd3c9857e803d02884199fd680e14a1bd2

Publish deno types on release (#4583)

view details

dubiousjim

commit sha 7a9273d9cfa8736575317bb3cc9465e07ed4ed18

Refactor and expand mkdir tests (#4579)

view details

Ryan Dahl

commit sha c8fc29fcca0171166b7093d278bfbe03d970f1a5

Revert "Respond with 400 on request parse failure" (#4593) readRequest should not write a response. This reverts commit 017a611131a35ccf5dbfce6a2a665fa569e32ec1.

view details

Ondřej Žára

commit sha b57d075c07c30000d46b09062cd9e7328bcff1bc

`deno doc` parses super-class names (#4595) Co-Authored-By: Luca Casonato <luca.casonato@antipy.com>

view details

Ondřej Žára

commit sha 6204555be3feaf5171dfb1bba15203ef2bb33265

"deno doc" parses the "implements" clause of a class def (#4604)

view details

Andy Finch

commit sha d8f32c7eff02fb62250e06c1bb1eda95b86a52a7

remove `Send` trait requirement from the `Resource` trait (#4585)

view details

push time in 6 days

issue commentdenoland/deno

Rename deno fetch subcommand to deno build

I prefer deno compile as a replacement to fetch, with deno package or deno release reserved for creating a self contained binary. Compiling is a clear instruction and it shouldn't matter whether your sources are local or remote. If no-compile really is a potential future requirement then deno prepare is a better fit for me.

kitsonk

comment created time in 6 days

PR opened denoland/deno

refactor: better named parameters

Minor API changes to improve name of parameters.

+22 -18

0 comment

2 changed files

pr created time in 9 days

create barnchcknight/deno

branch : parameterRename

created branch time in 9 days

push eventcknight/deno

Chris Knight

commit sha 2e48fcac758940fef472bc54ead800680460d0b5

docs: format

view details

push time in 9 days

pull request commentdenoland/deno

doc: Add reference on how to test deno types changes locally

Documentation on docs.py moved to tools/README.md. I've also added notes on format.py and lint.py. I'm not familiar enough with the other scrips to document them.

cknight

comment created time in 9 days

push eventcknight/deno

uki00a

commit sha 07ea145ec4d1defe4481035432bb63234560ba8d

re-enable a test (#4461)

view details

Yusuke Sakurai

commit sha c337d2c4349abd710b1ab0d4de3f1041cd02715c

clean up textproto code in std (#4458) - moved and renamed append() into bytes from ws and textproto - renamed textproto/readder_tests.ts -> textproto/test.ts

view details

Ryan Dahl

commit sha 3e74309798513c5238cef9aa1c6907c1173fec49

ci: releases should all use zip and LLVM target triples (#4460) Old release files are left around until we are able to update deno_install.

view details

Chris Knight

commit sha a0ba476feef9dcc1b3bbd5144d2e48ef5053ee09

doc: API improvements to chown, close, compile and connect (#4463)

view details

bartOssh

commit sha ec0738606753b34525988fd9f58a23cb300b7bc0

feat: first pass at "deno upgrade" (#4328)

view details

Ryan Dahl

commit sha d143fe61bc61030c0874c091aa0dd8bf5141b5fa

v0.37.0

view details

Bert Belder

commit sha 449dbe5272aef429067abe3226d30f640fd3bac3

Statically link the C runtime library on Windows (#4469)

view details

Ryan Dahl

commit sha b924e5ab7e69eab4d3b6d9a863a8fc2974f33b5d

v0.37.1

view details

João Souto

commit sha 70a50344315a4c3361fc321e78e076fb09a502b3

feat: Support Unix Domain Sockets (#4176)

view details

Kevin (Kun) "Kassimo" Qian

commit sha c61a231ff40c027af2df9b303b834535c6407a38

remove extra dot in Permission request output (#4471)

view details

Michał Sabiniarz

commit sha 2e5e5fe393059091ed3b69a484c89aa144046a4a

console: replace object abbreviation with line breaking (#4425)

view details

uki00a

commit sha b2478f3a217d5decbb638bf46e169ee58f17adad

docs: update manual about how to run tests for std (#4462)

view details

Bartek Iwańczuk

commit sha 30bcf6a2ea620aa989a7362e7f4a62fc11743bb4

Revert "avoid using same port number for test (#4147)" Ref #4467 This reverts commit 60cee4f045778777a16b6fffd6d5b9a1400d7246.

view details

Yusuke Sakurai

commit sha 07fc95aceee950316500cf2d770317b6e993356e

feat: add queueMicrotask to d.ts (#4477)

view details

Kevin (Kun) "Kassimo" Qian

commit sha addfdc4cd0ffa0e0f6b284379c8873a202af7d5b

fix: add fsEvent notify::Error casts (#4488)

view details

Kevin (Kun) "Kassimo" Qian

commit sha 3d228f5f9ec729d1b027588ccf36987c82f53516

hide source line if error message longer than 150 chars (#4487)

view details

Chris Knight

commit sha eeedb416c098c50a05292cbbd8135b7050a5ce0e

doc: improve various API docs and include examples (#4486)

view details

Kevin (Kun) "Kassimo" Qian

commit sha 3938071e91e7c3dcf7b4e727601e1e99005aceab

errors: replace .lines with explicit .split newline (#4483)

view details

Kevin (Kun) "Kassimo" Qian

commit sha 5d7bcf86fdb2bfcee0bfac24aeb7aeecb8b3faca

feat: window.close() (#4474)

view details

Ryan Dahl

commit sha fd432e234691cfc660028f4873eef9c3bf70acee

upgrade: dprint 0.9.5 (#4491)

view details

push time in 9 days

push eventcknight/deno

Chris Knight

commit sha a053462566874f699fa7f27961143e5f6ff070d3

refactor: rename ConsoleOptions to InspectOptions (#4493)

view details

Chris Knight

commit sha 8bcdb422e387a88075126d80e1612a30f5a7d89e

Improve isatty and kill API docs; Deno.kill() - throw on Windows (#4497)

view details

Ryan Dahl

commit sha 2874664e9131616b71dd0d7d23750245b023833f

feat: Support Inspector / Chrome Devtools (#4484) This is a first pass implementation which is still missing several important features: - support for --inspect-brk (#4503) - support for source maps (#4501) - support for piping console.log to devtools console (#4502) Co-authored-by: Bert Belder <bertbelder@gmail.com> Co-authored-by: Matt Harrison <mt.harrison86@gmail.com> Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>

view details

Ryan Dahl

commit sha 5837ce464c3283dc13f7bec237902b8c637f462d

upgrade: rusty_v8 to v0.3.9 (#4505)

view details

Kitson Kelly

commit sha 1397b8e0e7c85762e19d88fde103342bfa563360

upgrade: dprint 0.9.6 (#4509)

view details

Kitson Kelly

commit sha bced52505f32d6cca4f944bb610a8a26767908a8

Update to Prettier 2 and use ES Private Fields (#4498)

view details

Bartek Iwańczuk

commit sha 3fac487461abf055165fe0e2bb962573950277b8

feat: Add "deno doc" subcommand (#4500)

view details

Ryan Dahl

commit sha d6cb3892d48209fdb9c5196bb444e33a82bd3724

v0.38.0

view details

Luca Casonato

commit sha ad198b1cf175a1b88a6f698510bb0122e569f3ac

feat: Added colors to doc output (#4518)

view details

Kevin (Kun) "Kassimo" Qian

commit sha 2f7842246ecce1d69e13144931fd3b6417f4fdb0

fix(inspector): proper error message on port collision (#4514)

view details

Ryan Dahl

commit sha 6ae47449ec68b3353ef74fa232b1c1ff5b608773

Ignore flaky test cafile_info (#4517) Ref #4512

view details

Chris Knight

commit sha e88dcdc5e15fe4bc20b45e59d22fe993a6073da7

API doc improvments (#4525)

view details

Niklas Eicker

commit sha 92f1c71a6fde3701224f213f48e14776f9f8adee

doc: Fix some typos and improve a few sentences in the std manual (#4522)

view details

Luca Casonato

commit sha d795d3436246b609c572921ea4511fbde37f0ff3

fix(doc): Safely deal with optional type (#4526)

view details

Kitson Kelly

commit sha 7670a13f8a036589f200296693957e4e24ef769a

feat: Add common to std/path (#4527)

view details

uki00a

commit sha a98512af9a123b77332f0e7a75cfce753b7189bc

fix(std/encoding/csv): enable skipped tests (#4520)

view details

Michał Sabiniarz

commit sha 4b71ac550ea964e9c647dbb6bd9879bc06357255

console: iterable printing improvements (#4472) 1. Array elements are now grouped the same as in Node.js 2. Limit to 100 (Node.js default) elements to display in iterable 3. Print each element in new line if excessing max line length (same as in Node.js) 4. Print length of the TypedArray 5. Print information about empty items in Array

view details

Andres Villegas

commit sha 3892d49165f00b2ce078825c204ba8ceaa21f386

fix: Add check to fail the benchmark test on server error (#4519)

view details

Michał Sabiniarz

commit sha 30fdf6dc83d3a9d44436528959c39d3eab14cbbb

console: print promise details (#4524)

view details

dubiousjim

commit sha bdcb926b37d9ac79b58c66b418a9c37fa746eeb7

Fix umask test (#4533)

view details

push time in 9 days

delete branch cknight/deno

delete branch : docUpdate8

delete time in 9 days

PR opened denoland/deno

doc: Improve API documentation and add examples for Deno functions

This is the final PR in the series of work to update the documentation for the Deno functions API. Every function now has at least one example, greater consistency between functions and better calling out of Windows differences (or missing implementations). Hopefully this will provide a better end user experience.

Specifically, this PR addresses the following function APIs:

  • read/sync
  • readAll/sync
  • realpath/sync
  • remove/sync
  • rename/sync
  • resources
  • run
  • runTests
  • seek/sync
  • setRaw
  • shutdown/sync
  • signal
  • symlink/sync
  • test
  • truncate/sync
  • umask
  • utime/sync
  • write/sync
  • writeAll/sync
  • writeFile/sync
+305 -79

0 comment

1 changed file

pr created time in 9 days

create barnchcknight/deno

branch : docUpdate8

created branch time in 9 days

issue commentdenoland/deno

Deno.utime() does not appear to work on Windows

Never mind, it appears to be working now. How strange.

cknight

comment created time in 9 days

issue closeddenoland/deno

Deno.utime() does not appear to work on Windows

I can't tell if Deno.utime() is meant to work on Windows, but the error message isn't very user friendly. We should either throw a not implemented error or fix the issue.

Example code on Windows:

Deno.utimeSync("test_file.txt", 1556495550, 1556495550);

Give the error message:

error: Uncaught Error: The parameter is incorrect. (os error 87)

closed time in 9 days

cknight

issue openeddenoland/deno

Deno.utime() does not appear to work on Windows

I can't tell if Deno.utime() is meant to work on Windows, but the error message isn't very user friendly. We should either throw a not implemented error or fix the issue.

Example code on Windows:

Deno.utimeSync("test_file.txt", 1556495550, 1556495550);

Give the error message:

error: Uncaught Error: The parameter is incorrect. (os error 87)

created time in 9 days

issue openeddenoland/deno

Deno.utime() errors when supplied date parameter

Given the following code:

await Deno.utime("my_file.txt", new Date(), new Date());

The process errors out on v0.38.0 with:

error: Uncaught InvalidData: invalid type: floating point 1585688574.996, expected u64

The same error is present with Deno.utimeSync() as well.

created time in 9 days

pull request commentdenoland/deno

doc: Add reference on how to test deno types changes locally

Thanks for the feedback. I'll rework the PR to move this to a new README.md file in tools and link to the README.md from the user manual contributions section. While you may be the only one who generates the public docs, I've found docs.py really useful for checking the formatting output when doing all the updates and has caught a number of issues during my updates. It seems wrong not to publicise the useful tool for checking doc formatting during development.

cknight

comment created time in 10 days

pull request commentdenoland/deno

doc: Add reference on how to test deno types changes locally

@ry - gentle nudge to review. Should be a quick one.

cknight

comment created time in 10 days

pull request commentdenoland/deno

API doc improvments

Sorry @dubiousjim, and here was me thinking to take this on to get out of your way and let you catch up on your file system changes! Give me a shout if you want help resolving the conflicts.

cknight

comment created time in 11 days

PR opened denoland/deno

API doc improvments

Further improvements and examples for API docs. This round includes updates to:

  • loadavg
  • hostname
  • env (fix overload function docs)
  • open/openSync
  • read/readSync
  • readAll/readAllSync
  • mkdir/mkdirSync
  • makeTempDir/makeTempDirSync
  • makeTempFile/makeTempFileSync
  • readFile/readFileSync
  • readdir/readdirSync
  • readlink/readlinkSync
  • lstat/lstatSync
  • listen
  • listenTLS
  • connect
  • metrics
+176 -90

0 comment

1 changed file

pr created time in 11 days

push eventcknight/deno

Chris Knight

commit sha f13552324f183fd1b543a0241f74008779b882ae

doc: Update docs with examples and more explanation

view details

Chris Knight

commit sha 057afef79077f5c04163ef0de266e193b6e58628

doc: various improvements and added examples

view details

push time in 11 days

pull request commentdenoland/deno

feat: Add "deno doc" subcommand

This looks great! Really excited by this functionality. And I like that the overloaded methods are separated out, much easier to read.

bartlomieju

comment created time in 14 days

create barnchcknight/deno

branch : docUpdate7

created branch time in 14 days

push eventcknight/deno

Chris Knight

commit sha 7bc9fa2f5e4d7d9a46771e156cadf0f96c43673a

fix: import build correctly

view details

push time in 14 days

PR opened denoland/deno

Improve isatty and kill API docs; Deno.kill() - throw on Windows

This PR:

  • Improves isatty docs with examples
  • Improves kill docs with example and cleanup
  • Makes kill throw on Windows
+26 -7

0 comment

2 changed files

pr created time in 15 days

create barnchcknight/deno

branch : docUpdate6

created branch time in 15 days

push eventcknight/deno

Kevin (Kun) "Kassimo" Qian

commit sha c61a231ff40c027af2df9b303b834535c6407a38

remove extra dot in Permission request output (#4471)

view details

Michał Sabiniarz

commit sha 2e5e5fe393059091ed3b69a484c89aa144046a4a

console: replace object abbreviation with line breaking (#4425)

view details

uki00a

commit sha b2478f3a217d5decbb638bf46e169ee58f17adad

docs: update manual about how to run tests for std (#4462)

view details

Bartek Iwańczuk

commit sha 30bcf6a2ea620aa989a7362e7f4a62fc11743bb4

Revert "avoid using same port number for test (#4147)" Ref #4467 This reverts commit 60cee4f045778777a16b6fffd6d5b9a1400d7246.

view details

Yusuke Sakurai

commit sha 07fc95aceee950316500cf2d770317b6e993356e

feat: add queueMicrotask to d.ts (#4477)

view details

Kevin (Kun) "Kassimo" Qian

commit sha addfdc4cd0ffa0e0f6b284379c8873a202af7d5b

fix: add fsEvent notify::Error casts (#4488)

view details

Kevin (Kun) "Kassimo" Qian

commit sha 3d228f5f9ec729d1b027588ccf36987c82f53516

hide source line if error message longer than 150 chars (#4487)

view details

Chris Knight

commit sha eeedb416c098c50a05292cbbd8135b7050a5ce0e

doc: improve various API docs and include examples (#4486)

view details

Kevin (Kun) "Kassimo" Qian

commit sha 3938071e91e7c3dcf7b4e727601e1e99005aceab

errors: replace .lines with explicit .split newline (#4483)

view details

Kevin (Kun) "Kassimo" Qian

commit sha 5d7bcf86fdb2bfcee0bfac24aeb7aeecb8b3faca

feat: window.close() (#4474)

view details

Ryan Dahl

commit sha fd432e234691cfc660028f4873eef9c3bf70acee

upgrade: dprint 0.9.5 (#4491)

view details

push time in 15 days

pull request commentdenoland/deno

Rename ConsoleOptions to InspectOptions and add Deno.inspect() documentation

@ry ready for review

cknight

comment created time in 15 days

PR opened denoland/deno

Rename ConsoleOptions to InspectOptions and add Deno.inspect() documentation

This PR includes:

  • Minor update to hostname documentation
  • Major update to inspect documentation
  • Renames ConsoleOptions to InspectOptions
+41 -14

0 comment

3 changed files

pr created time in 15 days

create barnchcknight/deno

branch : inspectChanges

created branch time in 15 days

issue commentdenoland/deno_website2

Example borken

What is the output of which deno? Also, you can try /Users/mrw/.local/bin/deno --version

mathiasrw

comment created time in 16 days

issue commentdenoland/deno

Panick on fsEvents where path doesn't exist

Thanks for the speedy turnaround @kevinkassimo!

cknight

comment created time in 16 days

delete branch cknight/deno

delete branch : docUpdate4

delete time in 16 days

push eventcknight/deno

Chris Knight

commit sha c43ee6124719f57f04c369cb56d72f3da60d081d

doc: format fixes

view details

push time in 16 days

PR opened denoland/deno

doc: improve various API docs and include examples

This PR continues the focus on improvements to the API documentation. In addition to minor cleanup, this PR amends the following APIs:

  • close
  • connectTLS
  • copy
  • cwd
  • dir
  • env
  • execPath
  • exit
  • formatDiagnostics
  • fsEvents
+83 -28

0 comment

1 changed file

pr created time in 16 days

create barnchcknight/deno

branch : docUpdate4

created branch time in 16 days

issue openeddenoland/deno

Panick on fsEvents where path doesn't exist

Given the following code:

const iter = Deno.fsEvents("non-existant.file");

The code aborts with the following error:

thread 'main' panicked at 'Can't downcast ErrBox(Error { kind: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" }), paths: [] }) to OpError', cli/op_error.rs:389:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
fatal runtime error: failed to initiate panic, error 5
Aborted

This is on:

deno 0.37.1
v8 8.2.308
typescript 3.8.3

created time in 16 days

pull request commentdenoland/deno

doc: Add reference on how to test deno types changes locally

@ry - ready for review

cknight

comment created time in 16 days

issue openeddenoland/deno

Deno typedoc is out of date

15 commits to lib.deno.ns.d.ts representing new features, new APIs and improved documentation in v0.37.1 are missing from deno.land typedocs. As one example, chdir is missing the added example.

created time in 17 days

push eventcknight/deno

uki00a

commit sha 07ea145ec4d1defe4481035432bb63234560ba8d

re-enable a test (#4461)

view details

Yusuke Sakurai

commit sha c337d2c4349abd710b1ab0d4de3f1041cd02715c

clean up textproto code in std (#4458) - moved and renamed append() into bytes from ws and textproto - renamed textproto/readder_tests.ts -> textproto/test.ts

view details

Ryan Dahl

commit sha 3e74309798513c5238cef9aa1c6907c1173fec49

ci: releases should all use zip and LLVM target triples (#4460) Old release files are left around until we are able to update deno_install.

view details

Chris Knight

commit sha a0ba476feef9dcc1b3bbd5144d2e48ef5053ee09

doc: API improvements to chown, close, compile and connect (#4463)

view details

bartOssh

commit sha ec0738606753b34525988fd9f58a23cb300b7bc0

feat: first pass at "deno upgrade" (#4328)

view details

Ryan Dahl

commit sha d143fe61bc61030c0874c091aa0dd8bf5141b5fa

v0.37.0

view details

Bert Belder

commit sha 449dbe5272aef429067abe3226d30f640fd3bac3

Statically link the C runtime library on Windows (#4469)

view details

Ryan Dahl

commit sha b924e5ab7e69eab4d3b6d9a863a8fc2974f33b5d

v0.37.1

view details

João Souto

commit sha 70a50344315a4c3361fc321e78e076fb09a502b3

feat: Support Unix Domain Sockets (#4176)

view details

push time in 17 days

PR opened denoland/deno

doc: API improvements to chown, close, compile and connect

API documentation improvements #3. This PR includes documentation updates to the following APIs:

  • chown()
  • close()
  • compile()
  • connect()
+31 -16

0 comment

1 changed file

pr created time in 18 days

create barnchcknight/deno

branch : docUpdate3

created branch time in 18 days

pull request commentdenoland/deno

doc: Add reference on how to test deno types changes locally

@kitsonk I very much agree that the contributing to deno section shouldn't be in the end user manual but in it's own home. However, in the meantime and until such work is undertaken to move the "Contributing" section, I believe this is the correct place for this change, sitting in the "Testing and Tools" sub-section alongside the existing documentation on ./tools/format.py and ./tools/lint.py for example.

cknight

comment created time in 19 days

PR opened denoland/deno

doc: Add reference on how to test deno types changes locally

As per title, this PR documents how to run the ./tools/docs.py to test your deno types changes locally.

+19 -0

0 comment

1 changed file

pr created time in 19 days

create barnchcknight/deno

branch : docGenerationInManual

created branch time in 19 days

push eventcknight/deno

Bartek Iwańczuk

commit sha 4a4894532e9ffe0066038783b4178c7dd770ba24

try to handle ConnectionReset error in windows CI for unit tests (#4407)

view details

Bert Belder

commit sha a2b285158242b86a002e353776d52742ea35a496

Upgrade rust crates (#4412)

view details

Bert Belder

commit sha 0ef99ac970729dac0de8ccb78eed8c1c74fcd350

Set environment variables correctly in Github Actions (#4412)

view details

Bert Belder

commit sha 67ab201e2653dfbda1a3277317ed182e99d494c2

Use V8 binary build in Github Actions (#4412)

view details

Ryan Dahl

commit sha 6bd940abfd0319d8d432970e63215090b700a936

Update manual (#4412)

view details

Ryan Dahl

commit sha fb27e71c01983cd1a51802b2517815de39239a3c

Fix benchmarks (#4416)

view details

Ryan Dahl

commit sha 83f49161953c0c79056a56a19754fbf298f53f21

ci: Use github action's cache in addition to sccache (#4417)

view details

Kitson Kelly

commit sha da8cb408c878aa6e90542e26173f1f14b5254d29

Provide compiled JSON to TypeScript compiler. (#4404) Fixes #4101 Previously, we would just provide the raw JSON to the TypeScript compiler worker, but TypeScript does not transform JSON. This caused a problem when emitting a bundle, that the JSON would just be "inlined" into the output, instead of being transformed into a module. This fixes this problem by providing the compiled JSON to the TypeScript compiler, so TypeScript just sees JSON as a "normal" TypeScript module.

view details

Bert Belder

commit sha 070464e2cc617ecbd2c63dc5c4ac0432a77a29fd

Fix unit test runner ConnectionReset bug (#4424) Fixes: #4373

view details

Bartek Iwańczuk

commit sha 6e2df8c64feb92653077a5494d2c64a9f6fd2f48

feat: Deno.test() sanitizes ops and resources (#4399) This PR brings assertOps and assertResources sanitizers to Deno.test() API. assertOps checks that test doesn't leak async ops, ie. there are no unresolved promises originating from Deno APIs. Enabled by default, can be disabled using Deno.TestDefinition.disableOpSanitizer. assertResources checks that test doesn't leak resources, ie. all resources used in test are closed. For example; if a file is opened during a test case it must be explicitly closed before test case finishes. It's most useful for asynchronous generators. Enabled by default, can be disabled using Deno.TestDefinition.disableResourceSanitizer. We've used those sanitizers in internal runtime tests and it proved very useful in surfacing incorrect tests which resulted in interference between the tests. All tests have been sanitized. Closes #4208

view details

Chris Knight

commit sha 2a34cbfaf9530e86f5c049f82f8e35c086e22263

Improve API docs for Deno.bundle and Deno.chdir (#4426)

view details

Chris Knight

commit sha 54d1f299dc774c695056f04cfe1013287b53b86a

Chmod API documentation improvements (#4427)

view details

Bartek Iwańczuk

commit sha b0b27c43100bf4a7303174b9765c853d2f76f207

refactor: rename Deno.TestDefinition.skip to ignore (#4400)

view details

Kitson Kelly

commit sha 5b10ab0984fd762c14caf524d59ec8b6940d2bfb

feat: Add helper functions for permissions to std (#4258)

view details

Bartek Iwańczuk

commit sha 8de4a05f2a93f194f71b959f4d47a1b4fc61aa41

fix: std/testing/runner.ts and deno test (#4392) After splitting "failFast" and "exitOnFail" arguments, there was a situation where failing tests did not exit with code 1. * fixed argument value passed to Deno.runTests() in deno test * fixed argument value passed to Deno.runTests() in std/testing/runner.ts * added integration tests for deno test to ensure failFast and exitOnFail work as expected * don't write test file to file system, but keep it in memory

view details

Bartek Iwańczuk

commit sha 74c37e759ac03267975309c1425223289ebc925f

remove std/testing/runner.ts, use deno test for std/ tests (#4397) This introduces BREAKING CHANGE by removing "std/testing/runner.ts". Std tests are now run using "deno test" subcommand.

view details

Nikolai Vavilov

commit sha 8c1c929034d46101b6a51ec5cf5e2f307ed0c271

fix: stack traces for modules imported via std/node's require (#4035)

view details

Kevin (Kun) "Kassimo" Qian

commit sha 2f3de4b4252b933ac1161ba099feaed9103ab149

Simplify timer with macrotask callback (#4385)

view details

Bartek Iwańczuk

commit sha 3ef34673c9b92aa3c54dfccb37c06b82d6fb3eab

std(http/server): close open connections on server close (#3679) Due to structure of "Server" for each open connection there's a pending "read" op. Because connection owned by "Server" are not tracked, calling "Server.close()" doesn't close open connections. This commit introduces simple tracking of connections for server and ensures owned connections are closed on "Server.close()".

view details

Ryan Dahl

commit sha 392d2c11182332b8d3c168169b1585e3419cb1eb

Fix cafile_install_remote_module test (#4429)

view details

push time in 19 days

create barnchcknight/deno

branch : chmodAPIImprovements

created branch time in 19 days

issue commentdenoland/deno

Strategizing about opendir/readdir

Thanks for the detailed and thorough write up @dubiousjim, this all seems reasonable to me. I'd prefer the sparse info with stat capabilities after if someone needs that info.

dubiousjim

comment created time in 19 days

delete branch cknight/deno

delete branch : bundleChdirDocImprovements

delete time in 22 days

delete branch cknight/deno

delete branch : chmodAPIImprovements

delete time in 22 days

PR opened denoland/deno

Chmod API documentation improvements

Next up for more user friendly API documentation: chmod

+24 -0

0 comment

1 changed file

pr created time in 22 days

push eventcknight/deno

Chris Knight

commit sha c88724799616ed48d5c2b8f4d8fa9252f6316a32

docs: Add noop note to chmodSync for Windows users

view details

push time in 22 days

create barnchcknight/deno

branch : chmodAPIImprovements

created branch time in 22 days

push eventcknight/deno

Chris Knight

commit sha 99aa82805d16c9cba9160933aed86730ae21282f

docs: format fix

view details

push time in 22 days

PR opened denoland/deno

Improve API docs for bundle and chdir

My intention is to try to improve some of the Deno API documentation to be more end user friendly. Rather than dump all edits at once in a single PR, I'll try to drip feed them in multiple PRs. First up are the APIs for bundle and chdir.

+17 -5

0 comment

1 changed file

pr created time in 22 days

push eventcknight/deno

Chris Knight

commit sha fbea75ce9d0631f9285245b0ac5ae1bdfbbe548c

doc: add reference to manual for deno bundle

view details

push time in 22 days

create barnchcknight/deno

branch : bundleChdirDocImprovements

created branch time in 22 days

issue openeddenoland/deno

Require read permission to perform Deno.bundle()

Deno.bundle() takes in as argument a file name as a string. If the file is of a supported media type (currently javascript, JSX, Typescript, TSX, Json or Wasm), it will bundle that file up and return the output to the calling module as a string of Javascript. No permissions are required. This effectively gives the calling module the ability to read the contents of any these media types located anywhere on the file system without requiring any permission.

Proof of concept

/some/other/directory/secrets.json

{"my_secret_API_key":"abcd1234"}

/deno/module/dir/bundle_poc.ts

const [ maybeDiagnostics, output ] = await Deno.bundle("/some/other/directory/secrets.json");
console.log(output);

when executed as: deno bundle_poc.ts

The output (trimmed) is:

Compile file:///deno/module/dir/bundle_poc.ts
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.

// This is a specialised implementation of a System module loader.

// @ts-nocheck
/* eslint-disable */

let System, __inst, __inst_s;

<...trimmed output...>

{ "my_secret_API_key": "abcd1234" }

__inst_s("secrets");

As demonstrated above, this method exposes the json data to the calling module. If Deno.bundle() can access any of these media types on the file system and allow the content to be accessed in the module, it should be required to run under the --allow-read permission.

created time in 23 days

push eventcknight/deno

crowlKats

commit sha 9833975ef21afced84c6a16724ce13d026f09298

feat: fetch should accept a FormData body (#4363)

view details

Kitson Kelly

commit sha 9050d36d5763beabb1a642819dd24d61cccb3ffe

std: Provide types for React and ReactDOM (#4376) Introduces `std/types` which is designed to provide types for common libraries that are compatible with Deno.

view details

push time in 24 days

create barnchcknight/deno

branch : fsCopyFile

created branch time in 24 days

Pull request review commentdenoland/deno

feat: Deno.test() sanitizes ops and resources

 declare namespace Deno {     fn: TestFunction;     name: string;     skip?: boolean;+    disableOpSanitizer?: boolean;+    disableResourceSanitizer?: boolean;

Nice, I prefer leakCheck to my suggestion.

bartlomieju

comment created time in 24 days

Pull request review commentdenoland/deno

feat: Deno.test() sanitizes ops and resources

 function formatDuration(time = 0): string {   return gray(italic(timeStr)); } +// Wrap `TestFunction` in additional assertion that makes sure+// the test case does not leak async "ops" - ie. number of async+// completed ops after the test is the same as number of dispatched+// ops. Note that "unref" ops are ignored since in nature that are+// optional.+function assertOps(fn: TestFunction): TestFunction {+  return async function asyncOpSanitizer(): Promise<void> {+    const pre = metrics();+    await fn();+    const post = metrics();+    // We're checking diff because one might spawn HTTP server in the background+    // that will be a pending async op before test starts.+    const dispatchedDiff = post.opsDispatchedAsync - pre.opsDispatchedAsync;+    const completedDiff = post.opsCompletedAsync - pre.opsCompletedAsync;+    assert(+      dispatchedDiff === completedDiff,+      `Test case is leaking async ops.

The term async ops will be new and confusing to some end users. Is there a better way to phrase this, give more information about what this is reporting or suggestion possible actions to take?

bartlomieju

comment created time in 24 days

Pull request review commentdenoland/deno

feat: Deno.test() sanitizes ops and resources

 declare namespace Deno {     fn: TestFunction;     name: string;     skip?: boolean;+    disableOpSanitizer?: boolean;+    disableResourceSanitizer?: boolean;

Is 'sanitize' the right word here? A new user might assume an opSanitizer will automatically do some clean up for them. Alternatives could be disableOpValidation and disableResourceValidation.

bartlomieju

comment created time in 24 days

issue openeddenoland/deno

Feature request: Add 'access' to get a user's permissions for the file or directory

This feature would allow a user to get the permissions of a file or directory. See also Node's API. This is also relevant to #3403, allowing us to provide a polyfill for fs.access in std/node.

cc: @dubiousjim

created time in 24 days

push eventcknight/deno

Bartek Iwańczuk

commit sha 1edb20b399944c6eec1d7c555ab170b6dd276840

refactor: add no-return-await lint rule (#4384)

view details

Chris Knight

commit sha 62942749e6982b9aee24c22a5abdbc44b7f0e6b6

test: Fix broken test and remove redundant test file (#4390)

view details

Kevin (Kun) "Kassimo" Qian

commit sha 49541a04d25ba7308759824213b6053a7b412e3e

console: Symbol.toStringTag and display Object symbol entries (#4388)

view details

Bartek Iwańczuk

commit sha 7d0b77440e635a666ed1c333df1217dd5fa043c1

fix: fetch closes unused body (#4393) This commit makes sure that "httpBody" resource is closed in case of redirections in fetch API.

view details

Bartek Iwańczuk

commit sha 0d14a7bd531c76e653ab4fc4e0a81cb25db05ab5

try to fix unit test runner on Windows (#4395) This PR attempts to fix intermittent errors occurring on Windows for "cli/tests/unit_test_runner.ts." Runner has been reworked to create only single TCP listener instead of one listener per worker. Additionally worker doesn't close TCP socket - it waits for parent process to close the socket and only then exits.

view details

Gurwinder Singh

commit sha 8077ade7413db72572b8685c883f078335e0561b

refactor: remove an unsafe and some boxing (#4398)

view details

dubiousjim

commit sha f9557a4ff6b73a4af37e713bb6b2294253c7b230

Add mode option to open/create (#4289)

view details

push time in 24 days

issue commentdenoland/deno

chmod doesn't work on Windows

Should the API be that 0o000 and 0o777 are required to change these attributes, and other values are ignored? Or that other values throw an error? Or that only the user-write bit (0o200) has an effect, and other bits are ignored?

I think the way node handles this is that only the user write-bit is honored. In my example 0o000 and 0o777 were arbitrary. 0o077 and 0o007 both behave as per 0o000 for example. Caveat, my access to a windows test box is limited, so I'm going off memory here.

cknight

comment created time in 24 days

pull request commentdenoland/deno

Fix broken test and remove redundant test file

LGTM, fix for CI is done in #4392

Thanks @bartlomieju, you're too quick for me!

cknight

comment created time in 24 days

delete branch cknight/deno

delete branch : fsReorg

delete time in 25 days

PR opened denoland/deno

Fix broken test and remove redundant test file

As pointed out by @dubiousjim, my recent PR contained two bugs in test files which somehow didn't trigger a CI failure. I'll try to explore this later (e.g. why the CI didn't catch these), but in the meantime, here are the fixes:

  • Correct path in module.ts
  • Delete fs_test.ts as the test code has moved to individual test files under _fs.
+1 -114

0 comment

2 changed files

pr created time in 25 days

create barnchcknight/deno

branch : fixBrokenTests

created branch time in 25 days

pull request commentdenoland/deno

refactor: move existing fs implementation to internal _fs directory

@dubiousjim That is very weird. You're right, both should have broken the CI build. I'll raise a new PR to get those onto master.

cknight

comment created time in 25 days

push eventcknight/deno

Bert Belder

commit sha 0df9823cba680d41b981e021a88aaf19e88b0e76

Upgrade to rusty_v8 0.3.5 / v8 8.2.308 (#4364)

view details

dubiousjim

commit sha 6cc40b08652d0224111dc5e902210174b5a63cee

BREAKING CHANGE FileInfo.len renamed to FileName.size (#4338)

view details

Chris Knight

commit sha a159165fe5f9fe53c3593af707888a7efc859d14

Node polyfill for fs.chown and fs.close (#4377)

view details

Nayeem Rahman

commit sha 64a35acd64f4a9aedfb52f6b364c229c6f7e4090

feat(cli/js/testing): Add TestDefinition::skip (#4351)

view details

Kitson Kelly

commit sha 2f4be6e9441c7d5b0afd0d37dccd48d3057bcd3f

Remove Object.prototype.__proto__ (#4341)

view details

Nayeem Rahman

commit sha 6471d4cfabf27c0f5e7b340568aa88712d270541

refactor(std): Uncomment disabled tests, use skip option (#4378)

view details

Yoshiya Hinosawa

commit sha ec3f44581bf4312cbbe36b71daca7f0474177cf3

docs: fix Deno.compile examples in manual.md (#4380)

view details

Bartek Iwańczuk

commit sha dc6e0c3591709d6f8887bb672af1de54dfc8a974

feat: Deno.core.{encode,decode}; standalone UTF-8 encoding/decoding (#4349) This commits add two new methods to "Deno.core" namespace: "encode" and "decode". Those methods are bound in Rust to provide a) fast b) generally available of encoding and decoding UTF-8 strings. Both methods are now used in "cli/js/dispatch_json.ts".

view details

Chris Knight

commit sha 620dd9724d4f8568efebb1642b49c653de9424cd

refactor: move existing fs implementation to internal _fs directory (#4381)

view details

Bartek Iwańczuk

commit sha 70434b5bfba701f9de2221b64ee40262c5370ae0

refactor: change test reporter output (#4371) This commit changes output of default test reporter to resemble output from Rust test runner; first the name of running test is printed with "...", then after test has run result is printed on the same line. * Split "Deno.TestEvent.Result" into "TestStart" and "TestEnd"; * changes TestReporter interface to support both events; Co-authored-by: Ryan Dahl <ry@tinyclouds.org>

view details

push time in 25 days

pull request commentdenoland/deno

refactor: move existing fs implementation to internal _fs directory

@ry - ready for review

cknight

comment created time in a month

push eventcknight/deno

Chris Knight

commit sha 9a59573b468f6d69088387ce1a0abb9df4c156c0

fix: only create symlink for tests if not on windows

view details

push time in a month

push eventcknight/deno

Kitson Kelly

commit sha 2f4be6e9441c7d5b0afd0d37dccd48d3057bcd3f

Remove Object.prototype.__proto__ (#4341)

view details

Nayeem Rahman

commit sha 6471d4cfabf27c0f5e7b340568aa88712d270541

refactor(std): Uncomment disabled tests, use skip option (#4378)

view details

Chris Knight

commit sha d6db448dff21493b51d6cdc7eb02af4c28b5e11f

Merge with upstream master

view details

push time in a month

PR opened denoland/deno

refactor: move existing fs implementation to internal _fs directory

The original fs Node polyfill implementation started life in fs.ts. Looking through the API for fs it seems clear that hosting all fs polyfill code in a single file would not be good design. Therefore, the internal _fs directory was created and a pattern established to have each API function in its own file with associated test file. So far, this seems to be holding up well.

This PR moves the existing fs.ts implementation code to its own files in the internal directory, so that fs.ts simply becomes a module which imports each implementation and then re-exports it.

Other than swapping a few if statements for skip in the test code, there are no functional changes in this PR.

+353 -282

0 comment

9 changed files

pr created time in a month

create barnchcknight/deno

branch : fsReorg

created branch time in a month

more