Deno

D

Deno

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

Join

Embed `*/` in doc comment?

Per chance does deno doc have a solution for embedding */ inside a doc comment? There's no conclusion on the same issue in TSDoc, but one suggestion is to use a zero-width space in between the * and / character. This works well, but it's cumbersome and linters will complain about it.
No description

Auto-imports not suggesting import map paths when importing from the same base directory

Version: Deno 2.3.3 This appears to be a recent change from this PR: https://github.com/denoland/deno/pull/29098 Given an import map entry like:...

Help understanding Deno Deploy's KV usage limits and how to best optimize my DB

Hi, I was hoping to get some help understanding how to best optimize my game's Deno KV usage. I saw on the Deno Deploy's pricing page that database usage is metered in terms of KV read/write units per month. This would lead me to believe I should optimize for as few transactions as possible, but beside that it says (1KiB)/(4KiB). Is this referring to the max size of a single read / write? Or is this the max amount of information that can be transferred to / from the DB during that a month window, in which case I would also optimize for smaller transactions when possible. One of the areas this comes up in my game that I think would be helpful for me to understand is the deck. In my game each player has a set of cards that are each completely unique and can be modified individually (adding effects to specific cards etc.). I see two possible solutions to storing this: 1. Store one massive object that represents a players deck, with all the data about each specific card nested within it. This allows the entire deck to be fetched and set as one object reducing the number of transactions. However to draw or modify a card in the deck the entire deck needs to be fetched....

[Issue] Monorepo with 2 Vue App and one API

Hello, I recently started my first Deno project. I went for a mono-repo with the following structure: ```yml ├── apps/...

deno compile --include anything.wasm : relative import not prefixed error

I want to include a wasm file to load in a webview for a native program. The deno program itself does not actually load the wasm module. However, Deno insists on checking the import paths:
error: Relative import path "GOT.mem" not prefixed with / or ./ or ../ and not in import map ...
error: Relative import path "GOT.mem" not prefixed with / or ./ or ../ and not in import map ...
...

deno-loader module resolution error on WSL

Hello! I'm working on a deno/fresh project and while some colleagues on mac/windows are able to run successfully, I am getting many errors like this I keep getting errors like: [ERROR] Module not found "file:///mnt/PersonSearch.tsx" [plugin deno-loader]...
No description

Stream error with node-postgres (Suspected Deno runtime bug)

I think I have found an error in Deno's stream implementation, or at least an instance where it doesn't match node's implementation. I am putting together a bug report, but I wanted to see if anyone had any ideas before I send it.

Files with extension .mts do not get linting in WebStorm

I know this is probably IDE specific, but when asking JetBrains if they are responsible for language server issues or not, as they publish the various plugins, they avoided my question. I only asked once though so there's that. I've been using .mts for some time now, maybe overkill, but they are ESM files so it made sense. That said, I've had random success since moving to extended TypeScript language servers. In vanilla TypeScript it works as expected, but... outside of that it seems mildly random. Vue: linting breaks...

since today the TAB to auto-complete filenames doesn't work anymore with deno run

mac os 15.5 - deno 2.3.5 - zsh - error (eval):1: _deno: function definition file not found...

Deployment Issue with Next.js (15.2.4) on Deno Deploy – dispatcher.getOwner is not a function

I'm encountering an issue when deploying my Next.js application (v15.2.4) on Deno Deploy. While the build and deployment processes complete successfully, accessing the deployed endpoint results in an Internal Server Error. The logs show the following repeated error:
[TypeError: dispatcher.getOwner is not a function] TypeError: Cannot read properties of undefined (reading 'clientModules') at eventLoopTick (ext:core/01_core.js:178:7)...
No description

Semver update in deno.json + conventional commit

Is there any package that supports Deno for updating package semver like https://github.com/conventional-changelog/standard-version? What I want is to update version in deno.json, make a commit, create a git tag and generate changelog....

Deploy in single region

Is there a way to deploy in only one region using Deno Deploy? Im working with sockets and having multiple instances (regions) breaks my app. Fixing other way adds a lot of complexity and potential costs. (it seems)

VS Code Extension/LSP and rootDirs

The Deno VS Code extension and LSP don't seem to respect the compilerOptions.rootDirs setting. I've created a repro here: https://github.com/andymccurdy/deno-rootdirs The default TypeScript VS Code extension and LSP respect this setting and they can see imports from other rootDirs....

DenoKV multi-process

Was DenoKV originally designed with the intention of being used in a multi-process setup? I was considering using it from multiple processes, but sometimes I encounter a "database is locked" error....

Can't get @deno/kv-oauth to work

Hello, I am trying to use @deno/kv-oauth to enable login only for myself. I am using Angular in the frontend and Deno Deploy here. I would like to use Github OAuth for this and have already created an OAuth app—that should be fine. However, in my Angular frontend, I always get the following response:
https://secret.deno.dev/protected-route 401 Unauthorized
I haven't been able to get the whole thing to run locally yet, which makes it even more difficult. I would first show my Deno code here and then what I have in Angular. Maybe someone has an idea....

Web Cache API: Worth using to skip one kv.get()?

Is it worth caching a response using the Web Cache API just to avoid a single eventually-consistent kv.get() call? I'm wondering if the performance gain is significant enough in this case.

Packages for image creation

Are there any packages (internal or external) for image creation? I just need some basic functionality like fill rectangles and ideally drawing text. I don't need any rendering to the screen, but it needs to save as an image. I'm porting some lower level code that uses raylib, so that's my reference

Local Deno package imports: Use package's deno.json config "exports" map?

I'm working in a Deno workspace where the outer workspace deno.json references a project within (at some sub-dir path). - The project's deno.json uses the "exports" option to map "." to "./src/mod.ts". - The workspace root's deno.json then references this directory in the "imports" map, from "package-a" to "./package-a". ```...

Deno Subhosting Security

At my company I'm validating tools to run untrusted JavaScript code in a sandbox. I played around with Deno Subhosting, but I could not find a way to auth the subhosting deployed url. Is that intended or do I miss something?