Deno

D

Deno

Chat about Deno, a modern runtime for JavaScript and TypeScript.

Join

Deno BDD Testing in Visual Code Studio

I just install Visual Code Studio and loaded the Deno support for it. In my testing I have been using describe and it rather than Deno.test. I get the lense to run tests with with Deno.test is there any way to get it for describe and it...

assertThrowsAsync

does assertThrowsAsync still exist?...

__LINE__ __FILE__

is there anything like python's LINE FILE...

Deno bundle hangs

I've got this deno bundle issue, could someone help on that one? Not sure where to look. https://github.com/denoland/deno/issues/16341...

Sync uuid from string

How can I generate a UUID from a string synchronously? In the standard library I only found this async module https://deno.land/std@0.160.0/uuid/v5.ts?s=generate...

VS Code, Hello World -- F5 shows nothing in console?

I have a simple hello world program: ```ts let message: string = 'Hello World'; console.log(message);...

How to transform a Readable Stream to a file.

I have a ReadableStream from a post request and i cant find a way to transform the body(ReadableStream) to a file. I tried to pipe the ReadableStream into a file like this const file = await Deno.open('./test.png', {create: true,write: true,}) myPostRequest.body.pipeTo(file.writable); file.close();...

Silence error logs on Oak server

I'm trying to silence specific errors on an Oak server on Deploy. A Github issue said to add an 'error' event listener to the app. I did the following, but the error is still logged. Am I missing something? ```ts...

where does `document` come from

the default ultra gives me a client.tsx like this ``` import hydrate from "ultra/hydrate.js"; import App from "./src/app.tsx";...

How to create a crypto key to use with JWT from a Github pem file

Hi, I'm running into some difficulties to create a CryptoKey from a pem file. The pem key is created from this: https://docs.github.com/en/developers/apps/building-github-apps/authenticating-with-github-apps#authenticating-as-a-github-app The key format seems to be "ASN1", the error I'm getting:
unexpected ASN.1 DER tag: expected SEQUENCE, got INTEGER at DER byte 7 DataError: unexpected ASN.1 DER tag: expected SEQUENCE, got INTEGER at DER byte 7
unexpected ASN.1 DER tag: expected SEQUENCE, got INTEGER at DER byte 7 DataError: unexpected ASN.1 DER tag: expected SEQUENCE, got INTEGER at DER byte 7
What I'm trying to execute: ```crypto.subtle.importKey( 'pkcs8',...

Reddit fetch Vs. My noob brain part. I

Hello! So I want to fetch Reddit posts. I use this library. I have a few questions. https://github.com/Compositr/redditposts/tree/main/src/typings 1. What's the simplest way to return posts with a given flairtext? ...

How do I detect mouse clicks and key presses with Deno.stdin?

I don't even really have any base code, so I was just wondering as to how do I do the problem specified in the title.

How do I tell deno check to ignore this?

```
deno check cli/color-test.ts config.ts
Check file:///Users/dan/xall/aStuff/cli/color-test.ts...

how do I find a type to import?

I created a new ultra project with
deno run -A -r https://deno.land/x/ultra/create.ts
deno run -A -r https://deno.land/x/ultra/create.ts
...

ML with FFI

Suppose you wish to do some machine learning stuff with Deno, would it be optimal to use FFI with C over Rust?

Is there a way to determine what modules have been dynamically imported at runtime?

The builtin tools to compile/bundle/vendor don't account for dynamic imports (understandably), but is there a way at runtime that we could see what has been imported dynamically. This information could then be used to aid other tools, for example to generate a module that statically imports all of those dynamic modules.

weird interface

how can a class implement this interface ```ts interface I { (): void type: string...