njs-modbus 3.4.0 → 4.0.0
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/LICENSE +61 -21
- package/README.md +303 -367
- package/README.zh-CN.md +303 -367
- package/dist/index.cjs +7206 -4301
- package/dist/index.d.cts +2862 -0
- package/dist/index.d.mts +2862 -0
- package/dist/index.mjs +7162 -4286
- package/package.json +66 -62
- package/dist/index.d.ts +0 -867
- package/dist/utils.cjs +0 -564
- package/dist/utils.d.ts +0 -164
- package/dist/utils.mjs +0 -547
package/package.json
CHANGED
|
@@ -1,91 +1,95 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "njs-modbus",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "A
|
|
3
|
+
"version": "4.0.0",
|
|
4
|
+
"description": "A zero-dependency Modbus protocol library for Node.js with TCP, RTU, ASCII, UDP, and TLS support.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"modbus",
|
|
7
|
+
"tcp",
|
|
7
8
|
"rtu",
|
|
8
9
|
"ascii",
|
|
9
|
-
"
|
|
10
|
-
"tcp",
|
|
10
|
+
"tls",
|
|
11
11
|
"udp"
|
|
12
12
|
],
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
|
|
16
|
-
},
|
|
13
|
+
"author": "Xie Jay <xiejay97@gmail.com>",
|
|
14
|
+
"license": "BUSL-1.1",
|
|
15
|
+
"homepage": "https://github.com/xiejay97/njs-modbus#readme",
|
|
17
16
|
"repository": {
|
|
18
17
|
"type": "git",
|
|
19
18
|
"url": "git+https://github.com/xiejay97/njs-modbus.git"
|
|
20
19
|
},
|
|
21
|
-
"
|
|
22
|
-
|
|
20
|
+
"bugs": {
|
|
21
|
+
"url": "https://github.com/xiejay97/njs-modbus/issues"
|
|
22
|
+
},
|
|
23
23
|
"sideEffects": false,
|
|
24
24
|
"type": "module",
|
|
25
|
-
"main": "dist/index.cjs",
|
|
26
|
-
"module": "dist/index.mjs",
|
|
27
|
-
"
|
|
28
|
-
"types": "dist/index.d.ts",
|
|
25
|
+
"main": "./dist/index.cjs",
|
|
26
|
+
"module": "./dist/index.mjs",
|
|
27
|
+
"types": "./dist/index.d.cts",
|
|
29
28
|
"exports": {
|
|
30
29
|
".": {
|
|
31
|
-
"import":
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
"import": {
|
|
31
|
+
"types": "./dist/index.d.mts",
|
|
32
|
+
"default": "./dist/index.mjs"
|
|
33
|
+
},
|
|
34
|
+
"require": {
|
|
35
|
+
"types": "./dist/index.d.cts",
|
|
36
|
+
"default": "./dist/index.cjs"
|
|
37
|
+
}
|
|
34
38
|
},
|
|
35
|
-
"./
|
|
36
|
-
"import": "./dist/utils.mjs",
|
|
37
|
-
"require": "./dist/utils.cjs",
|
|
38
|
-
"types": "./dist/utils.d.ts"
|
|
39
|
-
}
|
|
39
|
+
"./package.json": "./package.json"
|
|
40
40
|
},
|
|
41
41
|
"files": [
|
|
42
|
-
"dist"
|
|
43
|
-
"*.d.ts"
|
|
42
|
+
"dist"
|
|
44
43
|
],
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"test": "tsx --test test/**/*.test.ts",
|
|
48
|
-
"benchmark:report": "tsx benchmark/generate-report.ts",
|
|
49
|
-
"benchmark:report:test": "tsx benchmark/test-report.ts",
|
|
50
|
-
"benchmark:report:quick": "tsx benchmark/generate-report.ts -- --duration 10s --runs 2",
|
|
51
|
-
"benchmark:report:full": "tsx benchmark/generate-report.ts -- --duration 120s --runs 5 --max-payload",
|
|
52
|
-
"util:sort-package-json": "sort-package-json"
|
|
44
|
+
"publishConfig": {
|
|
45
|
+
"access": "public"
|
|
53
46
|
},
|
|
54
47
|
"devDependencies": {
|
|
55
|
-
"@eslint/js": "^9.
|
|
56
|
-
"@
|
|
57
|
-
"@
|
|
58
|
-
"@
|
|
59
|
-
"@
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"rollup-plugin-dts": "^6.2.1",
|
|
76
|
-
"rollup-plugin-typescript2": "^0.36.0",
|
|
77
|
-
"serialport": ">=12.0.0",
|
|
78
|
-
"sort-package-json": "^3.2.1",
|
|
79
|
-
"tslib": "^2.8.1",
|
|
80
|
-
"tsx": "^4.21.0",
|
|
81
|
-
"typescript": "~5.8.3",
|
|
82
|
-
"typescript-eslint": "^8.34.0",
|
|
83
|
-
"why-is-node-running": "^3.2.2"
|
|
48
|
+
"@eslint/js": "^9.39.4",
|
|
49
|
+
"@release-it/conventional-changelog": "^11.0.1",
|
|
50
|
+
"@types/node": "^18.19.130",
|
|
51
|
+
"@typescript/native-preview": "7.0.0-dev.20260509.2",
|
|
52
|
+
"@vitest/coverage-v8": "^4.1.8",
|
|
53
|
+
"eslint": "^9.39.4",
|
|
54
|
+
"eslint-config-flat-gitignore": "^2.3.0",
|
|
55
|
+
"eslint-config-prettier": "^10.1.8",
|
|
56
|
+
"eslint-plugin-import": "^2.32.0",
|
|
57
|
+
"eslint-plugin-prettier": "^5.5.6",
|
|
58
|
+
"prettier": "^3.8.4",
|
|
59
|
+
"release-it": "^20.2.0",
|
|
60
|
+
"tsdown": "^0.22.0",
|
|
61
|
+
"tsx": "^4.22.4",
|
|
62
|
+
"typedoc": "^0.28.19",
|
|
63
|
+
"typedoc-plugin-markdown": "^4.12.0",
|
|
64
|
+
"typescript": "^6.0.3",
|
|
65
|
+
"typescript-eslint": "^8.61.0",
|
|
66
|
+
"unplugin-unused": "^0.5.7",
|
|
67
|
+
"vitest": "^4.1.5"
|
|
84
68
|
},
|
|
85
69
|
"peerDependencies": {
|
|
86
70
|
"serialport": ">=12.0.0"
|
|
87
71
|
},
|
|
72
|
+
"peerDependenciesMeta": {
|
|
73
|
+
"serialport": {
|
|
74
|
+
"optional": true
|
|
75
|
+
}
|
|
76
|
+
},
|
|
88
77
|
"engines": {
|
|
89
78
|
"node": ">=18.19"
|
|
79
|
+
},
|
|
80
|
+
"scripts": {
|
|
81
|
+
"build": "tsdown",
|
|
82
|
+
"dev": "tsdown --watch",
|
|
83
|
+
"test": "vitest run",
|
|
84
|
+
"test:coverage": "vitest run --coverage",
|
|
85
|
+
"lint": "eslint .",
|
|
86
|
+
"typecheck": "tsc --noEmit",
|
|
87
|
+
"format": "prettier --write .",
|
|
88
|
+
"release": "release-it",
|
|
89
|
+
"docs:build": "typedoc",
|
|
90
|
+
"benchmark": "NODE_OPTIONS='--conditions=dev' tsx benchmark/bench-run.ts",
|
|
91
|
+
"benchmark:test": "NODE_OPTIONS='--conditions=dev' tsx benchmark/bench-test-report.ts",
|
|
92
|
+
"benchmark:fast": "NODE_OPTIONS='--conditions=dev' tsx benchmark/bench-run.ts --all --report --fast --max-payload",
|
|
93
|
+
"benchmark:full": "pnpm run build && NODE_OPTIONS='--conditions=dist' pnpm exec tsx benchmark/bench-run.ts --all --report --max-payload --runs 5 --duration 120 --chaos-requests 2000"
|
|
90
94
|
}
|
|
91
|
-
}
|
|
95
|
+
}
|