Deno

D

Deno

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

Join

Lock file in JSR library?

Should one use a lock file in a JSR library or not? If not, should one put it in .gitignore or rather set lock: false in deno.json?

Support for tags in custom Deno lint plugins

Hi everyone! I’m working on a custom Deno lint plugin that currently defines about ten rules. I’d like to be able to group those rules into named “tags” (for example, frontend, backend, performance, etc.) so that in one project I can enable only the rules tagged frontend and in another project only those tagged backend. Right now, Deno’s built-in lint rules support tagging and allow you to enable or disable rules by tag, but custom plugins don’t expose that same functionality. Would it be possible to add tag support for custom lint plugins so we can define and consume tags just like the built-in rules? Any guidance on how to implement this or interest in adding it to the core would be greatly appreciated thanks!...

Possible to use CsvParseStream in Node.js

Hi, is it possible to use nodejs file streams with deno's stdlib? ```js import fs from "node:fs"; import { CsvParseStream } from "@std/csv"; ...

Unexpected `deno.lock` update?

In this commit, how was deno.lock updated to add a new transitive dependency to @deno/cache-dir, when its version wasn’t touched at all?

Deno 2.4 emit for bundling with "npm:" imports inside code

Hi People, i try to bundle my code with Deno emit. Inside my code i am using packages from npm, like npm:solid-js@^1.9.6. It looks like the loader from bundle can not resolve the package. Does someone know, if it is somehow possible to make it work ? The Error: Bundler.loader.load(npm:solid-js@^1.9.6) failed: Module "npm:solid-js@^1.9.6" was an unsupported module kind....

Deno constantly panics after reporting error about NPM modules

HI, I am having quite the issue atm, i wanted to use elevenlabs SDK from Npm, but apparently this has corrupted something in my Deno installation I am now unable to import any kind of module (in the REPL) and the LSP dont work anymore....
No description

How can I instantiate a FetchEvent in my test?

Hi! I'm testing my Service Worker library that accepts a FetchEvent as an input. In my tests of that library, I want to instantiate a FetchEvent to test it, but I'm getting
error: ReferenceError: FetchEvent is not defined
instead. My compiler options are:...

Freeh mono repro example?

Anyone made a monorepro with nx or turbo that uses shadcn ui components?

Recently upgraded `deno` and am on a newer version than is available

Looks like there might have been a problem when publishing versions; when I ran deno upgrade recently, it upgraded my deno version to 2.4.0, but it looks like the real latest version is 2.3.1 and the version was supposed to be 2.3.0 when that update went out. Is there anything I should be worried about since deno --version currently reports 2.4.0 when it comes to future releases? Using deno upgrade 2.3.0 didn't install the previous version, it kept it at 2.4.0. I'm using the st...

SQLite null prototype

Hi, SQLite returns [Object: null prototype] as it's not an object. What is the ideal way of dealing with this? ```...

Coverage for child processes

Does coverage not work for spawned child processes? I was trying to write an end to end test by spawning my server as a child process, but it seems like any code touched in that child process doesn't count towards coverage. Is there any way to get it to count? In the following test case, I have it spawn my hono server, then wait for Deno.serve to start listening before it tries making a fetch request to the hono server. The test passes, showing that it was able to use the endpoint that returns "Hello, World!" text, but the coverage shows it as untouched since it is in a child process. ```...
No description

Missing `init_ops_and_esm` function for extensions in rust

Hi there, I'm just getting started with Deno and trying to embed it in rust. I'm using deno_core 0.344.0 and deno_console 0.204.0. The docs for deno_console (and most docs about extensions) reference calling init_opts_and_esm like deno_console::deno_console::init_ops_and_esm() but this function doesn't seem to exist. I can't seem to find where it is defined, it's not in the deno repo or any cargo docs. I find the same on an extension that I create with extension as well. There is an init function . However, when I try to use that I get a panic like: ``` thread 'main' panicked at ~/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/deno_core-0.344.0/runtime/jsruntime.rs:750:9:...

Issues with a Rust panic running workers and attempting to use `otel`

I'm having issues in an app that heavily relies on web workers; I am greeted by an almost instant issue: ``` ============================================================ Deno has panicked. This is a bug in Deno. Please report this...

CLI application

Hey there, I’m trying to build a CLI application with Cliffy, but I’m currently stuck on how the structure should look. Does anyone know of a good demo project for Cliffy?

I have a JSR Package: Can I Import it From My Filesystem Instead of jsr.io?

Hello! 👋 I have a JSR package, but I'm doing some local development and I have an app that imports my SDK JSR package, and the SDK imports more library packages in a Deno workspace. I need to be able to test my local changes without having to publish a new version of the JSR package each time, but I'm not sure how to do that. I tried to use "patch", but one of my JSR libs also depends on an NPM package, and it seems that the NPM package is not properly loaded....

Decorators with esbuild-deno-loader

I want to compile class method decorators (ecmascript stage 3) with esbuild per the bundling docs, but I get "Unexpected token @logged" at runtime ``` ❯ dist/bin/design-tokens-language-server error: Uncaught SyntaxError: Invalid or unexpected token @logged("hi")...

Fresh: `toggle` is not a function.

I can't seem to figure out why the function toggle is undefined. I'm passing it like other examples on the internet. button.tsx ```tsx interface Props { toggle: () => void;...

Upgrade to Deno 2.2 caused an outage

Today, we upgraded from 2.1.10 to 2.2.11 and this caused an outage. Although we have extensive observability, there is no indication of what could have been the cause of it. The only things we know is that: 1) We are certain this is related to the Deno version, as we have reverted this only 2) Whatever it was, this caused high memory pressure ...

Do exceptions escape for await blocks?

I have an issue that seems to be an exception escaping my async iterator, could anyone verify if this is indeed something that escapes the environment if I try to rethrow in for await block? ```ts try { await socket.waitForMessage("StreamBeginMessage");...
Next