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 commentdenoland/deno

Inconsistent camel case usage in Deno API

Researching this more, realpath and readlink are both common terms in the Unix space (in all lowercase) so this makes sense to keep as originally spec'd I guess. Read directory is more mixed:

Deno: readDir (current) and readdir (proposed) Node: readdir Python: readdir Go: ReadDir Rust: read_dir function and ReadDir struct

cknight

comment created time in 4 days

issue commentdenoland/deno

Inconsistent camel case usage in Deno API

Fair points, and as operating system commands mkdir and shutdown make sense to remain 'as is', but I wonder if Deno should conform to underlying libc naming conventions which most users won't be familiar with (though Node and Python familiarity are reasonable points to consider).

Go uses Pascal case, but interestingly, they are also inconsistent. For example, their read directory interface is not Readdir but ReadDir, however they also have Readlink instead of ReadLink.

cknight

comment created time in 4 days

issue commentdenoland/deno

Add Node.js native module polyfills to std/node

Nice one @dubiousjim. I've not yet looked at detail into what Deno can offer, but at a glance it looks like your pending PRs will get us a lot closer to a full polyfill.

kevinkassimo

comment created time in 5 days

issue openeddenoland/deno

Inconsistent camel case usage in Deno API

The Deno API seems to have inconsistent casing where multiple words are involved.

One pattern (majority of the API) uses camel case:

applySourceMap copyFile copyFileSync execPath makeTempDir etc.

The other pattern does not strictly use camel case:

readlink realpath realpathSync readdir (proposed) readdirSync (proposed)

My preference would be for consistent camel case usage throughout (top pattern above), but very open to discussion as well. It feels odd to readFile, but then readdir for example.

created time in 5 days

issue commentdenoland/deno

Add Node.js native module polyfills to std/node

@kevinkassimo - That's the 'events' polyfill complete now (#3944, #3960, #4016). I'm going to attempt to pick up fs next, though will progress this in small chunks due to its large size.

kevinkassimo

comment created time in 5 days

push eventcknight/deno

geoFlux

commit sha 2e7d449623b7faee8feb0a2970e0d6bb7c66b409

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

view details

Nikolai Vavilov

commit sha 19080667534954ac75caa1bcf34e3a55d5d55e4c

