w7a9q
w7a9q
DDeno
Created by w7a9q on 1/24/2025 in #help
Prettier plugin support with deno fmt
Hi, is there any way how to achieve this using deno fmt? Work around here is to chain deno fmt with prettier execution (which handles only the plugin action), but that's a bit awkward. https://tailwindcss.com/blog/automatic-class-sorting-with-prettier
1 replies
DDeno
Created by w7a9q on 12/17/2024 in #help
CRON on Deploy
Hey, is CRON working fine on Deploy? Maybe I don't know how to use it. I have created a file cron.ts a put there: Deno.cron('Run once a minute', '* * * * *', () => { console.log('Hello, cron!'); }); It deployed on prod but there is nothing in CRON tab.
1 replies
DDeno
Created by w7a9q on 12/9/2024 in #help
Zed code completion
Does anyone uses Zed with auto completion for Deno as in: https://zed.dev/docs/languages/deno My config:
"lsp": {
"deno": {
"settings": {
"deno": {
"enable": true
}
}
}
},
"languages": {
"TypeScript": {
"language_servers": [
"deno",
"!typescript-language-server",
"!vtsls",
"!eslint"
],
"formatter": "language_server"
}
},
"lsp": {
"deno": {
"settings": {
"deno": {
"enable": true
}
}
}
},
"languages": {
"TypeScript": {
"language_servers": [
"deno",
"!typescript-language-server",
"!vtsls",
"!eslint"
],
"formatter": "language_server"
}
},
and
"auto_install_extensions": {
"deno": true,
"svelte": true,
"zig": true
},
"auto_install_extensions": {
"deno": true,
"svelte": true,
"zig": true
},
What should I config?
5 replies
DDeno
Created by w7a9q on 12/8/2024 in #help
Exclude packages from test coverage
Hi, I would like to exclude the packages from the coverage when I run deno test --coverage. Currently I also get generated jsons inside coverage directory with url like this: "url": "file:///Users/johndoe/Workspace/Dev/lld-test/node_modules/.deno/wawoff2@2.0.1/node_modules/wawoff2/decompress.js"", How do I avoid it? Note that I have it excluded in my deno.json as:
"test": {
"exclude": ["node_modules"]
},
"test": {
"exclude": ["node_modules"]
},
3 replies
DDeno
Created by w7a9q on 12/7/2024 in #help
Types for global variables
I have defined a global variable: globalThis.Args = validateArguments(Deno.args); Now whenever I use it I get TS error: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.deno-ts(7017) How can I fix this?
3 replies
DDeno
Created by w7a9q on 11/20/2024 in #help
Converting package.json into deno.json
Is there any documentation about what properties deno.json have and what are the expected values? I'm unable to find any. I would like to put as many things as possible into deno.lock from the package.json. This would be really helpful.
2 replies
DDeno
Created by w7a9q on 11/17/2024 in #help
Deno project source control
Should I include deno.lock in the source control? Afaik, it is generated everytime deno install is used.
2 replies
DDeno
Created by w7a9q on 11/8/2024 in #help
Getting version out of deno.json
How can I get data from deno.json on runtime without exposing it to client?
5 replies
DDeno
Created by w7a9q on 11/3/2024 in #help
Zed Deno Support
No description
2 replies
DDeno
Created by w7a9q on 11/2/2024 in #help
Cannot run Nitro project
I have created a new Nitro project using deno run -A npm:giget@latest nitro nitro-app --install. It was successfull but after trying deno run dev I get an error saying:
error: Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'pathname')
at getPathname (ext:deno_node/_fs/_fs_stat.ts:177:49)
at ext:deno_node/_fs/_fs_stat.ts:151:13
at eventLoopTick (ext:core/01_core.js:175:7)
error: Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'pathname')
at getPathname (ext:deno_node/_fs/_fs_stat.ts:177:49)
at ext:deno_node/_fs/_fs_stat.ts:151:13
at eventLoopTick (ext:core/01_core.js:175:7)
Is there any fix for that or is it a bug in Deno itself?
8 replies
DDeno
Created by w7a9q on 11/1/2024 in #help
Deno runs the whole script instead of the method
I have following test:
import { expect } from "jsr:@std/expect";
import { validateInput } from "./webp.ts";

Deno.test("invalid input", () => {
const fn = validateInput;
const result = fn('/root', 55);
expect(result).toThrow();
});
import { expect } from "jsr:@std/expect";
import { validateInput } from "./webp.ts";

Deno.test("invalid input", () => {
const fn = validateInput;
const result = fn('/root', 55);
expect(result).toThrow();
});
When I run deno test it runs the whole webp.ts script instead of just the validateInput() method.
4 replies
DDeno
Created by w7a9q on 10/21/2024 in #help
Create SvelteKit project with Deno
Hey, how do I create SvelteKit project with Deno? Docs recommends this command: npx sv create myapp How does a Deno command doing this looks like?
3 replies
DDeno
Created by w7a9q on 9/28/2024 in #help
Corepack
Hey, does Deno support Corepack?
9 replies