Skip to content

Commit

Permalink
logs
Browse files Browse the repository at this point in the history
  • Loading branch information
shannonhochkins committed Nov 26, 2023
1 parent 5dbb0ef commit 8de91d9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# 3.1.1
Upgrading all packages, leaving CJS stack trace in place so we can monitor updates of packages that haven't been upgraded to ESM only yet, type fixes
## @hakit/components
- No code changes aside from base package upgrades

## @hakit/core
- BUGFIX - BIG Thanks to @koriwi - the useArea hook will now match related devices/entities where entities are indirectly related to an area (device is in the area but a sub entity is not)
- BUGFIX - HassConnect was previously returning React.ReactNode as the return type, but i've removed this and left it to type inference as there's a bug with typescript < 5.1 where it doesn't properly work with React.
- BUGFIX - Test framework working again for @core only, still need to work on client side.

# 1.1.1
## create-hakit
- Adjustments to deploy script
Expand Down
6 changes: 4 additions & 2 deletions packages/core/src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ import type { TimelineState, EntityHistoryState } from "../hooks/useHistory/hist
export type { HistoryStreamMessage, TimelineState, HistoryResult, EntityHistoryState } from "../hooks/useHistory/history";

export interface CustomSupportedServices<T extends ServiceFunctionTypes = "target"> {
unknown: T;
// populated by the sync script and will be overwritten by the user
UNDETERMINED: T;
}

// dodgey hack to determine if the custom supported services are empty or not, if they're empty we use the default services
export type SupportedServices<T extends ServiceFunctionTypes = "target"> = [keyof CustomSupportedServices<T>] extends ["unknown"]
export type SupportedServices<T extends ServiceFunctionTypes = "target"> = [keyof CustomSupportedServices<T>] extends ["UNDETERMINED"]
? DefaultServices<T>
: CustomSupportedServices<T>;

Expand Down

0 comments on commit 8de91d9

Please sign in to comment.