Deno

D

Deno

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

Join

Getting error `Unrecognized algorithm name` on `crypto.subtle.importKey()`

I can't figure this one out. I've done some searching and found a list of supported algos at https://deno.land/std@0.167.0/crypto/mod.ts See anything I'm doing wrong? I tried it without the hash as well. Here's a snippet: ```js...

modifying the Deno object

heyo. is there any way to add our own properties to the Deno object? I read something which said since v1.12 it's no longer frozen but looks like that is no longer the case. wanting to add my own version to Deno.version. thanks!

What postgres module should I use?

I've been using /x/postgres for almost a year but I see that /x/postgresjs has been updated more recently (and I've seen some articles use it here and there). Does it have any advantage over /x/postgres?

Deno bench json

Does deno bench support json output? I want to visualize some of the output data in graphs but I don't really want to parse the output

can i track hits to static?

i would like to track downloads of my rss.xml file that's in static/

fetch - change user agent

Anyway to change user agent and other fetch parameters. There is one api I have not called in like 2 months, but it still shows up as ratelimited(cloudflare btw). However I can access it via insomnia or my web browser just fine so I am assuming deno headers are the problem...

Is it possible to rename a module in third party modules?

I've created a module and I would like to rename it as I think I broke convention. Is this possible?

Lint for if you forgot to `await` a Promise?

If you have async methods that you call for their side effects, it's easy to forget to await them. Is there a lint rule that I can enable for that? (Sort of like Rust's rules about unused Results?) ex:...

How do i get the IP address of a request in Fresh | Deno?

Setting up some server analytics that require it and I'm struggling to find the best way to pass it along. Thanks!

Where to contact for name squatting?

The website says to "contact us" if you believe name squatting is occurring, but it does not indicate where to "contact us."

what is import.meta.url on implicit version

I am in an awkward situation where I want to test retrieving the version from the url of my module when no version is specified (e.g. deno.land/x/sqlite_native). Unfortunately, it doesnt appear that there is a good way to test this. I have found the source file in ~/.cache/deno/deps/https/deno.land/, but editing it gives an error that the hash map doesnt match (which I suppose is there for safety). I also cannot test this locally since the import.meta.url will be the local file. I could publish a version to deno.land/x/ just to log out the import.meta.url, but I would like to avoid this. Essentially, I am wondering if deno will redirect the url to the latest version, and that version will appear in the import meta. Of course, if there is a better way to get the module version I am all ears. I am hoping to avoid adding a compile step to ci to edit tags to include a version number....

Deno SDL2 Default Text Render Example (FFI problem w 1.29)

Trying to get the font render example in the Deno SDL2 repo https://github.com/littledivy/deno_sdl2/blob/main/examples/font/font.ts to work but it perpetually complains about a pointer to buffer issue. I've read through the issues that were proposed to fix this solution and tried modifications of my own to solve this issue based on this PR here https://github.com/littledivy/deno_sdl2/pull/58 but the issue still remained in my own modifications. Wondering if anybody has any ideas on how to resolve this as it pertains specifically to FFI problems which I thought would be resolved in Deno 1.29 since that seemed to caused breaking changes. I've already tried the v3 released of SDL2 and it did not resolve the problem either. I have a large and mature project I want to port over to desktop but cannot use this solution until I can draw font. I am not seeking alternative solutions such as Electron :)...

third party module - edit webhook subdirectory

Hi, I just published a module https://deno.land/x/sqlite_native@0.1.0 but the actual library content is under the src/ folder. I did not specify this when first creating the webhook (leading to all imports looking like src/mod.ts. Is it possible to edit the webhook after creation? Its hard to tell if so, because there doesnt appear to be any 'owner' controls on a module after publishing.

get in oak

In oak, how do I check whether a request is the root? It - starts with slash...

Permissions dump

Is there a way to dump permissions to console or to a shell file after answering the prompts interactively? deno run --something-dump-permission="launch_deno.sh" smth.ts ✅ Granted env access to all. ✅ Granted read access to "/home/bogdanbiv/.cache/deno/npm/node_modules". Desired output:...

Remove trailing commas

Using the deno.json feature, how can I remove trailing commas? I can't find anything related to that under the fmt option. Thanks in advance!...

LSP becomes slow when importing large json

Filtered perf measures ``` semantic_tokens_range (6638ms) request (6638ms) inlay_hint (105800ms)...

Can you specify a git hash instead of version for npm modules?

As the title mentions, I'd like to use a specific commit for an npm package. Is this possible?

arch linux deno package might be broken

Installing deno on arch linux appears to 404 on all the mirrors. I just synchronized them all as well so I think theres something else going on... sudo pacman -Sy deno ``` :: Synchronizing package databases......