Deno

D

Deno

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

Join

Help to get test coverage as shown in this vs code guideline?

Hey anyone can please help to get test coverage visualization as shown in this guide? https://code.visualstudio.com/docs/editor/testing...

Streaming download throws `Bad resource ID`

Anyone have an idea why this errors when closing the file even though the download was successfully written to the file? deno 1.45.2 ```ts...

use `process` without importing it

Is there a way to enable the global process variable without manually importing it from node:process? This would help a lot with making node projects compatible with deno without any code change.

Why do ES6 module imports differ from browser?

When importing a JS module (e.g. https://example.com/module.js) from a URL that returns a 301/302 redirect to a specific version of the module (e.g. https://example.com/module-42.js), the redirected module is initiated as a separate instance. This means that when explicitly importing the module from both the initial URL and the versioned URL, two instances of the module are created: import "https://example.com/module.js"; // -> redirects to https://example.com/module-42.js import "https://example.com/module-42.js";...

Event loop resolving prematurely

It looks like event loop clears on await it.return?.(); call which is really strange. I can't figure out whats happening here and where the problem is. Can anyone help with that? ```typescript import { assert } from 'jsr:@std/assert@^1.0.0';...

Deno express typescript is not working

Hi, I am trying to use deno with express and ts as this https://docs.deno.com/runtime/tutorials/how_to_with_npm/express/ example but getting any on express() result and also on middleware variables such as req, res. any ideas? deno version 1.44.4 ...
No description

How can I change the human language used by the LSP?

Hi team. I'm using Deno and VSCode. The errors and warnings reported by the LSP are marked in English. Previously, it respected my system's locale, but that is no longer the case. My first instinct was to change the typescript human language setting by changing the locale like this in my VSCode config.
"typescript.locale": "es"
"typescript.locale": "es"
...

Can non-TS artefacts (images, MD files, etc.) be added to the "deno build" bundle?

Is there a way to add non-TS artifacts (images, MD-files, etc.) to the "deno build" bundle?

Help with FFI strings

I've been testing with the deno FFI to see if it's powerful enough to leverage the power of other languages into Deno. This however has been very unfruitful as FFI documentations seems to be "everywhere" when it comes to types, take for example anything that returns a char*. There are very few hints on how is one supposed to handle such returns. I was working with a function similar to this:...

deno fmt doesn't work properly using Visual Studio Code and WSL2

I am using: - Visual Studio Code 1.91.1 - Deno extension (in WSL: UBUNTU) v3.38.0 - WSL extension v0.88.2 - Deno 1.45.3...
No description

Compiling for use on ARM

I'm trying to use the rust deno crate on ARM linux, so I need to compile it for that. I'm trying my hardest to compile for arm linux on an x64 windows machine (yes i know). So I'm using WSL, and trying to compile rustyV8. Currently my setup is the following: i have: ```...

"invalid HTTP version parsed" error in proxy environmnet

Hi, now I installed deno on Ubuntu 22.04 and run deno upgrade then following error was happened. Could you let me know workaround if possible? ``` $ deno upgrade Looking up latest version...

Difference between "deno test" and "VSCode Runner UI"

Hello. When using the deno test command I'm getting some failures (What is not expected). ``` FAILURES ...
No description

Weird behaviour with deno autocomplete

I thought it was because of my terminal so I uninstalled deno and re-installed it with cargo and I have this behaviour again. When I start typing deno run for example, if I use tab to autocomplete with a local file, I get this and it breaks the command line. I don't know if it's a known issue or if it's related to my configuration but I didn't experience that on older versions of Deno πŸ€”
No description

Fresh - Error while running deno run on the built _fresh directory

Hi, I installed the latest version of Deno yesterday on Manjaro using the install.sh script. I then created a fresh (haha) fresh project. I noticed that the cli task was not happy because it uses the --unstable flag which is not valid anymore. Then I used the build task that successfully created a _fresh folder, but when I tried deno run -A _fresh/main.js I got the following error : ``` error: Uncaught (in promise) ReferenceError: history is not defined at file:///home/stephane/deno/fresh-project/_fresh/main.js:1:7893...

--watch flag doesn't restart on file creation

How can I trigger Deno to restart when a new file is added? The deno run --watch ... command only seems to trigger when a file is modified or deleted but not when a new file is created. My workaround currently is to use Deno.watchFs(".") to detect file creation and then modify an existing file which triggers the process to restart. This isn't ideal and it would be great if --watch would also restart on file creation....