Deno

D

Deno

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

Join

third party module repo change

I'm the author of a third party deno module: https://deno.land/x/streamdal_protos@v0.0.126. My company recently moved that code to a new github repo. Is there any way for me to point an existing module at the new repo? I'd prefer not to have to create a new one with a slightly different name to avoid confusion....

Deno.serve get full path instead of only params and url

I need to get params from an url like this http://localhost:8000/auth#token_type=Bearer&access_token=CENCORED&expires_in=604800&scope=identify but the params arnt after a ? but after a # so how do i get that using deno.serve?...

Send custom response inside error event listener

If I add an event listener for errors in Deno to catch anything my middleware error handler doesn't, how would I send back a custom response (status + body) to the client, rather than the default 500 internal server error? app.addEventListener("error", (event: any) => { log.error("Uncaught error:" + event.error) });...

assertThrows() limitations

assertThrows() seems to only filter on class name and message. Is there an assert function for checking whether code throws a DOMException with a specific name?

LSP/VSCode stops working

I'm having issues in my fresh project time to time it stops working and I have to restart it or vscode, no sure why I did not happend before I'm using deno 1.39 and "deno.maxTsServerMemory": 10000 any suggestions?...

Can the listeners for messages from Deno Deploy Queues timeout?

Can the listeners for messages from Deno Deploy Queues timeout like Vercel serverless functions? Are they allocated a certain amount of CPU time like regular requests?

How to get the path to the compiled binary?

import.meta.url and Deno.mainModule are used to get the current script, but after a binary is created, those get frozen to the script at the time that the compile was performed. Moving the binary somewhere else gives you the same (now wrong) result when import.meta.url or Deno.mainModule get called.

How to get `require.main.filename` like Node as Deno

I am making a module to be published on deno.land/x. I want the user to put a file describing the configuration for the module on the same level as the entrypoint file. I could not figure out how to get the entrypoint filename from the module side. In Node.js, require.main.filename seems to solve this. How would this be appropriate to write in Deno?...

Change Web Worker Permissions after the Worker Started

Hello, I was wondering if it is possible to change/update the permissions of a web worker after it has started to accommodate additional code being executed inside the worker or similar. Best regards...

Missing transpiled source code

I'm trying to generate coverage for my project and I'm getting the following: ``` deno task coverage Task coverage deno coverage --html ./coverage error: Missing transpiled source code for: "file:///Users/reed/code/fresh_ga4/deps.ts"....

Convert to exe

I have made my Javascript program into an exe with deno: https://docs.deno.com/runtime/manual/tools/compiler I use inquirer in my program. However, when I turn the program into an exe, I can no longer navigate in the console with the arrow keys. Generally, I can no longer write anything in the console. Can someone help me....

Manual deployment promotion + long lived preview deployments

Hello! I am working on a deployment pipeline and have a few questions: 1. Is there a way to promote preview deployments to production from a github actions? - I would like to deploy a preview deployment, run my own smoke tests and then promote to production 2. How long do preview deployments last?...

Is there a way to get deno coverage information in a vscode lens?

If I run my tests with coverage enabled, can I get some visual feedback in vscode?

Performance Question

I have a Deno application, which creates API endpoint, and uses mongodb. Now I want to host this on a Ubuntu server. Performance-wise, should I just copy the source code and use the Deno command to run it, or should I create a executable (using the deno cli)?

Is there a way to get a server's SSL certificate's public information with Deno?

This is available in Node with getPeerCertificate() but not in Deno's Node compatibility layer - is there an equivalent I'm missing?

InvalidData: No certificates found in cert file

Hello! Following up from a previous help post here, https://discord.com/channels/684898665143206084/1182742873670701078 I had been running against serveTls with these .crt and .key files, but now I'm seeing ...

Cannot use deno prompt when in windows CMD

It only works in the VSCode integrated terminal? I have added some output around the run command, but when i do run <filename>.cvs it doesnt even reach any of the outputs.

Streaming large files with fetch and FormData

Hi, I'm trying to find a way to build multiplart/form-data requests in Deno that contain large files. Ideally, I'll like these requests and the underlying files to be streamed out instead of needing to read the whole file into memory and adding them as parts to the request. I can't seem to find a built-in API for acquiring a Blob-like file handle. I also tried using npm:fetch-blob/from.js but that isn't compatible with Deno. Compared to other platforms: Node.js v20+: the fs.openAsBlob function in node:fs can return a web File backed by the file system Bun: The Bun.file function also returns a web File backed by the file system ...

If I want to integrate a fully featured Deno runtime into my application, where do I start?

I want to create a scripting environment for my application that will enable people to create custom integrations/workflows. I'm investigating if I can use Deno for this use case, but if we present it as an embedded Deno runtime to our users, I think they will also expect compatibility with all the things Deno offers as well. That means TypeScript compatibility, NPM compatibility on par with Deno's, being able to import from URLs, etc.. From my understanding a lot of that logic is implemented in...