Skip to content

Commit

Permalink
v2.0.0 (#218)
Browse files Browse the repository at this point in the history
## [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
  • Loading branch information
donavanbecker authored Feb 5, 2024
1 parent 7b12829 commit 7a8e59c
Show file tree
Hide file tree
Showing 36 changed files with 2,353 additions and 1,415 deletions.
83 changes: 83 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
{
"parser": "@typescript-eslint/parser",
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended" // uses the recommended rules from the @typescript-eslint/eslint-plugin
],
"parserOptions": {
"ecmaVersion": 2021,
"sourceType": "module"
},
"ignorePatterns": [
"dist",
"server"
],
"rules": {
"quotes": [
"warn",
"single"
],
"indent": [
"warn",
2,
{
"SwitchCase": 1
}
],
"linebreak-style": [
"warn",
"unix"
],
"semi": [
"warn",
"always"
],
"comma-dangle": [
"warn",
"always-multiline"
],
"dot-notation": "off",
"eqeqeq": "warn",
"curly": [
"warn",
"all"
],
"brace-style": [
"warn"
],
"prefer-arrow-callback": [
"warn"
],
"max-len": [
"warn",
150
], // use the provided log method instead
"no-non-null-assertion": [
"off"
],
"comma-spacing": [
"error"
],
"no-multi-spaces": [
"warn",
{
"ignoreEOLComments": true
}
],
"no-trailing-spaces": [
"warn"
],
"lines-between-class-members": [
"warn",
"always",
{
"exceptAfterSingleLine": true
}
],
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-explicit-any": "off"
}
}
26 changes: 0 additions & 26 deletions .eslintrc.js

This file was deleted.

8 changes: 4 additions & 4 deletions .github/workflows/changerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches: [latest]

jobs:
changerelease:
uses: OpenWonderLabs/.github/.github/workflows/changerelease.yml@latest
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
changerelease:
uses: OpenWonderLabs/.github/.github/workflows/changerelease.yml@latest
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
13 changes: 0 additions & 13 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

19 changes: 7 additions & 12 deletions .github/workflows/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,12 @@ name: AutoDependabot

on:
pull_request:
push:
branches:
- beta-*.*.*
branches: [beta, latest]
pull_request_target:
branches: [beta, latest]

jobs:
automerge:
name: Auto-merge patch updates
runs-on: ubuntu-latest
steps:
- uses: mitto98/dependabot-automerge-action@master
with:
token: ${{ github.token }}
merge-patch: true

dependabot:
uses: OpenWonderLabs/.github/.github/workflows/dependabot.yml@latest
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ name: Labeler
on: pull_request_target

jobs:
label:
labeler:
uses: OpenWonderLabs/.github/.github/workflows/labeler.yml@latest
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
workflow_dispatch:

jobs:
stale:
release-drafter:
uses: OpenWonderLabs/.github/.github/workflows/release-drafter.yml@latest
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
193 changes: 149 additions & 44 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,52 +1,157 @@
# Windows image file caches
Thumbs.db
ehthumbs.db
# Ignore compiled code

# Folder config file
Desktop.ini
dist

# Recycle Bin used on file shares
$RECYCLE.BIN/
# ------------- Defaults -------------

# Windows Installer files
*.cab
*.msi
*.msm
*.msp
# Logs

# Windows shortcuts
*.lnk
logs
_.log
npm-debug.log_
yarn-debug.log*
yarn-error.log*
lerna-debug.log\*

# =========================
# Operating System Files
# =========================
# Diagnostic reports (https://nodejs.org/api/report.html)

# OSX
# =========================
report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json

# Runtime data

pids
_.pid
_.seed
\*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover

lib-cov

# Coverage directory used by tools like istanbul

coverage
\*.lcov

# nyc test coverage

.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)

.grunt

# Bower dependency directory (https://bower.io/)

bower_components

# node-waf configuration

.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)

build/Release

# Dependency directories

.DS_Store
.AppleDouble
.LSOverride

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

test

# Node_modeules Directory
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)

web_modules/

# TypeScript cache

\*.tsbuildinfo

# Optional npm cache directory

.npm

# Optional eslint cache

.eslintcache

# Microbundle cache

.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history

.node_repl_history

# Output of 'npm pack'

\*.tgz

# Yarn Integrity file

.yarn-integrity

# dotenv environment variables file

.env
.env.test

# parcel-bundler cache (https://parceljs.org/)

.cache
.parcel-cache

# Next.js build output

.next

# Nuxt.js build / generate output

.nuxt
dist

# Gatsby files

.cache/

# Comment in the public line in if your project uses Gatsby and not Next.js

# https://nextjs.org/blog/next-9-1#public-directory-support

# public

# vuepress build output

.vuepress/dist

# Serverless directories

.serverless/

# FuseBox cache

.fusebox/

# DynamoDB Local files

.dynamodb/

# TernJS port file

.tern-port

# Stores VSCode versions used for testing VSCode extensions

.vscode-test

# yarn v2

.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.pnp.\*

# others
.DS_Store
Loading

0 comments on commit 7a8e59c

Please sign in to comment.