Commit graph

6 commits

Author SHA1 Message Date
Kirill Zhumarin
4f22da84a4 fix: register poller listeners before polling 2026-06-30 00:57:21 +03:00
Krzysztof Rosiński
730bc61942
extract bindings (#128)
Hello,

I have a use case where size of an application is important, I'd like to
webpack as much as possible. The problematic part is related *.node
files, I found a potential solution, example with sqlite:

```
externals: {
    './sqlite3-binding.js':       'commonjs ./node_sqlite3.node',
}
```

I can replace sqlite3-binding.js [1] with *.node, then I copy
node_sqlite3.node to the main application folder. I'd like to try
something similar with the serialport. However, it is slightly more
complicated since serialport doesn't have single import file. This PR is
an attempt to fix the problem.

[1]
https://github.com/TryGhost/node-sqlite3/blob/master/lib/sqlite3-binding.js

---------

Co-authored-by: Krzysztof Rosiński <krzysiek@jrdltd.co.uk>
2024-12-23 15:12:57 -05:00
Francis Gulotta
b3cb9c98f3
chore: upgrade ts and fix type warnings (#91) 2022-11-16 22:09:25 -05:00
Francis Gulotta
e7e31ca0c6
fix: poller debug namespace 2022-02-01 23:30:04 -05:00
Francis Gulotta
53b5c2530b
feat: BindingsError with a canceled property 2022-01-31 22:25:28 -05:00
Francis Gulotta
2a93f48ee6
feat: migrate to typescript (#3)
This change migrates to typescript. The tests have been modified to conform to typescript and to cleanup cases when they weren't actually working (only one or two cases).

I've defined the existing bindings interface for all platforms. There are changes I'd love to make but didn't here (update/set/get/getBaudRate etc are messy). This should in theory be a drop in for the existing bindings. If there are bugs I imagine they're type related not functionality.

I dropped abstract bindings as having it a separate package didn't make sense during the refactor. I'd like to iterate on the design a bit more before returning to that class. Mockbinding may also now be drifted slightly from this package. I'll clean those inconsistencies up when I upgrade the main repo.
2022-01-22 15:55:03 -05:00
Renamed from lib/poller.js (Browse further)