Comment by flohofwoe
2 months ago
I don't want the install step. That's redundant. Just a .ts script I can run via `deno run bla.ts` and which directly pulls in any dependency it needs from the web.
2 months ago
I don't want the install step. That's redundant. Just a .ts script I can run via `deno run bla.ts` and which directly pulls in any dependency it needs from the web.
Is it?
It's a different mental model I'd say. Specifically: First, I add the part to the pile, then I wire it up.
I wouldn't call it redundant to explicitly spell out what actually happens. If anything, I'd call it good to remind people that they are adding something into their scope of responsibility.
There are use cases like small scripts where people just want a single js file. So the top of that file basically functions as the package.json.
Bun has auto-install for you, but you do have to enable it.
Deno's is slicker. Deno's built-in LSP works with the automatically installed package's types.
I understand the point of this, just saying an existing codebase importing things this way doesn't seem all that hard to convert if you need to get off Deno.
> and which directly pulls in any dependency and exploit
Fix't it for ya.
You can pin versions. If you aren't, you have the same issue with regular npm.
> You can pin versions.
You can, but you won't. Let's be real for a second now - the only reason you use this feature is because you can't be bothered to use a real package manager that pins versions.
2 replies →
Well, nobody is supporting that any more. So you either support it yourself or stop using it.
That wasn't the question though