node-switchbot 2.3.1-beta.1 → 2.3.1-beta.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.
Files changed (2) hide show
  1. package/eslint.config.js +55 -55
  2. package/package.json +24 -13
package/eslint.config.js CHANGED
@@ -1,6 +1,6 @@
1
- import globals from "globals";
2
- import pluginJs from "@eslint/js";
3
- import tseslint from "typescript-eslint";
1
+ import globals from 'globals';
2
+ import pluginJs from '@eslint/js';
3
+ import tseslint from 'typescript-eslint';
4
4
 
5
5
 
6
6
  export default [
@@ -8,78 +8,78 @@ export default [
8
8
  pluginJs.configs.recommended,
9
9
  ...tseslint.configs.recommended,
10
10
  {
11
- ignores: [".dist/*"]
11
+ ignores: ['.dist/*'],
12
12
  },
13
13
  {
14
14
  rules: {
15
- "quotes": [
16
- "warn",
17
- "single"
15
+ 'quotes': [
16
+ 'warn',
17
+ 'single',
18
18
  ],
19
- "indent": [
20
- "warn",
19
+ 'indent': [
20
+ 'warn',
21
21
  2,
22
22
  {
23
- "SwitchCase": 1
24
- }
23
+ 'SwitchCase': 1,
24
+ },
25
25
  ],
26
- "linebreak-style": [
27
- "warn",
28
- "unix"
26
+ 'linebreak-style': [
27
+ 'warn',
28
+ 'unix',
29
29
  ],
30
- "semi": [
31
- "warn",
32
- "always"
30
+ 'semi': [
31
+ 'warn',
32
+ 'always',
33
33
  ],
34
- "comma-dangle": [
35
- "warn",
36
- "always-multiline"
34
+ 'comma-dangle': [
35
+ 'warn',
36
+ 'always-multiline',
37
37
  ],
38
- "dot-notation": "off",
39
- "eqeqeq": "warn",
40
- "curly": [
41
- "warn",
42
- "all"
38
+ 'dot-notation': 'off',
39
+ 'eqeqeq': 'warn',
40
+ 'curly': [
41
+ 'warn',
42
+ 'all',
43
43
  ],
44
- "brace-style": [
45
- "warn"
44
+ 'brace-style': [
45
+ 'warn',
46
46
  ],
47
- "prefer-arrow-callback": [
48
- "warn"
47
+ 'prefer-arrow-callback': [
48
+ 'warn',
49
49
  ],
50
- "max-len": [
51
- "warn",
52
- 150
50
+ 'max-len': [
51
+ 'warn',
52
+ 150,
53
53
  ],
54
- "no-console": [
55
- "warn"
54
+ 'no-console': [
55
+ 'warn',
56
56
  ], // use the provided Homebridge log method instead
57
- "no-non-null-assertion": [
58
- "off"
57
+ 'no-non-null-assertion': [
58
+ 'off',
59
59
  ],
60
- "comma-spacing": [
61
- "error"
60
+ 'comma-spacing': [
61
+ 'error',
62
62
  ],
63
- "no-multi-spaces": [
64
- "warn",
63
+ 'no-multi-spaces': [
64
+ 'warn',
65
65
  {
66
- "ignoreEOLComments": true
67
- }
66
+ 'ignoreEOLComments': true,
67
+ },
68
68
  ],
69
- "no-trailing-spaces": [
70
- "warn"
69
+ 'no-trailing-spaces': [
70
+ 'warn',
71
71
  ],
72
- "lines-between-class-members": [
73
- "warn",
74
- "always",
72
+ 'lines-between-class-members': [
73
+ 'warn',
74
+ 'always',
75
75
  {
76
- "exceptAfterSingleLine": true
77
- }
76
+ 'exceptAfterSingleLine': true,
77
+ },
78
78
  ],
79
- "@typescript-eslint/explicit-function-return-type": "off",
80
- "@typescript-eslint/no-non-null-assertion": "off",
81
- "@typescript-eslint/explicit-module-boundary-types": "off",
82
- "@typescript-eslint/no-explicit-any": "off"
83
- }
84
- }
79
+ '@typescript-eslint/explicit-function-return-type': 'off',
80
+ '@typescript-eslint/no-non-null-assertion': 'off',
81
+ '@typescript-eslint/explicit-module-boundary-types': 'off',
82
+ '@typescript-eslint/no-explicit-any': 'off',
83
+ },
84
+ },
85
85
  ];
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.3.1-beta.1",
2
+ "version": "2.3.1-beta.3",
3
3
  "name": "node-switchbot",
4
4
  "description": "The node-switchbot is a Node.js module which allows you to control your Switchbot Devices through Bluetooth (BLE).",
5
5
  "homepage": "https://github.com/OpenWonderLabs/node-switchbot",
@@ -9,16 +9,23 @@
9
9
  "type": "git",
10
10
  "url": "https://github.com/OpenWonderLabs/node-switchbot.git"
11
11
  },
12
+ "bugs": {
13
+ "url": "https://github.com/OpenWonderLabs/node-switchbot/issues"
14
+ },
15
+ "engines": {
16
+ "node": "^18 || ^20 || ^22"
17
+ },
12
18
  "main": "dist/index.js",
13
19
  "type": "module",
14
20
  "scripts": {
15
21
  "check": "npm install && npm outdated",
16
22
  "update": "ncu -u && npm update && npm install",
17
23
  "lint": "eslint src/**/*.ts",
18
- "build": "rimraf ./dist && tsc",
24
+ "watch": "npm run build && npm link && nodemon",
25
+ "build": "npm run clean && tsc",
19
26
  "prepublishOnly": "npm run lint && npm run build",
20
27
  "postpublish": "npm run clean",
21
- "clean": "rimraf ./dist",
28
+ "clean": "shx rm -rf ./dist",
22
29
  "test": "npm run lint",
23
30
  "docs": "typedoc",
24
31
  "lint-docs": "typedoc --emit none --treatWarningsAsErrors"
@@ -38,24 +45,28 @@
38
45
  ],
39
46
  "readmeFilename": "README.md",
40
47
  "dependencies": {
41
- "@stoprocent/noble": "^1.14.1"
48
+ "@stoprocent/noble": "^1.14.1",
49
+ "async-mutex": "^0.5.0"
42
50
  },
43
51
  "optionalDependencies": {
44
52
  "@stoprocent/bluetooth-hci-socket": "^1.2.1"
45
53
  },
46
54
  "devDependencies": {
47
- "@eslint/js": "^9.7.0",
48
- "@stylistic/eslint-plugin": "^2.3.0",
55
+ "@eslint/js": "^9.8.0",
56
+ "@stylistic/eslint-plugin": "^2.6.1",
49
57
  "@types/eslint__js": "^8.42.3",
50
- "@types/node": "^20.14.11",
51
- "eslint": "^9.7.0",
52
- "globals": "^15.8.0",
58
+ "@types/jest": "^29.5.12",
59
+ "@types/node": "^22.1.0",
60
+ "eslint": "^9.8.0",
61
+ "globals": "^15.9.0",
62
+ "jest": "^29.7.0",
53
63
  "nodemon": "^3.1.4",
54
- "npm-check-updates": "^16.14.20",
55
- "rimraf": "^6.0.1",
64
+ "npm-check-updates": "^17.0.3",
65
+ "shx": "^0.3.4",
66
+ "ts-jest": "^29.2.4",
56
67
  "ts-node": "^10.9.2",
57
68
  "typedoc": "^0.26.5",
58
- "typescript": "^5.5.3",
59
- "typescript-eslint": "^8.0.0-alpha.44"
69
+ "typescript": "^5.5.4",
70
+ "typescript-eslint": "^8.0.1"
60
71
  }
61
72
  }