arethetypeswrong / arethetypeswrong.github.io

Tool for analyzing TypeScript types of npm packages

Home Page:https://arethetypeswrong.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TS 5.3 incompatibility

ghoullier opened this issue · comments

Latest version "@arethetypeswrong/cli": "0.13.1" is not compatible with TS5.3

error while checking file:
ts.getResolvedModule is not a function

https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/packages/core/src/internal/checks/internalResolutionError.ts#L28

EDIT: I forked the project to bump typescript and ts-expose-internals to 5.3.2 and it also fails

I'm seeing pretty weird behavior on this myself.

Even if I manually run older versions locally, like npx @arethetypeswrong/cli@0.10.0 ./package.tgz --format table --ignore-rules false-cjs, I'm still seeing the same error, even though this is the version report:

$ attw --version
cli: v0.1.0
core: v0.1.0
typescript: v5.1.3
commented

Related microsoft/rushstack#4404

It seems that although it is a minor update, TS removes the API.
Though it then added an equivalent API, an easy and fast fix is to limit (override should also work) the TS version as ^5.2.2,<5.3.0.

I was under the impression I had the typescript dependency version pinned in core so I could use internal APIs safely, but I think I messed that up last time I bumped it. Will have a fix out soon.