-
Notifications
You must be signed in to change notification settings - Fork 170
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
Is this compatible with TS 5 decorators? #225
Comments
Is there any plans by the team or community to update this package to support TS 5.0? |
None of the maintainers seem to be working at microsoft. Not sure if they ever did, as I just started using this library recently. So I guess the future of this project seem to be uncertain, as there hasn't been much activity either lately. |
The library is stable, has all the features it needs implemented and has been in that state for ages. |
Technically yes, but I think we should expect TS to cease supporting experimental decorators eventually. But its more likely that users of tsyringe may eventually encounter a package they want to use that requires the new decorators but can't until it becomes compatible. |
Does anyone have experience using another stable, lightweight DI framework that is more actively maintained? EDIT: It turns out that I don't need any fancy features that a framework offers. I've decided to go Pure DI. |
I ended up going for Inversify. |
I agree - I want to see this package support TS 5 decorators as well or a fork that does and works with TS 5 so we aren't locked out of other newer decorator packages. However let's not forget that we were all using a flag that does actually say it is On my reply, it was only to the comment of "future of this project seem to be uncertain, as there hasn't been much activity either lately". Just because a project doesn't have recent activity, doesn't mean its broken or out of date. Some libraries you have in your dependency trees haven't had updates for years and remain stable, secure and reliable despite this fact. reflect-metadata (which up until TS 5 has been the thing to use if you're using decorators with the But let's try avoid getting into that whole topic, instead let's just focus on what we do with this package and TS 5 as it'll actually lead to some results for us all rather than a pointless argument on semantics 👍 |
In looking through the code it seems like this may have already been resolved via #226 but it simply hasn't been published yet. Hopefully once that becomes published it should work without issue in TS 5.x environments. |
Are there any plans to release the code changes that would publish the TS5 compatibility any time soon? PR looks like it was merged some time ago. |
inversify also uses Reflect.metadata so it won't work with TS 5 decorators. |
Just tested, inversify is not affected by this with version 6.0.1 |
@MeltingMosaic had merge capability, but sometimes it's different people who can publish new versions to NPM. I guess they'd also have to evaluate whether the other changes in |
Any updates for these releases? |
Upgraded TS to v5 and now I am facing this 😢 |
I don't really understand what is happening with the repo. The PR that would allow moving to the latest TS version was merged and the action ran for the release, its green and everything, but NPM still shows 4.7.0 which is over a year old now. |
In looking at that job you mentioned, the steps required to publish the package never ran, so the workflow didn't actually end up doing anything. This means that someone from the team needs to push a publishing commit so that these changes can go live. |
I am unfamiliar with github actions so I wasn't sure if that meant they were disabled or if I just didn't have access to see more detail about the steps. In any case hopefully a maintainer can just get it shipped; I really don't want to have to fork anything or look for other options if it can be avoided. |
yeah me too. i have a project built using tsyringe that id rather not have to move to inversify. |
may be we should ping them on twitter I guess.. |
Just forked and published to npm while waiting for the real package to update. @triptyk/tsyringe . |
@Xapphire13 Hoping to get some traction on getting the changes for TS5 support published. |
To avoid type error just place
It's a little hackish but at least it will work until package will be updated |
@wielski It works fine if you are just using tsc. Even VS code has no problems. But ts-node or ts-node-dev are giving the same error like it can't find our custom file. Any workaround that? |
got it working with --files flag that checks with the typeRoots option in tsconfig |
Any comment about when this is going to be released? At this rate i might as well move myself to Inversify. |
I'm wondering what other DI frameworks are being used in other popular microsoft projects because this is not actively maintained. tsc itself is from ms. Many projects moved to tsc5 (eg vscode). So these tsc5 moved projects' di lib could be not tsyringe, something else. Not sure if we are missing something. |
There was a new release published today to npm, in 4.8.0 this change is now included. |
Sorry folks - I thought I published a new version when I merged the change. Turns out, I did not. |
@MeltingMosaic Thanks! |
I think this issue can be closed now. |
@MeltingMosaic So, will the new version be published? |
@Frikki |
Any update on this working with TS5? |
Hey everyone, I have been working on a library called |
Typescript 5.0 recently released. It changes decorators quite a bit.
Will this library work without the experimental decorators flag? I think that should be written in the Readme somewhere.
The text was updated successfully, but these errors were encountered: