Deno

D

Deno

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

Join

subpackage imports with npm specifiers

e.g. import colors from "npm:tailwindcss/colors" currently fails, is this not supposed to work? Solution: npm:tailwindcss/colors.js...

Is it possible to use Cache-Control headers to control Deno's cache

I've seen via an issue ( https://github.com/denoland/deno/issues/16296 ) that Deno stores its metadata.json files in its cache directory so that it has response headers from when the dependency was downloaded, for cache invalidation. Is there cache invalidation based on these headers? Like if I have a dependency via HTTP that has Cache-Control: no-cache, can it be re-downloaded each time it's requested?

Deno Deploy Queue trouble in production

I'm encountering an issue with Deno Queue in my Deno Deploy project, and I'm hoping to get some guidance on it. Here's a brief summary of the problem: Problem description: In my Deno Deploy project, I'm trying to use Deno Queue, but it's not behaving as expected in production. During development, I received a log message stating that Deno Queue features are enabled in production, but I'm unable to get it to work as intended in the production environment. ...

Deno compile target error

Hello, I am trying to compile a Deno api using deno --unstable ./path/to/api/index.ts --output ./path/to/output/api but am getting the following error: ```bash Compile file:///Users/user/Projects/Code/app/functions/api/index.ts to ./functions/.build/api Archive: /var/folders/kp/brk5wgsn5mz73fxhj06c9tdw0000gn/T/.tmpnxgwN8/deno.zip inflating: deno ...
No description

How to avoid the method POST to executed in the URL I am redirected to?

How to avoid the method POST to executed in the URL I am redirected to? routes/admin/login.tsx ```tsx import { HandlerContext, Handlers } from "$fresh/server.ts";...
No description

how to use Untar without deprecated functions?

Untar from std/archives requires an instance of Reader - apparently most functions return some ReadableStream though. I only found a function in std/streams to convert a ReadableStream to a Reader. That function is deprecated though and will be removed in 1.0.0. What can I use instead? Or will the Untar class take a ReadableStream in 1.0.0? EDIT: the deprecated function: https://deno.land/std@0.203.0/streams/mod.ts?s=readerFromStreamReader the Untar class: https://deno.land/std@0.203.0/archive/mod.ts?s=Untar...

Help, does the middleware example in the Deno Fresh documentation not work for anyone else?

I tried to follow the example in Deno Fresh about middlewares, but it doesn't work, the content ctx.state.data doesn't appears to be undefined whatever I do

Deno Cache location

Hello, I am trying to cache my dependencies during the compile action using Github Actions, where does deno locate the cache when d dependencies on Ubuntu?

How to build rusty_v8 with old v8 version?

Hello all ! I am trying to build rusty_v8 (https://github.com/denoland/rusty_v8) with an old version of v8. I saw that there is an env var RUSTY_V8_ARCHIVE, so i tried to build v8 from the official repository as a static library. I tried using this ```...

Can someone explain WebSocketStream to me?

Whenever I try to connect using WebSocketStream and the host doesn't respond, my program inevitably crashes and stops. I'd like to have the program attempt to reconnect without stopping even if an error occurs, but I can't seem to make it work. Does anyone have a solution for this? `function webSocketStream_Connection() { try { const wss = new WebSocketStream("wss://localhost")...

deno doc: error: fp-ts

that's pretty much all I have :/ Running deno doc Server.ts only yields error: fp-ts. Can I enable some sort of verbose mode?

I want to add my package xmlbuilder2 to deno.land

But somebody already added it, albeit with his own forked repository (now non-existent, thus unusable). Can you please point it to the correct repository (https://github.com/oozcitak/xmlbuilder2) and let me know, so that I can add the webhook.

Cache imports in deno.json

Is there a way to cache imports defined in deno.json? I am hoping to avoid additional deps.ts file. I am able to cache main.ts before the run command but in Docker it takes much longer to cache everything and unable to leverage docker layering efficiently....

typescript type definition for deno.json

Does it exist, and where can I get it?

Publishing (and configuring) the webhook for deno.land from monorepo

Thanks in advance for your help! I went through the setup on https://deno.com/add_module for my jupyter project anywidget (https://github.com/manzt/anywidget/pull/311) to support module for deno jupyter. Anywidget is a monorepo of a Python package and associated front-end JavaScript modules. I have github actions setup to make a separate tagged release for each sub-package, and would like to similarly support the deno module I created for interfacing with these front-end modules. - Is it possible to configure a different sub-path within the repo? (I'm not sure I did this correct, or may want to move mod.ts)...

Looking for a Dev who is well-versed in Fast-Delivery of building front-end pages using React.js for

Looking for a Dev who is well-versed in Fast-Delivery of building front-end pages using React.js for continuous work. DM if you think you're the React.js expert meet the below requirements. Don't contact me if you're not comfortable with such conditions. ===============Terms================ ...

How to assert object with a field of a given type?

Hi, I'm writing an integration test that needs to assert an object response, where the ID field can be of type string: ```ts const json = await res.json(); assertObjectMatch(json, {...

Deno + Lit

Hey how can use the Lit framework with Deno? Is there a guide or config on how to use it with this framework?

Issues with Crypto Subtle Digest ext:deno_crypto/00_crypto.js

Currently we are using deno_core v0.200.0 deno_runtime v0.123.0 when attempting to invoke crypto.subtle.digest the following error is reported
SHA-256 TypeError: Error parsing args at position 1: serde_v8 error: invalid type; expected: object, got: string
SHA-256 TypeError: Error parsing args at position 1: serde_v8 error: invalid type; expected: object, got: string
example for reproduction...

Anyway to use deno fmt within a script itself without having to call deno again?

I am working on a code generator and I'd like to run a string through deno fmt before I save to file. I've seen how to do it by calling deno to format the file, but wondering if I could do this within the script itself? See this function here:...