Skip to content

TypeScript dependency should be a version range #720

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

Closed
adidahiya opened this issue Mar 8, 2018 · 2 comments
Closed

TypeScript dependency should be a version range #720

adidahiya opened this issue Mar 8, 2018 · 2 comments

Comments

@adidahiya
Copy link
Contributor

the typescript dependency of this package should be:

"typescript": "~2.7.2"

this allows patch versions, which downstream libraries should be allowed to pick up. I don't want multiple copies of typescript in my node_modules unnecessarily. this would fix #718.

have you had issues with allowing such a version range in the past?

@aciccarello
Copy link
Collaborator

Hello @adidahiya, currently TypeDoc is not able to support version ranges for typescript because it uses internal apis that could break even on patch versions. I am considering using a peer dependency on typescript in the future but that wouldn't be anytime soon. I'd have to go through and try and limit the api surface area to avoid unnecessary errors.

It might be worth checking out https://github.com/TypeStrong/typedoc/blob/master/UPDATING.md for updating your own projects.

@adidahiya
Copy link
Contributor Author

Thanks for the response and link to the docs.

I am considering using a peer dependency on typescript in the future but that wouldn't be anytime soon. I'd have to go through and try and limit the api surface area to avoid unnecessary errors.

I would appreciate a change to make typescript a peerDependency. This could be coupled with a warning in the docs suggesting to users that there might be breaks depending on the version of the typescript compiler used at runtime, but at least this gives people more options. Consumers of typedoc ought to be fairly technical so I think you could get away with this.

You should also consider testing with multiple versions of typescript in CI, like we do in tslint's .circleci/config.yml.

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

2 participants