Skip to content

Commit 6cb08dd

Browse files
committed
update to esm package
1 parent bfc8fdc commit 6cb08dd

25 files changed

+5403
-1710
lines changed

.eslintrc

-83
This file was deleted.

.github/workflows/beta-release.yml

+11-9
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,8 @@ jobs:
1818

1919
publish:
2020
needs: lint
21-
2221
if: ${{ github.repository == 'homebridge/plugin-ui-utils' }}
23-
24-
uses: homebridge/.github/.github/workflows/npm-publish.yml@latest
22+
uses: homebridge/.github/.github/workflows/npm-publish-esm.yml@latest
2523
with:
2624
tag: beta
2725
dynamically_adjust_version: true
@@ -30,9 +28,13 @@ jobs:
3028
secrets:
3129
npm_auth_token: ${{ secrets.npm_token }}
3230

33-
github-releases-to-discord:
34-
uses: homebridge/.github/.github/workflows/discord-webhooks.yml@latest
35-
with:
36-
footer_title: "plugin-ui-utils"
37-
secrets:
38-
DISCORD_WEBHOOK_URL_BETA: ${{ secrets.DISCORD_WEBHOOK_URL_LATEST }}
31+
# github-releases-to-discord:
32+
# name: Discord Webhooks
33+
# needs: publish
34+
# uses: homebridge/.github/.github/workflows/discord-webhooks.yml@latest
35+
# with:
36+
# title: Plugin UI Utils (Beta)
37+
# description: |
38+
# Version `v${{ needs.publish.outputs.NPM_VERSION }}`
39+
# secrets:
40+
# DISCORD_WEBHOOK_URL_BETA: ${{ secrets.DISCORD_WEBHOOK_URL_LATEST }}

.github/workflows/codeql-analysis.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: CodeQL
22

33
on:
44
push:
5-
branches: [ latest, beta* ]
5+
branches: [latest, beta*]
66
pull_request:
7-
branches: [ latest, beta* ]
7+
branches: [latest, beta*]
88
schedule:
99
- cron: '17 9 * * 2'
1010

.github/workflows/release.yml

+13-8
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Node Release
33
on:
44
push:
55
tags:
6-
- "v*.*.*"
6+
- 'v*.*.*'
77
workflow_dispatch:
88

99
jobs:
@@ -19,13 +19,18 @@ jobs:
1919

2020
if: ${{ github.repository == 'homebridge/plugin-ui-utils' }}
2121

22-
uses: homebridge/.github/.github/workflows/npm-publish.yml@latest
22+
uses: homebridge/.github/.github/workflows/npm-publish-esm.yml@latest
2323
secrets:
2424
npm_auth_token: ${{ secrets.npm_token }}
2525

26-
github-releases-to-discord:
27-
uses: homebridge/.github/.github/workflows/discord-webhooks.yml@latest
28-
with:
29-
footer_title: "plugin-ui-utils"
30-
secrets:
31-
DISCORD_WEBHOOK_URL_LATEST: ${{ secrets.DISCORD_WEBHOOK_URL_LATEST }}
26+
# github-releases-to-discord:
27+
# name: Discord Webhooks
28+
# needs: publish
29+
# uses: homebridge/.github/.github/workflows/discord-webhooks.yml@latest
30+
# with:
31+
# title: Plugin UI Utils
32+
# description: |
33+
# Version `v${{ needs.publish.outputs.NPM_VERSION }}`
34+
# url: 'https://github.com/homebridge/plugin-ui-utils/releases/tag/v${{ needs.publish.outputs.NPM_VERSION }}'
35+
# secrets:
36+
# DISCORD_WEBHOOK_URL_LATEST: ${{ secrets.DISCORD_WEBHOOK_URL_LATEST }}

.vscode/extensions.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
"recommendations": [
33
"dbaeumer.vscode-eslint"
44
]
5-
}
5+
}

.vscode/settings.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@
99
"editor.rulers": [
1010
140
1111
],
12-
"codeQL.githubDatabase.download": "never",
13-
}
12+
"codeQL.githubDatabase.download": "never"
13+
}

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
All notable changes to `@homebridge/plugin-ui-utils` will be documented in this file. This project tries to adhere to [Semantic Versioning](http://semver.org/).
44

5+
## BETA
6+
7+
### Notable Changes
8+
9+
- update to esm package
10+
511
## v1.0.3 (2024-04-06)
612

713
### Other Changes

DEVELOPMENT.md

+10-11
Original file line numberDiff line numberDiff line change
@@ -104,30 +104,29 @@ Here is a simple example using Jest:
104104
import { MockHomebridgePluginUi } from '@homebridge/plugin-ui-utils/dist/ui.mock'
105105

106106
describe('TestCustomUi', () => {
107-
let homebridge: MockHomebridgePluginUi;
107+
let homebridge: MockHomebridgePluginUi
108108

109109
beforeEach(() => {
110-
homebridge = new MockHomebridgePluginUi();
111-
window.homebridge = homebridge;
112-
});
110+
homebridge = new MockHomebridgePluginUi()
111+
window.homebridge = homebridge
112+
})
113113

114114
it('should return the plugin config and schema when called', async () => {
115115
// mock the config
116116
homebridge.mockPluginConfig = [
117117
{
118118
platform: 'homebridge-example'
119119
}
120-
];
120+
]
121121

122122
// mock the schema
123123
homebridge.mockPluginSchema = {
124124
pluginAlias: 'homebridge-example',
125125
pluginType: 'platform'
126-
};
127-
128-
expect(await window.homebridge.getPluginConfig()).toHaveLength(1);
129-
expect(await window.homebridge.getPluginConfigSchema()).toHaveProperty('pluginAlias');
130-
});
126+
}
131127

132-
});
128+
expect(await window.homebridge.getPluginConfig()).toHaveLength(1)
129+
expect(await window.homebridge.getPluginConfigSchema()).toHaveProperty('pluginAlias')
130+
})
131+
})
133132
```

0 commit comments

Comments
 (0)