From 0fd6592fd5f6dec30db98fab6682ddfa6ace1cc9 Mon Sep 17 00:00:00 2001 From: Chris Pinkham Date: Wed, 11 Oct 2023 17:53:52 -0400 Subject: [PATCH 01/11] Add a new time_pattern option. - Default new option value to 'HH:mm' - Remove time_format fallbacks to locale and instead fall through to using time_pattern. - time_format option can be removed when desired leaving time_pattern to act for time the same as date_pattern acts for date. --- README.md | 3 ++- src/clock-weather-card.ts | 11 +++-------- src/types.ts | 2 ++ 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 6658ab58..555bcdd0 100644 --- a/README.md +++ b/README.md @@ -127,7 +127,8 @@ time_zone: null | animated_icon | boolean | **Optional** | Whether the large weather icon should be animated | `true` | | forecast_rows | number | **Optional** | The amount of weather forecast rows to show. Depending on `hourly_forecast` each row either corresponds to a day or an hour | `5` | | locale | string[^2] | **Optional** | Language to use for language specific text and date/time formatting. If not provided, falls back to the locale set in HA or, if not set in HA, to `en-GB` | `en-GB` | -| time_format | `24` \| `12` | **Optional** | Format used to display the time. If not provided, falls back to the default time format of the configured `locale` | `24` | +| time_format | `24` \| `12` | **Optional** | Format used to display the time. If not provided, falls through to time_pattern format | `null` | +| time_pattern | string | **Optional** | Pattern to use for time formatting. If not provided, falls back to a localized default time formatting. See [luxon](https://moment.github.io/luxon/#/formatting?id=table-of-tokens) for valid tokens | `HH:MM` | | date_pattern | string | **Optional** | Pattern to use for date formatting. If not provided, falls back to a localized default date formatting. See [luxon](https://moment.github.io/luxon/#/formatting?id=table-of-tokens) for valid tokens | `D` | | hide_today_section | boolean | **Optional** | Hides the cards today section (upper section), containing the large weather icon, clock and current date | `false` | | hide_forecast_section | boolean | **Optional** | Hides the cards forecast section (lower section),containing the weather forecast | `false` | diff --git a/src/clock-weather-card.ts b/src/clock-weather-card.ts index 661a387d..b5e9e93f 100644 --- a/src/clock-weather-card.ts +++ b/src/clock-weather-card.ts @@ -390,6 +390,7 @@ export class ClockWeatherCard extends LitElement { hourly_forecast: config.hourly_forecast ?? false, animated_icon: config.animated_icon ?? true, time_format: config.time_format?.toString() as '12' | '24' | undefined, + time_pattern: config.time_pattern ?? 'HH:mm', hide_forecast_section: config.hide_forecast_section ?? false, hide_today_section: config.hide_today_section ?? false, hide_clock: config.hide_clock ?? false, @@ -440,19 +441,13 @@ export class ClockWeatherCard extends LitElement { } private time (date: DateTime = this.currentDate): string { + // Honor deprecated time_format setting until removed if (this.config.time_format) { return this.toZonedDate(date) .toFormat(this.config.time_format === '24' ? 'HH:mm' : 'h:mm a') } - if (this.hass.locale.time_format === TimeFormat.am_pm) { - return this.toZonedDate(date).toFormat('h:mm a') - } - - if (this.hass.locale.time_format === TimeFormat.twenty_four) { - return this.toZonedDate(date).toFormat('HH:mm') - } - return this.toZonedDate(date).toFormat('t') + return this.toZonedDate(date).toFormat(this.config.time_pattern) } private getIconAnimationKind (): 'static' | 'animated' { diff --git a/src/types.ts b/src/types.ts index 47c932dc..9e639d9f 100644 --- a/src/types.ts +++ b/src/types.ts @@ -19,6 +19,7 @@ export interface ClockWeatherCardConfig extends LovelaceCardConfig { forecast_rows?: number locale?: string time_format?: '12' | '24' + time_pattern?: string date_pattern?: string hide_today_section?: boolean hide_forecast_section?: boolean @@ -39,6 +40,7 @@ export interface MergedClockWeatherCardConfig extends LovelaceCardConfig { forecast_rows: number locale?: string time_format?: '12' | '24' + time_pattern: string date_pattern: string hide_today_section: boolean hide_forecast_section: boolean From 69ef7e06d065be49e5ff19c126da9a8577153f6b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 12 Oct 2023 10:48:10 +0200 Subject: [PATCH 02/11] chore(deps): update dependency rollup-plugin-serve to v2 (#232) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- rollup.config.dev.js | 15 ++++++------ rollup.config.js | 54 ++++++++++++++++---------------------------- yarn.lock | 8 +++---- 4 files changed, 31 insertions(+), 48 deletions(-) diff --git a/package.json b/package.json index d2e9624c..66b4ab97 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "rollup-plugin-commonjs": "^10.1.0", "rollup-plugin-gzip": "^3.0.1", "rollup-plugin-node-resolve": "^5.2.0", - "rollup-plugin-serve": "^1.1.0", + "rollup-plugin-serve": "^2.0.0", "rollup-plugin-terser": "^7.0.2", "rollup-plugin-typescript2": "^0.36.0", "typescript": "*" diff --git a/rollup.config.dev.js b/rollup.config.dev.js index f79836d8..911a8edb 100644 --- a/rollup.config.dev.js +++ b/rollup.config.dev.js @@ -1,10 +1,10 @@ -import resolve from 'rollup-plugin-node-resolve'; -import typescript from 'rollup-plugin-typescript2'; -import babel from 'rollup-plugin-babel'; -import serve from 'rollup-plugin-serve'; -import { terser } from 'rollup-plugin-terser'; -import json from '@rollup/plugin-json'; -import image from '@rollup/plugin-image'; +import resolve from 'rollup-plugin-node-resolve' +import typescript from 'rollup-plugin-typescript2' +import babel from 'rollup-plugin-babel' +import serve from 'rollup-plugin-serve' +import { terser } from 'rollup-plugin-terser' +import json from '@rollup/plugin-json' +import image from '@rollup/plugin-image' export default { input: ['src/clock-weather-card.ts'], @@ -25,7 +25,6 @@ export default { contentBase: './dist', host: '0.0.0.0', port: 5001, - allowCrossOrigin: true, headers: { 'Access-Control-Allow-Origin': '*', }, diff --git a/rollup.config.js b/rollup.config.js index 2325212d..998dd59c 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,38 +1,11 @@ -import typescript from 'rollup-plugin-typescript2'; -import commonjs from 'rollup-plugin-commonjs'; -import nodeResolve from 'rollup-plugin-node-resolve'; -import babel from 'rollup-plugin-babel'; +import typescript from 'rollup-plugin-typescript2' +import commonjs from 'rollup-plugin-commonjs' +import nodeResolve from 'rollup-plugin-node-resolve' +import babel from 'rollup-plugin-babel' import { terser } from 'rollup-plugin-terser'; -import serve from 'rollup-plugin-serve'; -import json from '@rollup/plugin-json'; -import image from '@rollup/plugin-image'; -import gzipPlugin from 'rollup-plugin-gzip'; - -const dev = process.env.ROLLUP_WATCH; - -const serveopts = { - contentBase: ['./dist'], - host: '0.0.0.0', - port: 5000, - allowCrossOrigin: true, - headers: { - 'Access-Control-Allow-Origin': '*', - }, -}; - -const plugins = [ - image(), - nodeResolve({}), - commonjs(), - typescript(), - json(), - babel({ - exclude: 'node_modules/**', - }), - dev && serve(serveopts), - !dev && terser(), - gzipPlugin(), -]; +import json from '@rollup/plugin-json' +import image from '@rollup/plugin-image' +import gzipPlugin from 'rollup-plugin-gzip' export default [ { @@ -41,6 +14,17 @@ export default [ dir: 'dist', format: 'es', }, - plugins: [...plugins], + plugins: [ + image(), + nodeResolve({}), + commonjs(), + typescript(), + json(), + babel({ + exclude: 'node_modules/**', + }), + terser(), + gzipPlugin() + ] }, ]; diff --git a/yarn.lock b/yarn.lock index 2addb481..46fc93a8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2362,10 +2362,10 @@ rollup-plugin-node-resolve@^5.2.0: resolve "^1.11.1" rollup-pluginutils "^2.8.1" -rollup-plugin-serve@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/rollup-plugin-serve/-/rollup-plugin-serve-1.1.0.tgz#0654a57021a21b903340c69940f7463706e8288d" - integrity sha512-pYkSsuA0/psKqhhictkJw1c2klya5b+LlCvipWqI9OE1aG2M97mRumZCbBlry5CMEOzYBBgSDgd1694sNbmyIw== +rollup-plugin-serve@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/rollup-plugin-serve/-/rollup-plugin-serve-2.0.2.tgz#f49958b0725c9bd2fef976d23025a361e20bdee2" + integrity sha512-ALqyTbPhlf7FZ5RzlbDvMYvbKuCHWginJkTo6dMsbgji/a78IbsXox+pC83HENdkTRz8OXrTj+aShp3+3ratpg== dependencies: mime ">=2.4.6" opener "1" From d80b3f7300ade37d1cdd7e627964f6af447207eb Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 5 Oct 2023 19:49:37 +0000 Subject: [PATCH 03/11] chore(deps): update dependency @rollup/plugin-image to v3 --- package.json | 2 +- yarn.lock | 28 +++++++--------------------- 2 files changed, 8 insertions(+), 22 deletions(-) diff --git a/package.json b/package.json index 66b4ab97..0e81aebf 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "@babel/core": "^7.15.0", "@babel/plugin-proposal-class-properties": "^7.14.5", "@babel/plugin-proposal-decorators": "^7.14.5", - "@rollup/plugin-image": "^2.1.1", + "@rollup/plugin-image": "^3.0.0", "@rollup/plugin-json": "^5.0.0", "@types/luxon": "^3.3.2", "@typescript-eslint/eslint-plugin": "^6.4.0", diff --git a/yarn.lock b/yarn.lock index 46fc93a8..91bd27b9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -492,13 +492,13 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@rollup/plugin-image@^2.1.1": - version "2.1.1" - resolved "https://registry.yarnpkg.com/@rollup/plugin-image/-/plugin-image-2.1.1.tgz#898d6b59ac0025d7971ef45640ab330cb0663b0c" - integrity sha512-AgP4U85zuQJdUopLUCM+hTf45RepgXeTb8EJsleExVy99dIoYpt3ZlDYJdKmAc2KLkNntCDg6BPJvgJU3uGF+g== +"@rollup/plugin-image@^3.0.0": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@rollup/plugin-image/-/plugin-image-3.0.3.tgz#025b557180bae20f2349ff5130ef2114169feaac" + integrity sha512-qXWQwsXpvD4trSb8PeFPFajp8JLpRtqqOeNYRUKnEQNHm7e5UP7fuSRcbjQAJ7wDZBbnJvSdY5ujNBQd9B1iFg== dependencies: - "@rollup/pluginutils" "^3.1.0" - mini-svg-data-uri "^1.2.3" + "@rollup/pluginutils" "^5.0.1" + mini-svg-data-uri "^1.4.4" "@rollup/plugin-json@^5.0.0": version "5.0.2" @@ -507,15 +507,6 @@ dependencies: "@rollup/pluginutils" "^5.0.1" -"@rollup/pluginutils@^3.1.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-3.1.0.tgz#706b4524ee6dc8b103b3c995533e5ad680c02b9b" - integrity sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg== - dependencies: - "@types/estree" "0.0.39" - estree-walker "^1.0.1" - picomatch "^2.2.2" - "@rollup/pluginutils@^4.1.2": version "4.2.1" resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-4.2.1.tgz#e6c6c3aba0744edce3fb2074922d3776c0af2a6d" @@ -1321,11 +1312,6 @@ estree-walker@^0.6.1: resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.6.1.tgz#53049143f40c6eb918b23671d1fe3219f3a1b362" integrity sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w== -estree-walker@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-1.0.1.tgz#31bc5d612c96b704106b477e6dd5d8aa138cb700" - integrity sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg== - estree-walker@^2.0.1, estree-walker@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-2.0.2.tgz#52f010178c2a4c117a7757cfe942adb7d2da4cac" @@ -2052,7 +2038,7 @@ mime@>=2.4.6: resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.6.tgz#e5b407c90db442f2beb5b162373d07b69affa4d1" integrity sha512-RZKhC3EmpBchfTGBVb8fb+RL2cWyw/32lshnsETttkBAyAUXSGHxbEJWWRXc751DrIxG1q04b8QwMbAwkRPpUA== -mini-svg-data-uri@^1.2.3: +mini-svg-data-uri@^1.4.4: version "1.4.4" resolved "https://registry.yarnpkg.com/mini-svg-data-uri/-/mini-svg-data-uri-1.4.4.tgz#8ab0aabcdf8c29ad5693ca595af19dd2ead09939" integrity sha512-r9deDe9p5FJUPZAk3A59wGH7Ii9YrjjWw0jmw/liSbHl2CHiyXj6FcDXDu2K3TjVAXqiJdaw3xxwlZZr9E6nHg== From 298f1c81c33bab483e7ee44df2edefa432278e6e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 7 Oct 2023 11:42:14 +0000 Subject: [PATCH 04/11] chore(deps): update dependency @typescript-eslint/parser to v6 --- .eslintrc.js => .eslintrc.cjs | 7 ++- package.json | 2 +- yarn.lock | 98 +---------------------------------- 3 files changed, 7 insertions(+), 100 deletions(-) rename .eslintrc.js => .eslintrc.cjs (86%) diff --git a/.eslintrc.js b/.eslintrc.cjs similarity index 86% rename from .eslintrc.js rename to .eslintrc.cjs index cebcd4ca..fb35bed8 100644 --- a/.eslintrc.js +++ b/.eslintrc.cjs @@ -3,7 +3,9 @@ module.exports = { "browser": true, "es2021": true }, - "extends": "standard-with-typescript", + "extends": [ + "standard-with-typescript" + ], "overrides": [ { "env": { @@ -23,5 +25,6 @@ module.exports = { }, "rules": { "@typescript-eslint/strict-boolean-expressions": "off" - } + }, + "root": true } diff --git a/package.json b/package.json index 0e81aebf..cbcd2431 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "@rollup/plugin-json": "^5.0.0", "@types/luxon": "^3.3.2", "@typescript-eslint/eslint-plugin": "^6.4.0", - "@typescript-eslint/parser": "^4.33.0", + "@typescript-eslint/parser": "^6.0.0", "eslint": "^8.0.1", "eslint-config-standard-with-typescript": "^39.1.0", "eslint-plugin-import": "^2.25.2", diff --git a/yarn.lock b/yarn.lock index 91bd27b9..12592166 100644 --- a/yarn.lock +++ b/yarn.lock @@ -588,17 +588,7 @@ semver "^7.5.4" ts-api-utils "^1.0.1" -"@typescript-eslint/parser@^4.33.0": - version "4.33.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.33.0.tgz#dfe797570d9694e560528d18eecad86c8c744899" - integrity sha512-ZohdsbXadjGBSK0/r+d87X0SBmKzOq4/S5nzK6SBgJspFo9/CUDJ7hjayuze+JK7CZQLDMroqytp7pOcFKTxZA== - dependencies: - "@typescript-eslint/scope-manager" "4.33.0" - "@typescript-eslint/types" "4.33.0" - "@typescript-eslint/typescript-estree" "4.33.0" - debug "^4.3.1" - -"@typescript-eslint/parser@^6.4.0": +"@typescript-eslint/parser@^6.0.0", "@typescript-eslint/parser@^6.4.0": version "6.7.4" resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.7.4.tgz#23d1dd4fe5d295c7fa2ab651f5406cd9ad0bd435" integrity sha512-I5zVZFY+cw4IMZUeNCU7Sh2PO5O57F7Lr0uyhgCJmhN/BuTlnc55KxPonR4+EM3GBdfiCyGZye6DgMjtubQkmA== @@ -609,14 +599,6 @@ "@typescript-eslint/visitor-keys" "6.7.4" debug "^4.3.4" -"@typescript-eslint/scope-manager@4.33.0": - version "4.33.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.33.0.tgz#d38e49280d983e8772e29121cf8c6e9221f280a3" - integrity sha512-5IfJHpgTsTZuONKbODctL4kKuQje/bzBRkwHE8UOZ4f89Zeddg+EGZs8PD8NcN4LdM3ygHWYB3ukPAYjvl/qbQ== - dependencies: - "@typescript-eslint/types" "4.33.0" - "@typescript-eslint/visitor-keys" "4.33.0" - "@typescript-eslint/scope-manager@6.7.4": version "6.7.4" resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.7.4.tgz#a484a17aa219e96044db40813429eb7214d7b386" @@ -635,29 +617,11 @@ debug "^4.3.4" ts-api-utils "^1.0.1" -"@typescript-eslint/types@4.33.0": - version "4.33.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.33.0.tgz#a1e59036a3b53ae8430ceebf2a919dc7f9af6d72" - integrity sha512-zKp7CjQzLQImXEpLt2BUw1tvOMPfNoTAfb8l51evhYbOEEzdWyQNmHWWGPR6hwKJDAi+1VXSBmnhL9kyVTTOuQ== - "@typescript-eslint/types@6.7.4": version "6.7.4" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.7.4.tgz#5d358484d2be986980c039de68e9f1eb62ea7897" integrity sha512-o9XWK2FLW6eSS/0r/tgjAGsYasLAnOWg7hvZ/dGYSSNjCh+49k5ocPN8OmG5aZcSJ8pclSOyVKP2x03Sj+RrCA== -"@typescript-eslint/typescript-estree@4.33.0": - version "4.33.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.33.0.tgz#0dfb51c2908f68c5c08d82aefeaf166a17c24609" - integrity sha512-rkWRY1MPFzjwnEVHsxGemDzqqddw2QbTJlICPD9p9I9LfsO8fdmfQPOX3uKfUaGRDFJbfrtm/sXhVXN4E+bzCA== - dependencies: - "@typescript-eslint/types" "4.33.0" - "@typescript-eslint/visitor-keys" "4.33.0" - debug "^4.3.1" - globby "^11.0.3" - is-glob "^4.0.1" - semver "^7.3.5" - tsutils "^3.21.0" - "@typescript-eslint/typescript-estree@6.7.4": version "6.7.4" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.7.4.tgz#f2baece09f7bb1df9296e32638b2e1130014ef1a" @@ -684,14 +648,6 @@ "@typescript-eslint/typescript-estree" "6.7.4" semver "^7.5.4" -"@typescript-eslint/visitor-keys@4.33.0": - version "4.33.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.33.0.tgz#2a22f77a41604289b7a186586e9ec48ca92ef1dd" - integrity sha512-uqi/2aSz9g2ftcHWf8uLPJA70rUv6yuMW5Bohw+bwcuzaxQIHaKFZCKGoGXIrc9vkTJ3+0txM73K0Hq3d5wgIg== - dependencies: - "@typescript-eslint/types" "4.33.0" - eslint-visitor-keys "^2.0.0" - "@typescript-eslint/visitor-keys@6.7.4": version "6.7.4" resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.7.4.tgz#80dfecf820fc67574012375859085f91a4dff043" @@ -992,13 +948,6 @@ debug@^4.1.0, debug@^4.1.1, debug@^4.3.2, debug@^4.3.4: dependencies: ms "2.1.2" -debug@^4.3.1: - version "4.3.2" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.2.tgz#f0a49c18ac8779e31d4a0c6029dfb76873c7428b" - integrity sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw== - dependencies: - ms "2.1.2" - deep-is@^0.1.3: version "0.1.4" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" @@ -1226,11 +1175,6 @@ eslint-scope@^7.2.2: esrecurse "^4.3.0" estraverse "^5.2.0" -eslint-visitor-keys@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" - integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== - eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4.3: version "3.4.3" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" @@ -1327,17 +1271,6 @@ fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== -fast-glob@^3.1.1: - version "3.2.7" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.7.tgz#fd6cb7a2d7e9aa7a7846111e85a196d6b2f766a1" - integrity sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q== - dependencies: - "@nodelib/fs.stat" "^2.0.2" - "@nodelib/fs.walk" "^1.2.3" - glob-parent "^5.1.2" - merge2 "^1.3.0" - micromatch "^4.0.4" - fast-glob@^3.2.9: version "3.3.1" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.1.tgz#784b4e897340f3dbbef17413b3f11acf03c874c4" @@ -1549,18 +1482,6 @@ globalthis@^1.0.3: dependencies: define-properties "^1.1.3" -globby@^11.0.3: - version "11.0.4" - resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.4.tgz#2cbaff77c2f2a62e71e9b2813a67b97a3a3001a5" - integrity sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg== - dependencies: - array-union "^2.1.0" - dir-glob "^3.0.1" - fast-glob "^3.1.1" - ignore "^5.1.4" - merge2 "^1.3.0" - slash "^3.0.0" - globby@^11.1.0: version "11.1.0" resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" @@ -1649,11 +1570,6 @@ home-assistant-js-websocket@^8.0.0: resolved "https://registry.yarnpkg.com/home-assistant-js-websocket/-/home-assistant-js-websocket-8.2.0.tgz#3505bf004cc3026c5d0cfdae5c031a44b0fcb01b" integrity sha512-B163iuvC1hsObkbSXm89JfjjOguyQXSQeQsGf6KQblUj9QwMgFkQt13TiCYjeFFTMzhQ8Qj3/gKx/6MnSeYUqA== -ignore@^5.1.4: - version "5.1.8" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57" - integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw== - ignore@^5.2.0, ignore@^5.2.4: version "5.2.4" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324" @@ -2604,11 +2520,6 @@ tsconfig-paths@^3.14.2: minimist "^1.2.6" strip-bom "^3.0.0" -tslib@^1.8.1: - version "1.14.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" - integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== - tslib@^2.1.0: version "2.4.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3" @@ -2619,13 +2530,6 @@ tslib@^2.6.2: resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== -tsutils@^3.21.0: - version "3.21.0" - resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" - integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA== - dependencies: - tslib "^1.8.1" - type-check@^0.4.0, type-check@~0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" From f547cf4fefe9c4a2914e12376fa7ec9ee689f7ab Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 13 Oct 2023 06:21:11 +0000 Subject: [PATCH 05/11] chore(deps): update dependency @rollup/plugin-json to v6 --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index cbcd2431..fa0a2348 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "@babel/plugin-proposal-class-properties": "^7.14.5", "@babel/plugin-proposal-decorators": "^7.14.5", "@rollup/plugin-image": "^3.0.0", - "@rollup/plugin-json": "^5.0.0", + "@rollup/plugin-json": "^6.0.0", "@types/luxon": "^3.3.2", "@typescript-eslint/eslint-plugin": "^6.4.0", "@typescript-eslint/parser": "^6.0.0", diff --git a/yarn.lock b/yarn.lock index 12592166..5ca6d88a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -500,10 +500,10 @@ "@rollup/pluginutils" "^5.0.1" mini-svg-data-uri "^1.4.4" -"@rollup/plugin-json@^5.0.0": - version "5.0.2" - resolved "https://registry.yarnpkg.com/@rollup/plugin-json/-/plugin-json-5.0.2.tgz#d7dbbac62ff74064876b3e5d0d863cb3ad1e7cdb" - integrity sha512-D1CoOT2wPvadWLhVcmpkDnesTzjhNIQRWLsc3fA49IFOP2Y84cFOOJ+nKGYedvXHKUsPeq07HR4hXpBBr+CHlA== +"@rollup/plugin-json@^6.0.0": + version "6.0.1" + resolved "https://registry.yarnpkg.com/@rollup/plugin-json/-/plugin-json-6.0.1.tgz#7e2efcf5ed549963f1444e010611d22f463931c0" + integrity sha512-RgVfl5hWMkxN1h/uZj8FVESvPuBJ/uf6ly6GTj0GONnkfoBN5KC0MSz+PN2OLDgYXMhtG0mWpTrkiOjoxAIevw== dependencies: "@rollup/pluginutils" "^5.0.1" From c0085b18ae5cf63cc0a53f805bacb898af5aface Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 7 Oct 2023 11:42:28 +0000 Subject: [PATCH 06/11] chore(deps): update dependency rollup to v4 --- package.json | 3 +- yarn.lock | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 82 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index fa0a2348..7860832e 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "repository": "git@github.com:pkissling/clock-weather-card.git", "author": "Patrick Kissling ", "license": "MIT", + "type": "module", "dependencies": { "@lit-labs/scoped-registry-mixin": "^1.0.0", "custom-card-helpers": "^1.8.0", @@ -35,7 +36,7 @@ "eslint-plugin-import": "^2.25.2", "eslint-plugin-n": "^15.0.0 || ^16.0.0 ", "eslint-plugin-promise": "^6.0.0", - "rollup": "^2.58.0", + "rollup": "^4.0.0", "rollup-plugin-babel": "^4.4.0", "rollup-plugin-commonjs": "^10.1.0", "rollup-plugin-gzip": "^3.0.1", diff --git a/yarn.lock b/yarn.lock index 5ca6d88a..d45d511e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -524,6 +524,66 @@ estree-walker "^2.0.2" picomatch "^2.3.1" +"@rollup/rollup-android-arm-eabi@4.0.2": + version "4.0.2" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.0.2.tgz#c990ff2c4317b477121272fce8ee4075bbc36b67" + integrity sha512-xDvk1pT4vaPU2BOLy0MqHMdYZyntqpaBf8RhBiezlqG9OjY8F50TyctHo8znigYKd+QCFhCmlmXHOL/LoaOl3w== + +"@rollup/rollup-android-arm64@4.0.2": + version "4.0.2" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.0.2.tgz#46327be24d75c7c53b7b065af29a62688eae3f1b" + integrity sha512-lqCglytY3E6raze27DD9VQJWohbwCxzqs9aSHcj5X/8hJpzZfNdbsr4Ja9Hqp6iPyF53+5PtPx0pKRlkSvlHZg== + +"@rollup/rollup-darwin-arm64@4.0.2": + version "4.0.2" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.0.2.tgz#072f9133f6ff7a4fcb06ed9b718c6882964d52bb" + integrity sha512-nkBKItS6E6CCzvRwgiKad+j+1ibmL7SIInj7oqMWmdkCjiSX6VeVZw2mLlRKIUL+JjsBgpATTfo7BiAXc1v0jA== + +"@rollup/rollup-darwin-x64@4.0.2": + version "4.0.2" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.0.2.tgz#3c6988acf7a95b909801e92d905dfbc7f7e73542" + integrity sha512-vX2C8xvWPIbpEgQht95+dY6BReKAvtDgPDGi0XN0kWJKkm4WdNmq5dnwscv/zxvi+n6jUTBhs6GtpkkWT4q8Gg== + +"@rollup/rollup-linux-arm-gnueabihf@4.0.2": + version "4.0.2" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.0.2.tgz#4797cb038d0cb4beecaa56fdb1769aac4253b02a" + integrity sha512-DVFIfcHOjgmeHOAqji4xNz2wczt1Bmzy9MwBZKBa83SjBVO/i38VHDR+9ixo8QpBOiEagmNw12DucG+v55tCrg== + +"@rollup/rollup-linux-arm64-gnu@4.0.2": + version "4.0.2" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.0.2.tgz#dfc5b1b3f1e991278ff40a63e24e84e28164b34f" + integrity sha512-GCK/a9ItUxPI0V5hQEJjH4JtOJO90GF2Hja7TO+EZ8rmkGvEi8/ZDMhXmcuDpQT7/PWrTT9RvnG8snMd5SrhBQ== + +"@rollup/rollup-linux-arm64-musl@4.0.2": + version "4.0.2" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.0.2.tgz#bbdda4472d932f4c275b97f6f826b4648d458ab6" + integrity sha512-cLuBp7rOjIB1R2j/VazjCmHC7liWUur2e9mFflLJBAWCkrZ+X0+QwHLvOQakIwDymungzAKv6W9kHZnTp/Mqrg== + +"@rollup/rollup-linux-x64-gnu@4.0.2": + version "4.0.2" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.0.2.tgz#94dd9d135df6e38d4fd2ca24f5a2ace3389696fe" + integrity sha512-Zqw4iVnJr2naoyQus0yLy7sLtisCQcpdMKUCeXPBjkJtpiflRime/TMojbnl8O3oxUAj92mxr+t7im/RbgA20w== + +"@rollup/rollup-linux-x64-musl@4.0.2": + version "4.0.2" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.0.2.tgz#88246776c2b45b55e5d56a070eac592d10280d59" + integrity sha512-jJRU9TyUD/iMqjf8aLAp7XiN3pIj5v6Qcu+cdzBfVTKDD0Fvua4oUoK8eVJ9ZuKBEQKt3WdlcwJXFkpmMLk6kg== + +"@rollup/rollup-win32-arm64-msvc@4.0.2": + version "4.0.2" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.0.2.tgz#853acc6ec7eb573fba1161c5707d7e1d1c12b3b0" + integrity sha512-ZkS2NixCxHKC4zbOnw64ztEGGDVIYP6nKkGBfOAxEPW71Sji9v8z3yaHNuae/JHPwXA+14oDefnOuVfxl59SmQ== + +"@rollup/rollup-win32-ia32-msvc@4.0.2": + version "4.0.2" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.0.2.tgz#da89fe49f5384235ccb846e93b2c316551f2474a" + integrity sha512-3SKjj+tvnZ0oZq2BKB+fI+DqYI83VrRzk7eed8tJkxeZ4zxJZcLSE8YDQLYGq1tZAnAX+H076RHHB4gTZXsQzw== + +"@rollup/rollup-win32-x64-msvc@4.0.2": + version "4.0.2" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.0.2.tgz#4c3ba41643cc1c83ddcaf9d864bf16f612f909cb" + integrity sha512-MBdJIOxRauKkry7t2q+rTHa3aWjVez2eioWg+etRVS3dE4tChhmt5oqZYr48R6bPmcwEhxQr96gVRfeQrLbqng== + "@types/estree@0.0.39": version "0.0.39" resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f" @@ -2300,13 +2360,32 @@ rollup-pluginutils@^2.8.1: dependencies: estree-walker "^0.6.1" -rollup@^2.58.0, rollup@^2.63.0: +rollup@^2.63.0: version "2.79.1" resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.79.1.tgz#bedee8faef7c9f93a2647ac0108748f497f081c7" integrity sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw== optionalDependencies: fsevents "~2.3.2" +rollup@^4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-4.0.2.tgz#e0e452d30882555d5bac9d81d78e8aa3bed8a345" + integrity sha512-MCScu4usMPCeVFaiLcgMDaBQeYi1z6vpWxz0r0hq0Hv77Y2YuOTZldkuNJ54BdYBH3e+nkrk6j0Rre/NLDBYzg== + optionalDependencies: + "@rollup/rollup-android-arm-eabi" "4.0.2" + "@rollup/rollup-android-arm64" "4.0.2" + "@rollup/rollup-darwin-arm64" "4.0.2" + "@rollup/rollup-darwin-x64" "4.0.2" + "@rollup/rollup-linux-arm-gnueabihf" "4.0.2" + "@rollup/rollup-linux-arm64-gnu" "4.0.2" + "@rollup/rollup-linux-arm64-musl" "4.0.2" + "@rollup/rollup-linux-x64-gnu" "4.0.2" + "@rollup/rollup-linux-x64-musl" "4.0.2" + "@rollup/rollup-win32-arm64-msvc" "4.0.2" + "@rollup/rollup-win32-ia32-msvc" "4.0.2" + "@rollup/rollup-win32-x64-msvc" "4.0.2" + fsevents "~2.3.2" + run-parallel@^1.1.9: version "1.2.0" resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" From 40f142ba2c1678804227101787deeaf093a6487a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 13 Oct 2023 07:00:08 +0000 Subject: [PATCH 07/11] chore(deps): replace dependency rollup-plugin-node-resolve with @rollup/plugin-node-resolve ^6.0.0 --- package.json | 2 +- rollup.config.dev.js | 4 ++-- rollup.config.js | 6 +++--- yarn.lock | 38 ++++++++++++++++++++++++++------------ 4 files changed, 32 insertions(+), 18 deletions(-) diff --git a/package.json b/package.json index 7860832e..5e7ff74f 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "rollup-plugin-babel": "^4.4.0", "rollup-plugin-commonjs": "^10.1.0", "rollup-plugin-gzip": "^3.0.1", - "rollup-plugin-node-resolve": "^5.2.0", + "@rollup/plugin-node-resolve": "^6.0.0", "rollup-plugin-serve": "^2.0.0", "rollup-plugin-terser": "^7.0.2", "rollup-plugin-typescript2": "^0.36.0", diff --git a/rollup.config.dev.js b/rollup.config.dev.js index 911a8edb..b4754d12 100644 --- a/rollup.config.dev.js +++ b/rollup.config.dev.js @@ -1,4 +1,4 @@ -import resolve from 'rollup-plugin-node-resolve' +import nodeResolve from '@rollup/plugin-node-resolve' import typescript from 'rollup-plugin-typescript2' import babel from 'rollup-plugin-babel' import serve from 'rollup-plugin-serve' @@ -14,7 +14,7 @@ export default { }, plugins: [ image(), - resolve(), + nodeResolve(), typescript(), json(), babel({ diff --git a/rollup.config.js b/rollup.config.js index 998dd59c..2ccacd4d 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,8 +1,8 @@ import typescript from 'rollup-plugin-typescript2' import commonjs from 'rollup-plugin-commonjs' -import nodeResolve from 'rollup-plugin-node-resolve' +import nodeResolve from '@rollup/plugin-node-resolve' import babel from 'rollup-plugin-babel' -import { terser } from 'rollup-plugin-terser'; +import { terser } from 'rollup-plugin-terser' import json from '@rollup/plugin-json' import image from '@rollup/plugin-image' import gzipPlugin from 'rollup-plugin-gzip' @@ -16,7 +16,7 @@ export default [ }, plugins: [ image(), - nodeResolve({}), + nodeResolve(), commonjs(), typescript(), json(), diff --git a/yarn.lock b/yarn.lock index d45d511e..f1e53942 100644 --- a/yarn.lock +++ b/yarn.lock @@ -507,6 +507,26 @@ dependencies: "@rollup/pluginutils" "^5.0.1" +"@rollup/plugin-node-resolve@^6.0.0": + version "6.1.0" + resolved "https://registry.yarnpkg.com/@rollup/plugin-node-resolve/-/plugin-node-resolve-6.1.0.tgz#0d2909f4bf606ae34d43a9bc8be06a9b0c850cf0" + integrity sha512-Cv7PDIvxdE40SWilY5WgZpqfIUEaDxFxs89zCAHjqyRwlTSuql4M5hjIuc5QYJkOH0/vyiyNXKD72O+LhRipGA== + dependencies: + "@rollup/pluginutils" "^3.0.0" + "@types/resolve" "0.0.8" + builtin-modules "^3.1.0" + is-module "^1.0.0" + resolve "^1.11.1" + +"@rollup/pluginutils@^3.0.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-3.1.0.tgz#706b4524ee6dc8b103b3c995533e5ad680c02b9b" + integrity sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg== + dependencies: + "@types/estree" "0.0.39" + estree-walker "^1.0.1" + picomatch "^2.2.2" + "@rollup/pluginutils@^4.1.2": version "4.2.1" resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-4.2.1.tgz#e6c6c3aba0744edce3fb2074922d3776c0af2a6d" @@ -1316,6 +1336,11 @@ estree-walker@^0.6.1: resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.6.1.tgz#53049143f40c6eb918b23671d1fe3219f3a1b362" integrity sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w== +estree-walker@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-1.0.1.tgz#31bc5d612c96b704106b477e6dd5d8aa138cb700" + integrity sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg== + estree-walker@^2.0.1, estree-walker@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-2.0.2.tgz#52f010178c2a4c117a7757cfe942adb7d2da4cac" @@ -2313,17 +2338,6 @@ rollup-plugin-gzip@^3.0.1: resolved "https://registry.yarnpkg.com/rollup-plugin-gzip/-/rollup-plugin-gzip-3.1.0.tgz#ce439ba9cd212c0e2c131d91e6214044e8972485" integrity sha512-PFS9s6/w6dCra6/Z8PGD+ug3aaaqKLDCbr5y1Ek71Wd4rQSmMnOqCIIMgwbYxZ9A/gjP3pCN6rA4pAG47jxF0w== -rollup-plugin-node-resolve@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-5.2.0.tgz#730f93d10ed202473b1fb54a5997a7db8c6d8523" - integrity sha512-jUlyaDXts7TW2CqQ4GaO5VJ4PwwaV8VUGA7+km3n6k6xtOEacf61u0VXwN80phY/evMcaS+9eIeJ9MOyDxt5Zw== - dependencies: - "@types/resolve" "0.0.8" - builtin-modules "^3.1.0" - is-module "^1.0.0" - resolve "^1.11.1" - rollup-pluginutils "^2.8.1" - rollup-plugin-serve@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/rollup-plugin-serve/-/rollup-plugin-serve-2.0.2.tgz#f49958b0725c9bd2fef976d23025a361e20bdee2" @@ -2422,7 +2436,7 @@ semver@^6.0.0, semver@^6.3.1: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.0.0, semver@^7.3.5, semver@^7.5.3, semver@^7.5.4: +semver@^7.0.0, semver@^7.5.3, semver@^7.5.4: version "7.5.4" resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== From 5c666ea45c8e59befb556cde8254bc549bac0f41 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 13 Oct 2023 07:15:18 +0000 Subject: [PATCH 08/11] chore(deps): replace dependency rollup-plugin-babel with @rollup/plugin-babel ^5.0.0 --- package.json | 2 +- rollup.config.dev.js | 3 ++- rollup.config.js | 3 ++- yarn.lock | 41 ++++++++++------------------------------- 4 files changed, 15 insertions(+), 34 deletions(-) diff --git a/package.json b/package.json index 5e7ff74f..e130138d 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "eslint-plugin-n": "^15.0.0 || ^16.0.0 ", "eslint-plugin-promise": "^6.0.0", "rollup": "^4.0.0", - "rollup-plugin-babel": "^4.4.0", + "@rollup/plugin-babel": "^5.0.0", "rollup-plugin-commonjs": "^10.1.0", "rollup-plugin-gzip": "^3.0.1", "@rollup/plugin-node-resolve": "^6.0.0", diff --git a/rollup.config.dev.js b/rollup.config.dev.js index b4754d12..4bd21f60 100644 --- a/rollup.config.dev.js +++ b/rollup.config.dev.js @@ -1,6 +1,6 @@ import nodeResolve from '@rollup/plugin-node-resolve' import typescript from 'rollup-plugin-typescript2' -import babel from 'rollup-plugin-babel' +import { babel } from '@rollup/plugin-babel' import serve from 'rollup-plugin-serve' import { terser } from 'rollup-plugin-terser' import json from '@rollup/plugin-json' @@ -19,6 +19,7 @@ export default { json(), babel({ exclude: 'node_modules/**', + babelHelpers: 'bundled' }), terser(), serve({ diff --git a/rollup.config.js b/rollup.config.js index 2ccacd4d..dc8e6157 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,7 +1,7 @@ import typescript from 'rollup-plugin-typescript2' import commonjs from 'rollup-plugin-commonjs' import nodeResolve from '@rollup/plugin-node-resolve' -import babel from 'rollup-plugin-babel' +import { babel } from '@rollup/plugin-babel' import { terser } from 'rollup-plugin-terser' import json from '@rollup/plugin-json' import image from '@rollup/plugin-image' @@ -22,6 +22,7 @@ export default [ json(), babel({ exclude: 'node_modules/**', + babelHelpers: 'bundled' }), terser(), gzipPlugin() diff --git a/yarn.lock b/yarn.lock index f1e53942..79593744 100644 --- a/yarn.lock +++ b/yarn.lock @@ -126,14 +126,7 @@ dependencies: "@babel/types" "^7.23.0" -"@babel/helper-module-imports@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.0.0.tgz#96081b7111e486da4d2cd971ad1a4fe216cc2e3d" - integrity sha512-aP/hlLq01DWNEiDg4Jn23i+CXxW/owM4WpDLFUbpjxe4NS3BhLVZQ5i7E0ZrxuQ/vwekIeciyamgB1UIYxxM6A== - dependencies: - "@babel/types" "^7.0.0" - -"@babel/helper-module-imports@^7.22.15": +"@babel/helper-module-imports@^7.10.4", "@babel/helper-module-imports@^7.22.15": version "7.22.15" resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz#16146307acdc40cc00c3b2c647713076464bdbf0" integrity sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w== @@ -296,15 +289,6 @@ debug "^4.1.0" globals "^11.1.0" -"@babel/types@^7.0.0": - version "7.5.5" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.5.5.tgz#97b9f728e182785909aa4ab56264f090a028d18a" - integrity sha512-s63F9nJioLqOlW3UkyMd+BYhXt44YuaFm/VV0VwuteqjYwRrObkU7ra9pY4wAJR3oXi8hJrMcrcJdO/HH33vtw== - dependencies: - esutils "^2.0.2" - lodash "^4.17.13" - to-fast-properties "^2.0.0" - "@babel/types@^7.22.15", "@babel/types@^7.22.5", "@babel/types@^7.23.0": version "7.23.0" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.23.0.tgz#8c1f020c9df0e737e4e247c0619f58c68458aaeb" @@ -492,6 +476,14 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" +"@rollup/plugin-babel@^5.0.0": + version "5.3.1" + resolved "https://registry.yarnpkg.com/@rollup/plugin-babel/-/plugin-babel-5.3.1.tgz#04bc0608f4aa4b2e4b1aebf284344d0f68fda283" + integrity sha512-WFfdLWU/xVWKeRQnKmIAQULUI7Il0gZnBIH/ZFO069wYIfPu+8zrfp/KMW0atmELoRDq8FbiP3VCss9MhCut7Q== + dependencies: + "@babel/helper-module-imports" "^7.10.4" + "@rollup/pluginutils" "^3.1.0" + "@rollup/plugin-image@^3.0.0": version "3.0.3" resolved "https://registry.yarnpkg.com/@rollup/plugin-image/-/plugin-image-3.0.3.tgz#025b557180bae20f2349ff5130ef2114169feaac" @@ -518,7 +510,7 @@ is-module "^1.0.0" resolve "^1.11.1" -"@rollup/pluginutils@^3.0.0": +"@rollup/pluginutils@^3.0.0", "@rollup/pluginutils@^3.1.0": version "3.1.0" resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-3.1.0.tgz#706b4524ee6dc8b103b3c995533e5ad680c02b9b" integrity sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg== @@ -1978,11 +1970,6 @@ lodash.merge@^4.6.2: resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== -lodash@^4.17.13: - version "4.17.21" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" - integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== - lru-cache@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" @@ -2314,14 +2301,6 @@ rimraf@^3.0.2: dependencies: glob "^7.1.3" -rollup-plugin-babel@^4.4.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/rollup-plugin-babel/-/rollup-plugin-babel-4.4.0.tgz#d15bd259466a9d1accbdb2fe2fff17c52d030acb" - integrity sha512-Lek/TYp1+7g7I+uMfJnnSJ7YWoD58ajo6Oarhlex7lvUce+RCKRuGRSgztDO3/MF/PuGKmUL5iTHKf208UNszw== - dependencies: - "@babel/helper-module-imports" "^7.0.0" - rollup-pluginutils "^2.8.1" - rollup-plugin-commonjs@^10.1.0: version "10.1.0" resolved "https://registry.yarnpkg.com/rollup-plugin-commonjs/-/rollup-plugin-commonjs-10.1.0.tgz#417af3b54503878e084d127adf4d1caf8beb86fb" From 2b034d3fefc0230221e79266c24479b7b0a638e2 Mon Sep 17 00:00:00 2001 From: Patrick Kissling Date: Fri, 13 Oct 2023 09:16:24 +0200 Subject: [PATCH 09/11] Run renovate every day --- renovate.json | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/renovate.json b/renovate.json index 427e8d89..1fa7250c 100644 --- a/renovate.json +++ b/renovate.json @@ -3,7 +3,6 @@ "extends": [ "config:base" ], - "timezone": "Europe/Berlin", "packageRules": [ { "matchUpdateTypes": [ @@ -15,8 +14,5 @@ ], "groupName": "minor-dependencies" } - ], - "schedule": [ - "before 9am on monday" ] -} \ No newline at end of file +} From 8da9b7a2ee0c224f49fc7cc89aa0a7963c0a0920 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 13 Oct 2023 07:17:02 +0000 Subject: [PATCH 10/11] chore(deps): update minor-dependencies --- yarn.lock | 170 +++++++++++++++++++++++++++--------------------------- 1 file changed, 85 insertions(+), 85 deletions(-) diff --git a/yarn.lock b/yarn.lock index 79593744..ddc87afb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -31,24 +31,24 @@ chalk "^2.4.2" "@babel/compat-data@^7.22.9": - version "7.22.20" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.22.20.tgz#8df6e96661209623f1975d66c35ffca66f3306d0" - integrity sha512-BQYjKbpXjoXwFW5jGqiizJQQT/aC7pFm9Ok1OWssonuguICi264lbgMzRp2ZMmRSlfkX6DsWDDcsrctK8Rwfiw== + version "7.23.2" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.23.2.tgz#6a12ced93455827037bfb5ed8492820d60fc32cc" + integrity sha512-0S9TQMmDHlqAZ2ITT95irXKfxN9bncq8ZCoJhun3nHL/lLUxd2NKBJYoNGWH7S0hz6fRQwWlAWn/ILM0C70KZQ== "@babel/core@^7.15.0": - version "7.23.0" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.23.0.tgz#f8259ae0e52a123eb40f552551e647b506a94d83" - integrity sha512-97z/ju/Jy1rZmDxybphrBuI+jtJjFVoz7Mr9yUQVVVi+DNZE333uFQeMOqcCIy1x3WYBIbWftUSLmbNXNT7qFQ== + version "7.23.2" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.23.2.tgz#ed10df0d580fff67c5f3ee70fd22e2e4c90a9f94" + integrity sha512-n7s51eWdaWZ3vGT2tD4T7J6eJs3QoBXydv7vkUM06Bf1cbVD2Kc2UrkzhiQwobfV7NwOnQXYL7UBJ5VPU+RGoQ== dependencies: "@ampproject/remapping" "^2.2.0" "@babel/code-frame" "^7.22.13" "@babel/generator" "^7.23.0" "@babel/helper-compilation-targets" "^7.22.15" "@babel/helper-module-transforms" "^7.23.0" - "@babel/helpers" "^7.23.0" + "@babel/helpers" "^7.23.2" "@babel/parser" "^7.23.0" "@babel/template" "^7.22.15" - "@babel/traverse" "^7.23.0" + "@babel/traverse" "^7.23.2" "@babel/types" "^7.23.0" convert-source-map "^2.0.0" debug "^4.1.0" @@ -206,13 +206,13 @@ resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.22.15.tgz#694c30dfa1d09a6534cdfcafbe56789d36aba040" integrity sha512-bMn7RmyFjY/mdECUbgn9eoSY4vqvacUnS9i9vGAGttgFWesO6B4CYWA7XlpbWgBt71iv/hfbPlynohStqnu5hA== -"@babel/helpers@^7.23.0": - version "7.23.1" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.23.1.tgz#44e981e8ce2b9e99f8f0b703f3326a4636c16d15" - integrity sha512-chNpneuK18yW5Oxsr+t553UZzzAs3aZnFm4bxhebsNTeshrC95yA7l5yl7GBAG+JG1rF0F7zzD2EixK9mWSDoA== +"@babel/helpers@^7.23.2": + version "7.23.2" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.23.2.tgz#2832549a6e37d484286e15ba36a5330483cac767" + integrity sha512-lzchcp8SjTSVe/fPmLwtWVBFC7+Tbn8LGHDVfDp9JGxpAY5opSaEFgt8UQvrnECWOTdji2mOWMz1rOhkHscmGQ== dependencies: "@babel/template" "^7.22.15" - "@babel/traverse" "^7.23.0" + "@babel/traverse" "^7.23.2" "@babel/types" "^7.23.0" "@babel/highlight@^7.14.5": @@ -247,9 +247,9 @@ "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-proposal-decorators@^7.14.5": - version "7.23.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.23.0.tgz#66d9014173b3267a9ced3e69935138bc64ffb5c8" - integrity sha512-kYsT+f5ARWF6AdFmqoEEp+hpqxEB8vGmRWfw2aj78M2vTwS2uHW91EF58iFm1Z9U8Y/RrLu2XKJn46P9ca1b0w== + version "7.23.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.23.2.tgz#0b345a5754f48309fa50b7cd99075ef0295b12c8" + integrity sha512-eR0gJQc830fJVGz37oKLvt9W9uUIQSAovUl0e9sJ3YeO09dlcoBVYD3CLrjCj4qHdXmfiyTyFt8yeQYSN5fxLg== dependencies: "@babel/helper-create-class-features-plugin" "^7.22.15" "@babel/helper-plugin-utils" "^7.22.5" @@ -273,10 +273,10 @@ "@babel/parser" "^7.22.15" "@babel/types" "^7.22.15" -"@babel/traverse@^7.23.0": - version "7.23.0" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.23.0.tgz#18196ddfbcf4ccea324b7f6d3ada00d8c5a99c53" - integrity sha512-t/QaEvyIoIkwzpiZ7aoSKK8kObQYeF7T2v+dazAYCb8SXtp58zEVkWW7zAnju8FNKNdr4ScAOEDmMItbyOmEYw== +"@babel/traverse@^7.23.2": + version "7.23.2" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.23.2.tgz#329c7a06735e144a506bdb2cad0268b7f46f4ad8" + integrity sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw== dependencies: "@babel/code-frame" "^7.22.13" "@babel/generator" "^7.23.0" @@ -436,19 +436,19 @@ "@jridgewell/sourcemap-codec" "^1.4.14" "@lit-labs/scoped-registry-mixin@^1.0.0": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@lit-labs/scoped-registry-mixin/-/scoped-registry-mixin-1.0.1.tgz#0ad266c029f1eb385711d2cd26252baadf145a5d" - integrity sha512-7aKnBKb5izcTjICO4VdeQLRYpZoB8FepJjG7TmE2oe0cU8cb4MUA4NFCjze+vbE+wP/55xv4dAMFOuJN9EG26w== + version "1.0.2" + resolved "https://registry.yarnpkg.com/@lit-labs/scoped-registry-mixin/-/scoped-registry-mixin-1.0.2.tgz#39e23896ed301ffd00d0dc8cca0c7d1912bcf795" + integrity sha512-fPJ68KGkic1i6euSze/gmrtUqS4lGnIKpG5cIdIDDTHDd7wetOolrPdngjX3I7ng/nyZ0GXGaOTyQcVMaNMrpw== dependencies: - "@lit/reactive-element" "^1.0.0" - lit "^2.0.0" + "@lit/reactive-element" "^2.0.0" + lit "^3.0.0" "@lit-labs/ssr-dom-shim@^1.0.0", "@lit-labs/ssr-dom-shim@^1.1.0": - version "1.1.1" - resolved "https://registry.yarnpkg.com/@lit-labs/ssr-dom-shim/-/ssr-dom-shim-1.1.1.tgz#64df34e2f12e68e78ac57e571d25ec07fa460ca9" - integrity sha512-kXOeFbfCm4fFf2A3WwVEeQj55tMZa8c8/f9AKHMobQMkzNUfUj+antR3fRPaZJawsa1aZiP/Da3ndpZrwEe4rQ== + version "1.1.2" + resolved "https://registry.yarnpkg.com/@lit-labs/ssr-dom-shim/-/ssr-dom-shim-1.1.2.tgz#d693d972974a354034454ec1317eb6afd0b00312" + integrity sha512-jnOD+/+dSrfTWYfSXBXlo5l5f0q1UuJo3tkbMDCYA2lKUYq79jaxqtGEvnRoh049nt1vdo1+45RinipU6FGY2g== -"@lit/reactive-element@1.6.3", "@lit/reactive-element@^1.0.0", "@lit/reactive-element@^1.3.0", "@lit/reactive-element@^1.6.0": +"@lit/reactive-element@1.6.3", "@lit/reactive-element@^1.3.0", "@lit/reactive-element@^1.6.0", "@lit/reactive-element@^2.0.0": version "1.6.3" resolved "https://registry.yarnpkg.com/@lit/reactive-element/-/reactive-element-1.6.3.tgz#25b4eece2592132845d303e091bad9b04cdcfe03" integrity sha512-QuTgnG52Poic7uM1AN5yJ09QMe0O28e10XzSvWDz02TJiiKee4stsiownEIadWm8nYzyDAyT+gKzUoZmiWQtsQ== @@ -644,15 +644,15 @@ integrity sha512-IDaobHimLQhjwsQ/NMwRVfa/yL7L/wriQPMhw1ZJall0KX6E1oxk29XMDeilW5qTIg5aoiqf5Udy8U/51aNoQQ== "@typescript-eslint/eslint-plugin@^6.4.0": - version "6.7.4" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.7.4.tgz#057338df21b6062c2f2fc5999fbea8af9973ac6d" - integrity sha512-DAbgDXwtX+pDkAHwiGhqP3zWUGpW49B7eqmgpPtg+BKJXwdct79ut9+ifqOFPJGClGKSHXn2PTBatCnldJRUoA== + version "6.7.5" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.7.5.tgz#f4024b9f63593d0c2b5bd6e4ca027e6f30934d4f" + integrity sha512-JhtAwTRhOUcP96D0Y6KYnwig/MRQbOoLGXTON2+LlyB/N35SP9j1boai2zzwXb7ypKELXMx3DVk9UTaEq1vHEw== dependencies: "@eslint-community/regexpp" "^4.5.1" - "@typescript-eslint/scope-manager" "6.7.4" - "@typescript-eslint/type-utils" "6.7.4" - "@typescript-eslint/utils" "6.7.4" - "@typescript-eslint/visitor-keys" "6.7.4" + "@typescript-eslint/scope-manager" "6.7.5" + "@typescript-eslint/type-utils" "6.7.5" + "@typescript-eslint/utils" "6.7.5" + "@typescript-eslint/visitor-keys" "6.7.5" debug "^4.3.4" graphemer "^1.4.0" ignore "^5.2.4" @@ -661,71 +661,71 @@ ts-api-utils "^1.0.1" "@typescript-eslint/parser@^6.0.0", "@typescript-eslint/parser@^6.4.0": - version "6.7.4" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.7.4.tgz#23d1dd4fe5d295c7fa2ab651f5406cd9ad0bd435" - integrity sha512-I5zVZFY+cw4IMZUeNCU7Sh2PO5O57F7Lr0uyhgCJmhN/BuTlnc55KxPonR4+EM3GBdfiCyGZye6DgMjtubQkmA== - dependencies: - "@typescript-eslint/scope-manager" "6.7.4" - "@typescript-eslint/types" "6.7.4" - "@typescript-eslint/typescript-estree" "6.7.4" - "@typescript-eslint/visitor-keys" "6.7.4" + version "6.7.5" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.7.5.tgz#8d7ca3d1fbd9d5a58cc4d30b2aa797a760137886" + integrity sha512-bIZVSGx2UME/lmhLcjdVc7ePBwn7CLqKarUBL4me1C5feOd663liTGjMBGVcGr+BhnSLeP4SgwdvNnnkbIdkCw== + dependencies: + "@typescript-eslint/scope-manager" "6.7.5" + "@typescript-eslint/types" "6.7.5" + "@typescript-eslint/typescript-estree" "6.7.5" + "@typescript-eslint/visitor-keys" "6.7.5" debug "^4.3.4" -"@typescript-eslint/scope-manager@6.7.4": - version "6.7.4" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.7.4.tgz#a484a17aa219e96044db40813429eb7214d7b386" - integrity sha512-SdGqSLUPTXAXi7c3Ob7peAGVnmMoGzZ361VswK2Mqf8UOYcODiYvs8rs5ILqEdfvX1lE7wEZbLyELCW+Yrql1A== +"@typescript-eslint/scope-manager@6.7.5": + version "6.7.5" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.7.5.tgz#1cf33b991043886cd67f4f3600b8e122fc14e711" + integrity sha512-GAlk3eQIwWOJeb9F7MKQ6Jbah/vx1zETSDw8likab/eFcqkjSD7BI75SDAeC5N2L0MmConMoPvTsmkrg71+B1A== dependencies: - "@typescript-eslint/types" "6.7.4" - "@typescript-eslint/visitor-keys" "6.7.4" + "@typescript-eslint/types" "6.7.5" + "@typescript-eslint/visitor-keys" "6.7.5" -"@typescript-eslint/type-utils@6.7.4": - version "6.7.4" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-6.7.4.tgz#847cd3b59baf948984499be3e0a12ff07373e321" - integrity sha512-n+g3zi1QzpcAdHFP9KQF+rEFxMb2KxtnJGID3teA/nxKHOVi3ylKovaqEzGBbVY2pBttU6z85gp0D00ufLzViQ== +"@typescript-eslint/type-utils@6.7.5": + version "6.7.5" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-6.7.5.tgz#0a65949ec16588d8956f6d967f7d9c84ddb2d72a" + integrity sha512-Gs0qos5wqxnQrvpYv+pf3XfcRXW6jiAn9zE/K+DlmYf6FcpxeNYN0AIETaPR7rHO4K2UY+D0CIbDP9Ut0U4m1g== dependencies: - "@typescript-eslint/typescript-estree" "6.7.4" - "@typescript-eslint/utils" "6.7.4" + "@typescript-eslint/typescript-estree" "6.7.5" + "@typescript-eslint/utils" "6.7.5" debug "^4.3.4" ts-api-utils "^1.0.1" -"@typescript-eslint/types@6.7.4": - version "6.7.4" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.7.4.tgz#5d358484d2be986980c039de68e9f1eb62ea7897" - integrity sha512-o9XWK2FLW6eSS/0r/tgjAGsYasLAnOWg7hvZ/dGYSSNjCh+49k5ocPN8OmG5aZcSJ8pclSOyVKP2x03Sj+RrCA== +"@typescript-eslint/types@6.7.5": + version "6.7.5" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.7.5.tgz#4571320fb9cf669de9a95d9849f922c3af809790" + integrity sha512-WboQBlOXtdj1tDFPyIthpKrUb+kZf2VroLZhxKa/VlwLlLyqv/PwUNgL30BlTVZV1Wu4Asu2mMYPqarSO4L5ZQ== -"@typescript-eslint/typescript-estree@6.7.4": - version "6.7.4" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.7.4.tgz#f2baece09f7bb1df9296e32638b2e1130014ef1a" - integrity sha512-ty8b5qHKatlNYd9vmpHooQz3Vki3gG+3PchmtsA4TgrZBKWHNjWfkQid7K7xQogBqqc7/BhGazxMD5vr6Ha+iQ== +"@typescript-eslint/typescript-estree@6.7.5": + version "6.7.5" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.7.5.tgz#4578de1a26e9f24950f029a4f00d1bfe41f15a39" + integrity sha512-NhJiJ4KdtwBIxrKl0BqG1Ur+uw7FiOnOThcYx9DpOGJ/Abc9z2xNzLeirCG02Ig3vkvrc2qFLmYSSsaITbKjlg== dependencies: - "@typescript-eslint/types" "6.7.4" - "@typescript-eslint/visitor-keys" "6.7.4" + "@typescript-eslint/types" "6.7.5" + "@typescript-eslint/visitor-keys" "6.7.5" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" semver "^7.5.4" ts-api-utils "^1.0.1" -"@typescript-eslint/utils@6.7.4": - version "6.7.4" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-6.7.4.tgz#2236f72b10e38277ee05ef06142522e1de470ff2" - integrity sha512-PRQAs+HUn85Qdk+khAxsVV+oULy3VkbH3hQ8hxLRJXWBEd7iI+GbQxH5SEUSH7kbEoTp6oT1bOwyga24ELALTA== +"@typescript-eslint/utils@6.7.5": + version "6.7.5" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-6.7.5.tgz#ab847b53d6b65e029314b8247c2336843dba81ab" + integrity sha512-pfRRrH20thJbzPPlPc4j0UNGvH1PjPlhlCMq4Yx7EGjV7lvEeGX0U6MJYe8+SyFutWgSHsdbJ3BXzZccYggezA== dependencies: "@eslint-community/eslint-utils" "^4.4.0" "@types/json-schema" "^7.0.12" "@types/semver" "^7.5.0" - "@typescript-eslint/scope-manager" "6.7.4" - "@typescript-eslint/types" "6.7.4" - "@typescript-eslint/typescript-estree" "6.7.4" + "@typescript-eslint/scope-manager" "6.7.5" + "@typescript-eslint/types" "6.7.5" + "@typescript-eslint/typescript-estree" "6.7.5" semver "^7.5.4" -"@typescript-eslint/visitor-keys@6.7.4": - version "6.7.4" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.7.4.tgz#80dfecf820fc67574012375859085f91a4dff043" - integrity sha512-pOW37DUhlTZbvph50x5zZCkFn3xzwkGtNoJHzIM3svpiSkJzwOYr/kVBaXmf+RAQiUDs1AHEZVNPg6UJCJpwRA== +"@typescript-eslint/visitor-keys@6.7.5": + version "6.7.5" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.7.5.tgz#84c68d6ceb5b12d5246b918b84f2b79affd6c2f1" + integrity sha512-3MaWdDZtLlsexZzDSdQWsFQ9l9nL8B80Z4fImSpyllFC/KLqWQRdEcB+gGGO+N3Q2uL40EsG66wZLsohPxNXvg== dependencies: - "@typescript-eslint/types" "6.7.4" + "@typescript-eslint/types" "6.7.5" eslint-visitor-keys "^3.4.1" acorn-jsx@^5.3.2: @@ -919,9 +919,9 @@ callsites@^3.0.0: integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== caniuse-lite@^1.0.30001541: - version "1.0.30001543" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001543.tgz#478a3e9dddbb353c5ab214b0ecb0dbed529ed1d8" - integrity sha512-qxdO8KPWPQ+Zk6bvNpPeQIOH47qZSYdFZd6dXQzb2KzhnSXju4Kd7H1PkSJx6NICSMgo/IhRZRhhfPTHYpJUCA== + version "1.0.30001547" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001547.tgz#d4f92efc488aab3c7f92c738d3977c2a3180472b" + integrity sha512-W7CrtIModMAxobGhz8iXmDfuJiiKg1WADMO/9x7/CLNin5cpSbuBjooyoIUVB5eyCc36QuTVlkVa1iB2S5+/eA== chalk@^2.0.0, chalk@^2.4.2: version "2.4.2" @@ -1065,9 +1065,9 @@ doctrine@^3.0.0: esutils "^2.0.2" electron-to-chromium@^1.4.535: - version "1.4.540" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.540.tgz#c685f2f035e93eb21dd6a9cfe2c735bad8f77401" - integrity sha512-aoCqgU6r9+o9/S7wkcSbmPRFi7OWZWiXS9rtjEd+Ouyu/Xyw5RSq2XN8s5Qp8IaFOLiRrhQCphCIjAxgG3eCAg== + version "1.4.553" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.553.tgz#56fd65afddbd713c52f0e95d0223b3368f520865" + integrity sha512-HiRdtyKS2+VhiXvjhMvvxiMC33FJJqTA5EB2YHgFZW6v7HkK4Q9Ahv2V7O2ZPgAjw+MyCJVMQvigj13H8t+wvA== emojis-list@^3.0.0: version "3.0.0" @@ -1942,7 +1942,7 @@ lit-html@2.8.0, lit-html@^2.8.0: dependencies: "@types/trusted-types" "^2.0.2" -lit@^2.0.0, lit@^2.1.1, lit@^2.1.2: +lit@^2.0.0, lit@^2.1.1, lit@^2.1.2, lit@^3.0.0: version "2.8.0" resolved "https://registry.yarnpkg.com/lit/-/lit-2.8.0.tgz#4d838ae03059bf9cafa06e5c61d8acc0081e974e" integrity sha512-4Sc3OFX9QHOJaHbmTMk28SYgVxLN3ePDjg7hofEft2zWlehFL3LiAuapWc4U/kYwMYJSh2hTCPZ6/LIC7ii0MA== From f57135419b57f81cbb264240f3a3abea6460ceed Mon Sep 17 00:00:00 2001 From: Chris Pinkham Date: Mon, 16 Oct 2023 18:03:34 -0400 Subject: [PATCH 11/11] time_pattern updates based on feedback from pkissling --- README.md | 5 +++-- src/clock-weather-card.ts | 16 +++++++++++++--- src/types.ts | 2 +- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 555bcdd0..4d523bce 100644 --- a/README.md +++ b/README.md @@ -103,6 +103,7 @@ weather_icon_type: line animated_icon: true forecast_rows: 5 locale: en-GB +time_pattern: HH:mm time_format: 24 date_pattern: P hide_today_section: false @@ -127,8 +128,8 @@ time_zone: null | animated_icon | boolean | **Optional** | Whether the large weather icon should be animated | `true` | | forecast_rows | number | **Optional** | The amount of weather forecast rows to show. Depending on `hourly_forecast` each row either corresponds to a day or an hour | `5` | | locale | string[^2] | **Optional** | Language to use for language specific text and date/time formatting. If not provided, falls back to the locale set in HA or, if not set in HA, to `en-GB` | `en-GB` | -| time_format | `24` \| `12` | **Optional** | Format used to display the time. If not provided, falls through to time_pattern format | `null` | -| time_pattern | string | **Optional** | Pattern to use for time formatting. If not provided, falls back to a localized default time formatting. See [luxon](https://moment.github.io/luxon/#/formatting?id=table-of-tokens) for valid tokens | `HH:MM` | +| time_format | `24` \| `12` | **Optional** | Format used to display the time. If not provided, falls back to the default time format of the configured `locale`. This option is ignored if `time_pattern` is set. | `24` | +| time_pattern | string | **Optional** | Pattern to use for time formatting. See [luxon](https://moment.github.io/luxon/#/formatting?id=table-of-tokens) for valid tokens. If not provided, falls back to time_format option. | `null` | | date_pattern | string | **Optional** | Pattern to use for date formatting. If not provided, falls back to a localized default date formatting. See [luxon](https://moment.github.io/luxon/#/formatting?id=table-of-tokens) for valid tokens | `D` | | hide_today_section | boolean | **Optional** | Hides the cards today section (upper section), containing the large weather icon, clock and current date | `false` | | hide_forecast_section | boolean | **Optional** | Hides the cards forecast section (lower section),containing the weather forecast | `false` | diff --git a/src/clock-weather-card.ts b/src/clock-weather-card.ts index b5e9e93f..0b85ac1f 100644 --- a/src/clock-weather-card.ts +++ b/src/clock-weather-card.ts @@ -390,7 +390,7 @@ export class ClockWeatherCard extends LitElement { hourly_forecast: config.hourly_forecast ?? false, animated_icon: config.animated_icon ?? true, time_format: config.time_format?.toString() as '12' | '24' | undefined, - time_pattern: config.time_pattern ?? 'HH:mm', + time_pattern: config.time_pattern ?? undefined, hide_forecast_section: config.hide_forecast_section ?? false, hide_today_section: config.hide_today_section ?? false, hide_clock: config.hide_clock ?? false, @@ -441,13 +441,23 @@ export class ClockWeatherCard extends LitElement { } private time (date: DateTime = this.currentDate): string { - // Honor deprecated time_format setting until removed + if (this.config.time_pattern) { + return this.toZonedDate(date).toFormat(this.config.time_pattern) + } + if (this.config.time_format) { return this.toZonedDate(date) .toFormat(this.config.time_format === '24' ? 'HH:mm' : 'h:mm a') } + if (this.hass.locale.time_format === TimeFormat.am_pm) { + return this.toZonedDate(date).toFormat('h:mm a') + } + + if (this.hass.locale.time_format === TimeFormat.twenty_four) { + return this.toZonedDate(date).toFormat('HH:mm') + } - return this.toZonedDate(date).toFormat(this.config.time_pattern) + return this.toZonedDate(date).toFormat('t') } private getIconAnimationKind (): 'static' | 'animated' { diff --git a/src/types.ts b/src/types.ts index 9e639d9f..2f04a6ef 100644 --- a/src/types.ts +++ b/src/types.ts @@ -40,7 +40,7 @@ export interface MergedClockWeatherCardConfig extends LovelaceCardConfig { forecast_rows: number locale?: string time_format?: '12' | '24' - time_pattern: string + time_pattern?: string date_pattern: string hide_today_section: boolean hide_forecast_section: boolean