Commit graph

12 commits

Author SHA1 Message Date
Francis Gulotta
258574260f
chore: Unit test unixWrite (#1986)
- unit test unixWrite 100% code coverage
- found a bug where we’d always disconnect on write errors despite attempts to sometimes just have write errors, I didn’t fix it, I need to think if we can just rip one of those concepts out completely.
2019-11-09 23:38:17 -05:00
Francis Gulotta
17c30f19c1
chore: change bindings constructor option to be optional (#1987) 2019-11-09 23:37:56 -05:00
Francis Gulotta
50f967e788
fix: bindings.close() should cause a canceled read error (#1972)
`stream` seems unaffected by this but other future interfaces may not be so forgiving.

- removed the unused disconnect handler that we passed to bindings in tests.
- moved shouldReject to a test global
- unit tested unixRead
2019-11-09 21:46:21 -05:00
Francis Gulotta
61e9d9ec7e
chore: more async refactoring (#1955) 2019-10-05 20:13:56 -04:00
Francis Gulotta
9d01492968
fix: bindings now error when closed during empty writes (#1872)
Also fix tests not running!
2019-05-17 20:33:25 -07:00
Francis Gulotta
6b85c3d719 chore: rename comName to path (#1859)
We refer to the data as path everywhere but the port info object. This unifies them.

Accessing `comName` will log a warning for one major release and go away afterwards.
2019-05-03 23:20:59 -04:00
Francis Gulotta
d4f15c0a09
chore: remove node6 support and upgrade codebase (#1851)
- use async functions
- use Object.entries/Object.values
- use Object spreading

BREAKING CHANGE: bindings now use async functions so they’ll never throw, only reject
2019-05-01 21:19:29 -04:00
HipsterBrown
d347f3b807 fix(packages/bindings#write): do not call native binding for empty buffers 2018-11-05 12:35:29 -05:00
Francis Gulotta
f123d2745f chore: linting - a much more reasonable line length 2018-09-15 05:02:59 -04:00
Francis Gulotta
7cee2020f1
chore: use Prettier for formatting (#1635)
This is a crazy diff that's unreadable. Prettier has gained a lot of traction I personally like it and a lot of code looks like this these days. It also supports linting and formatting that eslint doesn't on its own. That alone helps keep the code more standard. This PR is equivalent of ripping off a bandaid.

- Add prittier
- `npm run format`
2018-08-25 19:05:56 -07:00
Francis Gulotta
dad88ce899
chore: drop node 4 and upgrade to node 6 features (#1633)
Libraries, LTS support and a large enough amount of users have all dropped node 4. As part of this years [J5 summit](https://github.com/rwaldron/johnny-five/issues/1463) we discussed supporting all Active, Maintenance and Current LTS releases only. This will greatly reduce maintenance overhead and make this maintainer a little bit more happy. The last version of serialport to support node 4 will be `serialport@6`.

- remove "use strict;"
- add engines directives to all package.json's
- drop safe-buffer as they're all safe now
- let eslint-plugin-node use the engines directive
- use new language features in a few random places to feel better about this
- stop including the package-lock.json
- upgrade a few packages

BREAKING: Dropping support for node 4
2018-08-25 18:41:39 -07:00
Francis Gulotta
baecde7917
chore: split out more packages (#1611)
* chore: split out more packages

- `npm run format` to fix eslint issues
- fix repo links on parser packages
- ensure we're always rebuilding c++ on CI
- `@serialport/binding-abstract` as an abstract class for all bindings
- `@serialport/binding-mock` for a mock binding package
- `@serialport/stream` for our traditional stream interface
- `@serialport/bindings` for working with osx, windows and linux OS serialports
2018-08-25 09:31:34 -07:00
Renamed from packages/serialport/lib/bindings/linux.js (Browse further)