denoland / saaskit

A modern SaaS template built on Fresh.
https://deno.com/saaskit
MIT License
1.22k stars 153 forks source link

use jsr modules where possible and upgrade fresh version #684

Open ycmjason opened 2 months ago

ycmjason commented 2 months ago

Hello there,

Decided to do some migration of packages to JSR modules and upgrading fresh versions.

Do let me know if there's any modifications I should make. I am not sure how the blog plugin should be typed.. as i can't find any references to location and projectLocation in the official API.

p.s. I am quite new to the deno community so I am not sure with a lot of conventions / best practices. Please feel free to guide me through this. 🙏

iuioiua commented 2 months ago

Please allow me to look into these CI failures once I get a chance.

ycmjason commented 2 months ago

@iuioiua I am curious to understand about specifying modules. I understand that we want to keep things trim, but wouldn't tree shaking handle that for us?

iuioiua commented 2 months ago

That's a fair assumption. However, Deno currently doesn't do this. You can test by having the following.

// deps.ts
export { STATUS_CODE } from "jsr:@std/http";

Run deno info deps.ts. You'll see all modules within @std/http are pulled in. Then, change the script to the following.

// deps.ts
export { STATUS_CODE } from "jsr:@std/http/status";

Now, running deno info deps.ts again, notice that only jsr:@std/http/status is pulled in. This fact remains even when we use an import map.

If you think this is worth having, please open an issue in the runtime repo with the suggestion.