custom-cards / custom-card-helpers

Custom Card Helper Functions/Types for Developers
https://custom-cards.github.io/custom-card-helpers/
MIT License
48 stars 29 forks source link

durationToSeconds and secondsToDuration are no longer exported #55

Open rianadon opened 2 years ago

rianadon commented 2 years ago

Absolutely love the library and I'm glad it got a new release recently!

However, after pulling the latest version I noticed that the functions secondsToDuration and durationToSeconds no longer import.

(!) Plugin typescript: @rollup/plugin-typescript TS2305: Module '"custom-card-helpers"' has no exported member 'durationToSeconds'.
src/helpers.ts: (2:10)

2 import { durationToSeconds, formatTime, HomeAssistant } from "custom-card-helpers";
           ~~~~~~~~~~~~~~~~~

test/util.ts: (1:10)

1 import { durationToSeconds } from "custom-card-helpers";
           ~~~~~~~~~~~~~~~~~

(!) Plugin typescript: @rollup/plugin-typescript TS2305: Module '"custom-card-helpers"' has no exported member 'secondsToDuration'.
src/timer-bar-entity-row.ts: (6:51)

6 import { HomeAssistant, hasConfigOrEntityChanged, secondsToDuration, computeStateDisplay } from 'custom-card-helpers';
                                                    ~~~~~~~~~~~~~~~~~

I was poking around and it seems that https://github.com/custom-cards/custom-card-helpers/commit/e754e7523c73fdff5b0ef7958060508b24b9318d might have something to do with the issue.

It looks like secondsToDuration has been removed from index.m.js even though it is still in the source code:

image

Thank you!