-
Notifications
You must be signed in to change notification settings - Fork 615
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] ts.getResolvedModule with TypeScript 5.3 #4404
Comments
Just to clarify, did you encounter this error while making a PR for API Extractor to upgrade its bundled version? Looking at the code, the bundled version is currently supposed to be 5.0.x. (We do need to update that.) (In other words, are you reporting a bug that API Extractor loaded the wrong TypeScript version, instead of the bundled version? Or are you asking for help making an API Extractor PR to support the latest TypeScript?) |
This one: that it's crashing on the latest beta version of TypeScript. |
Ok, I can take a look at it tomorrow morning. Most likely we just need to find what happened to that internal API in the latest branch. |
Right, the It seems that @sheetalkamat later exposed an equivalent API as an API Extractor's tests seem to pass with this small change. I'll make a PR for you to try. We don't usually do official releases of API Extractor bundling beta versions of the TypeScript compiler. And (for exactly the reasons seen here) we don't provide a way for API Extractor users to override the compiler version. @JoshuaKGoldberg are you just doing investigative testing? Or are you planning to publish a release of your project? If so, maybe we need to publish a "beta" release of API Extractor that you can depend on? Let me know. |
Try this: #4408 |
Yup, this one. We publish a new version of typescript-eslint every Monday, and aim to have support for each new version of TypeScript as soon as possible (https://typescript-eslint.io/users/dependency-versions#typescript).
After manually applying the changes in local
|
@JoshuaKGoldberg okay but in general, API Extractor's bundled version of typescript does NOT need to be |
Got it, thanks! I really appreciate you debugging this for us ❤️. Filed an issue on our end to not take up too much space on the rushstack issue tracker. typescript-eslint/typescript-eslint#7839 |
@JoshuaKGoldberg with the PR build of API Extractor, I am not able to reproduce the error that you reported.
Could you provide more detailed repro instructions? I used typescript-eslint/typescript-eslint@e198efb |
Hmm, at this point it's likely I misunderstood something and/or the fix you suggested around resolutions would fix things. |
Summary
I'm trying to run api-extractor on a repository with TypeScript 5.3 as a dev dependency. It was previously working with TypeScript 5.2.
Repro steps
See typescript-eslint/typescript-eslint#7821:
yarn
yarn build
(specifically, thepackages/ast-spec
task)Expected result: Successful API extraction / build?
Actual result:
Details
I'm guessing this is because of the
(ts as any).getResolvedModule
used to access TypeScript compiler internals:rushstack/apps/api-extractor/src/analyzer/TypeScriptInternals.ts
Lines 89 to 92 in 4f15a3c
microsoft/TypeScript#55790 removed that internal API.
Standard questions
Please answer these questions to help us investigate your issue more quickly:
@microsoft/api-extractor
version?5.3.0-beta
node -v
)?The text was updated successfully, but these errors were encountered: