Skip to content

Commit 7a8e59c

Browse files
v2.0.0 (#218)
## [2.0.0](https://github.com/OpenWonderLabs/node-switchbot/releases/tag/v2.0.0) (2024-02-05) ### What's Changed - Rewrite into Typescript and Convert CommonJS to ES Module - Fix Linting, Thanks [@dnicolson](https://github.com/dnicolson) [#216](#216) - Code Cleaup, Thanks [@dnicolson](https://github.com/dnicolson) [#217](#217) - Housekeeping and update dependencies **Full Changelog**: v1.10.0...v2.0.0
1 parent 7b12829 commit 7a8e59c

36 files changed

+2353
-1415
lines changed

.eslintrc

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
{
2+
"parser": "@typescript-eslint/parser",
3+
"extends": [
4+
"eslint:recommended",
5+
"plugin:@typescript-eslint/eslint-recommended",
6+
"plugin:@typescript-eslint/recommended" // uses the recommended rules from the @typescript-eslint/eslint-plugin
7+
],
8+
"parserOptions": {
9+
"ecmaVersion": 2021,
10+
"sourceType": "module"
11+
},
12+
"ignorePatterns": [
13+
"dist",
14+
"server"
15+
],
16+
"rules": {
17+
"quotes": [
18+
"warn",
19+
"single"
20+
],
21+
"indent": [
22+
"warn",
23+
2,
24+
{
25+
"SwitchCase": 1
26+
}
27+
],
28+
"linebreak-style": [
29+
"warn",
30+
"unix"
31+
],
32+
"semi": [
33+
"warn",
34+
"always"
35+
],
36+
"comma-dangle": [
37+
"warn",
38+
"always-multiline"
39+
],
40+
"dot-notation": "off",
41+
"eqeqeq": "warn",
42+
"curly": [
43+
"warn",
44+
"all"
45+
],
46+
"brace-style": [
47+
"warn"
48+
],
49+
"prefer-arrow-callback": [
50+
"warn"
51+
],
52+
"max-len": [
53+
"warn",
54+
150
55+
], // use the provided log method instead
56+
"no-non-null-assertion": [
57+
"off"
58+
],
59+
"comma-spacing": [
60+
"error"
61+
],
62+
"no-multi-spaces": [
63+
"warn",
64+
{
65+
"ignoreEOLComments": true
66+
}
67+
],
68+
"no-trailing-spaces": [
69+
"warn"
70+
],
71+
"lines-between-class-members": [
72+
"warn",
73+
"always",
74+
{
75+
"exceptAfterSingleLine": true
76+
}
77+
],
78+
"@typescript-eslint/explicit-function-return-type": "off",
79+
"@typescript-eslint/no-non-null-assertion": "off",
80+
"@typescript-eslint/explicit-module-boundary-types": "off",
81+
"@typescript-eslint/no-explicit-any": "off"
82+
}
83+
}

.eslintrc.js

Lines changed: 0 additions & 26 deletions
This file was deleted.

.github/workflows/changerelease.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
branches: [latest]
88

99
jobs:
10-
changerelease:
11-
uses: OpenWonderLabs/.github/.github/workflows/changerelease.yml@latest
12-
secrets:
13-
token: ${{ secrets.GITHUB_TOKEN }}
10+
changerelease:
11+
uses: OpenWonderLabs/.github/.github/workflows/changerelease.yml@latest
12+
secrets:
13+
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/codeql-analysis.yml

Lines changed: 0 additions & 13 deletions
This file was deleted.

.github/workflows/dependabot.yml

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,12 @@ name: AutoDependabot
22

33
on:
44
pull_request:
5-
push:
6-
branches:
7-
- beta-*.*.*
5+
branches: [beta, latest]
6+
pull_request_target:
7+
branches: [beta, latest]
88

99
jobs:
10-
automerge:
11-
name: Auto-merge patch updates
12-
runs-on: ubuntu-latest
13-
steps:
14-
- uses: mitto98/dependabot-automerge-action@master
15-
with:
16-
token: ${{ github.token }}
17-
merge-patch: true
18-
10+
dependabot:
11+
uses: OpenWonderLabs/.github/.github/workflows/dependabot.yml@latest
12+
secrets:
13+
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/labeler.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ name: Labeler
1010
on: pull_request_target
1111

1212
jobs:
13-
label:
13+
labeler:
1414
uses: OpenWonderLabs/.github/.github/workflows/labeler.yml@latest
1515
secrets:
1616
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release-drafter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
workflow_dispatch:
99

1010
jobs:
11-
stale:
11+
release-drafter:
1212
uses: OpenWonderLabs/.github/.github/workflows/release-drafter.yml@latest
1313
secrets:
1414
token: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 149 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,157 @@
1-
# Windows image file caches
2-
Thumbs.db
3-
ehthumbs.db
1+
# Ignore compiled code
42

5-
# Folder config file
6-
Desktop.ini
3+
dist
74

8-
# Recycle Bin used on file shares
9-
$RECYCLE.BIN/
5+
# ------------- Defaults -------------
106

11-
# Windows Installer files
12-
*.cab
13-
*.msi
14-
*.msm
15-
*.msp
7+
# Logs
168

17-
# Windows shortcuts
18-
*.lnk
9+
logs
10+
_.log
11+
npm-debug.log_
12+
yarn-debug.log*
13+
yarn-error.log*
14+
lerna-debug.log\*
1915

20-
# =========================
21-
# Operating System Files
22-
# =========================
16+
# Diagnostic reports (https://nodejs.org/api/report.html)
2317

24-
# OSX
25-
# =========================
18+
report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
19+
20+
# Runtime data
21+
22+
pids
23+
_.pid
24+
_.seed
25+
\*.pid.lock
26+
27+
# Directory for instrumented libs generated by jscoverage/JSCover
28+
29+
lib-cov
30+
31+
# Coverage directory used by tools like istanbul
32+
33+
coverage
34+
\*.lcov
35+
36+
# nyc test coverage
37+
38+
.nyc_output
39+
40+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
41+
42+
.grunt
43+
44+
# Bower dependency directory (https://bower.io/)
45+
46+
bower_components
47+
48+
# node-waf configuration
49+
50+
.lock-wscript
51+
52+
# Compiled binary addons (https://nodejs.org/api/addons.html)
53+
54+
build/Release
55+
56+
# Dependency directories
2657

27-
.DS_Store
28-
.AppleDouble
29-
.LSOverride
30-
31-
# Thumbnails
32-
._*
33-
34-
# Files that might appear in the root of a volume
35-
.DocumentRevisions-V100
36-
.fseventsd
37-
.Spotlight-V100
38-
.TemporaryItems
39-
.Trashes
40-
.VolumeIcon.icns
41-
42-
# Directories potentially created on remote AFP share
43-
.AppleDB
44-
.AppleDesktop
45-
Network Trash Folder
46-
Temporary Items
47-
.apdisk
48-
49-
test
50-
51-
# Node_modeules Directory
5258
node_modules/
59+
jspm_packages/
60+
61+
# Snowpack dependency directory (https://snowpack.dev/)
62+
63+
web_modules/
64+
65+
# TypeScript cache
66+
67+
\*.tsbuildinfo
68+
69+
# Optional npm cache directory
70+
71+
.npm
72+
73+
# Optional eslint cache
74+
75+
.eslintcache
76+
77+
# Microbundle cache
78+
79+
.rpt2_cache/
80+
.rts2_cache_cjs/
81+
.rts2_cache_es/
82+
.rts2_cache_umd/
83+
84+
# Optional REPL history
85+
86+
.node_repl_history
87+
88+
# Output of 'npm pack'
89+
90+
\*.tgz
91+
92+
# Yarn Integrity file
93+
94+
.yarn-integrity
95+
96+
# dotenv environment variables file
97+
98+
.env
99+
.env.test
100+
101+
# parcel-bundler cache (https://parceljs.org/)
102+
103+
.cache
104+
.parcel-cache
105+
106+
# Next.js build output
107+
108+
.next
109+
110+
# Nuxt.js build / generate output
111+
112+
.nuxt
113+
dist
114+
115+
# Gatsby files
116+
117+
.cache/
118+
119+
# Comment in the public line in if your project uses Gatsby and not Next.js
120+
121+
# https://nextjs.org/blog/next-9-1#public-directory-support
122+
123+
# public
124+
125+
# vuepress build output
126+
127+
.vuepress/dist
128+
129+
# Serverless directories
130+
131+
.serverless/
132+
133+
# FuseBox cache
134+
135+
.fusebox/
136+
137+
# DynamoDB Local files
138+
139+
.dynamodb/
140+
141+
# TernJS port file
142+
143+
.tern-port
144+
145+
# Stores VSCode versions used for testing VSCode extensions
146+
147+
.vscode-test
148+
149+
# yarn v2
150+
151+
.yarn/cache
152+
.yarn/unplugged
153+
.yarn/build-state.yml
154+
.pnp.\*
155+
156+
# others
157+
.DS_Store

0 commit comments

Comments
 (0)