Skip to content

Commit

Permalink
Hotfix: Change dependencies to newest beta SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus Kling committed May 1, 2023
1 parent 5d7694b commit 203bd4d
Show file tree
Hide file tree
Showing 8 changed files with 118 additions and 101 deletions.
6 changes: 6 additions & 0 deletions docs/releasenotes/v02-00-00.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ title: Release Notes v2.0.0
### RC18
* **2.0.2** [Release notes](docs/releasenotes/v02-00-02.md)

### RC19
* **2.0.3** [Release notes](docs/releasenotes/v02-00-03.md)

### RC20
* **2.0.4** [Release notes](docs/releasenotes/v02-00-04.md)


## Docs
Compatibility with Homey 3.0 SDK
6 changes: 6 additions & 0 deletions docs/releasenotes/v02-00-04.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
layout: page
title: Release Notes v2.0.4
---

(ries to fix an issue with dependencies for 10.* breaking 8.* homey versions.
173 changes: 94 additions & 79 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 5 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
"@material-ui/icons": "^4.5.1",
"@sentry/node": "^5.0.0",
"body-scroll-lock": "^2.6.1",
"homey-api": "^1.10.20",
"d3": "^5.9.2",
"date-fns": "^2.0.0-alpha.21",
"graceful-fs": "^4.2.3",
"homey-api": "^3.0.0-rc.19",
"lodash": "^4.17.11",
"material-ui-pickers": "^2.2.4",
"natives": "^1.1.6",
Expand All @@ -37,6 +37,7 @@
"@sentry/cli": "^1.40.0",
"@types/chai": "^4.2.6",
"@types/d3": "^5.7.2",
"@types/homey": "npm:homey-apps-sdk-v3-types@^0.3.4",
"@types/lodash": "^4.14.123",
"@types/mocha": "^5.2.6",
"@types/mock-require": "^2.0.0",
Expand All @@ -47,9 +48,8 @@
"@types/react-router-dom": "^5.1.3",
"@types/socket.io-client": "^1.4.32",
"@vitalets/google-translate-api": "^3.0.0",
"homey": "2.33.13",
"@types/homey": "npm:homey-apps-sdk-v3-types@^0.3.4",
"awesome-typescript-loader": "^5.2.1",
"babel-loader": "^8.0.5",
"chai": "^4.2.0",
"clean-webpack-plugin": "^3.0.0",
"copy-webpack-plugin": "^5.0.5",
Expand All @@ -58,6 +58,7 @@
"file-loader": "^5.0.2",
"fstream": "^1.0.12",
"glob": "^7.1.6",
"homey": "2.33.13",
"html-webpack-plugin": "^5.5.1",
"https": "^1.0.0",
"license-checker-webpack-plugin": "^0.2.1",
Expand All @@ -76,37 +77,28 @@
"unzipper": "^0.10.5",
"webpack": "^5.79.0",
"webpack-cli": "^5.0.1",
"webpack-dev-server": "^4.13.3",
"babel-loader": "^8.0.5"
"webpack-dev-server": "^4.13.3"
},
"scripts": {
"homey": "homey",

"homey:run": "rimraf /tmp/homey-heating && npm run build:app:dev && homey -p /tmp/homey-heating app run --remote",
"homey:install": "rimraf /tmp/homey-heating && npm run build:app:prod && npm run build:web:prod && homey -p /tmp/homey-heating app install",

"dist": "npm run build:app:prod && npm run build:web:prod && homey -p /tmp/homey-heating app validate --level publish",
"tag": "npm run lint:app && npm run lint:web && npm run test && git tag",
"test": "",
"test2": "rimraf tmp && tsc -p ./src/test/tsconfig.json && mocha",

"release:download": "node scripts/download.js",
"release:install": "homey app install -p tmp",
"release:publish": "homey app publish -p tmp",

"build:setversion": "node scripts/update-version.js",
"build:sentry": "sentry-cli",

"lint:app": "tslint --project ./src/tsconfig.json",
"lint:web": "tslint --project ./src/settings/tsconfig.json",

"build:app:releasenotes": "node scripts/release-notes.js",
"build:app:dev": "webpack --mode development --config webpack.app.js",
"build:app:prod": "npm run lint:app && npm run build:app:releasenotes && webpack --mode production --config webpack.app.js",

"build:web:dev": "webpack --mode development --config webpack.react.js",
"build:web:prod": "npm run lint:web && webpack --mode production --config webpack.react.js",

"start:web": "webpack-dev-server --mode development --config webpack.react.js --open",
"start:web:prod": "webpack-dev-server --mode production --config webpack.react.js --open"
},
Expand Down
2 changes: 1 addition & 1 deletion scripts/download.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ var branchName = process.argv.length >= 3 ? process.argv[2] : null;

const options = {
hostname: 'api.github.com',
path: '/repos/mskg/homey-heating/branches',
path: '/repos/mskg/homey-heating/branches?per_page=100',
headers: { 'User-Agent': 'console' }
};

Expand Down
2 changes: 1 addition & 1 deletion src/app/services/device-manager/DeviceManagerService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export type AuditedDevice = {
} & IDevice;

export function VirtualDevice(device: IDevice): boolean {
return device.driverUri.match(/app\.mskg\.homey\-heating/ig) != null;
return device.driverUri != null && device.driverUri.match(/app\.mskg\.homey\-heating/ig) != null;
}

export function CanSetTargetTemperature(device: IDevice): boolean {
Expand Down
6 changes: 4 additions & 2 deletions src/app/services/homey-api/HomeyAPIService.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { App as HomeyApp } from "homey";
import { HomeyAPIApp } from "homey-api";
import { HomeyAPI } from "homey-api";
import { singleton } from "tsyringe";
import { ICategoryLogger, LoggerFactory } from "../log";
import { StableHomeyAPI } from "./api";
Expand All @@ -21,7 +21,9 @@ export class HomeyAPIService {
if (this.homeyAPI == null) {
try {
this.logger.debug("Connecting to API");
this.homeyAPI = new HomeyAPIApp({ homey, debug: !__PRODUCTION__ }) as StableHomeyAPI;

//@ts-ignore
this.homeyAPI = await HomeyAPI.createAppAPI({ homey, debug: !__PRODUCTION__ }) as StableHomeyAPI;
} catch (e) {
this.logger.error(e, "CATASTROPHIC FAILURE **** CANNOT BE HANDELED *****");

Expand Down
Loading

0 comments on commit 203bd4d

Please sign in to comment.