Skip to content

Commit

Permalink
20241223.0 (#23392)
Browse files Browse the repository at this point in the history
  • Loading branch information
bramkragten authored Dec 23, 2024
2 parents cd44b33 + 5a0225b commit a7cacbb
Show file tree
Hide file tree
Showing 566 changed files with 17,498 additions and 6,561 deletions.
26 changes: 10 additions & 16 deletions .browserslistrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@
# - released in the last year + current alpha/beta versions
# - Firefox extended support release (ESR)
# - with global utilization at or above 0.5%
# - must support dynamic import of ES modules
# - exclude browsers no longer being maintained
# - exclude dead browsers (no security maintenance for 2+ years)
# - exclude KaiOS, QQ, and UC browsers due to lack of sufficient feature support data
unreleased versions
last 1 year
Firefox ESR
>= 0.5% and supports es6-module-dynamic-import
>= 0.5%
not dead
not KaiOS > 0
not QQAndroid > 0
Expand All @@ -20,23 +19,18 @@ not UCAndroid > 0
# Legacy builds are served when modern requirements are not met and support browsers:
# - released in the last 7 years + current alpha/beta versionss
# - with global utilization at or above 0.05%
# The lattermost query ensures that support for popular old browsers is not dropped too early
# (e.g. IE 11, Android 4.4, or Samsung 4).
#
# In addition, legacy browsers must support some minimum features that cannot be polyfilled:
# - ES5 (strict mode)
# - web sockets to communicate with backend
# - inline SVG used widely in buttons, widgets, etc.
# - custom events used for most user interactions
# - CSS flexbox used in the majority of the layout
# Nearly all of these are redundant with the above rules.
# As of May 2023, only web sockets must be added to the query.
# - exclude dead browsers (no security maintenance for 2+ years)
# - exclude Opera Mini which does not support web sockets
unreleased versions
last 7 years
>= 0.05% and supports websockets
>= 0.05%
not dead
not op_mini all

[legacy-sw]
# Same as legacy plus supports service workers
unreleased versions
last 7 years
>= 0.05% and supports websockets and supports serviceworkers
>= 0.05% and supports serviceworkers
not dead
not op_mini all
40 changes: 5 additions & 35 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,18 @@ jobs:
- name: Check out files from GitHub
uses: actions/[email protected]
- name: Setup Node
id: setup-node
uses: actions/[email protected]
with:
node-version-file: ".nvmrc"
cache: yarn
- uses: actions/[email protected]
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: "node_modules"
key: ${{ runner.os }}-yarn-${{ hashFiles('.yarnrc.yml') }}-${{ steps.setup-node.outputs.node-version }}-${{ hashFiles('yarn.lock') }}
restore-keys: ${{ runner.os }}-yarn-${{ hashFiles('.yarnrc.yml') }}-${{ steps.setup-node.outputs.node-version }}
- name: Install dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --immutable
- name: Check for duplicate dependencies
run: yarn dedupe --check
- name: Build resources
run: ./node_modules/.bin/gulp gen-icons-json build-translations build-locale-data gather-gallery-pages
- name: Setup lint cache
uses: actions/cache@v4.1.2
uses: actions/cache@v4.2.0
with:
path: |
node_modules/.cache/prettier
Expand All @@ -66,19 +60,11 @@ jobs:
- name: Check out files from GitHub
uses: actions/[email protected]
- name: Setup Node
id: setup-node
uses: actions/[email protected]
with:
node-version-file: ".nvmrc"
cache: yarn
- uses: actions/[email protected]
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: "node_modules"
key: ${{ runner.os }}-yarn-${{ hashFiles('.yarnrc.yml') }}-${{ steps.setup-node.outputs.node-version }}-${{ hashFiles('yarn.lock') }}
restore-keys: ${{ runner.os }}-yarn-${{ hashFiles('.yarnrc.yml') }}-${{ steps.setup-node.outputs.node-version }}
- name: Install dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --immutable
- name: Build resources
run: ./node_modules/.bin/gulp gen-icons-json build-translations build-locale-data
Expand All @@ -92,26 +78,18 @@ jobs:
- name: Check out files from GitHub
uses: actions/[email protected]
- name: Setup Node
id: setup-node
uses: actions/[email protected]
with:
node-version-file: ".nvmrc"
cache: yarn
- uses: actions/[email protected]
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: "node_modules"
key: ${{ runner.os }}-yarn-${{ hashFiles('.yarnrc.yml') }}-${{ steps.setup-node.outputs.node-version }}-${{ hashFiles('yarn.lock') }}
restore-keys: ${{ runner.os }}-yarn-${{ hashFiles('.yarnrc.yml') }}-${{ steps.setup-node.outputs.node-version }}
- name: Install dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --immutable
- name: Build Application
run: ./node_modules/.bin/gulp build-app
env:
IS_TEST: "true"
- name: Upload bundle stats
uses: actions/upload-artifact@v4.4.3
uses: actions/upload-artifact@v4.5.0
with:
name: frontend-bundle-stats
path: build/stats/*.json
Expand All @@ -124,26 +102,18 @@ jobs:
- name: Check out files from GitHub
uses: actions/[email protected]
- name: Setup Node
id: setup-node
uses: actions/[email protected]
with:
node-version-file: ".nvmrc"
cache: yarn
- uses: actions/[email protected]
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: "node_modules"
key: ${{ runner.os }}-yarn-${{ hashFiles('.yarnrc.yml') }}-${{ steps.setup-node.outputs.node-version }}-${{ hashFiles('yarn.lock') }}
restore-keys: ${{ runner.os }}-yarn-${{ hashFiles('.yarnrc.yml') }}-${{ steps.setup-node.outputs.node-version }}
- name: Install dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --immutable
- name: Build Application
run: ./node_modules/.bin/gulp build-hassio
env:
IS_TEST: "true"
- name: Upload bundle stats
uses: actions/upload-artifact@v4.4.3
uses: actions/upload-artifact@v4.5.0
with:
name: supervisor-bundle-stats
path: build/stats/*.json
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@ jobs:
run: tar -czvf translations.tar.gz translations

- name: Upload build artifacts
uses: actions/upload-artifact@v4.4.3
uses: actions/upload-artifact@v4.5.0
with:
name: wheels
path: dist/home_assistant_frontend*.whl
if-no-files-found: error

- name: Upload translations
uses: actions/upload-artifact@v4.4.3
uses: actions/upload-artifact@v4.5.0
with:
name: translations
path: translations.tar.gz
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/relative-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Send bundle stats and build information to RelativeCI
uses: relative-ci/[email protected].13
uses: relative-ci/[email protected].14
with:
key: ${{ secrets[format('RELATIVE_CI_KEY_{0}_{1}', matrix.bundle, matrix.build)] }}
token: ${{ github.token }}
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ jobs:
- name: Checkout the repository
uses: actions/[email protected]

- name: Verify version
uses: home-assistant/actions/helpers/verify-version@master

- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}

- name: Verify version
uses: home-assistant/actions/helpers/verify-version@master

- name: Setup Node
uses: actions/[email protected]
with:
Expand All @@ -55,7 +55,7 @@ jobs:
script/release
- name: Upload release assets
uses: softprops/action-gh-release@v2.1.0
uses: softprops/action-gh-release@v2.2.0
with:
files: |
dist/*.whl
Expand Down Expand Up @@ -107,7 +107,7 @@ jobs:
- name: Tar folder
run: tar -czf landing-page/home_assistant_frontend_landingpage-${{ github.event.release.tag_name }}.tar.gz -C landing-page/dist .
- name: Upload release asset
uses: softprops/action-gh-release@v2.1.0
uses: softprops/action-gh-release@v2.2.0
with:
files: landing-page/home_assistant_frontend_landingpage-${{ github.event.release.tag_name }}.tar.gz

Expand Down Expand Up @@ -136,6 +136,6 @@ jobs:
- name: Tar folder
run: tar -czf hassio/home_assistant_frontend_supervisor-${{ github.event.release.tag_name }}.tar.gz -C hassio/build .
- name: Upload release asset
uses: softprops/action-gh-release@v2.1.0
uses: softprops/action-gh-release@v2.2.0
with:
files: hassio/home_assistant_frontend_supervisor-${{ github.event.release.tag_name }}.tar.gz
160 changes: 80 additions & 80 deletions .yarn/releases/yarn-4.5.2.cjs → .yarn/releases/yarn-4.5.3.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ enableGlobalCache: false

nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.5.2.cjs
yarnPath: .yarn/releases/yarn-4.5.3.cjs
55 changes: 11 additions & 44 deletions build-scripts/babel-plugins/custom-polyfill-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import paths from "../paths.cjs";
const POLYFILL_DIR = join(paths.polymer_dir, "src/resources/polyfills");

// List of polyfill keys with supported browser targets for the functionality
const PolyfillSupport = {
const polyfillSupport = {
// Note states and shadowRoot properties should be supported.
"element-internals": {
android: 90,
Expand All @@ -18,17 +18,6 @@ const PolyfillSupport = {
safari: 17.4,
samsung: 15.0,
},
"element-append": {
android: 54,
chrome: 54,
edge: 17,
firefox: 49,
ios: 10.0,
opera: 41,
opera_mobile: 41,
safari: 10.0,
samsung: 6.0,
},
"element-getattributenames": {
android: 61,
chrome: 61,
Expand All @@ -51,27 +40,18 @@ const PolyfillSupport = {
safari: 12.0,
samsung: 10.0,
},
fetch: {
android: 42,
chrome: 42,
edge: 14,
firefox: 39,
ios: 10.3,
opera: 29,
opera_mobile: 29,
safari: 10.1,
samsung: 4.0,
},
// FormatJS polyfill detects fix for https://bugs.chromium.org/p/v8/issues/detail?id=10682,
// so adjusted to several months after that was marked fixed
"intl-getcanonicallocales": {
android: 54,
chrome: 54,
edge: 16,
android: 90,
chrome: 90,
edge: 90,
firefox: 48,
ios: 10.3,
opera: 41,
opera_mobile: 41,
opera: 76,
opera_mobile: 64,
safari: 10.1,
samsung: 6.0,
samsung: 15.0,
},
"intl-locale": {
android: 74,
Expand All @@ -87,17 +67,6 @@ const PolyfillSupport = {
"intl-other": {
// Not specified (i.e. always try polyfill) since compatibility depends on supported locales
},
proxy: {
android: 49,
chrome: 49,
edge: 12,
firefox: 18,
ios: 10.0,
opera: 36,
opera_mobile: 36,
safari: 10.0,
samsung: 5.0,
},
"resize-observer": {
android: 64,
chrome: 64,
Expand All @@ -115,8 +84,6 @@ const PolyfillSupport = {
// corresponding polyfill key and actual module to import
const polyfillMap = {
global: {
fetch: { key: "fetch", module: "unfetch/polyfill" },
Proxy: { key: "proxy", module: "proxy-polyfill" },
ResizeObserver: {
key: "resize-observer",
module: join(POLYFILL_DIR, "resize-observer.ts"),
Expand All @@ -128,7 +95,7 @@ const polyfillMap = {
module: "element-internals-polyfill",
},
...Object.fromEntries(
["append", "getAttributeNames", "toggleAttribute"].map((prop) => {
["getAttributeNames", "toggleAttribute"].map((prop) => {
const key = `element-${prop.toLowerCase()}`;
return [prop, { key, module: join(POLYFILL_DIR, `${key}.ts`) }];
})
Expand Down Expand Up @@ -168,7 +135,7 @@ export default defineProvider(
const resolvePolyfill = createMetaResolver(polyfillMap);
return {
name: "custom-polyfill",
polyfills: PolyfillSupport,
polyfills: polyfillSupport,
usageGlobal(meta, utils) {
const polyfill = resolvePolyfill(meta);
if (polyfill && shouldInjectPolyfill(polyfill.desc.key)) {
Expand Down
5 changes: 5 additions & 0 deletions build-scripts/bundle.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ module.exports.definedVars = ({ isProdBuild, latestBuild, defineOverlay }) => ({
__SUPERVISOR__: false,
__BACKWARDS_COMPAT__: false,
__STATIC_PATH__: "/static/",
__HASS_URL__: `\`${
"HASS_URL" in process.env
? process.env["HASS_URL"]
: "${location.protocol}//${location.host}"
}\``,
"process.env.NODE_ENV": JSON.stringify(
isProdBuild ? "production" : "development"
),
Expand Down
3 changes: 0 additions & 3 deletions build-scripts/env.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ const paths = require("./paths.cjs");
const isTrue = (value) => value === "1" || value?.toLowerCase() === "true";

module.exports = {
useWDS() {
return isTrue(process.env.WDS);
},
isProdBuild() {
return (
process.env.NODE_ENV === "production" || module.exports.isStatsBuild()
Expand Down
3 changes: 1 addition & 2 deletions build-scripts/gulp/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import "./gen-icons-json.js";
import "./locale-data.js";
import "./service-worker.js";
import "./translations.js";
import "./wds.js";
import "./rspack.js";

gulp.task(
Expand All @@ -26,7 +25,7 @@ gulp.task(
"build-locale-data"
),
"copy-static-app",
env.useWDS() ? "wds-watch-app" : "rspack-watch-app"
"rspack-watch-app"
)
);

Expand Down
Loading

0 comments on commit a7cacbb

Please sign in to comment.