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

Can I package my dependencies typings in a way that snapshots the version? #5097

Closed
alexeagle opened this issue Oct 3, 2015 · 5 comments
Closed
Labels
Question An issue which isn't directly actionable in code

Comments

@alexeagle
Copy link
Contributor

I'm using the new 1.6 module loading for typings from #2338

I distribute my library with NPM and clients pick up the typings for my code magically from the path indicated by the "typings" field in the package.json. So great! The version of the typings will always match the version of the runtime code.

But, one of my files might try to import from a namespace like 'es6-collections'. What version will I pick up, and from where? There is no "typings" in https://github.com/WebReflection/es6-collections/blob/master/package.json so I will have to have this file presented to the compiler from the command line, or in the 'files' of my user's tsconfig.json, or a tripleslash ref in the user's code.

That means I can tell users to npm install my package, but then all my dependencies leak out when I tell them "now you need to tsd install es6-collections/es6-collections.correct-version.d.ts" and that is not so nice.

Is there already a way to do without that extra step? I could re-distribute the es6-collections-correct-version.d.ts in my NPM package but I don't see a way to depend on it.

@alexeagle
Copy link
Contributor Author

From discussion with @rkirov

@weswigham
Copy link
Member

#4913 - The package scope proposal - would loosen current restrictions and allow you to redistribute the types you require inside your package.

@alexeagle
Copy link
Contributor Author

Cool, I hope we can get a solution for that, it's the biggest remaining issue with our new quickstart.
I have a working demo, see https://github.com/alexeagle/angular2-distro/blob/master/README.md

@DanielRosenwasser DanielRosenwasser added the Question An issue which isn't directly actionable in code label Oct 4, 2015
@mhegazy mhegazy closed this as completed Nov 13, 2015
@xogeny
Copy link

xogeny commented Nov 18, 2015

This was closed, but what was the resolution?

@kitsonk
Copy link
Contributor

kitsonk commented Nov 18, 2015

#4913 #5269 #4166 and #5537 it was mentioned in #5657 that there is further movement. I think the issue is so spread out that it was an effort to consolidate it. #5537 is likely to be the central ticket that solves this meta problem.

@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Question An issue which isn't directly actionable in code
Projects
None yet
Development

No branches or pull requests

6 participants