monounity / karma-typescript

Simplifying running unit tests with coverage for Typescript projects.
313 stars 110 forks source link

Typescript 5 Integration #619

Closed maxbilbow closed 1 year ago

maxbilbow commented 1 year ago

Projects migrating to Typescript 5 will not be able to install on NPM 7+ because of the peer dependency conflict.

Hopefully this is just a case of evaluating compatibility and adding v5 to the peer dependency version range.

DavidParks8 commented 1 year ago

@erikbarke, has this project been abandoned?

Andrew-web-coder commented 1 year ago

This project seems to be dead, what are the alternatives?

digable1 commented 1 year ago

I just got bit by this. Temporarily reverting toTS4 but that is far from the best resolution.

maxbilbow commented 1 year ago

@digable1 There is a better solution:

{
  "overrides": {
    "karma-typescript@<=5.5.2": {
      "typescript": "$typescript"
    }
}

More info: https://docs.npmjs.com/cli/v8/configuring-npm/package-json#overrides

digable1 commented 1 year ago

Hmmm.....that didn't work for me.

But this did:

"overrides": {
    "karma-typescript": {
        ".": "^5.5.3",
        "typescript": "^5.0.4"
    }
}

Furthermore, hopefully by the time any of these two minor versions get implemented, this won't be needed. Yeah, it's brittle and hacky and a gamble regarding the future state of this issue, but I like this idea better than deprecating TS.

So thanks for that!

In the meantime: Still asking along with the rest of the posts on this issue tor a resolution (hopefully as simple as the update to the dependency range as suggested in post 1).

maxbilbow commented 1 year ago

I think that overrides the karma-typescript version as well.

I recommend using $typescript for the version as this references whatever you specify in your dependencies.

erikbarke commented 1 year ago

Hey guys, my apologies for the delay, I haven't been able to work on this project for a long time now. 5.5.4 is on npm with support for TS 5 now 🙂