CodyC
CodyC
DDeno
Created by Kasper on 1/13/2025 in #help
Typescript monorepo LSP performance
FWIW, there are reports of LSP performance fixes in the latest deno release (v2.1.8). See if that improves things for you? https://www.reddit.com/r/Deno/comments/1idwroh/deno_218_is_out/
11 replies
DDeno
Created by Almaju on 1/15/2025 in #help
Super slow LSP with Deno + VSCode
FWIW, there are reports of LSP performance fixes in the latest deno release (v2.1.8). See if that improves things for you? https://www.reddit.com/r/Deno/comments/1idwroh/deno_218_is_out/
6 replies
DDeno
Created by raunioroo on 2/26/2024 in #help
Deny env permissions silently (without throwing)
9 replies
DDeno
Created by raunioroo on 2/26/2024 in #help
Deny env permissions silently (without throwing)
Yeah. I'm still not a fan of --deny-env though, so I'm writing up an issue documenting the problem.
9 replies
DDeno
Created by raunioroo on 2/26/2024 in #help
Deny env permissions silently (without throwing)
Yes, behavior now (Deno v2.1.6) seems to be that the node compatibility process.env.x will return undefined if permission is denied for reading x.
9 replies
DDeno
Created by raunioroo on 2/26/2024 in #help
Deny env permissions silently (without throwing)
Interesting. I've used several npm modules and they seem to work OK when I --deny-env. I wonder if they're handling the exception better than deepl-node, or if Deno changed the behavior there. 🤔
9 replies
DDeno
Created by beerman on 1/20/2025 in #help
batching tasks
Ah. Yeah I wasn’t happy with sveltekit support either. But I decided to abandon it rather than deno. 😆
12 replies
DDeno
Created by beerman on 1/20/2025 in #help
batching tasks
Oh. Did you open an issue about convex compatibility? The Deno team seems keen to make sure node compatibility works so it’s not a blocker to adopting Deno.
12 replies
DDeno
Created by beerman on 1/20/2025 in #help
batching tasks
Thanks! If you end up using it, let me know! Feel free to add issues to request new features you mind find helpful.
12 replies
DDeno
Created by beerman on 1/20/2025 in #help
batching tasks
So that would be something like:
const results = await
lazy(yourItems).chunked(100).map({
parallel: 5,
async mapper(yourItemChunk) { ... }
})
.toArray()
const results = await
lazy(yourItems).chunked(100).map({
parallel: 5,
async mapper(yourItemChunk) { ... }
})
.toArray()
12 replies
DDeno
Created by beerman on 1/20/2025 in #help
batching tasks
I wrote a library to do this kind of thing because I wasn't a fan of the ones I found.
https://jsr.io/@nfnitloop/better-iterators
12 replies
DDeno
Created by Adamduehansen on 1/19/2025 in #help
Cannot assign number to "number | undefined" when using package.json
Could they be resolving different versions of the npm:excalibur library? (Check its version in package-lock.json and deno.lock files)
4 replies
DDeno
Created by Kasper on 1/13/2025 in #help
Typescript monorepo LSP performance
The deno team does seem to be interested in a performant language server, btw. They even made a post about it a while back:
Recently, a customer reported significant performance issues with our language server in large codebases. Their feedback led us to investigate and optimize our language server, resulting in a dramatic reduction in auto-completion times - from 8 seconds to under one second. This blog post details how we achieved this improvement, from identifying the problem to implementing the solution.
https://deno.com/blog/optimizing-our-lsp
11 replies
DDeno
Created by CodyC on 1/12/2025 in #help
Reliable pattern for cleaning up resources as process exists?
I'd settle for something that let me register (and later remove) a "cleanup" callback that would have a chance to run as the process is exiting from a signal, an .exit(), unhandled rejection, etc. (so I don't need to track down all the cases, which may change in the future)
5 replies
DDeno
Created by Kasper on 1/13/2025 in #help
Typescript monorepo LSP performance
I believe the Deno team uses a monorepo for the std libraries. (https://jsr.io/@std), but that might be a smaller codebase than yours. If you don't get a response here in the next day or two, I'd suggest opening an issue on the Deno GitHub. They might also be able to provide more tips, or info on how to help track down the performance bottleneck.
11 replies
DDeno
Created by Kasper on 1/13/2025 in #help
Typescript monorepo LSP performance
The next thing I'd check for is any node_modules folders left over from the conversion from npm packages. (I'd hope not, but,) The language server might be trying to parse all of that code as part of your project. And node_modules directories can get quite large.
11 replies
DDeno
Created by CodyC on 1/12/2025 in #help
Reliable pattern for cleaning up resources as process exists?
In other languages, the process shutting down can result in exceptions being thrown, which lets the usual code pathways (finally blocks) clean up resources. I'm thinking, KeyboardInterrupt in Python, or InterruptedException in Java. But, I don't know if JS/V8 has anything like that. You'd need to be able to just throw some exception at any trivial point in code.
5 replies
DDeno
Created by Kasper on 1/13/2025 in #help
Typescript monorepo LSP performance
deno just makes one typescript project
That would be my guess too... ... unless you've configured your monorepo as a workspace. Have you done that? Or is it just a big repo with N unrelated codebases in it? https://docs.deno.com/runtime/fundamentals/workspaces/
11 replies
DDeno
Created by CodyC on 1/12/2025 in #help
Reliable pattern for cleaning up resources as process exists?
I hacked together a thing that does this in my critical path, at least: * Register signal handlers for SIGTERM and SIGINT (others I should add?) * The handler sets an "aborted" flag. * Periodically check that flag in my code (it's mostly a loop) and throw an exception if we aborted. * Unregister the event handlers at the end of my scope. ... but this only works for my example because I know my exception will bubble all the way up out of main(), so I don't lose the default ctrl-c behavior of killing the app. Doing this in a library would be bad news because the user might be trying to SIGINT (ctrl-c) to quit the program but some higher-level handling is catching the exception.
5 replies
DDeno
Created by Artificer on 11/21/2024 in #help
Sharing a library between deno and frontend
I'm interested to hear what other responses you get here. I've been sortof cobbling my own system together. I'm using Preact for server-side rendering for most of a project I'm working on, but then I want to be able to re-use some components for the parts that do need to be interactive client-side. (Take a look at the Fresh framework, which does a lot of this for you quite easily. I'm just being pedantic in my use case.) I wrote my own little tool, https://github.com/NfNitLoop/deno-embedder which can also run ESBuild to transpile typescript/TSX for use on the web. So now it's easy for me to use a component on the server or in the client.
3 replies