Skip to content
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

Update typescript definitions to 3.0.0-* #1190

Closed
clmcgrath opened this issue Jan 25, 2018 · 24 comments
Closed

Update typescript definitions to 3.0.0-* #1190

clmcgrath opened this issue Jan 25, 2018 · 24 comments
Assignees
Labels
Feature Request Request for new functionality to support use cases not already covered

Comments

@clmcgrath
Copy link

Not sure if this is maintained by you but the typescript definitions for RC don't yet exist ,
if this is maintained here could you bring these up to date

@DABH
Copy link
Contributor

DABH commented Jan 30, 2018

It's a work in progress, should be done soon... can follow the conversation here:
DefinitelyTyped/DefinitelyTyped#20418

@indexzero
Copy link
Member

@DABH would be fine adding them to the repository itself so they can be closely aligned on versioning.

@DABH
Copy link
Contributor

DABH commented Feb 20, 2018

Now that I have access I'll bring the typings over here. I'll add the ones for 3.x; also, it might be nice (though not necessary) to bring the 2.x typings over as well, so everything's out of DefinitelyTyped.

@clmcgrath
Copy link
Author

This would definitely be the preferred route

@nolazybits
Copy link

Hey @DABH what's the status?

@DABH
Copy link
Contributor

DABH commented Mar 8, 2018

@nolazybits I'm meeting with @indexzero on Friday and will discuss getting this integrated -- know this has been delayed for a while but expect some updates hopefully this weekend!

@DABH
Copy link
Contributor

DABH commented Mar 14, 2018

logform PR is opened (winstonjs/logform#15); PRs for winston-transport and winston should come soon. Feel free to review/+1 as appropriate.

@DABH
Copy link
Contributor

DABH commented Apr 2, 2018

logform typings got merged in, winston-transport are now in PR (winstonjs/winston-transport#9). Now that the dependencies are done, just need to finish up the actual winston typings... coming soon!

@DABH
Copy link
Contributor

DABH commented Apr 6, 2018

winston-transport typings merged... incidentally if anyone wants to start using/testing the logform / winston-transport typings in their apps that would be much appreciated, it's possible I've missed things. Still working on winston typings but will post an update when I have one

@indexzero indexzero added Feature Request Request for new functionality to support use cases not already covered and removed next-minor labels Apr 19, 2018
@DABH DABH self-assigned this Apr 19, 2018
@DABH
Copy link
Contributor

DABH commented Apr 21, 2018

#1287
(this depends on winstonjs/winston-transport#11 which isn't merged yet as of writing this, but you can download that revision manually)

Anyone who wants to help test/debug this scores some Internet points ;) Otherwise I'll test things as best I can and hopefully get this merged in soon. There may be problems with what's written, as well as missing things.

I chose to exclude any deprecated methods, since people who are bleeding edge enough to use Typescript surely wouldn't want to use any deprecated methods ;)

@DABH DABH closed this as completed in 51cc53f Apr 27, 2018
@DABH
Copy link
Contributor

DABH commented Apr 27, 2018

Typings have been merged and will be included in the next RC (if we do another one) and the final 3.0 release! Please start using them when you can and let me know if I missed anything. Thanks!

@sveyret
Copy link
Contributor

sveyret commented May 15, 2018

Hi, thank you @DABH. I've just added the latest winston RC as dependency to my project and I'd be glad to use the TS definitions. Is a new RC expected before the final 3.0 or should I take definitions directly from github?

@DABH
Copy link
Contributor

DABH commented May 16, 2018

@sveyret The TS defs should be in the latest RC (RC6). Let me know if you don’t see them! I don’t expect them to change significantly between now and the final 3.0 release near the end of the month.

@sveyret
Copy link
Contributor

sveyret commented May 16, 2018

@DABH actually, I don't see this latest RC6 at all… Neither in github releases nor with npm. I tried to install winston@next, but I only have RC5, so I tried winston@3.0.0-rc6 but the version wasn't found.

@DABH
Copy link
Contributor

DABH commented May 16, 2018

My apologies -- we are putting in a few more fixes before pushing RC6 (I suspect it will go out this Friday morning). Meanwhile if you use winston@master you'll get them (a little uglier in your package.json I know...). Sorry about that, thanks for bringing this up!

@sveyret
Copy link
Contributor

sveyret commented May 16, 2018

Thank you for the info. I think I'd better wait for Friday (morning for which continent? 😉) If it's not ready this week-end, I'll get the branch directly from git.

@DABH
Copy link
Contributor

DABH commented May 18, 2018

Aiming for around pushing in around 11 hours but stay tuned ; )

@sveyret
Copy link
Contributor

sveyret commented May 19, 2018

A bit delayed?

@DABH
Copy link
Contributor

DABH commented May 20, 2018

Indeed... @indexzero ?

Perhaps just use master for now, it's quite similar to what will be the upcoming official 3.0 release...

@sveyret
Copy link
Contributor

sveyret commented May 22, 2018

Hi @DABH ,
Thank you for your work. I finally installed the master on my project.
I am using the default logger, and the LeveledLogMethod are not defined for it on index.d.ts. As you can see here, npm level methods are concatenated to the listed methods which are added to default winston object.
Btw, even if I don't use them, there also seem that methods handleExceptions and unhandleExceptions are neither defined on the default logger, nor on other ones.
Would you like me to open new issues for that?

@sveyret
Copy link
Contributor

sveyret commented May 22, 2018

I also noticed that there is a new http level (between info and verbose) for npm…

@sveyret
Copy link
Contributor

sveyret commented May 23, 2018

I sent a pull request #1323 to correct this. I did not dare to add (un)handleExceptions because I don't use them and therefore am not sure of me.

@DABH
Copy link
Contributor

DABH commented May 24, 2018

Thanks @sveyret for your contribution. We merged #1323 . I've opened #1330 which should address your comments on .(un)handleException. .(un)handleException is a deprecated API so I'm only including the defs for the equivalent non-deprecated .exception.(un)handle. Hope that makes sense. If there is any vocal support for having the deprecated ones in the TS defs I'm open to adding them.

@sveyret
Copy link
Contributor

sveyret commented May 24, 2018

Thank you for merging this change. Your comment on .(un)handleException completely makes sense to me. There is no need to use them if they are deprecated.

Mizumaki pushed a commit to Mizumaki/winston that referenced this issue Jun 11, 2020
TypeScript definitions for winston@3.0 (closes winstonjs#1190)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request Request for new functionality to support use cases not already covered
Projects
None yet
Development

No branches or pull requests

5 participants