-
Notifications
You must be signed in to change notification settings - Fork 607
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
[api-extractor] Move "typescript" from dependencies to peerDependencies #3891
base: main
Are you sure you want to change the base?
[api-extractor] Move "typescript" from dependencies to peerDependencies #3891
Conversation
Could you provide some detail about the problem scenario that you're trying to solve? (Is it merely that API Extractor's
This is unlikely to work reliably. API Extractor installs its own specific version of TypeScript because it accesses internal compiler APIs that can get broken between major releases of the TypeScript compiler. Also, API Extractor's logic analyzes the compiler's abstract syntax tree (AST) whose structure changes whenever new language features are installed. Often, upgrading to a newer compiler will require code changes to API Extractor. From a design perspective, API Extractor analyzes your library the way an external consumer would (by looking at your |
Came here to suggest something similar because the package Relevant issue raised: #3890 |
No, often that is quite easy actually. I can investigate on Monday and follow up. |
I'm also interested in this PR for the |
619c39e
to
f72b577
Compare
a9dacfa
to
7dba2c1
Compare
Summary
In @microsoft/api-extractor there is a dependency on typescript, and this PR converts that from a hard dependency to a peerDependency, so the client can supply their own typescript version instead of being forced to use the one that api-extractor chooses.
Details
"typescript" was removed from dependencies and added to peerDependencies, as well as devDependencies so the package can still locally use a copy of typescript when building.
How it was tested
Unsure