-
Notifications
You must be signed in to change notification settings - Fork 1
Update Deno pkgs regularly #90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
agree. Can we set a periodic task in a GitHub project? |
Let's revisit to use this format so we can use the latest versions. Importing a Module Using the Latest Version with
|
Step | Command/Action | Result |
---|---|---|
Add latest version | deno add jsr:@luca/cases |
Adds latest version to deno.json imports |
Import in code | import { camelCase } from "@luca/cases" |
Uses the mapped module from deno.json |
Update to latest | deno add jsr:@luca/cases (again) |
Updates to latest version in deno.json if available |
Key Points
- Always use
deno add
to ensure yourdeno.json
stays in sync with the latest module versions. - The
imports
field indeno.json
acts as an import map, making your imports cleaner and easier to manage[1]. - For third-party modules, prefer using the
jsr:
ornpm:
prefixes for better compatibility and versioning[1][2].
This workflow ensures you are always using the latest version of your dependencies in Deno projects.
Sources
[1] Modules and dependencies - Deno Docs https://docs.deno.com/runtime/fundamentals/modules/
[2] Dependency Management in Deno - Kevin Cunningham https://www.kevincunningham.co.uk/posts/intro-to-jsr
[3] Importing JSON - Deno Docs https://docs.deno.com/examples/importing_json/
[4] deno.json and package.json - Deno Docs https://docs.deno.com/runtime/fundamentals/configuration/
[5] How can I force Deno to download latest version of a dependency? https://stackoverflow.com/questions/61444575/how-can-i-force-deno-to-download-latest-version-of-a-dependency
[6] Deno Third Party Modules https://deno.land/x
[7] Module versioning, dependency management, and more - GitHub denoland/deno#4574
[8] Deno 2.1: Wasm Imports and other enhancements https://deno.com/blog/v2.1
[9] Create your first module with Deno - Livio Brunner https://www.brunnerliv.io/articles/create-your-first-module-with-deno/
[10] Confuse about the way import module on Deno project https://stackoverflow.com/questions/78505466/confuse-about-the-way-import-module-on-deno-project
Uh oh!
There was an error while loading. Please reload this page.
Run this command monthly
The text was updated successfully, but these errors were encountered: