Skip to content

Commit

Permalink
cleaning and minor fix
Browse files Browse the repository at this point in the history
* delete helper.test.js / .env.template : can't works now with new
netatmo API Rules
 * add token.json in .gitignore
 * update README.md
 * minor fix in helper.js
 * cleaning package.json
 * update validation rules
 * fix renovate.json
  • Loading branch information
bugsounet committed Jun 22, 2024
1 parent 0f3ed1b commit f6b1f65
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 182 deletions.
3 changes: 0 additions & 3 deletions .env.template

This file was deleted.

2 changes: 1 addition & 1 deletion .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:base",
"schedule:automergeMonthly",
"schedule:automergeMonthly"
],
"packageRules": [
{
Expand Down
19 changes: 0 additions & 19 deletions .github/workflows/validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,25 +51,6 @@ jobs:
run: npm clean-install
- name: Validate CSS Sources
run: npm run validate:css
unit:
runs-on: ubuntu-latest
name: 'Unit Tests'
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Use Node.js ${{ env.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.node-version }}
cache: "npm"
- name: Install Dependencies
run: npm clean-install
- name: Execute Unit Tests
run: npm run test
env:
CLIENT_ID: ${{ secrets.CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
REFRESH_TOKEN: ${{ secrets.REFRESH_TOKEN }}
package-lock-is-up-to-date:
runs-on: ubuntu-latest
steps:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ node_modules
report
.env*
.DS_Store
/token.json
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,7 @@ cd ~/MagicMirror/modules && git clone https://github.com/CFenner/MMM-Netatmo net

:warning: Note that the checkout folder is named `netatmo` and not `MMM-Netatmo` as the repository.

Navigate into the module folder and install missing dependencies:

```shell
cd netatmo && npm ci --production --ignore-scripts
```
Since v2.1.0: **No special dependencies and no others commands are now needed!**

### Connection to Netatmo Service API

Expand Down
3 changes: 2 additions & 1 deletion helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* Module: MMM-Netatmo
*
* By Christopher Fenner https://github.com/CFenner
* Review @bugsounet https://github.com/bugsounet
* MIT Licensed.
*/
const fs = require("fs");
Expand Down Expand Up @@ -137,7 +138,7 @@ module.exports = {
this.authenticate();
break;
case this.notifications.DATA:
this.loadData(payload);
this.loadData();
break;
}
},
Expand Down
151 changes: 0 additions & 151 deletions helper.test.js

This file was deleted.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
"validate:json": "find . -type f -name '*.json' ! -path './node_modules/*' -exec jsonlint {} --insert-final-newline --in-place ';'",
"validate:md": "node_modules/.bin/markdownlint *.md",
"fix:js": "eslint --config eslint.config.js --fix **/*.js --ignore-pattern helper.test.js",
"test": "npm run test:js",
"test:js": "jest *.test.js",
"test": "npm run validate",
"docker:clean": "rm -f compose/config/config.js && rm -f compose/config/config.js_* && rm -rf compose/css && rm -rf compose/modules",
"docker:server": "docker compose --file compose/docker-compose.yml up",
"docker:clone": "git clone https://github.com/CFenner/MMM-Netatmo compose/modules/netatmo",
Expand Down

0 comments on commit f6b1f65

Please sign in to comment.