gajus / lightship

Abstracts readiness, liveness and startup checks and graceful shutdown of Node.js services running in Kubernetes.
Other
518 stars 32 forks source link

feat: migrate to typescript #30

Closed JohannesLamberts closed 3 years ago

JohannesLamberts commented 3 years ago

closes #29

JohannesLamberts commented 3 years ago

the untyped 'promise-deferred' leads to tsc errors, but otherwise look good so far.

JohannesLamberts commented 3 years ago

@gajus 'promise-deferred' is currently missing types. I removed the dependency as the same can be archived with little code, also reducing dependencies.

If you dislike the change I could re-insert the module and either add types inside this repo (they don't need to be exported, since the Deferred is not public) - or add the types to DefinitelyTyped as suggested in https://github.com/ljharb/promise-deferred/issues/9.

I'm looking forward to your review 🙂

JohannesLamberts commented 3 years ago

ahhh, now nyc fails. Otherwise, the tests are green. I'll try to look into that tomorrow.

coveralls commented 3 years ago

Pull Request Test Coverage Report for Build 130


Totals Coverage Status
Change from base Build 126: 0.8%
Covered Lines: 139
Relevant Lines: 148

💛 - Coveralls
coveralls commented 3 years ago

Pull Request Test Coverage Report for Build 132


Totals Coverage Status
Change from base Build 126: 0.8%
Covered Lines: 139
Relevant Lines: 148

💛 - Coveralls
JohannesLamberts commented 3 years ago

@gajus thanks for the quick feedback. I don't know if you prefer to resolve the discussions. I went ahead and resolved them after my commit.

I also noted that I accidentally removed the --source-maps option and forgot to remove @babel/plugin-transform-flow-strip-types. Both have been adressed with the two latest commits.

I compared the dist file before and after the migration to make sure everything is ok. The only real difference apart from .d.ts instead of .flow files is the change of promise-deferred.

gajus commented 3 years ago

Thank you

gajus commented 3 years ago

:tada: This PR is included in version 6.6.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: