coapjs / node-coap

CoAP - Node.js style
MIT License
531 stars 154 forks source link

refactor: migrate project to Typescript #293

Closed JKRhb closed 2 years ago

JKRhb commented 2 years ago

This PR is a potential follow-up to #289 migrating the whole project to Typescript.

coveralls commented 2 years ago

Pull Request Test Coverage Report for Build 1427551635


Changes Missing Coverage Covered Lines Changed/Added Lines %
lib/server.ts 37 38 97.37%
index.ts 56 59 94.92%
lib/cache.ts 37 40 92.5%
<!-- Total: 255 262 97.33% -->
Totals Coverage Status
Change from base Build 1427500654: -0.5%
Covered Lines: 1131
Relevant Lines: 1244

💛 - Coveralls
Apollon77 commented 2 years ago

wow, now you go forward :-))

invaderb commented 2 years ago

This is awesome! great job so far :)

JKRhb commented 2 years ago

@invaderb @Apollon77 Thank you for your feedback! :) I now migrated most of the code, there are still some issues, though, which I have to investigate. I guess the PR should be ready for review later this week :)

JKRhb commented 2 years ago

After some intense procrastination debugging, I now managed to finish this PR and move the whole codebase to Typescript :) Feedback is highly appreciated!

Both tests and the linter currently fail here on GitHub because https://github.com/DefinitelyTyped/DefinitelyTyped/pull/56130 hasn't been merged yet but once that is done it should be possible to merge this PR as well. I guess #289 has become obsolete now or do you think it might make sense to have some kind of intermediary step between the old state of the project and this PR?

To better keep track of the changes I'll might create a couple of smaller PRs from this one that introduce certain aspects (like the null checks or the use of Maps instead of Objects for caching) first and then finally merge the rest of this PR.

JKRhb commented 2 years ago

After the merge of https://github.com/DefinitelyTyped/DefinitelyTyped/pull/56130, the tests are now finally passing :)

JKRhb commented 2 years ago

Ehem, sorry for all the updates. I think this PR should now be finished :) After the release of 0.26.0 we should be able to merge it right away and release 1.0.0.

Apollon77 commented 2 years ago

seems a rebase is needed @JKRhb

JKRhb commented 2 years ago

seems a rebase is needed @JKRhb

Done :)