From b916bbbc56501c4d71edb286d0b7745a6e6f89b0 Mon Sep 17 00:00:00 2001 From: Don McCurdy Date: Tue, 7 Jan 2025 13:24:41 -0500 Subject: [PATCH] chore(deps): Upgrade to Prettier 3.4 --- examples/01-pure-js/index.html | 2 +- examples/02-react/index.html | 2 +- examples/03-svelte/index.html | 2 +- examples/04-vue/index.html | 2 +- examples/05-spatial-index/index.html | 2 +- examples/components/widgets/category-widget.ts | 14 ++++++++------ examples/components/widgets/histogram-widget.ts | 12 +++++++----- examples/components/widgets/scatter-widget.ts | 12 +++++++----- examples/index.html | 2 +- package.json | 2 +- src/utils.ts | 13 ++++++++----- yarn.lock | 12 ++++++------ 12 files changed, 43 insertions(+), 34 deletions(-) diff --git a/examples/01-pure-js/index.html b/examples/01-pure-js/index.html index 89d8862..2ec1b38 100644 --- a/examples/01-pure-js/index.html +++ b/examples/01-pure-js/index.html @@ -1,4 +1,4 @@ - + diff --git a/examples/02-react/index.html b/examples/02-react/index.html index e3a4c2e..f602de1 100644 --- a/examples/02-react/index.html +++ b/examples/02-react/index.html @@ -1,4 +1,4 @@ - + diff --git a/examples/03-svelte/index.html b/examples/03-svelte/index.html index 8087843..5bc5918 100644 --- a/examples/03-svelte/index.html +++ b/examples/03-svelte/index.html @@ -1,4 +1,4 @@ - + diff --git a/examples/04-vue/index.html b/examples/04-vue/index.html index 3dbf75d..a52620f 100644 --- a/examples/04-vue/index.html +++ b/examples/04-vue/index.html @@ -1,4 +1,4 @@ - + diff --git a/examples/05-spatial-index/index.html b/examples/05-spatial-index/index.html index 7f08a0e..0a02a0b 100644 --- a/examples/05-spatial-index/index.html +++ b/examples/05-spatial-index/index.html @@ -1,4 +1,4 @@ - + diff --git a/examples/components/widgets/category-widget.ts b/examples/components/widgets/category-widget.ts index 8376fe3..63bcd26 100644 --- a/examples/components/widgets/category-widget.ts +++ b/examples/components/widgets/category-widget.ts @@ -34,7 +34,7 @@ export class CategoryWidget extends BaseWidget { protected _chart: echarts.ECharts | null = null; protected _chartRef: Ref = createRef(); - protected declare _filterValues: string[]; + declare protected _filterValues: string[]; constructor() { super(); @@ -73,11 +73,13 @@ export class CategoryWidget extends BaseWidget { override render() { return this._task.render({ pending: () => - cache(html`

${this.header}

-
-
-
${this.caption}
-
`), + cache( + html`

${this.header}

+
+
+
${this.caption}
+
` + ), complete: () => cache(html`

${this.header}

diff --git a/examples/components/widgets/histogram-widget.ts b/examples/components/widgets/histogram-widget.ts index 097d346..1d716cf 100644 --- a/examples/components/widgets/histogram-widget.ts +++ b/examples/components/widgets/histogram-widget.ts @@ -75,11 +75,13 @@ export class HistogramWidget extends BaseWidget { override render() { return this._task.render({ pending: () => - cache(html`

${this.header}

-
-
-
${this.caption}
-
`), + cache( + html`

${this.header}

+
+
+
${this.caption}
+
` + ), complete: () => cache(html`

${this.header}

diff --git a/examples/components/widgets/scatter-widget.ts b/examples/components/widgets/scatter-widget.ts index a3f7e80..e559515 100644 --- a/examples/components/widgets/scatter-widget.ts +++ b/examples/components/widgets/scatter-widget.ts @@ -83,11 +83,13 @@ export class ScatterWidget extends BaseWidget { override render() { return this._task.render({ pending: () => - cache(html`

${this.header}

-
-
-
${this.caption}
-
`), + cache( + html`

${this.header}

+
+
+
${this.caption}
+
` + ), complete: () => cache(html`

${this.header}

diff --git a/examples/index.html b/examples/index.html index 296c17a..61616d5 100644 --- a/examples/index.html +++ b/examples/index.html @@ -1,4 +1,4 @@ - + diff --git a/package.json b/package.json index 5051478..ab2ac6c 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,7 @@ "lit-analyzer": "^1.2.1", "maplibre-gl": "^5.0.0", "microbundle": "^0.15.1", - "prettier": "^2.6.2", + "prettier": "^3.4.2", "react": "^18.3.1", "react-dom": "^18.3.1", "react-map-gl": "^7.1.7", diff --git a/src/utils.ts b/src/utils.ts index 7f6f927..b0265f8 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -49,11 +49,14 @@ export function normalizeObjectKeys>(el: R): R { return el; } - return Object.entries(el as Record).reduce((acc, [key, value]) => { - acc[key.toLowerCase()] = - typeof value === 'object' && value ? normalizeObjectKeys(value) : value; - return acc; - }, {} as Record) as R; + return Object.entries(el as Record).reduce( + (acc, [key, value]) => { + acc[key.toLowerCase()] = + typeof value === 'object' && value ? normalizeObjectKeys(value) : value; + return acc; + }, + {} as Record + ) as R; } /** @internalRemarks Source: @carto/react-core */ diff --git a/yarn.lock b/yarn.lock index 3de8e8d..6b8ec1f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1481,7 +1481,7 @@ __metadata: lit-analyzer: "npm:^1.2.1" maplibre-gl: "npm:^5.0.0" microbundle: "npm:^0.15.1" - prettier: "npm:^2.6.2" + prettier: "npm:^3.4.2" react: "npm:^18.3.1" react-dom: "npm:^18.3.1" react-map-gl: "npm:^7.1.7" @@ -8146,12 +8146,12 @@ __metadata: languageName: node linkType: hard -"prettier@npm:^2.6.2": - version: 2.8.8 - resolution: "prettier@npm:2.8.8" +"prettier@npm:^3.4.2": + version: 3.4.2 + resolution: "prettier@npm:3.4.2" bin: - prettier: bin-prettier.js - checksum: 10c0/463ea8f9a0946cd5b828d8cf27bd8b567345cf02f56562d5ecde198b91f47a76b7ac9eae0facd247ace70e927143af6135e8cf411986b8cb8478784a4d6d724a + prettier: bin/prettier.cjs + checksum: 10c0/99e076a26ed0aba4ebc043880d0f08bbb8c59a4c6641cdee6cdadf2205bdd87aa1d7823f50c3aea41e015e99878d37c58d7b5f0e663bba0ef047f94e36b96446 languageName: node linkType: hard