node-web-gpio 1.1.35 → 1.1.39

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/dist/index.js +5 -6
  2. package/package.json +7 -7
package/dist/index.js CHANGED
@@ -32,7 +32,6 @@ function parseUint16(parseString) {
32
32
  const n = Number.parseInt(parseString, 10);
33
33
  if (0 <= n && n <= Uint16Max)
34
34
  return n;
35
- // biome-ignore lint/style/noUselessElse:
36
35
  else
37
36
  throw new RangeError(`Must be between 0 and ${Uint16Max}.`);
38
37
  }
@@ -58,7 +57,7 @@ class GPIOAccess extends node_events_1.EventEmitter {
58
57
  constructor(ports) {
59
58
  super();
60
59
  this._ports = ports == null ? new GPIOPortMap() : ports;
61
- // biome-ignore lint/complexity/noForEach:
60
+ // biome-ignore lint/suspicious/useIterableCallbackReturn: port.on()の戻り値は使用しないため
62
61
  this._ports.forEach((port) => port.on('change', (event) => {
63
62
  this.emit('change', event);
64
63
  }));
@@ -193,7 +192,7 @@ class GPIOPort extends node_events_1.EventEmitter {
193
192
  // eslint-disable-next-line
194
193
  this.read.bind(this), this._pollingInterval);
195
194
  }
196
- // biome-ignore lint/suspicious/noExplicitAny:
195
+ // biome-ignore lint/suspicious/noExplicitAny: エラーの型が不明なため、any型を使用してOperationErrorに変換する
197
196
  }
198
197
  catch (error) {
199
198
  if (this._exportRetry < 10) {
@@ -218,7 +217,7 @@ class GPIOPort extends node_events_1.EventEmitter {
218
217
  clearInterval(this._timeout);
219
218
  try {
220
219
  await node_fs_1.promises.writeFile(path.join(SysfsGPIOPath, 'unexport'), String(this.portNumber));
221
- // biome-ignore lint/suspicious/noExplicitAny:
220
+ // biome-ignore lint/suspicious/noExplicitAny: エラーの型が不明なため、any型を使用してOperationErrorに変換する
222
221
  }
223
222
  catch (error) {
224
223
  throw new OperationError(error);
@@ -241,7 +240,7 @@ class GPIOPort extends node_events_1.EventEmitter {
241
240
  this.emit('change', { value, port: this });
242
241
  }
243
242
  return value;
244
- // biome-ignore lint/suspicious/noExplicitAny:
243
+ // biome-ignore lint/suspicious/noExplicitAny: エラーの型が不明なため、any型を使用してOperationErrorに変換する
245
244
  }
246
245
  catch (error) {
247
246
  throw new OperationError(error);
@@ -257,7 +256,7 @@ class GPIOPort extends node_events_1.EventEmitter {
257
256
  }
258
257
  try {
259
258
  await node_fs_1.promises.writeFile(path.join(SysfsGPIOPath, this.portName, 'value'), parseUint16(value.toString()).toString());
260
- // biome-ignore lint/suspicious/noExplicitAny:
259
+ // biome-ignore lint/suspicious/noExplicitAny: エラーの型が不明なため、any型を使用してOperationErrorに変換する
261
260
  }
262
261
  catch (error) {
263
262
  throw new OperationError(error);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-web-gpio",
3
- "version": "1.1.35",
3
+ "version": "1.1.39",
4
4
  "description": "GPIO access with Node.js",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -14,12 +14,12 @@
14
14
  "author": "Kohei Watanabe <kou029w@gmail.com>",
15
15
  "license": "MIT",
16
16
  "devDependencies": {
17
- "@biomejs/biome": "1.9.4",
18
- "@types/node": "22.18.13",
17
+ "@biomejs/biome": "2.3.10",
18
+ "@types/node": "^22.19.3",
19
19
  "husky": "9.1.7",
20
- "lint-staged": "15.5.2",
21
- "prettier": "3.6.2",
22
- "typedoc": "0.28.14",
20
+ "lint-staged": "16.2.7",
21
+ "prettier": "3.7.4",
22
+ "typedoc": "0.28.15",
23
23
  "typescript": "5.9.3"
24
24
  },
25
25
  "scripts": {
@@ -46,5 +46,5 @@
46
46
  "robots",
47
47
  "rpi"
48
48
  ],
49
- "packageManager": "npm@11.6.4"
49
+ "packageManager": "npm@11.7.0"
50
50
  }