Compare commits

...

6 commits
main ... v1.0.0

Author SHA1 Message Date
Kirill Zhumarin
22c1997ba2 fix permissions 2024-11-11 02:35:42 +03:00
Kirill Zhumarin
f15b1f2ffa fix repository url 2024-11-11 02:19:05 +03:00
Kirill Zhumarin
ad35edcab5 downgrade artifacts actions 2024-11-11 02:11:16 +03:00
Kirill Zhumarin
175d11e402 downgrade node-gyp 2024-11-11 02:06:38 +03:00
Kirill Zhumarin
ef4e02e51d remark 2024-11-11 01:51:49 +03:00
Kirill Zhumarin
e00ed66238 fork with fixes 2024-11-11 01:49:24 +03:00
7 changed files with 48 additions and 32 deletions

View file

@ -1,9 +1,6 @@
name: Build
on:
push:
branches:
- main
- beta
workflow_dispatch:
concurrency:
group: build-${{ github.ref }}
cancel-in-progress: false
@ -48,7 +45,7 @@ jobs:
- uses: actions/checkout@v4
- run: npm ci
- run: npm run ${{ matrix.command }} -- ${{ matrix.args }}
- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v3
with:
name: build-artifacts
path: prebuilds/
@ -59,9 +56,13 @@ jobs:
needs: prebuild
name: Release
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v3
with:
name: build-artifacts
path: prebuilds
@ -72,5 +73,5 @@ jobs:
- run: npm run build
- run: npm run semantic-release
env:
GH_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

View file

@ -1,7 +1,6 @@
name: Test / Lint
on:
push:
pull_request:
workflow_dispatch:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

View file

@ -16,7 +16,7 @@
"assets": [
{
"path": "prebuilds-*.tar.gz",
"label": "Binary modules (from npm @serialport/bindings-cpp)"
"label": "Binary modules (from npm @sie-js/node-serialport-bindings-cpp)"
}
]
}

View file

