Skip to content
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

How to keep dependency versions in sync across files? #243

Closed
jbcpollak opened this issue Jun 11, 2018 · 4 comments
Closed

How to keep dependency versions in sync across files? #243

jbcpollak opened this issue Jun 11, 2018 · 4 comments

Comments

@jbcpollak
Copy link
Contributor

Lets say I have code like this:

foo.ts:

import { myDep } from "https://unpkg.com/[email protected]/myDep.ts"

bar.ts:

import { myDep } from "https://unpkg.com/[email protected]/myDep.ts"

How do I ensure my versions of myDep stay in sync across foo.ts and bar.ts?

Should Deno-idomatic code use dependency injection so dependencies are only externally referenced in one place? That seems like a good idea, but difficult to enforce.

@jedahan
Copy link

jedahan commented Jun 11, 2018

A few potential solutions:

  • Subresource integrity for modules #200
  • importing from a central file you run + code lint is another
  • using a content-addressable protocol
  • I'm pretty sure the current cache only updates on --reload and you can also pass in separate cache directories if you want, but I forget where I read that

In the spirit of #94, maybe this should be closed and re-addressed once deno is more mature?

@jbcpollak
Copy link
Contributor Author

#200 might be a good duplicate for this ticket, seems like it plus 'central file to run' could have overlap (I was thinking of something like dependencies.ts).

#94 makes sense as well - Perhaps this is premature, but I was hoping this could be a place someone could lend a hand in defining.

@jedahan
Copy link

jedahan commented Jun 11, 2018

I think the enthusiasm and support is welcome but overwhelming at this stage. Its the downside of open development so early. Luckily, when #94 is closed, we can look at all the cross-references and reopen good discussions :)

@ry
Copy link
Member

ry commented Aug 7, 2018

Thanks for the discussion. We'll revisit when this functionality is there in the rewrite. Closing this one.

@ry ry closed this as completed Aug 7, 2018
hardfist pushed a commit to hardfist/deno that referenced this issue Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants