-
Notifications
You must be signed in to change notification settings - Fork 5
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
feat: ts rewrite and DPT 22, 28 29, 213, 235, 242, 249, 251, 275, 99, 60001 support #2
base: master
Are you sure you want to change the base?
Conversation
Fixed errors: - On dpt2 multiple subtypes 001: 010 011 012 - Ensure every file uses knxlog and not log-driver directly - Fix logs on dptlib/index.js (scalar and range not defined) - Varius dpt typos - DPT237 apdu_data[1] and [2] assigned to an array instead of a number
TODOs:
|
please consider:
|
Nice to see that someone want to invest time in knx. |
Could I ask you why? |
@ekarak Sure! I will let you know once I end with this but my idea is to keep it full back compatibile! |
The benefit vs the work necessary to set up, undertand and maintain typescript project will complicate things for me and my colleague. I already don't have much time to do it in the simple way. |
I can understand but trust me I had your same opinion about TS at start and now I feel so bad when I work with an untyped codebase. Also every time I do a TS refactor I found tons of issues and bugs caused by typos that js simply will never spot. Could you wait a bit I end with this so I can help you working with the TS codebase? It would be much better and easier to debug... |
@ekarak the PR is almost done (I only need to add eslint and prettier) I kindly ask you if you can take a look at it and also run the wired tests on your end (I don't have a way to run them) Now to run them simply use: |
Ok I'm done here, please @ekarak make a review when possible :) The only breaking changes I introduced are:
|
Wired test are ok for me. I just did the read storm with 4 as I don't have a bigger actuator. |
please rebase and test so that we can merge this |
Just my 5 cent to this PR:
If you want to check it out, I created a commit how this could be done for the connection: TooAngel@a07637a Some smaller things needs to be done to make the type file really nice, the |
I have no more time to invest on this, I'm sorry. It took me more then a week to do all this and when I stopped (due to no feedbacks) everything was working flowlessy. I couldn't agree with any statement against Typescript, nowdays ALL major projects are written in TS and there is a reason if so, you can use JS docs or in line types but that's just a masked Typescript that most people do only because they don't want to learn it (or do such big refactors). I have found many people that were against it then all changed their mind once they started using it Just by switich to it here I found tons of issues in code and bugs, this is not an opinion but a real fact. About the code that is different in production: there are source maps that can be used for such purpose, never had any problem with all my projects understanding where the issue is because of TS. Just to give you an example: I converted to TS also the MQTT.js module (almost 5 milions downloads per month on npm) and before that the project was going to die, now it's back to life as people feel much more confident making changes to code thanks to types |
Sry, I didn't want to offend someone, just wanted to mention my opinion / give me 5 cent. In the end it is @ekarak 's decision how to move forward. I just wanted to do a small extension so that I can work better with this library, so I'm fine. |
@TooAngel Didn't want to be rude anyway with my comment, just wanted to explain my points as well about TS move that I'm pretty sure would be a super nice addition to this project 😄 |
Improvements/Fixes:
Connection.js
has been renamed toKnxClient
BREAKING CHANGES
Connection
toKnxClient
andnew
operator is now manadatory