@ -1,4 +1,4 @@
# @serialport/bindings-cpp
# @sie-js/node-serialport-bindings-cpp (FORK)
[![Backers on Open Collective](https://opencollective.com/serialport/backers/badge.svg)](#backers)
[![Sponsors on Open Collective](https://opencollective.com/serialport/sponsors/badge.svg)](#sponsors)
@ -13,14 +13,14 @@ Access serial ports with JavaScript. Linux, OSX and Windows. Welcome your roboti
- 📚 [**Guides**](https://serialport.io/docs/)
- [**API Docs**](https://serialport.io/docs/api-serialport)
- [`@serialport/bindings-cpp`](https://www.npmjs.com/package/@serialport/bindings-cpp)
- [`@sie-js/node-serialport-bindings-cpp`](https://www.npmjs.com/package/@sie-js/node-serialport-bindings-cpp)
- 🐛 [Help and Bugs](https://github.com/serialport/node-serialport/issues/new/choose) All serialport issues are pointed to the main serialport repo.
### Bindings
The Bindings provide a low level interface to work with your serialport. It is possible to use them alone but it's usually easier to use them with an interface.
- [`@serialport/bindings-cpp`](https://serialport.io/docs/api-bindings-cpp) bindings for Linux, Mac and Windows
- [`@sie-js/node-serialport-bindings-cpp`](https://serialport.io/docs/api-bindings-cpp) bindings for Linux, Mac and Windows
- [`@serialport/binding-interface`](https://serialport.io/docs/api-bindings-interface) as an interface to use if you're making your own bindings
- [`@serialport/binding-mock`](https://serialport.io/docs/api-binding-mock) for a mock binding package for testing

42
package-lock.json generated
View file

@ -1,11 +1,11 @@
{
"name": "@serialport/bindings-cpp",
"name": "@sie-js/node-serialport-bindings-cpp",
"version": "0.0.0-development",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@serialport/bindings-cpp",
"name": "@sie-js/node-serialport-bindings-cpp",
"version": "0.0.0-development",
"hasInstallScript": true,
"license": "MIT",
@ -34,7 +34,7 @@
"eslint": "8.57.1",
"mocha": "10.8.2",
"node-abi": "3.71.0",
"node-gyp": "10.2.0",
"node-gyp": "^10.1.0",
"nyc": "17.1.0",
"prebuildify": "6.0.1",
"prebuildify-cross": "5.1.1",
@ -8302,9 +8302,9 @@
}
},
"node_modules/node-gyp": {
"version": "10.2.0",
"resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-10.2.0.tgz",
"integrity": "sha512-sp3FonBAaFe4aYTcFdZUn2NYkbP7xroPGYvQmP4Nl5PxamznItBnNCgjrVTKrEfQynInMsJvZrdmqUnysCJ8rw==",
"version": "10.1.0",
"resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-10.1.0.tgz",
"integrity": "sha512-B4J5M1cABxPc5PwfjhbV5hoy2DP9p8lFXASnEN6hugXOa61416tnTZ29x9sSwAd0o99XNIcpvDDy1swAExsVKA==",
"dev": true,
"license": "MIT",
"dependencies": {
@ -8314,9 +8314,9 @@
"graceful-fs": "^4.2.6",
"make-fetch-happen": "^13.0.0",
"nopt": "^7.0.0",
"proc-log": "^4.1.0",
"proc-log": "^3.0.0",
"semver": "^7.3.5",
"tar": "^6.2.1",
"tar": "^6.1.2",
"which": "^4.0.0"
},
"bin": {
@ -8411,6 +8411,16 @@
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/node-gyp/node_modules/proc-log": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/proc-log/-/proc-log-3.0.0.tgz",
"integrity": "sha512-++Vn7NS4Xf9NacaU9Xq3URUuqZETPsf8L4j5/ckhaRYsfPeRyzGw+iDjFhV/Jr3uNmTvvddEJFWh5R1gRgUH8A==",
"dev": true,
"license": "ISC",
"engines": {
"node": "^14.17.0 || ^16.13.0 || >=18.0.0"
}
},
"node_modules/node-gyp/node_modules/signal-exit": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz",
@ -21403,9 +21413,9 @@
}
},
"node-gyp": {
"version": "10.2.0",
"resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-10.2.0.tgz",
"integrity": "sha512-sp3FonBAaFe4aYTcFdZUn2NYkbP7xroPGYvQmP4Nl5PxamznItBnNCgjrVTKrEfQynInMsJvZrdmqUnysCJ8rw==",
"version": "10.1.0",
"resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-10.1.0.tgz",
"integrity": "sha512-B4J5M1cABxPc5PwfjhbV5hoy2DP9p8lFXASnEN6hugXOa61416tnTZ29x9sSwAd0o99XNIcpvDDy1swAExsVKA==",
"dev": true,
"requires": {
"env-paths": "^2.2.0",
@ -21414,9 +21424,9 @@
"graceful-fs": "^4.2.6",
"make-fetch-happen": "^13.0.0",
"nopt": "^7.0.0",
"proc-log": "^4.1.0",
"proc-log": "^3.0.0",
"semver": "^7.3.5",
"tar": "^6.2.1",
"tar": "^6.1.2",
"which": "^4.0.0"
},
"dependencies": {
@ -21468,6 +21478,12 @@
"brace-expansion": "^2.0.1"
}
},
"proc-log": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/proc-log/-/proc-log-3.0.0.tgz",
"integrity": "sha512-++Vn7NS4Xf9NacaU9Xq3URUuqZETPsf8L4j5/ckhaRYsfPeRyzGw+iDjFhV/Jr3uNmTvvddEJFWh5R1gRgUH8A==",
"dev": true
},
"signal-exit": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz",

View file

@ -1,5 +1,5 @@
{
"name": "@serialport/bindings-cpp",
"name": "@sie-js/node-serialport-bindings-cpp",
"description": "SerialPort Hardware bindings for node serialport written in c++",
"version": "0.0.0-development",
"main": "./dist/index.js",
@ -42,7 +42,7 @@
"eslint": "8.57.1",
"mocha": "10.8.2",
"node-abi": "3.71.0",
"node-gyp": "10.2.0",
"node-gyp": "^10.1.0",
"nyc": "17.1.0",
"prebuildify": "6.0.1",
"prebuildify-cross": "5.1.1",
@ -91,7 +91,7 @@
},
"repository": {
"type": "git",
"url": "https://github.com/serialport/bindings-cpp.git"
"url": "https://github.com/siemens-mobile-hacks/node-serialport-bindings-cpp.git"
},
"funding": "https://opencollective.com/serialport/donate",
"changelog": {

View file

@ -114,14 +114,14 @@ void ConnectionOptionsBaton::Execute() {
// If there is a custom baud rate on linux you can do the following trick with B38400
#if defined(__linux__) && defined(ASYNC_SPD_CUST)
if (baudRate == -1) {
int err = linuxSetCustomBaudRate(fd, baudRate);
int err = linuxSetCustomBaudRate(fd, this->baudRate);
if (err == -1) {
snprintf(errorString, sizeof(errorString), "Error: %s || while retrieving termios2 info", strerror(errno));
this->SetError(errorString);
return;
} else if (err == -2) {
snprintf(errorString, sizeof(errorString), "Error: %s || while setting custom baud rate of %d", strerror(errno), baudRate);
snprintf(errorString, sizeof(errorString), "Error: %s || while setting custom baud rate of %d", strerror(errno), this->baudRate);
this->SetError(errorString);
return;
}
@ -133,7 +133,7 @@ void ConnectionOptionsBaton::Execute() {
// On OS X, starting with Tiger, we can set a custom baud rate with ioctl
#if defined(MAC_OS_X_VERSION_10_4) && (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_4)
if (-1 == baudRate) {
speed_t speed = baudRate;
speed_t speed = this->baudRate;
if (-1 == ioctl(fd, IOSSIOSPEED, &speed)) {
snprintf(errorString, sizeof(errorString), "Error: %s calling ioctl(.., IOSSIOSPEED, %ld )", strerror(errno), speed);
this->SetError(errorString);