Update ws client example (#4012)

view details

Bartek Iwańczuk

commit sha 95563476f604c33e91d66e164e7a804c356c0802

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

view details

Chris Knight

commit sha 7b9f6e9c456175fd8a6c11049a2f5f723e909d03

feat: Asynchronous event iteration node polyfill (#4016)

view details

push time in 5 days

delete branch cknight/deno

delete branch : eventsOnNodePolyfill

delete time in 5 days

push eventcknight/deno

Bartek Iwańczuk

commit sha a0f015b1a39463ec0e98ec204ca727a5f023b200

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

view details

Ben Noordhuis

commit sha 503d8bfef208178be847cd9d80c62462e0a0d417

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

view details

Kitson Kelly

commit sha 98e585a284f6b8bb568cec52ca3599612b663ef3

Fix issue with detecting AMD like imports (#4009)

view details

push time in 5 days

PR opened denoland/deno

Asynchronous event iteration node polyfill

A port of the Node.js asynchronous event iterator 'on' function. This completes the node.js events polyfill, however be aware that the following remain intentionally unimplemented at this time:

  • EventEmitter.listenerCount(emitter, eventName) - Deprecated
  • Capture Rejections of Promises - Experimental
+299 -1

0 comment

2 changed files

pr created time in 5 days

push eventcknight/deno

Chris Knight

commit sha 4d0b6a41819091a99516dff763d06b4f2d4b9f31

docs: add jsDoc and improve types

view details

push time in 5 days

create barnchcknight/deno

branch : eventsOnNodePolyfill

created branch time in 5 days

push eventcknight/deno

Ryan Dahl

commit sha 87c329c45ac0e3382c115793094317df15cbe5bf

v0.33.0

view details

push time in 8 days

push eventcknight/deno

Bartek Iwańczuk

commit sha 79b3bc05d6de520f1df73face1744ae3d8be0bb8

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

view details

Nayeem Rahman

commit sha 701ce9b3342647cf01cb23c4fc28bc99ce0aa8c1

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

view details

Bartek Iwańczuk

commit sha a3bfbcceade3d359f677106399562b461b4af01a

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

view details

uki00a

commit sha 5a143cdbd34df590a24ec756a6319a89d7656e5c

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

view details

Bartek Iwańczuk

commit sha e0bcecee6042b219c6626172851af5a25362b948

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

view details

Bartek Iwańczuk

commit sha 61273085e40fb4d992eef4b1b5601e3567c80664

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

view details

Bartek Iwańczuk

commit sha b67f20be3b5234bad2565c1770fa89d49942b342

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

view details

木杉

commit sha 92019498f6361c31ad24decfc14e81660959f6cb

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

view details

Chris Knight

commit sha a7056095a5c9dd000c3c9468d63d695d029969bd

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

view details

Bartek Iwańczuk

commit sha 63718ab305f61e7b196380f15ef2b4bba3c533fa

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

view details

Bartek Iwańczuk

commit sha e6167c78134182c45689bda7bcb12af05009349c

chore: share HTTP server between tests (#3966)

view details

Nayeem Rahman

commit sha 3563ab4c53689480ac47871fe928ae7c78a2fcc3

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

view details

Kitson Kelly

commit sha 6bd846a780bec8a60d0a251ed1fb43e3add81be5

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

view details

Ryan Dahl

commit sha 9325744a9426241a2826a6fb5516269227e26efa

Clean up fmt flags and path handling (#3988)

view details

Yusuke Sakurai

commit sha 621aeef8364fcbd2da93b208971c51a4fbf08903

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

view details

push time in 9 days

PR opened denoland/deno

Node events polyfill: Monitor error events

This capability (EventEmitter.errorMonitor) was added in Node 13.6.

There is one more function to add (also added in Node 13.6) after this to complete the Node events polyfill.

+59 -11

0 comment

2 changed files

pr created time in 11 days

push eventcknight/deno

Chris Knight

commit sha b69af436950008ceeb5b1edf0ed78a106e725bb6

format: new line at end of file

view details

push time in 11 days

push eventcknight/deno

Benny Shi

commit sha e8f639ce53c5a232c84d499b0d6375a2d2ad7131

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

view details

Yusuke Sakurai

commit sha e6f204199b1a1f6c5d963da2b8cdfc5992656147

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

view details

Ryan Dahl

commit sha e1105a159406d8b64a833fa3266fd4ac7fc47a00

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

view details

Chris Knight

commit sha 81905a867ea3f942619229e330840d132c57a5da

feat: Event emitter node polyfill (#3944)

view details

Chris Knight

commit sha d34ecbcd5d89e30637e47429b999ca959cfca3e9

Merge with master

view details

push time in 11 days

push eventcknight/deno

Chris Knight

commit sha 81905a867ea3f942619229e330840d132c57a5da

feat: Event emitter node polyfill (#3944)

view details

push time in 11 days

delete branch cknight/deno

delete branch : eventEmitterNodePolyfill

delete time in 11 days

create barnchcknight/deno

branch : monitorErrorEvents

created branch time in 11 days

push eventcknight/deno

Luka Hartwig

commit sha 7d115a2a657fcfc54670e56cad3fe44fc7a59a9f

refactor: port fetch test to rust (#3887)

view details

Ryan Dahl

commit sha 55ea8546719579099a89132a5567919fd81742e9

Move create_channels into worker constructor (#3889)

view details

Chris Knight

commit sha a04e7270cdebb188ce5a1f779c5d2d56016a3f49

fix: Validate all tests included in unit_tests.ts (#3879)

view details

Chris Knight

commit sha 700f5e45ef0af01558d7619e9ca08ae130ca7263

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

view details

Ryan Dahl

commit sha ed680552a24b7d4b936b7c16a63b46e0f24c0e60

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

view details

Yusuke Sakurai

commit sha 699d10bd9e5f19ad2f4ffb82225c86690a092c07

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

view details

Nayeem Rahman

commit sha 971391dbaf8f5273eb2f16edd22b0c6cf694be46

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

view details

Ryan Dahl

commit sha 5e8581ff4b7bd4a58f1e7d16544ca6498952b5b1

fix 015_duplicate_parallel_import (#3904)

view details

Seungho Kim

commit sha 522e856347b27b939dac92eb592ce64d86a96c03

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

view details

Ryan Dahl

commit sha d9c84eb91eecdf1225091e4d2bea8e4c6a076504

Rename ThreadSafeGlobalState to GlobalState (#3907) simplify

view details

Yoshiya Hinosawa

commit sha 5a8ba3b114bbacf10f03abc0335a753585861c97

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

view details

Kitson Kelly

commit sha ea6179f7dce89416f1586ee18c2f437e68eabd38

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

view details

Yusuke Sakurai

commit sha c2986891f6aac87cec98232735945af756e6643f

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

view details

Ryan Dahl

commit sha 98fc7db47d2ae1d817ac595d7f21138678515474

Fix deno types | head (#3910)

view details

Ryan Dahl

commit sha 99186dbaa25c5715103f6a0e0df9fae9488470b3

Remove conditionals from installer (#3909)

view details

Ryan Dahl

commit sha 724e39f13f2f144703ce00e156cacfc653d8e209

Enable thread pool for blocking ops (#3912)

view details

Brad Dunbar

commit sha d7edf393b6f1178bc91ec9113412f23f5dbd61e1

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

view details

Bert Belder

commit sha 25467aa7c7852c3695091a547ffac4857478c037

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

view details

Bert Belder

commit sha f650c3edb3081ac0433b338c0c99418171656dd1

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

view details

Kevin (Kun) "Kassimo" Qian

commit sha 619a24390ff15d5ea5e577a4d0391823f94e8592

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

view details

push time in 11 days

pull request commentdenoland/deno

Event emitter node polyfill

@ry Thanks. I've added some jsdoc, but decided I will save my other changes for another PR. Basically I found a few extra functions added in Node 13.4 I'm missing. Ready for review now.

cknight

comment created time in 12 days

push eventcknight/deno

Chris Knight

commit sha 152d58b6510d8bd9ed00842e2bc851f281cbc34b

doc: add jdoc to public methods

view details

push time in 12 days

PR opened denoland/deno

Event emitter node polyfill

This is the polyfill implementation for the Node Events API. See also #3403. It is partly based off the nodejs/event.js and denolibs/event_emitter libraries.

+744 -23

0 comment

6 changed files

pr created time in 12 days

push eventcknight/deno

Chris Knight

commit sha cfe38b61546c8857fe62dcbdce97d1d11d273d15

Add node events polyfill

view details

push time in 12 days

create barnchcknight/deno

branch : eventEmitterNodePolyfill

created branch time in 13 days

issue commentdenoland/deno

Date.toLocaleString doesn't respect options

Looking at this more deeply, I'm now of the belief that adding date formatting tools to Deno isn't the right way to go. Dates can be so complex with timezones, locales, etc. that at best we could only deliver a small subset of possibilities which javascript already offers by default (however, not currently supported by Deno). Best to wait for ICU support and get it right from the beginning I think, rather than build a half-baked solution to be deprecated later. As well, for most people's needs who have a specific date formatting requirement, it should be easy to build their own specific use case date formatting routine.

@kitsonk Not sure how much control we have over the typescript compiler (I'm guessing not much?), but it'd be cool if the typescript compiler could warn on the use of Date.toLocaleString and such other methods that Deno doesn't support ICU yet, etc. which would be a better user experience than puzzling why the run time behaviour isn't working as expected. Probably too hard/not worth it, but the UX here isn't great, though I suppose Node lived with it for years.

Yamboy1

comment created time in 16 days

issue commentdenoland/deno

Date.toLocaleString doesn't respect options

I'd be happy to work on that once my current PR is complete. I'd intended to expand the functionality in std/datetime next anyway so it's a good fit.

Yamboy1

comment created time in 17 days

issue commentdenoland/deno

Date.toLocaleString doesn't respect options

@isAdrisal I agree, looks like a duplicate of #1968.

Yamboy1

comment created time in 17 days

delete branch cknight/deno

delete branch : validateAllTestsIncluded

delete time in 17 days

pull request commentdenoland/deno

[Fix] jsDoc broken for Deno.dir()

Thanks @axetroy & @ry !

cknight

comment created time in 17 days

pull request commentdenoland/deno

[Fix] jsDoc broken for Deno.dir()

Hmm, not sure why test_format.py failed. All this change has added are a few blank comment lines. Works locally for me.

cknight

comment created time in 17 days

PR opened denoland/deno

[Fix] jsDoc broken for Deno.dir()

markdown tables require an empty line above them.

Caveat: I'm not entirely sure how to test this locally. jsdoc didn't seem to want to run against the ts file.

+14 -0

0 comment

1 changed file

pr created time in 17 days

create barnchcknight/deno

branch : fixJsDoc

created branch time in 17 days

push eventcknight/deno

Chris Knight

commit sha 77f4df40f3d5a9456118dc0c296ee2a465b6033a

Fixed month reference in documented output of parseDate and parseDateTime function calls (#3859)

view details

Kevin (Kun) "Kassimo" Qian

commit sha e8df66c12cbb3e51f8776aa91e6db41bbfdcae5e

std/encoding: add base32 support (#3855)

view details

Luka Hartwig

commit sha f168597b7ab81afda3bf4749a81c360d364e7cf1

Remove //tests symlink (#3849)

view details

Rafael Vargas

commit sha 55063dd8e8e3ae52eb90bdf42e36d979dcbb5010

fix: Deno.remove() to properly remove dangling symlinks (#3860) For some reason, the unit tests for Deno.remove() were not being imported to unit_tests.ts and, consequently, not being executed. Thus, I imported them, refactored some existent ones and wrote new ones for the symlink removal case. Since the creation of a symlink is not implemented for Windows yet, assertions that consider this state were added when the tests are executed in this OS.

view details

Ryan Dahl

commit sha fba40d86c4cbb8ff406175820ea9a2d9eb2b40cd

Use tokio::test for some of cli's unit tests (#3868)

view details

serverhiccups

commit sha 2b0cf74a8f6335ae4e8ef2dfe1010d2695b1c518

Make fetch API more standards compliant (#3667)

view details

Bartek Iwańczuk

commit sha f4cc08c4fc97f86d82b860ac11a134dad75dfdca

v0.32.0

view details

Ryan Dahl

commit sha 0471243334ac1aeb76dcaadbc3f0b8114d188fb8

upgrade: dprint 0.3.0-alpha.6

view details

Ryan Dahl

commit sha 161cf7cdfd44ace8937fb7940727984990742d18

refactor: Use Tokio's single-threaded runtime (#3844) This change simplifies how we execute V8. Previously V8 Isolates jumped around threads every time they were woken up. This was overly complex and potentially hurting performance in a myriad ways. Now isolates run on their own dedicated thread and never move. - blocking_json spawns a thread and does not use a thread pool - op_host_poll_worker and op_host_resume_worker are non-operational - removes Worker::get_message and Worker::post_message - ThreadSafeState::workers table contains WorkerChannel entries instead of actual Worker instances. - MainWorker and CompilerWorker are no longer Futures. - The multi-threaded version of deno_core_http_bench was removed. - AyncOps no longer need to be Send + Sync This PR is very large and several tests were disabled to speed integration: - installer_test_local_module_run - installer_test_remote_module_run - _015_duplicate_parallel_import - _026_workers

view details

Bartek Iwańczuk

commit sha 70eccff7f1b82a726e22753716faeb4bdc1d2823

reenable some tests (#3882)

view details

Kitson Kelly

commit sha 145188bcf73e614e2df375b9d0a64540aa70f7b3

std/http/server::serve aligned to std/http/server::serveTLS (#3881)

view details

Tilman Roeder

commit sha 2ab49a80a62f00e5540907d6d85cf15a9cce070e

Do not encode files loaded from network as utf8 (#3856)

view details

Bartek Iwańczuk

commit sha 184be99f5b6e85a6041e72dfdd0afda46e5f8619

refactor: CLI subcommands and argv (#3886)

view details

push time in 17 days

issue commentdenoland/deno

Date.toLocaleString doesn't respect options

Interesting reading about this. Looks like v8 uses ICU to add internationalisation and deno would need additional work to support this.

Yamboy1

comment created time in 17 days

pull request commentdenoland/deno

Fix: Validate all tests included in unit_tests.ts

@bartlomieju - nice one, thanks for the speedy response. All tests passing now and ready for review.

cknight

comment created time in 18 days

issue commentdenoland/deno

Date.toLocaleString doesn't respect options

In addition to options, the locale is not respected either. Example (my default locale should be "en-GB"):

const date = new Date(Date.UTC(2018, 5, 26, 7, 0, 0));   
const options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' };
console.log("raw:          ", date.toLocaleString());
console.log("locale en-US: ", date.toLocaleString("en-US"));
console.log("locale en-DE: ", date.toLocaleString("de-DE", options));
console.log("long output:  ", date.toLocaleString("en-US", options));

Deno output:

raw:           Tue Jun 26 2018 08:00:00 GMT+0100 (BST)
locale en-US:  Tue Jun 26 2018 08:00:00 GMT+0100 (BST)
locale en-US:  Tue Jun 26 2018 08:00:00 GMT+0100 (BST)
long output:   Tue Jun 26 2018 08:00:00 GMT+0100 (BST)

Curiously, node doesn't recognize locale either (and seems to default to en-US).

Node output:

raw:           6/26/2018, 08:00:00
locale en-US:  6/26/2018, 8:00:00 AM
locale en-DE:  Tuesday, June 26, 2018
long output:   Tuesday, June 26, 2018

Chrome output:

raw:           26/06/2018, 08:00:00
locale en-US:  6/26/2018, 8:00:00 AM
locale en-DE:  Dienstag, 26. Juni 2018
long output:   Tuesday, June 26, 2018
Yamboy1

comment created time in 18 days

push eventcknight/deno

Chris Knight

commit sha a649e8c3f2a9d3aa605e424bdea5e5e293179f6e

test: apply test patch courtesy of bartlomieju

view details

push time in 18 days

pull request commentdenoland/deno

Fix: Validate all tests included in unit_tests.ts

@bartlomieju - The import dispatch_minimal_test.ts was missing from cli/js/unit_tests.ts. As part of this merge request, I've included this in the imports. However, it's highlighted a few failures. I've fixed one, but am stuck on malformedMinimalControlBuffer() in dispatch_minimal_test.ts. I've no idea what this code does so am struggling on how to fix. Here's the relevant code:

test(async function malformedMinimalControlBuffer(): Promise<void> {
  // @ts-ignore
  const res = Deno.core.send(1, new Uint8Array([1, 2, 3, 4, 5]));
  const header = res.slice(0, 12);
  const buf32 = new Int32Array(
    header.buffer,
    header.byteOffset,
    header.byteLength / 4
  );
  const arg = buf32[1];
  const result = buf32[2];
  const message = new TextDecoder().decode(res.slice(12));
  assert(arg < 0);
  assertEquals(result, Deno.ErrorKind.InvalidInput);
  assertEquals(message, "Unparsable control buffer");
});

All 3 assertions fail. On my machine (linux), arg is 2067407474, result is 1936026914 and message is sage":"expected value at line 1 column 1","kind":12},"promiseId":null} (the full error message is {"err":{"message":"expected value at line 1 column 1","kind":12},"promiseId":null}). As the last comitter of this code, I'm looking for help to fix this failing test! Any help most appreciated.

cknight

comment created time in 18 days

push eventcknight/deno

Chris Knight

commit sha 30581fc8ac5582fa9f51665604c16b0024471578

test: fix error stack trace for Deno.read()

view details

push time in 18 days

push eventcknight/deno

Chris Knight

commit sha 722572e42c3f1e1b7259b25a8ed8a8e0f5bb1321

test: fix file id. -1 doesn't work on Mac

view details

push time in 18 days

PR opened denoland/deno

Fix: Validate all tests included in unit_tests.ts

A comment in #3860 inspired this attempt at improving unit test robustness:

Our list of tests in cli/js/unit_tests.ts is rather error prone. We should figure out a better way to do this.

While far from perfect, this should at least highlight when unit tests are missing from the imports in unit_tests.ts.

Discovered while building this that dispatch_minimal_test.ts was not being run.

+34 -1

0 comment

3 changed files

pr created time in 18 days

push eventcknight/deno

Chris Knight

commit sha ac256c7994dd5c0a9d33ee3deb74cfe91c54c6d9

refactor: more sensible name

view details

push time in 18 days

push eventcknight/deno

Chris Knight

commit sha 89d434b1b43d386429fae8493eee36b8bda47736

style: apply format

view details

push time in 18 days

create barnchcknight/deno

branch : validateAllTestsIncluded

created branch time in 18 days

pull request commentdenoland/deno

installer: add uninstall subcommand in Rust

I'd agree that deno install is confusing. I was very surprised the first time I had a look under the covers at what the deno install actually did. Install to me means placing a binary on my system for use, not creating a run script for source code. I think install should be renamed.

kevinkassimo

comment created time in 19 days

delete branch cknight/deno

delete branch : stdDateDocFix

delete time in 20 days

push eventcknight/deno

Tim Ermilov

commit sha 2cd3994902fb6a4d4d0603c839a78503d792b96a

Add support for multiple files in fetch command (#3845)

view details

Andy Finch

commit sha 4f8a5c0239cd633ea3fd15a27046da3edee2b2f2

feat: support crate imports in deno_typescript (#3814) Co-authored-by: Ryan Dahl <ry@tinyclouds.org>

view details

push time in 20 days

PR opened denoland/deno

Fixed month reference in documented output of parseDate and parseDateTime

The representation of month in Javascript date objects are (painfully) '0' indexed. Therefore the documentation should show a January month as '0' and not '1' in its example output. I have also changed the day of month in the examples to '20' so as to make it visually easier to understand the format (since there is no month 20).

+4 -4

0 comment

1 changed file

pr created time in 20 days

create barnchcknight/deno

branch : stdDateDocFix

created branch time in 20 days

push eventcknight/deno

Bartek Iwańczuk

commit sha de5c099b47bd1d2e528f1a10179f130a02f26f86

feat: deno install in Rust (#3806) //std/installer couldn't be removed due to bug, but it's now deprecated.

view details

Chris Knight

commit sha 3de9540ac6ae5ce051ccd9be69c1d6ef64663a26

feat(std/node) Endianness (#3833)

view details

Kevin (Kun) "Kassimo" Qian

commit sha 97b2a0bb958549e298cd137778053210a05d85d8

bring back std/examples/xeval.ts (#3822)

view details

Ryan Dahl

commit sha af081d7449d73ff023b817a30c99236527567aac

upgrade: Rust 1.41.0 (#3838)

view details

Bartek Iwańczuk

commit sha c7a2a33ea1a3245bfc1b9af1db2282ef8e3f7ab3

chore: upgrade dprint (#3842)

view details

Bartek Iwańczuk

commit sha e1697421e2c00508cd78976b6ec586e056530c30

chore: remove std/installer, port installer tests to Rust (#3843)

view details

Ryan Dahl

commit sha 1dc8afe3afc483703641c907075e2d8aa7396cfd

Add NO_BUILD_SNAPSHOTS to speed up incremental builds (#3847)

view details

push time in 22 days

issue commentdenoland/deno

Add Node.js native module polyfills to std/node

@kevinkassimo - That's the 'os' polyfill taken as far as I can, so please mark this as partly completed. Now moving onto 'events'.

kevinkassimo

comment created time in 22 days

PR opened denoland/deno

Endianness

Endianness can be determined via a few simple lines of Javascript. Ideally this would be implemented alongside other os functionality in Deno, but for now it provides the necessary polyfill for the node os module. Credit to Mozilla.

+19 -10

0 comment

2 changed files

pr created time in 23 days

push eventcknight/deno

Chris Knight

commit sha 61f5b91000b6828792f672e6cfb58329e269d6a5

code formatting

view details

push time in 23 days

push eventcknight/deno

Chris Knight

commit sha d7a7c6a73ef5c4cf8ea4b93f35913e7fb72253aa

Upgrade EOL constants to fs EOL enum values

view details

push time in 23 days

create barnchcknight/deno

branch : endianness

created branch time in 23 days

push eventcknight/deno

Ryan Dahl

commit sha 9d98f0126c5e19704b273579acf40132a38ce43b

Remove dead code in cli/shell.rs (#3792)

view details

Kevin (Kun) "Kassimo" Qian

commit sha ec44be0760d647b3d005387d2f44ad0336d01024

lock: support lock-write for fetch command (#3787)

view details

Kitson Kelly

commit sha f604becaba0c747fdf8dd9d0d744c7bd19322e41

Improve support of type definitions (#3755)

view details

Bartek Iwańczuk

commit sha ac10d79d231d3b66b918764b9706597321850687

refactor: isomorphic snapshot for CLI (#3728)

view details

Bartek Iwańczuk

commit sha f32c31a0eba90b6b1f711a2d5dfe182157d3ecb5

dx: descriptive permission errors (#3808) Before: ``` ▶ target/debug/deno https://deno.land/std/examples/echo_server.ts error: Uncaught PermissionDenied: run again with the --allow-net flag ► $deno$/dispatch_json.ts:40:11 at DenoError ($deno$/errors.ts:20:5) at unwrapResponse ($deno$/dispatch_json.ts:40:11) at sendSync ($deno$/dispatch_json.ts:67:10) at listen ($deno$/net.ts:170:15) at https://deno.land/std/examples/echo_server.ts:4:23 ``` ``` ▶ target/debug/deno --allow-read=/usr https://deno.land/std/examples/cat.ts /etc/passwd error: Uncaught PermissionDenied: run again with the --allow-read flag ► $deno$/dispatch_json.ts:40:11 at DenoError ($deno$/errors.ts:20:5) at unwrapResponse ($deno$/dispatch_json.ts:40:11) at sendAsync ($deno$/dispatch_json.ts:91:10) ``` After: ``` ▶ target/debug/deno https://deno.land/std/examples/echo_server.ts error: Uncaught PermissionDenied: network access to "0.0.0.0:8080", run again with the --allow-net flag ► $deno$/dispatch_json.ts:40:11 at DenoError ($deno$/errors.ts:20:5) at unwrapResponse ($deno$/dispatch_json.ts:40:11) at sendSync ($deno$/dispatch_json.ts:67:10) at listen ($deno$/net.ts:170:15) at https://deno.land/std/examples/echo_server.ts:4:23 ``` ``` ▶ target/debug/deno --allow-read=/usr https://deno.land/std/examples/cat.ts /etc/passwd error: Uncaught PermissionDenied: read access to "/etc/passwd", run again with the --allow-read flag ► $deno$/dispatch_json.ts:40:11 at DenoError ($deno$/errors.ts:20:5) at unwrapResponse ($deno$/dispatch_json.ts:40:11) at sendAsync ($deno$/dispatch_json.ts:91:10) ```

view details

Ryan Dahl

commit sha d14864c57cebbd1d5bc18b8a9e05e522eb9987b0

Upgrade rusty_v8 (#3816)

view details

Bartek Iwańczuk

commit sha 161adfc51b750a7c8c62a898ea9948c2ad5b6cd9

workers: proper TS libs, more spec-compliant APIs (#3812) * split lib.deno_main.d.ts into: - lib.deno.shared_globals.d.ts - lib.deno.window.d.ts - lib.deno.worker.d.ts * remove no longer used libs: - lib.deno_main.d.ts - lib.deno_worker.d.ts * change module loading to use proper TS library for compilation * align to Worker API spec: - Worker.terminate() - self.close() - self.name

view details

cknight

commit sha f0a6062012c4e09553877c9feedb3fbc3d4625b9

Partial implementation of node os polyfill based on currently available Deno functionality (#3821)

view details

Bartek Iwańczuk

commit sha 73a3cc21d0e7ceec1275078db125f57ce97725fb

feat: dprint formatter (#3820) * rewrite fmt_test in Rust, remove tools/fmt_test.py * remove //std/prettier

view details

EnokMan

commit sha 1c6c6c6d7f85c7f9a7c77489abba669d5dff22ab

Deno.makeTempDir() check permissions (#3810)

view details

Ryan Dahl

commit sha e1b3a0769a09458855aeaedfc78176b90a1e0788

Try to fix docs.rs for cli crate (#3823)

view details

Ryan Dahl

commit sha 8e3bc774f73ba4736c1fa1d32d1d66d66f8af95e

Adjust dprint configuration to be closer to prettier (#3824)

view details

Ryan Dahl

commit sha 51089836eb835d6b4cc03653dcb0b7a281017157

Upgrade Rust crates (#3829)

view details

Ryan Dahl

commit sha 2338e7679c8840314642dbf3ea838908f5f35d3c

Remove --current-thread flag (#3830) This flag was added to evaluate performance relative to tokio's threaded runtime. Although it's faster in the HTTP benchmark, it's clear the runtime is not the only perf problem. Removing this flag will simplify further refactors, in particular adopting the #[tokio::main] macro. This will be done in a follow up. Ultimately we expect to move to the current thread runtime with Isolates pinned to specific threads, but that will be a much larger refactor. The --current-thread just complicates that effort.

view details

Ryan Dahl

commit sha 25b13c8917061c569e8f92da124b1b446dc223f0

Use tokio::main (#3831)

view details

push time in 23 days

PR opened denoland/deno

Partial implementation of node os polyfill

This is a partial implementation of the node os polyfill (see #3403 ). It provides implementation for the following:

  • arch()
  • homedir()
  • hostname()
  • EOL
  • constants.Signal (partial)

The following functions cannot be implemented at this time as Deno does not provide needed capabilities ( see issue #3802 ):

  • cpus()
  • endianness()
  • freemem()
  • getPriority()
  • loadavg()
  • networkInterfaces()
  • platform()
  • release()
  • setPriority()
  • tmpdir()
  • totalmem()
  • type()
  • uptime()
  • userInfo()
  • constants.UV_UDP_REUSEADDR
  • constants.dlopen
  • constants.Signal (partial)
  • constants.priority
+505 -1

0 comment

5 changed files

pr created time in 23 days

create barnchcknight/deno

branch : nodeOsPolyfill

created branch time in 23 days

issue commentdenoland/deno

TypeScript support in REPL

No idea about the practicality of this suggestion, but could you have the best of both worlds by having the typescript support enabled through a flag? In other words, one REPL (e.g. loaded via deno) for javascript and another for Typescript (e.g. loaded via deno -ts).

kitsonk

comment created time in a month

issue commentdenoland/deno

Add Node.js native module polyfills to std/node

I'm working on the 'os' polyfill, though as discussed in #3802 there's a lot of functionality Deno is missing.

kevinkassimo

comment created time in a month

issue openeddenoland/deno

Support reporting of CPU information

I am looking into the Node polyfill for 'os' ( #3403 ). Node offers the cpus() function to get information about the logical CPU cores. See cpus() API. Deno does not currently seem to offer any way to get at this information and new functionality will need to be added to Deno to complete this polyfill.

created time in a month

starteddenoland/deno

started time in a month

startedcknight/deno

started time in a month

fork cknight/deno

A secure JavaScript and TypeScript runtime

https://deno.land/

fork in a month

more