I'm a bit of mixed that Deno doesn't have some kind of package manager, if you import module from master your code will break so soon... if you import using version number you must replace it in all places when you want to update the dependency.
I remember that golang decided to implement dep & modules due former problem.
Hello Deli,
thank you for your comment. I understand your doubts. In my examples I import dependencies directly from master for simplicity, but there is a solution for the problem you described:
Step 1. Import a specific version instead of master (don't forget to add "v" before the version number):
Easy management from the perspective of the person authoring the code, but how is this easily manageable from the perspective of a monorepo where dependencies need to be updated en masse?
I think a separate tool like npm won't be added because as the deno docs state: "Deno explicitly takes on the role of both runtime and package manager"
I'm a bit of mixed that Deno doesn't have some kind of package manager, if you import module from master your code will break so soon... if you import using version number you must replace it in all places when you want to update the dependency.
I remember that golang decided to implement dep & modules due former problem.
I think more and more people with use some kind of workaround like this:
github.com/crookse/deno-drash/blob...
github.com/oakserver/oak/blob/mast...
im yet to test it, but you can make a import map.
deno.land/std/manual.md#import-maps
Hello Deli,
thank you for your comment. I understand your doubts. In my examples I import dependencies directly from master for simplicity, but there is a solution for the problem you described:
Step 1. Import a specific version instead of master (don't forget to add "v" before the version number):
Step 2. Put this import and all external dependencies into a separate file and re-export them (change "import" from the code above to "export"):
imports.ts
3. Import from imports.ts and not directly from the internet:
Advantages:
Easy management from the perspective of the person authoring the code, but how is this easily manageable from the perspective of a monorepo where dependencies need to be updated en masse?
great answer, I think it should be added to the article
I already know your method beforehand, but it would be great if there's cli tool to manage deps.ts to keep things standard.
I think a separate tool like npm won't be added because as the deno docs state: "Deno explicitly takes on the role of both runtime and package manager"
Another solution supported by Deno are file maps: [deno.land/std/manual.md#import-maps]