Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update package json with new hb and node versions #74

Merged
merged 3 commits into from
Jul 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,27 @@

</span>

> [!IMPORTANT]
> **Homebridge v2.0 Information**
>
> This template currently has a
> - `package.json -> engines.homebridge` value of `"^1.8.0 || ^2.0.0-beta.0"`
> - `package.json -> devDependencies.homebridge` value of `"^2.0.0-beta.0"`
>
> This is to ensure that your plugin will build and run on both Homebridge v1 and v2.
>
> Once Homebridge v2.0 has been released, you can remove the `-beta.0` in both places.

> [!IMPORTANT]
> **Node v22 Information**
>
> This template currently has a
> - `package.json -> engines.node` value of `"^18.20.4 || ^20.16.0 || ^22.5.1"`
>
> This is to remind developers that plugins should be supporting Node v22 from October 2024.

---

This is a template Homebridge dynamic platform plugin and can be used as a base to help you get started developing your own plugin.

This template should be used in conjunction with the [developer documentation](https://developers.homebridge.io/). A full list of all supported service types, and their characteristics is available on this site.
Expand Down
138 changes: 69 additions & 69 deletions package-lock.json

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

14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"url": "https://github.com/USERNAME/GITHUB_PROJECT_NAME/issues"
},
"engines": {
"node": "^18.17.0 || ^20.9.0",
"homebridge": "^1.8.0"
"node": "^18.20.4 || ^20.16.0 || ^22.5.1",
"homebridge": "^1.8.0 || ^2.0.0-beta.0"
},
"main": "dist/index.js",
"scripts": {
Expand All @@ -28,14 +28,14 @@
"homebridge-plugin"
],
"devDependencies": {
"@types/node": "^20.14.10",
"@typescript-eslint/eslint-plugin": "^7.16.0",
"@typescript-eslint/parser": "^7.16.0",
"@types/node": "^20.14.12",
"@typescript-eslint/eslint-plugin": "^7.17.0",
"@typescript-eslint/parser": "^7.17.0",
"eslint": "^8.57.0",
"homebridge": "^1.8.3",
"homebridge": "^2.0.0-beta.0",
"nodemon": "^3.1.4",
"rimraf": "^6.0.1",
"ts-node": "^10.9.2",
"typescript": "^5.5.3"
"typescript": "^5.5.4"
}
}
6 changes: 0 additions & 6 deletions src/platform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,6 @@ export class ExampleHomebridgePlatform implements DynamicPlatformPlugin {

this.log.debug('Finished initializing platform:', this.config.name);

// Homebridge 1.8.0 introduced a `log.success` method that can be used to log success messages
// For users that are on a version prior to 1.8.0, we need a 'polyfill' for this method
if (!log.success) {
log.success = log.info;
}

// When this event is fired it means Homebridge has restored all cached accessories from disk.
// Dynamic Platform plugins should only register new accessories after this event was fired,
// in order to ensure they weren't added to homebridge already. This event can also be used
Expand Down
Loading