bluetooth-serial-port 3.0.1 → 3.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.circleci/config.yml +29 -17
- package/Dockerfile +1 -1
- package/README.md +3 -2
- package/RELEASE_NOTES.md +10 -0
- package/appveyor.yml +11 -16
- package/package.json +3 -3
- package/src/linux/BTSerialPortBinding.cc +1 -0
- package/src/linux/DeviceINQ.cc +7 -1
- package/src/windows/BTSerialPortBinding.cc +1 -0
- package/.ccls-cache/@@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/@usr@local@Cellar@libuv@1.31.0@include@uv.h +0 -1724
- package/.ccls-cache/@@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/@usr@local@Cellar@libuv@1.31.0@include@uv.h.blob +0 -0
- package/.ccls-cache/@@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/@usr@local@Cellar@libuv@1.31.0@include@uv@darwin.h +0 -61
- package/.ccls-cache/@@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/@usr@local@Cellar@libuv@1.31.0@include@uv@darwin.h.blob +0 -0
- package/.ccls-cache/@@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/@usr@local@Cellar@libuv@1.31.0@include@uv@errno.h +0 -443
- package/.ccls-cache/@@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/@usr@local@Cellar@libuv@1.31.0@include@uv@errno.h.blob +0 -0
- package/.ccls-cache/@@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/@usr@local@Cellar@libuv@1.31.0@include@uv@threadpool.h +0 -37
- package/.ccls-cache/@@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/@usr@local@Cellar@libuv@1.31.0@include@uv@threadpool.h.blob +0 -0
- package/.ccls-cache/@@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/@usr@local@Cellar@libuv@1.31.0@include@uv@unix.h +0 -491
- package/.ccls-cache/@@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/@usr@local@Cellar@libuv@1.31.0@include@uv@unix.h.blob +0 -0
- package/.ccls-cache/@@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/@usr@local@Cellar@libuv@1.31.0@include@uv@version.h +0 -43
- package/.ccls-cache/@@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/@usr@local@Cellar@libuv@1.31.0@include@uv@version.h.blob +0 -0
- package/.ccls-cache/@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/src@DeviceINQ.h +0 -78
- package/.ccls-cache/@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/src@DeviceINQ.h.blob +0 -0
- package/.ccls-cache/@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/src@linux@BTSerialPortBinding.cc +0 -404
- package/.ccls-cache/@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/src@linux@BTSerialPortBinding.cc.blob +0 -0
- package/.ccls-cache/@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/src@linux@BluetoothSerialPort.cc +0 -23
- package/.ccls-cache/@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/src@linux@BluetoothSerialPort.cc.blob +0 -0
- package/.ccls-cache/@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/src@linux@DeviceINQ.cc +0 -369
- package/.ccls-cache/@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/src@linux@DeviceINQ.cc.blob +0 -0
- package/.ccls-cache/@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/src@windows@BluetoothHelpers.h +0 -24
- package/.ccls-cache/@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/src@windows@BluetoothHelpers.h.blob +0 -0
- package/.ccls-cache/@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/src@windows@DeviceINQ.cc +0 -527
- package/.ccls-cache/@Users@eelco@Projects@Figaro@workspace@node-bluetooth-serial-port/src@windows@DeviceINQ.cc.blob +0 -0
- package/Dockerfile.bk +0 -13
- package/qemu-arm-static +0 -0
package/.circleci/config.yml
CHANGED
|
@@ -6,42 +6,54 @@ orbs:
|
|
|
6
6
|
# The Node.js orb contains a set of prepackaged CircleCI configuration you can utilize
|
|
7
7
|
# Orbs reduce the amount of configuration required for common tasks.
|
|
8
8
|
# See the orb documentation here: https://circleci.com/developer/orbs/orb/circleci/node
|
|
9
|
-
node: circleci/node@4.
|
|
9
|
+
node: circleci/node@4.7
|
|
10
10
|
|
|
11
11
|
jobs:
|
|
12
|
-
build-
|
|
12
|
+
build-18:
|
|
13
13
|
docker:
|
|
14
|
-
- image: node:
|
|
14
|
+
- image: node:18
|
|
15
15
|
steps:
|
|
16
|
-
- checkout
|
|
16
|
+
- checkout:
|
|
17
|
+
method: full
|
|
17
18
|
- run:
|
|
18
|
-
name:
|
|
19
|
+
name: install build dependencies
|
|
19
20
|
command: apt-get update && apt-get install -y build-essential libbluetooth-dev
|
|
20
21
|
- node/install-packages
|
|
21
|
-
|
|
22
|
-
build-16:
|
|
22
|
+
build-20:
|
|
23
23
|
docker:
|
|
24
|
-
- image: node:
|
|
24
|
+
- image: node:20
|
|
25
25
|
steps:
|
|
26
|
-
- checkout
|
|
26
|
+
- checkout:
|
|
27
|
+
method: full
|
|
27
28
|
- run:
|
|
28
|
-
name:
|
|
29
|
+
name: install build dependencies
|
|
29
30
|
command: apt-get update && apt-get install -y build-essential libbluetooth-dev
|
|
30
31
|
- node/install-packages
|
|
31
|
-
|
|
32
|
-
build-18:
|
|
32
|
+
build-22:
|
|
33
33
|
docker:
|
|
34
|
-
- image: node:
|
|
34
|
+
- image: node:22
|
|
35
|
+
steps:
|
|
36
|
+
- checkout:
|
|
37
|
+
method: full
|
|
38
|
+
- run:
|
|
39
|
+
name: install build dependencies
|
|
40
|
+
command: apt-get update && apt-get install -y build-essential libbluetooth-dev
|
|
41
|
+
- node/install-packages
|
|
42
|
+
build-24:
|
|
43
|
+
docker:
|
|
44
|
+
- image: node:24
|
|
35
45
|
steps:
|
|
36
|
-
- checkout
|
|
46
|
+
- checkout:
|
|
47
|
+
method: full
|
|
37
48
|
- run:
|
|
38
|
-
name:
|
|
49
|
+
name: install build dependencies
|
|
39
50
|
command: apt-get update && apt-get install -y build-essential libbluetooth-dev
|
|
40
51
|
- node/install-packages
|
|
41
52
|
|
|
42
53
|
workflows:
|
|
43
54
|
build:
|
|
44
55
|
jobs:
|
|
45
|
-
- build-14
|
|
46
|
-
- build-16
|
|
47
56
|
- build-18
|
|
57
|
+
- build-20
|
|
58
|
+
- build-22
|
|
59
|
+
- build-24
|
package/Dockerfile
CHANGED
package/README.md
CHANGED
|
@@ -17,13 +17,14 @@ If you have any problems make sure to [checkout the FAQ](https://github.com/eelc
|
|
|
17
17
|
|
|
18
18
|
## New in the last release
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
* Fixes memory leaks.
|
|
21
|
+
* Adds support for node 20, 22 and 24
|
|
21
22
|
|
|
22
23
|
Check the [release notes](RELEASE_NOTES.md) for an overview of the change history.
|
|
23
24
|
|
|
24
25
|
## Prerequisites on Linux
|
|
25
26
|
|
|
26
|
-
|
|
27
|
+
* Needs Bluetooth development packages to build
|
|
27
28
|
|
|
28
29
|
`apt-get install build-essential libbluetooth-dev`
|
|
29
30
|
|
package/RELEASE_NOTES.md
CHANGED
package/appveyor.yml
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
|
+
image: Visual Studio 2019
|
|
2
|
+
|
|
1
3
|
environment:
|
|
2
4
|
# Visual Studio Version
|
|
3
5
|
MSVS_VERSION: 2017
|
|
4
|
-
# Test against these
|
|
6
|
+
# Test against these Node.js versions
|
|
5
7
|
matrix:
|
|
6
|
-
# node.js
|
|
7
|
-
- nodejs_version: "14"
|
|
8
|
-
- nodejs_version: "16"
|
|
9
8
|
- nodejs_version: "18"
|
|
9
|
+
- nodejs_version: "20"
|
|
10
|
+
- nodejs_version: "22"
|
|
11
|
+
- nodejs_version: "24"
|
|
10
12
|
|
|
11
13
|
|
|
12
14
|
platform:
|
|
@@ -18,21 +20,14 @@ install:
|
|
|
18
20
|
- ps: Install-Product node $env:nodejs_version $env:Platform
|
|
19
21
|
# install modules
|
|
20
22
|
- node --version
|
|
21
|
-
- npm -g install npm@latest
|
|
22
23
|
- npm --version
|
|
23
|
-
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
- npm update
|
|
28
|
-
- npm run install-debug
|
|
24
|
+
- npm ci --ignore-scripts
|
|
25
|
+
|
|
26
|
+
# Disable automatic MSBuild discovery (there is no .sln/.vcxproj in repo root).
|
|
27
|
+
build: off
|
|
29
28
|
|
|
30
29
|
# Post-install test scripts.
|
|
31
30
|
test_script:
|
|
32
31
|
# run tests
|
|
33
|
-
-
|
|
34
|
-
- node_modules\.bin\node-gyp build
|
|
32
|
+
- npm run install-debug
|
|
35
33
|
- node test\index.js
|
|
36
|
-
|
|
37
|
-
# Don't actually build.
|
|
38
|
-
build: off
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bluetooth-serial-port",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.3",
|
|
4
4
|
"description": "Bluetooth serial port communication for Node.js",
|
|
5
5
|
"author": "Eelco Cramer <eelco@hailendal.org>",
|
|
6
6
|
"keywords": [
|
|
@@ -27,14 +27,14 @@
|
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"bindings": "1.5.x",
|
|
30
|
-
"nan": "2.
|
|
30
|
+
"nan": "^2.28.0",
|
|
31
31
|
"stable": "^0.1.8"
|
|
32
32
|
},
|
|
33
33
|
"optionalDependencies": {
|
|
34
34
|
"@types/node": "^18.0.0"
|
|
35
35
|
},
|
|
36
36
|
"engines": {
|
|
37
|
-
"node": ">=
|
|
37
|
+
"node": ">= 18.x",
|
|
38
38
|
"npm": ">= 8.x"
|
|
39
39
|
},
|
|
40
40
|
"scripts": {
|
|
@@ -391,6 +391,7 @@ NAN_METHOD(BTSerialPortBinding::Read) {
|
|
|
391
391
|
Nan::AsyncResource resource("bluetooth-serial-port:Read");
|
|
392
392
|
Nan::Callback *nc = new Nan::Callback(cb);
|
|
393
393
|
nc->Call(2, argv, &resource);
|
|
394
|
+
delete nc;
|
|
394
395
|
} else {
|
|
395
396
|
read_baton_t *baton = new read_baton_t();
|
|
396
397
|
baton->rfcomm = rfcomm;
|
package/src/linux/DeviceINQ.cc
CHANGED
|
@@ -252,9 +252,12 @@ NAN_METHOD(DeviceINQ::InquireSync) {
|
|
|
252
252
|
};
|
|
253
253
|
found->Call(2, argv, &resource);
|
|
254
254
|
}
|
|
255
|
+
free(inquiryResult.devices);
|
|
255
256
|
|
|
256
257
|
Local<Value> argv[] = {};
|
|
257
258
|
callback->Call(0, argv, &resource);
|
|
259
|
+
delete callback;
|
|
260
|
+
delete found;
|
|
258
261
|
return;
|
|
259
262
|
}
|
|
260
263
|
|
|
@@ -262,7 +265,9 @@ class InquireWorker : public Nan::AsyncWorker {
|
|
|
262
265
|
public:
|
|
263
266
|
InquireWorker(Nan::Callback* found, Nan::Callback *callback)
|
|
264
267
|
: Nan::AsyncWorker(callback), found(found) {}
|
|
265
|
-
~InquireWorker() {
|
|
268
|
+
~InquireWorker() {
|
|
269
|
+
delete found;
|
|
270
|
+
}
|
|
266
271
|
|
|
267
272
|
// Executed inside the worker-thread.
|
|
268
273
|
// It is not safe to access V8, or V8 data structures
|
|
@@ -289,6 +294,7 @@ class InquireWorker : public Nan::AsyncWorker {
|
|
|
289
294
|
|
|
290
295
|
Local<Value> argv[] = {};
|
|
291
296
|
callback->Call(0, argv, &resource);
|
|
297
|
+
free(inquiryResult.devices);
|
|
292
298
|
}
|
|
293
299
|
|
|
294
300
|
private:
|
|
@@ -354,6 +354,7 @@ NAN_METHOD(BTSerialPortBinding::Read) {
|
|
|
354
354
|
Nan::AsyncResource resource("bluetooth-serial-port:Read");
|
|
355
355
|
Nan::Callback *nc = new Nan::Callback(cb);
|
|
356
356
|
nc->Call(2, argv, &resource);
|
|
357
|
+
delete nc;
|
|
357
358
|
} else {
|
|
358
359
|
read_baton_t *baton = new read_baton_t();
|
|
359
360
|
baton->rfcomm = rfcomm;
|