Commit graph

34 commits

Author SHA1 Message Date
Francis Gulotta
4f2a4517e2
chore: remove other packages 2021-12-29 18:00:56 -05:00
Francis Gulotta
145b906d9c
feat: drop callback argument on SerialPort.list() (#1943)
Promises are now standard

BREAKING: SerialPort.list() now takes no arguments and always returns a promise.
2019-09-24 23:15:31 -04: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
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
Francis Gulotta
826545bd0a
chore: change to a monorepo structure with Lerna (#1586)
- move from istanbul to nyc and update coverage reporting
- global docs
- global linting
- global tests
2018-07-24 01:15:09 -04:00
Francis Gulotta
1fa20e792e
fix(terminal): specifying a port now behaves correctly (#1463)
- Don't list the ports when specifying a port
- Small promise refactor.
2018-02-04 18:07:59 -05:00
Robert Massaioli
9f543b63ee Adding in port selection to serialport-term. (#1448)
* Adding in port selection to serialport-term.

This makes the terminal command much more useable when you need to open
it multiple times in a row; especially when the names of the serialports
are rapidly changing.

* Fix the command line arguments.

* Fixing eslint mistakes.

* Make all of the negative errors positive in serialport-terminal.
2018-02-03 09:17:12 -05:00
Francis Gulotta
4fc1404c8c [all] Unify the serialport.list output (#1266)
- [osx] remove the 0x from productID and locationId and vendorId
- [linux] remove the starting 0x from any values, small refactor
- [linux] Fixup output using the hex encoded fields
- [windows] Grab the serial number from the pnp id
- Isolate list functions to their own platform files (c++)
- Better ensure our serialports fields are present

closes #1220
2017-07-29 19:40:39 -04:00
Francis Gulotta
cc779624db [all] Add promise support to serialport-repl and improve docs 2017-07-29 01:32:43 -04:00
Francis Gulotta
2ed7b119d0 Test flushing data
- [unix] small changes to flushing data during port open and setup to prevent bad data
- [all] mock binding flush now works
- cleanup on mock-binding pending reads
- add `serialport-repl` as a bin and npm command
2017-07-09 21:25:02 -04:00
Francis Gulotta
4cf9f4c7a4 remove the unnecessary disabled lint rules, make the repl easier (#1219) 2017-07-05 10:01:45 -04:00
Francis Gulotta
6455ecbb51 [unix] New read/write subsystem (#1212)
This has always been the dream. Use `fs.read` and `fs.write` to do reading and writing. To make that happen I've created a cross platform `Poller` object that notifies us once on `readable` and `writable` states.

- Reduce large write cpu usage from 100% to 1-2%
- Replace ReadPoller with a multi purpose poller because you can only have a single uv_poll_t on a fd at a time because reasons
- Experimented with doing this all in c++, maybe there are gains to doing that but I'd never finish.
- Some unrelated eslint changes
- Arduino echo should just echo, writing random bytes was messing it up
- use a file to disable tests in envs
- read and write errors can trigger disconnects
- disconnect event only happens if there are listeners, otherwise error events will be triggered
- a disconnect during write will always have a write error too
- win32 bindings seem to only trigger disconnects on writes
2017-07-05 09:12:31 -04:00
Francis Gulotta
5f53a45cae Buffer upgrades (#1168)
* upgrade to non deprecated buffer methods
* Don't lint on node 4 as it's now broken

I really wish packages would keep things working on LTS platforms.
2017-05-14 12:58:56 -04:00
Francis Gulotta
a049538270 Upgrade linters, edit for clarity 2017-03-16 22:24:53 -04:00
Francis Gulotta
e588e88fa7 Feature flags for disabling tests
Use feature flags instead of platform tags when disabling tests. This also preps us for virtual ports which don't support everything.
2017-01-07 19:05:35 -05:00
Francis Gulotta
a98e92c898 Switch to arrow functions when possible
- Rename the linux-list test
- restore the require cache after proxyquire
2017-01-07 18:29:55 -05:00
Francis Gulotta
c15eb841cb linting for es6 (#1040)
* linting for es6
2016-12-21 21:09:43 -05:00
Francis Gulotta
efee0cd46f remove pre 4.0 stuff 2016-12-20 20:56:11 -05:00
Francis Gulotta
61d44cd39d Fix baud rate parsing in serialport-terminal
Fixes #1023
2016-12-11 12:47:17 -05:00
Francis Gulotta
9f8a359a86 Test changes
- Increase code coverage of parsers 
- Ask mocha to fail fast
- Auto detect arduino for tests
2016-11-04 17:26:41 -04:00
Francis Gulotta
f9547d9b40 Start failing on linter errors 2016-10-11 00:35:35 +01:00
Francis Gulotta
dcfe2ab4ee Switch up testing infrastructure (#881)
- npm test now runs everything but stress tests
 - TEST_PORT is optional but now requires an arduino, the travis provided OS X serial port wasn't worth it
 - do some improvements to coverage
 - Drop grunt for file size and complexity
 - Eslint has dropped 0.10

I don't think Istanbul can detect coverage on sandboxed modules like our mocked bindings. Moving to an isolated binding will improve this situation.

I also don't think coveralls is working on travis
2016-07-24 22:20:23 -04:00
Francis Gulotta
9a98ede77f Remove the serial port factory and throw errors on invalid arguments (#822)
- Constructor now throws errors when given invalid options
 - The Constructor’s callback is given to `.open()` if `openImmediately` is set
 - Depreciation warning when using the old style SerialPort.SerialPort
2016-05-26 11:40:58 -04:00
Francis Gulotta
77b1cbc2f7 Tighten up the graphics on level 4
I mean the linter rules, whitespace only.
2016-05-14 19:12:52 -04:00
Francis Gulotta
bd959f23ec npm2 makes having deps during install near impossible 2016-05-14 19:11:03 -04:00
Francis Gulotta
0d6a11227b bump beta version 2016-05-12 16:13:27 -04:00
Francis Gulotta
4d3fd22bb6 pre-publish is too flakey 2016-05-12 15:41:42 -04:00
Francis Gulotta
0b68db2c45 SpawnSync doesn't exist on node 0.10 2016-05-12 15:36:21 -04:00
Francis Gulotta
3ede1e252e Add some pre-publish hooks to help prevent bad releases 2016-05-12 14:01:55 -04:00
Francis Gulotta
9f9693cb15 Update cli tools (#776)
- Better argument handling
 - Switch to commander as optimist is deprecated 
 - more output formats for serial port list
 - give serialportterm a list option
2016-05-01 18:19:54 -04:00
Francis Gulotta
98c79c98c5 rename the binary files per the usual conventions 2016-04-30 21:35:27 -04:00
Francis Gulotta
cf2f461127 linting binaries, cleaning up tests, add a doc 2016-03-30 11:27:25 -04:00
Joe Ferner
f44e7e66f0 working list and terminal on ubuntu 2012-06-26 22:57:16 -04:00