Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
@serialport/parser-readline
Advanced tools
See our api docs See our api docs https://serialport.io/docs/api-parser-readline
@serialport/parser-readline is a parser for the serialport library that reads data from a serial port and splits it into lines based on a delimiter. It is useful for applications that need to process data line-by-line from serial devices.
Basic Line Parsing
This feature allows you to read data from a serial port and split it into lines based on a specified delimiter. In this example, the delimiter is set to '\r\n'.
const SerialPort = require('serialport');
const Readline = require('@serialport/parser-readline');
const port = new SerialPort('/dev/tty-usbserial1', { baudRate: 9600 });
const parser = port.pipe(new Readline({ delimiter: '\r\n' }));
parser.on('data', line => {
console.log(`Received line: ${line}`);
});
Custom Delimiter
This feature allows you to specify a custom delimiter for splitting the data into lines. In this example, the delimiter is set to ';'.
const SerialPort = require('serialport');
const Readline = require('@serialport/parser-readline');
const port = new SerialPort('/dev/tty-usbserial1', { baudRate: 9600 });
const parser = port.pipe(new Readline({ delimiter: ';' }));
parser.on('data', line => {
console.log(`Received line: ${line}`);
});
Handling Errors
This feature demonstrates how to handle errors that may occur while reading data from the serial port. The error event is listened to on the port object.
const SerialPort = require('serialport');
const Readline = require('@serialport/parser-readline');
const port = new SerialPort('/dev/tty-usbserial1', { baudRate: 9600 });
const parser = port.pipe(new Readline({ delimiter: '\r\n' }));
parser.on('data', line => {
console.log(`Received line: ${line}`);
});
port.on('error', err => {
console.error('Error: ', err.message);
});
See our api docs See our api docs https://serialport.io/docs/api-parser-readline
8.0.4 (2019-10-27)
This is the first non beta release of serialport version 8! 🎉 The biggest change in 8x is our version numbers. We now user lerna's "fixed versioning" to allow for a much easier documentation experience. This makes all our packages share a version number when they're released. Our website now has versioned docs so you can see what they looked like for the version of serialport you're using today. (Check out our 7x docs if you still need them.)
With this change we've moved a centralized changelog (this file!) and we'll be moving older release notes here. We also moved the website to it's own repo.
A few breaking api changes have been introduced over the 8x beta releases. You can find out more about them in the Upgrade Guide
We dropped node6 support and now support node12 (and we work on node 13) which allowed us to migrate to async/await. The reduced a fair bit of code and was a welcome change.
Windows got a few notable bug fixes from contributors and RTS/CTS flow control should now work as expected.
And lastly our CI system has mostly been moved to GitHub Actions, they are much much faster than our travis/appveyor combo and cheaper too (free!). We still pay for Appveyor because we still use them with travis for binary builds. When that process is migrated we should be able to drop both services completely.
This is also our first major release since starting the serialport collective! Like a lot of projects we rely on volunteers, students, professionals and the backing of companies using the project for their businesses. If you find serialport helpful, please read about why you might want to donate to the project and our project's goals.
Thanks to @boneskull, @BryanHunt, @hipsterbrown, @Holger-Will, @icebob, @jacobq, @jowy, @krutkay, @maxvgi, @nornagon, @podarok, @reconbot, and @warp for their help with this release!
And Thanks to our first 5 open collective backers! https://opencollective.com/serialport#backers for help with sustaining this project!
FAQs
See our api docs See our api docs https://serialport.io/docs/api-parser-readline
We found that @serialport/parser-readline demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.