Deno

D

Deno

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

Join

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......

500 error in httpsdeno.landxfresh1.1.2srcserverhtmlescape.ts

I'm having problems on my CI because this dependency returns a 500 error from deno.land. How can I debug it/fix the problem?

Disable Deno VSCode TS types

This is a recent updates. I like to code in Javascript and the new types are incredibly distracting- I can't read the code. How to disable this please?...

discord.js with new npm imports

Has anyone successfully used https://www.npmjs.com/package/discord.js with Deno's new import functionality? I ran their basic example and found it hangs without error when trying to login using Client.login

Websocket client with headers

I'm trying to create a websocket client that has an authorization header. It seems that a lot of the functionality of websockets has been moved out of the standard library, and I don't see much in the core. Any advice on how to proceed? For reference, I'm trying to do the following in Deno, rather than by using websocat: https://trading-api.readme.io/reference/introduction#connecting...

Can I programatically trigger a SIGINT event?

I would like to trigger a SIGINT event from a file, is there a way to do this? For example in Node, you can do process.emit('sigint');

i think the language server is broken

was working perfectly fine last night, and im not sure how to fix