@flux-control/effect-modbus-rs 0.8.1 → 0.9.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.
Files changed (2) hide show
  1. package/README.md +7 -7
  2. package/package.json +19 -10
package/README.md CHANGED
@@ -13,18 +13,18 @@ The API can change before version 1.0.
13
13
  ## Install
14
14
 
15
15
  ```sh
16
- bun add @flux-control/effect-modbus-rs effect@4.0.0-rc.118
16
+ bun add @flux-control/effect-modbus-rs effect@^4.0.3
17
17
  ```
18
18
 
19
- The current package requires Effect `^4.0.0-rc.118` as a peer dependency.
19
+ The current package requires Effect `^4.0.3` as a peer dependency.
20
20
  It depends on `modbus-rs@0.16.3`.
21
21
  The published package exports JavaScript and TypeScript declarations from `dist/`.
22
22
 
23
23
  ## Quick start
24
24
 
25
25
  ```ts
26
- import { Console, Effect } from 'effect';
27
26
  import { TcpTransportService } from '@flux-control/effect-modbus-rs';
27
+ import { Console, Effect } from 'effect';
28
28
 
29
29
  const program = Effect.gen(function* () {
30
30
  const transport = yield* TcpTransportService;
@@ -66,8 +66,8 @@ For native serial connections, provide `RtuTransportService.make` or `AsciiTrans
66
66
  Its `fromRtu(options)` and `fromAscii(options)` methods provide that tag.
67
67
 
68
68
  ```ts
69
- import { Console, Effect } from 'effect';
70
69
  import { SerialTransportService } from '@flux-control/effect-modbus-rs';
70
+ import { Console, Effect } from 'effect';
71
71
 
72
72
  const program = Effect.gen(function* () {
73
73
  const transport = yield* SerialTransportService;
@@ -95,8 +95,8 @@ It does not call the browser permission API synchronously in the handler.
95
95
  Permission behavior depends on browser support and transient user activation.
96
96
 
97
97
  ```ts
98
- import { Console, Effect } from 'effect';
99
98
  import { requestSerialPort, WasmRtuTransportService } from '@flux-control/effect-modbus-rs';
99
+ import { Console, Effect } from 'effect';
100
100
 
101
101
  const connectButton = document.querySelector<HTMLButtonElement>('#connect');
102
102
 
@@ -157,8 +157,8 @@ Use `withBatchingClient` to collect register operations, plan contiguous transac
157
157
  Batching does not cover coils, diagnostics, or file records.
158
158
 
159
159
  ```ts
160
- import { Console, Effect } from 'effect';
161
160
  import { TcpTransportService } from '@flux-control/effect-modbus-rs';
161
+ import { Console, Effect } from 'effect';
162
162
 
163
163
  const program = Effect.gen(function* () {
164
164
  const transport = yield* TcpTransportService;
@@ -519,8 +519,8 @@ Options include the transport's connection settings, resilience settings, and mo
519
519
  The abstract serial tags accept either framing's connection settings.
520
520
 
521
521
  ```ts
522
- import { Console, Effect } from 'effect';
523
522
  import { TcpTransportService } from '@flux-control/effect-modbus-rs';
523
+ import { Console, Effect } from 'effect';
524
524
 
525
525
  const layer = TcpTransportService.makeMockTransport([
526
526
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flux-control/effect-modbus-rs",
3
- "version": "0.8.1",
3
+ "version": "0.9.0",
4
4
  "description": "Type-safe Modbus communication via Effect-TS, wrapping the modbus-rs npm bindings.",
5
5
  "license": "GPL-3.0",
6
6
  "repository": {
@@ -30,6 +30,7 @@
30
30
  "format:fix": "oxfmt",
31
31
  "lint": "oxlint",
32
32
  "lint:fix": "oxlint --fix",
33
+ "lint:staged": "lint-staged --config package.json",
33
34
  "lock": "bash tools/refresh-lockfile.sh",
34
35
  "prepare": "husky",
35
36
  "release": "changeset publish",
@@ -42,19 +43,27 @@
42
43
  "modbus-rs": "0.16.3"
43
44
  },
44
45
  "devDependencies": {
45
- "@changesets/cli": "^2.31.1",
46
- "@effect/language-service": "0.87.2",
47
- "@effect/platform-bun": "^4.0.0-rc.118",
48
- "@oxlint/plugins": "1.76.0",
46
+ "@changesets/cli": "^3.0.3",
47
+ "@effect/language-service": "0.87.4",
48
+ "@effect/platform-bun": "4.0.3",
49
+ "@oxlint/plugins": "1.87.0",
49
50
  "@types/bun": "latest",
50
- "effect": "4.0.0-rc.118",
51
- "fallow": "^2.104.0",
51
+ "effect": "4.0.3",
52
+ "fallow": "^3.33.1",
52
53
  "husky": "^9.1.7",
53
- "oxfmt": "^0.71.0",
54
- "oxlint": "1.76.0",
54
+ "lint-staged": "^17.6.0",
55
+ "oxfmt": "^0.72.0",
56
+ "oxlint": "1.87.0",
55
57
  "typescript": "^7.0.2"
56
58
  },
57
59
  "peerDependencies": {
58
- "effect": "^4.0.0-rc.118"
60
+ "effect": "^4.0.3"
61
+ },
62
+ "lint-staged": {
63
+ "*.{js,jsx,mjs,cjs,ts,tsx,mts,cts}": [
64
+ "oxlint --fix",
65
+ "oxfmt"
66
+ ],
67
+ "*.{json,jsonc,md,mdx,css,scss,html,yaml,yml}": "oxfmt"
59
68
  }
60
69
  }