Deno

D

Deno

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

Join

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");...

Mocking the FileSystem

Hello! I'd like to mock the filesystem for some BDD tests - in other words, create some fake files before a test and tear them down afterwards. I need these mocks to specifically affect require.resolve calls. Do you have an example of this I could crib from?...

How to stub and spy an deep nested object in deno? (Firestore)

Im desperate with deno testing how can I stub a firestore object in deno? ```...

Web Cache API not available in Deno Binaries?

It seems like the Web Cache API isn't available in deno binaries created through deno compile. Is there any config that I need to change to enable this, or is this Web API just not available in Deno binaries? I see that the Web Storage API isn't available in Deno binaries, but I was wondering if the Web Cache API not working in Deno binaries is also intended. The specific error I'm seeing when I use try to use the the Web Cache API (in this case, caches.open("foo")) is TypeError: CacheStorage is not available in this context. I would appreciate any workarounds/solutions here, I need to be running my application through a binary generated through deno compile....

collab

anyone down for a collaboration for an project/brand someone who can build a artunning website, yeah...

Using express

Hi, I'm trying to use express with deno in https://github.com/the-benchmarker/web-frameworks/blob/master/javascript/express-deno/app.ts wuth the follwing command deno serve --parallel --port 3000 --allow-net --allow-read --allow-env app.ts. Is this somethinn doable ? Regards,...

@google-cloud/tasks not working

I'm trying to use the Cloud Tasks emulator from a Deno script using the @google-cloud/tasks npm package. I run the following code with deno run -A <path>, but I always get a timeout error like this: ``` Operation failed: Error: Total timeout of API google.cloud.tasks.v2.CloudTasks exceeded 20000 milliseconds before any response was received....

Deno Monorepo with nested applications and packages

I'm trying to move a node monorepo from NPM to Deno. It's got a set of applications in a directory called services, and set of libraries used by said services in packages. These are all independent, and are registered to the apps workspace (@example) for now. eg: if a service myapp registered as @example/myapp wanted packages/utils, it'd import @example/utils and it'd find it within packages. I'm trying to do the same in NPM but it seems like everything has to be flat, at the root. Am I not able to register workspaces that are deeper than the root directory? I've got /packages/foo/deno.json and packages/foo/mod.ts with a funciton exported. the deno.js has the following contents:...

Deno Fresh deployment failing in Github Actions

After adding Apache Echarts to my Deno Fresh website, my Github Actions now fail with a strange error: https://paste.jlcarveth.dev/paste/e04b7a13-39a8-461c-a7b1-bde1f241939b Error: R] Directory not empty (os error 39): rename '/tmp/1add3e3f311485e6' -> '/home/runner/work/eastsite/eastsite/.cache/deno/deno_esbuild/zrender@5.6.1/node_modules/zrender' [plugin deno-loader] ...