Open Collective
Open Collective
Loading
Node SerialPort v10 has been released 🎉
Published on March 1, 2022 by Francis Gulotta

This past year has brought a lot of really good change to Node Serialport. First and foremost we have a new maintainer who personally lead our c++ codebase to the modern area by implementing N-API support.

Please welcome Gareth Hancock to the team 👏

Now for the changes! (Jump into the upgrade guide if you just want to get started!)

N-API Support

The number one support issue we have has to do with installing on Electron. Electron is great and people are using it to build everything from Point of Sale machines to, sports medicine devices to ATMS. (Really!) But the mix of nodejs and chrome environments made it very difficult to install a binary module and download the right kind of binary for the environment. We had over 25 builds and depending on how you installed the package you got one that might work in node, but not electron, or vice versa. Additionally we had to publish updated binaries for every new version of node and electron. It was a lot of work.

With N-API everything changes. We now publish one binary that works for every supported version of node and electron per platform. (Windows, linux, osx, and a varying set of cpu architectures.) This means we don't need to release anything when NodeJS or Electron have new releases. We should just work!

But we took it a step further. We now ship binaries for every platform we support inside the module! They're small! Thanks to the prebuildify-cross project it was relatively easy.

There's a lot of people to thank for this but most of all Gareth Hancock, the NodeJS N-API team for giving us lots of feedback and for everyone who tested and reported issues along the way.

TypeScript

I've personally been wanting to do this for a long time. It took moving a few packages out of the monorepo as they had very different build needs, but our code base is now 100% typescript. Types are no longer external and they are now guaranteed to match reality. It took a couple weeks of work but I quite enjoyed doing this.

New Bindings Interface

Another breaking change this release is a brand new Bindings Interface. Port objects can't exist unless they're open and it separates list out of the bindings class. It's a simplification of the pre-existing class and now that our bindings package has moved out of the monorepo, we plan on versioning it independently allowing for breaking changes at the binding level that wont be noticed at the stream or parsers level. There's more cleanup to do but this is the first major change in years.

Rust SerialPort

The serialport-rs project has been forked after being stagnate for a while and we're talking with the new maintainer about bringing it into the serialport org for long term maintenance. Since renaming our bindings package to `@serialport/bindings-cpp` we're making room for a `bindings-rs` should it's code base improve our support.

Lastly I want to thank so many contributors this year. In no particular order;
  • AndreiLeman
  • caffeinatedbits
  • doggkruse
  • enami
  • GazHank
  • gdt
  • jeremy-mf
  • Julusian
  • LazyRichard
  • pavinthan
  • s-c-p
  • tasnimzotder
  • thegecko
Since this is opencollective it's worth talking about money. We haven't been spending any, but we don't have much. The original idea was to web costs, CI costs (which is now free with GitHub Actions), test hardware (which we haven't purchased many), and hiring contractors to improve our c++ code base (which we don't have enough money to make happen.)

If you do use Node SerialPort for work, do consider asking your business to contribute, hiring c++ developers would still be helpful and could help improve performance and maintainability, but would be a large cost. The maintainers will be talking this over how best to manage the small flow of cash (if any change is needed) but we're still quite appreciative to all who donate. 

Thanks to our financial contributors this year (all personal donations) in no particular order;
  • Donovan Buck
  • Peter Dyson
  • A wonderful anonymous donor
  • Quinn Carver
  • Ryan Gordon (for our largest donation ❤️)
Hope your 2022 brings you joy.

-Francis

PS You might notice we've changed the name of the Open Collective to "SerialPort" that's to make room for Rust. =)