17
u/No_Cartographer1492 Oct 10 '24
Support for SvelteKit? hell yeah!
1
u/Quiet_Drummer669988 Oct 11 '24
where could i find the info on this? I made a demo project work, but not sure if its the right way
1
1
u/No_Cartographer1492 Oct 11 '24
to be more diligent on my observation, here: https://github.com/denoland/deno/issues/17248#issuecomment-2405164512
1
4
3
1
1
u/KaliQt Oct 11 '24
Well yes but no, it does not have the Web Audio API which is an extremely powerful API that would be really nice if it was supported.
1
u/mornaq Oct 12 '24
the ad is great, promises are great, but honestly, do I really have to update all my imports or there's some config to make the node code just work?
also there's no option between compiling and shipping TS and I don't like it that much, I'd prefer to keep ready to run, tree shaked and such JS in the container next to a generic binary, though I'm probably being pedantic about it
1
-5
u/Acceptable-Fudge-816 Oct 10 '24 edited Oct 10 '24
Fine, but make imports without an extension work (for ts files) please. Having to use a Deno specific extension in VSCode just for that is weird.
EDIT: e.g. porting an existing code base that doesn't use extensions on the relative imports to Deno.
8
u/bartlomieju Oct 10 '24
You can do that - use
--unstable-sloppy-importsflag and Deno will accept extensionless imports0
u/Acceptable-Fudge-816 Oct 10 '24
Okish solution? It says there is not supported by `deno compile`, plus it is an unstable feature and they say it is "less performant" so they must by checking the existence of files or guessing the extension instead of assuming ts.
3
u/bartlomieju Oct 10 '24
That's true. We'll fix it in Deno compile in a few days. We don't plan to "stabilize" it. And yeah, it proves for files. Afaik both Node ans TS also probe for various files.
4
4
Oct 10 '24
-1
u/Acceptable-Fudge-816 Oct 10 '24
Doesn't solve the problem. Say I have an existing code base using relative imports on every file without extensions and I want to move to Deno. How does this fix it? I'm not going to add a mapping on every file.
5
Oct 10 '24
So you're talking about moving a Node project to Deno?
And aren't you a programmer? It would be trivial to write a script than adds the extension or creates the mappings.
-3
u/Acceptable-Fudge-816 Oct 10 '24
Maybe, but it goes against the premise of the video, it ain't simple. It doesn't work out of the box. And you still need to install a LSP extension for no good reason. Now you get asked every-time you want to use the auto-formatter if you want to use TypeScript or Deno LSP for that. Yikes.
2
Oct 10 '24
There are no standards in the module resolution behavior of JS runtimes. The one used in Node is just as custom as the one used in Deno. TypeScript doesn't have a resolution behavior. It's host based.
Honestly it doesn't sound like you really want to solve the problem. You could have written a script to fix the issue in the time you've spent bitching about it here.
1
u/Acceptable-Fudge-816 Oct 10 '24
My code base is just an example. Say I want to import a code base from a github repo, do I have to fork it now? It is not reasonable. There may be no official standards, but it is quite a standard practice none the less, and one that is enforced by official the TypeScript LSP.
Deno could fix it easily also, just assume ts extension if none is provided within a TS file, no extra look ups or fetches needed.
0
-30
u/bagel-glasses Oct 10 '24
So, I'll make it even easier.
Don't use Typescript, unless you're working on a huge project with inexperienced devs it's just bloat
Don't overuse packages
There's I've apparently solved all the problems Deno solves.
10
u/Acceptable-Fudge-816 Oct 10 '24
What do you use instead? Rust? How do you do front-end with that? Python, PHP? Doesn't sound that great for front-end either. Java hell no. C# is way too much corporate and MS. Honestly, I don't think there is anything better out there. You could argue maybe Go/Rust for back-end, but the moment you have a front-end with a closely related back-end for it, TypeScript seems just right.
-19
u/bagel-glasses Oct 10 '24
Just use node without Typescript. Seriously, it's just not that hard.
6
u/Luolong Oct 10 '24
Sure, yes. And by the same token, why not write your own CSV parser while you’re at it. It’s not that hard.
-7
u/bagel-glasses Oct 10 '24
See, now the difference there is that if I'm just not including Typescript in my project I'm saving time instead of wasting it.
2
1
u/oravecz Oct 10 '24
I just enabled type checking on a small (250 file) Typescript codebase, and instantly saw hundreds of unsafe function calls, syntax fails, and incomplete data objects. They have been using Typescript, but never running tsc. They have been stripping the type information and disabling the ts plugin in their ide’s. This also includes bypassing git hooks on commits and prs. And this is a Fortune 20 company.
Switching their project from a complex webpack/eslint/prettier config to Vite + Biome has been so much faster and cleaner. We are using Node, but Deno will now be considered.
It took me a long time to appreciate Typescript, but now I am using it even if I am the only developer.
-30
u/dankobg Oct 10 '24
It should, so we should never use js or ts or node or deno or anything this guy makes.
There are better languages and runtimes already but yeah lets listen to this guy again
7
Oct 11 '24
[removed] — view removed comment
5
u/m_hans_223344 Oct 11 '24
I'm doing this stuff for way to many years and have forgotten how hard it is for people coming into the ecosystem.
Node? Why NPM install and not Node install? What is NPM? Where do I get it? Uhhh, dude on YT is telling me about Yarn. Oh, PNPM in this blog post, is it a typo? ... and I haven't even started TS or Linting or formatting.
23
u/rykuno Oct 11 '24
So I just created an hono/svelte monorepo in Deno2 this evening to try it out and holy shit - it’s so fucking nice I’m at an absolute loss of words.
I was able to remove Turborepo and EVERY SINGLE CONFIG that wasn’t framework specific. It’s so incredibly clean and the imports are just a godsend.
It just works somehow. I was sooooo skeptical after trying bun and needing 200 workarounds for everything.
This is going to have an insane adoption once people actually try it.