From 288eac2ab5fa4cb363d519ab1a4dc708cee7611e Mon Sep 17 00:00:00 2001 From: Philipp Rudiger Date: Fri, 22 Mar 2024 14:10:19 +0100 Subject: [PATCH 01/12] Replace existing Comm on open --- ipywidgets_bokeh/src/manager.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ipywidgets_bokeh/src/manager.ts b/ipywidgets_bokeh/src/manager.ts index 11b8e5c..3a4348f 100644 --- a/ipywidgets_bokeh/src/manager.ts +++ b/ipywidgets_bokeh/src/manager.ts @@ -136,8 +136,7 @@ export class WidgetManager extends HTMLManager { this._attach_comm(comm_wrapper, model) } }) - } - if (model != null && !model.comm_live) { + } else { this._attach_comm(comm_wrapper, model) } this._model_objs.delete(msg.content.comm_id) From 61b9cdcc9affeafe011f64e29c2d39ae9867b5af Mon Sep 17 00:00:00 2001 From: Philipp Rudiger Date: Fri, 22 Mar 2024 16:43:56 +0100 Subject: [PATCH 02/12] Look up Comm on kernel --- ipywidgets_bokeh/src/manager.ts | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/ipywidgets_bokeh/src/manager.ts b/ipywidgets_bokeh/src/manager.ts index 3a4348f..6b22f20 100644 --- a/ipywidgets_bokeh/src/manager.ts +++ b/ipywidgets_bokeh/src/manager.ts @@ -3,7 +3,7 @@ import * as outputWidgets from "@jupyter-widgets/output" import * as controls from "@jupyter-widgets/controls" import {HTMLManager} from "@jupyter-widgets/html-manager" -import {WidgetModel, WidgetView, IModelOptions, IClassicComm, shims} from "@jupyter-widgets/base" +import {WidgetModel, WidgetView, IModelOptions, shims} from "@jupyter-widgets/base" import {IState, IManagerState} from "@jupyter-widgets/base-manager" import {Kernel, KernelManager, ServerConnection} from "@jupyterlab/services" @@ -190,14 +190,18 @@ export class WidgetManager extends HTMLManager { } override async _create_comm(target_name: string, model_id: string, data?: any, metadata?: any, - buffers?: ArrayBuffer[] | ArrayBufferView[]): Promise { + buffers?: ArrayBuffer[] | ArrayBufferView[]): Promise { const comm = (() => { const key = target_name + model_id - const comm = this._comms.get(key) - if (comm != null) + let comm = this._comms.get(key) + if (comm != null) { return comm - else { - const comm = this.kernel.createComm(target_name, model_id) + } else { + if (this.kernel.hasComm(model_id) { + comm = (this.kernel as any)._comms.get(model_id) + } else { + comm = this.kernel.createComm(target_name, model_id) + } this._comms.set(key, comm) return comm } From 3f2571e416d418c088d6f6df7da978099b38cefc Mon Sep 17 00:00:00 2001 From: Philipp Rudiger Date: Fri, 22 Mar 2024 16:46:56 +0100 Subject: [PATCH 03/12] Minor cleanup --- ipywidgets_bokeh/src/manager.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/ipywidgets_bokeh/src/manager.ts b/ipywidgets_bokeh/src/manager.ts index 6b22f20..6996cc8 100644 --- a/ipywidgets_bokeh/src/manager.ts +++ b/ipywidgets_bokeh/src/manager.ts @@ -194,17 +194,15 @@ export class WidgetManager extends HTMLManager { const comm = (() => { const key = target_name + model_id let comm = this._comms.get(key) - if (comm != null) { - return comm - } else { - if (this.kernel.hasComm(model_id) { + if (!comm) { + if (this.kernel.hasComm(model_id)) { comm = (this.kernel as any)._comms.get(model_id) } else { comm = this.kernel.createComm(target_name, model_id) } this._comms.set(key, comm) - return comm } + return comm })() comm.open(data, metadata, buffers) return new shims.services.Comm(comm) From 4137975f14072fcd0dce86c59ef751f981b6e60d Mon Sep 17 00:00:00 2001 From: Philipp Rudiger Date: Fri, 22 Mar 2024 16:56:39 +0100 Subject: [PATCH 04/12] Make linter happy --- ipywidgets_bokeh/src/manager.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ipywidgets_bokeh/src/manager.ts b/ipywidgets_bokeh/src/manager.ts index 6996cc8..ac42758 100644 --- a/ipywidgets_bokeh/src/manager.ts +++ b/ipywidgets_bokeh/src/manager.ts @@ -194,12 +194,12 @@ export class WidgetManager extends HTMLManager { const comm = (() => { const key = target_name + model_id let comm = this._comms.get(key) - if (!comm) { + if (comm == null) { if (this.kernel.hasComm(model_id)) { comm = (this.kernel as any)._comms.get(model_id) - } else { + } else { comm = this.kernel.createComm(target_name, model_id) - } + } this._comms.set(key, comm) } return comm From 8a134df5d262a85419f8fedde43d2a98e7d460d3 Mon Sep 17 00:00:00 2001 From: Mateusz Paprocki Date: Sat, 23 Mar 2024 10:32:19 +0100 Subject: [PATCH 05/12] Upgrade to TypeScript 5.4 --- ipywidgets_bokeh/package-lock.json | 10 +++++----- ipywidgets_bokeh/package.json | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ipywidgets_bokeh/package-lock.json b/ipywidgets_bokeh/package-lock.json index 5889ec2..129d7b3 100644 --- a/ipywidgets_bokeh/package-lock.json +++ b/ipywidgets_bokeh/package-lock.json @@ -19,7 +19,7 @@ "eslint": "^8.32.0", "file-loader": "~6.2.0", "style-loader": "~3.3.1", - "typescript": "~5.0.2", + "typescript": "~5.4.2", "url-loader": "~4.1.1", "webpack": "~5.76.3", "webpack-cli": "~5.0.1" @@ -4296,16 +4296,16 @@ "integrity": "sha512-pzP0PWoZUhsECYjABgCGQlRGL1n7tOHsgwYv3oIiEpJwGhFTuty/YNeduxQYzXXa3Ge5BdT6sHYIQYpl4uJ+5Q==" }, "node_modules/typescript": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.0.2.tgz", - "integrity": "sha512-wVORMBGO/FAs/++blGNeAVdbNKtIh1rbBL2EyQ1+J9lClJ93KiiKe8PmFIVdXhHcyv44SL9oglmfeSsndo0jRw==", + "version": "5.4.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.3.tgz", + "integrity": "sha512-KrPd3PKaCLr78MalgiwJnA25Nm8HAmdwN3mYUYZgG/wizIo9EainNVQI9/yDavtVFRN2h3k8uf3GLHuhDMgEHg==", "dev": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" }, "engines": { - "node": ">=12.20" + "node": ">=14.17" } }, "node_modules/typestyle": { diff --git a/ipywidgets_bokeh/package.json b/ipywidgets_bokeh/package.json index 23eb484..5f74983 100644 --- a/ipywidgets_bokeh/package.json +++ b/ipywidgets_bokeh/package.json @@ -21,7 +21,7 @@ "css-loader": "~6.7.3", "file-loader": "~6.2.0", "style-loader": "~3.3.1", - "typescript": "~5.0.2", + "typescript": "~5.4.2", "url-loader": "~4.1.1", "webpack": "~5.76.3", "webpack-cli": "~5.0.1", From 5edcb9acde527cbe0c675f23890e8d256de83e9a Mon Sep 17 00:00:00 2001 From: Mateusz Paprocki Date: Sat, 23 Mar 2024 10:34:39 +0100 Subject: [PATCH 06/12] Resolve type issues --- ipywidgets_bokeh/src/manager.ts | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/ipywidgets_bokeh/src/manager.ts b/ipywidgets_bokeh/src/manager.ts index ac42758..0ad7e79 100644 --- a/ipywidgets_bokeh/src/manager.ts +++ b/ipywidgets_bokeh/src/manager.ts @@ -8,6 +8,7 @@ import {IState, IManagerState} from "@jupyter-widgets/base-manager" import {Kernel, KernelManager, ServerConnection} from "@jupyterlab/services" +import {assert} from "@bokehjs/core/util/assert" import {isString} from "@bokehjs/core/util/types" import {keys, entries, to_object} from "@bokehjs/core/util/object" @@ -65,6 +66,12 @@ export type ModelBundle = { let _kernel_id = 0 +type KernelConnection = Kernel.IKernelConnection & { + // This is probably a private member of IKernelConnection, but there's + // no public API to retrieve a Comm, only to check if one exists. + _comms: Map +} + export class WidgetManager extends HTMLManager { private _known_models: Map = new Map() @@ -192,14 +199,15 @@ export class WidgetManager extends HTMLManager { override async _create_comm(target_name: string, model_id: string, data?: any, metadata?: any, buffers?: ArrayBuffer[] | ArrayBufferView[]): Promise { const comm = (() => { - const key = target_name + model_id + const key = `${target_name}${model_id}` let comm = this._comms.get(key) - if (comm == null) { + if (comm === undefined) { if (this.kernel.hasComm(model_id)) { - comm = (this.kernel as any)._comms.get(model_id) + comm = (this.kernel as KernelConnection)._comms.get(model_id) } else { comm = this.kernel.createComm(target_name, model_id) } + assert(comm != null) this._comms.set(key, comm) } return comm From 1740546cbe9357beeebd7cf4ec086b3c9724f013 Mon Sep 17 00:00:00 2001 From: Mateusz Paprocki Date: Sat, 23 Mar 2024 10:41:03 +0100 Subject: [PATCH 07/12] Upgrade eslint and @typescript-eslint --- ipywidgets_bokeh/package-lock.json | 510 +++++++++++++++++------------ ipywidgets_bokeh/package.json | 6 +- 2 files changed, 303 insertions(+), 213 deletions(-) diff --git a/ipywidgets_bokeh/package-lock.json b/ipywidgets_bokeh/package-lock.json index 129d7b3..4ab6a5d 100644 --- a/ipywidgets_bokeh/package-lock.json +++ b/ipywidgets_bokeh/package-lock.json @@ -13,10 +13,10 @@ "@jupyter-widgets/html-manager": "~1.0.5" }, "devDependencies": { - "@typescript-eslint/eslint-plugin": "^5.49.0", - "@typescript-eslint/parser": "^5.49.0", + "@typescript-eslint/eslint-plugin": "^7.3.1", + "@typescript-eslint/parser": "^7.3.1", "css-loader": "~6.7.3", - "eslint": "^8.32.0", + "eslint": "^8.57.0", "file-loader": "~6.2.0", "style-loader": "~3.3.1", "typescript": "~5.4.2", @@ -25,6 +25,15 @@ "webpack-cli": "~5.0.1" } }, + "node_modules/@aashutoshrathi/word-wrap": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", + "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/@babel/runtime": { "version": "7.21.0", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.21.0.tgz", @@ -125,23 +134,23 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.5.0.tgz", - "integrity": "sha512-vITaYzIcNmjn5tF5uxcZ/ft7/RXGrMUIS9HalWckEOF6ESiwXKoMzAQf2UW0aVd6rnOeExTJVd5hmWXucBKGXQ==", + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", + "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==", "dev": true, "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, "node_modules/@eslint/eslintrc": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.2.tgz", - "integrity": "sha512-3W4f5tDUra+pA+FzgugqL2pRimUTDJWKr7BINqOpkZrC0uYI0NIc0/JFgBROCU07HR6GieA5m3/rsPIhDmCXTQ==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", "dev": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.5.1", + "espree": "^9.6.0", "globals": "^13.19.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", @@ -172,16 +181,38 @@ "url": "https://github.com/sponsors/epoberezkin" } }, + "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, "node_modules/@eslint/eslintrc/node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true }, + "node_modules/@eslint/eslintrc/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/@eslint/js": { - "version": "8.37.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.37.0.tgz", - "integrity": "sha512-x5vzdtOOGgFVDCUs81QRB2+liax8rFg3+7hqM+QhBG0/G3F1ZsoYl97UrqgHgQ9KKT7G6c4V+aTUCgu/n22v1A==", + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", + "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -197,19 +228,41 @@ } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.11.8", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz", - "integrity": "sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==", + "version": "0.11.14", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", + "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", "dev": true, "dependencies": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", "minimatch": "^3.0.5" }, "engines": { "node": ">=10.10.0" } }, + "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@humanwhocodes/config-array/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/@humanwhocodes/module-importer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", @@ -224,9 +277,9 @@ } }, "node_modules/@humanwhocodes/object-schema": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", - "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz", + "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==", "dev": true }, "node_modules/@hypnosphi/create-react-context": { @@ -1006,9 +1059,9 @@ } }, "node_modules/@types/json-schema": { - "version": "7.0.11", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", - "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==" + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==" }, "node_modules/@types/lodash": { "version": "4.14.192", @@ -1042,9 +1095,9 @@ "integrity": "sha512-5cJ8CB4yAx7BH1oMvdU0Jh9lrEXyPkar6F9G/ERswkCuvP4KQZfZkSjcMbAICCpQTN4OuZn8tz0HiKv9TGZgrQ==" }, "node_modules/@types/semver": { - "version": "7.3.13", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.13.tgz", - "integrity": "sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==", + "version": "7.5.8", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", + "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==", "dev": true }, "node_modules/@types/sizzle": { @@ -1058,32 +1111,33 @@ "integrity": "sha512-uO4CD2ELOjw8tasUrAhvnn2W4A0ZECOvMjCivJr4gA9pGgjv+qxKWY9GLTMVEK8ej85BxQOocUyE7hImmSQYcg==" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.57.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.57.0.tgz", - "integrity": "sha512-itag0qpN6q2UMM6Xgk6xoHa0D0/P+M17THnr4SVgqn9Rgam5k/He33MA7/D7QoJcdMxHFyX7U9imaBonAX/6qA==", + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.3.1.tgz", + "integrity": "sha512-STEDMVQGww5lhCuNXVSQfbfuNII5E08QWkvAw5Qwf+bj2WT+JkG1uc+5/vXA3AOYMDHVOSpL+9rcbEUiHIm2dw==", "dev": true, "dependencies": { - "@eslint-community/regexpp": "^4.4.0", - "@typescript-eslint/scope-manager": "5.57.0", - "@typescript-eslint/type-utils": "5.57.0", - "@typescript-eslint/utils": "5.57.0", + "@eslint-community/regexpp": "^4.5.1", + "@typescript-eslint/scope-manager": "7.3.1", + "@typescript-eslint/type-utils": "7.3.1", + "@typescript-eslint/utils": "7.3.1", + "@typescript-eslint/visitor-keys": "7.3.1", "debug": "^4.3.4", - "grapheme-splitter": "^1.0.4", - "ignore": "^5.2.0", - "natural-compare-lite": "^1.4.0", - "semver": "^7.3.7", - "tsutils": "^3.21.0" + "graphemer": "^1.4.0", + "ignore": "^5.2.4", + "natural-compare": "^1.4.0", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^5.0.0", - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + "@typescript-eslint/parser": "^7.0.0", + "eslint": "^8.56.0" }, "peerDependenciesMeta": { "typescript": { @@ -1092,25 +1146,26 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "5.57.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.57.0.tgz", - "integrity": "sha512-orrduvpWYkgLCyAdNtR1QIWovcNZlEm6yL8nwH/eTxWLd8gsP+25pdLHYzL2QdkqrieaDwLpytHqycncv0woUQ==", + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.3.1.tgz", + "integrity": "sha512-Rq49+pq7viTRCH48XAbTA+wdLRrB/3sRq4Lpk0oGDm0VmnjBrAOVXH/Laalmwsv2VpekiEfVFwJYVk6/e8uvQw==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.57.0", - "@typescript-eslint/types": "5.57.0", - "@typescript-eslint/typescript-estree": "5.57.0", + "@typescript-eslint/scope-manager": "7.3.1", + "@typescript-eslint/types": "7.3.1", + "@typescript-eslint/typescript-estree": "7.3.1", + "@typescript-eslint/visitor-keys": "7.3.1", "debug": "^4.3.4" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + "eslint": "^8.56.0" }, "peerDependenciesMeta": { "typescript": { @@ -1119,16 +1174,16 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "5.57.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.57.0.tgz", - "integrity": "sha512-NANBNOQvllPlizl9LatX8+MHi7bx7WGIWYjPHDmQe5Si/0YEYfxSljJpoTyTWFTgRy3X8gLYSE4xQ2U+aCozSw==", + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.3.1.tgz", + "integrity": "sha512-fVS6fPxldsKY2nFvyT7IP78UO1/I2huG+AYu5AMjCT9wtl6JFiDnsv4uad4jQ0GTFzcUV5HShVeN96/17bTBag==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.57.0", - "@typescript-eslint/visitor-keys": "5.57.0" + "@typescript-eslint/types": "7.3.1", + "@typescript-eslint/visitor-keys": "7.3.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", @@ -1136,25 +1191,25 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "5.57.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.57.0.tgz", - "integrity": "sha512-kxXoq9zOTbvqzLbdNKy1yFrxLC6GDJFE2Yuo3KqSwTmDOFjUGeWSakgoXT864WcK5/NAJkkONCiKb1ddsqhLXQ==", + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.3.1.tgz", + "integrity": "sha512-iFhaysxFsMDQlzJn+vr3OrxN8NmdQkHks4WaqD4QBnt5hsq234wcYdyQ9uquzJJIDAj5W4wQne3yEsYA6OmXGw==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "5.57.0", - "@typescript-eslint/utils": "5.57.0", + "@typescript-eslint/typescript-estree": "7.3.1", + "@typescript-eslint/utils": "7.3.1", "debug": "^4.3.4", - "tsutils": "^3.21.0" + "ts-api-utils": "^1.0.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "*" + "eslint": "^8.56.0" }, "peerDependenciesMeta": { "typescript": { @@ -1163,12 +1218,12 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "5.57.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.57.0.tgz", - "integrity": "sha512-mxsod+aZRSyLT+jiqHw1KK6xrANm19/+VFALVFP5qa/aiJnlP38qpyaTd0fEKhWvQk6YeNZ5LGwI1pDpBRBhtQ==", + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.3.1.tgz", + "integrity": "sha512-2tUf3uWggBDl4S4183nivWQ2HqceOZh1U4hhu4p1tPiIJoRRXrab7Y+Y0p+dozYwZVvLPRI6r5wKe9kToF9FIw==", "dev": true, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", @@ -1176,21 +1231,22 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.57.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.57.0.tgz", - "integrity": "sha512-LTzQ23TV82KpO8HPnWuxM2V7ieXW8O142I7hQTxWIHDcCEIjtkat6H96PFkYBQqGFLW/G/eVVOB9Z8rcvdY/Vw==", + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.3.1.tgz", + "integrity": "sha512-tLpuqM46LVkduWP7JO7yVoWshpJuJzxDOPYIVWUUZbW+4dBpgGeUdl/fQkhuV0A8eGnphYw3pp8d2EnvPOfxmQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.57.0", - "@typescript-eslint/visitor-keys": "5.57.0", + "@typescript-eslint/types": "7.3.1", + "@typescript-eslint/visitor-keys": "7.3.1", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" + "minimatch": "9.0.3", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", @@ -1203,48 +1259,53 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "5.57.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.57.0.tgz", - "integrity": "sha512-ps/4WohXV7C+LTSgAL5CApxvxbMkl9B9AUZRtnEFonpIxZDIT7wC1xfvuJONMidrkB9scs4zhtRyIwHh4+18kw==", + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.3.1.tgz", + "integrity": "sha512-jIERm/6bYQ9HkynYlNZvXpzmXWZGhMbrOvq3jJzOSOlKXsVjrrolzWBjDW6/TvT5Q3WqaN4EkmcfdQwi9tDjBQ==", "dev": true, "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@types/json-schema": "^7.0.9", - "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.57.0", - "@typescript-eslint/types": "5.57.0", - "@typescript-eslint/typescript-estree": "5.57.0", - "eslint-scope": "^5.1.1", - "semver": "^7.3.7" + "@eslint-community/eslint-utils": "^4.4.0", + "@types/json-schema": "^7.0.12", + "@types/semver": "^7.5.0", + "@typescript-eslint/scope-manager": "7.3.1", + "@typescript-eslint/types": "7.3.1", + "@typescript-eslint/typescript-estree": "7.3.1", + "semver": "^7.5.4" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + "eslint": "^8.56.0" } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.57.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.57.0.tgz", - "integrity": "sha512-ery2g3k0hv5BLiKpPuwYt9KBkAp2ugT6VvyShXdLOkax895EC55sP0Tx5L0fZaQueiK3fBLvHVvEl3jFS5ia+g==", + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.3.1.tgz", + "integrity": "sha512-9RMXwQF8knsZvfv9tdi+4D/j7dMG28X/wMJ8Jj6eOHyHWwDW4ngQJcqEczSsqIKKjFiLFr40Mnr7a5ulDD3vmw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.57.0", - "eslint-visitor-keys": "^3.3.0" + "@typescript-eslint/types": "7.3.1", + "eslint-visitor-keys": "^3.4.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" } }, + "node_modules/@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", + "dev": true + }, "node_modules/@webassemblyjs/ast": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz", @@ -1448,9 +1509,9 @@ "dev": true }, "node_modules/acorn": { - "version": "8.8.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", - "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", + "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -1574,13 +1635,12 @@ } }, "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "balanced-match": "^1.0.0" } }, "node_modules/braces": { @@ -2106,27 +2166,28 @@ } }, "node_modules/eslint": { - "version": "8.37.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.37.0.tgz", - "integrity": "sha512-NU3Ps9nI05GUoVMxcZx1J8CNR6xOvUT4jAUMH5+z8lpp3aEdPVCImKw6PWG4PY+Vfkpr+jvMpxs/qoE7wq0sPw==", + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", + "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.4.0", - "@eslint/eslintrc": "^2.0.2", - "@eslint/js": "8.37.0", - "@humanwhocodes/config-array": "^0.11.8", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.0", + "@humanwhocodes/config-array": "^0.11.14", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", - "ajv": "^6.10.0", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", "debug": "^4.3.2", "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.1.1", - "eslint-visitor-keys": "^3.4.0", - "espree": "^9.5.1", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -2134,22 +2195,19 @@ "find-up": "^5.0.0", "glob-parent": "^6.0.2", "globals": "^13.19.0", - "grapheme-splitter": "^1.0.4", + "graphemer": "^1.4.0", "ignore": "^5.2.0", - "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", "is-path-inside": "^3.0.3", - "js-sdsl": "^4.1.4", "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.9.1", + "optionator": "^0.9.3", "strip-ansi": "^6.0.1", - "strip-json-comments": "^3.1.0", "text-table": "^0.2.0" }, "bin": { @@ -2176,9 +2234,9 @@ } }, "node_modules/eslint-visitor-keys": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.0.tgz", - "integrity": "sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ==", + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -2203,10 +2261,20 @@ "url": "https://github.com/sponsors/epoberezkin" } }, + "node_modules/eslint/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, "node_modules/eslint/node_modules/eslint-scope": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", - "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", "dev": true, "dependencies": { "esrecurse": "^4.3.0", @@ -2214,6 +2282,9 @@ }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/eslint/node_modules/estraverse": { @@ -2231,15 +2302,27 @@ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true }, + "node_modules/eslint/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/espree": { - "version": "9.5.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.1.tgz", - "integrity": "sha512-5yxtHSZXRSW5pvv3hAlXM5+/Oswi1AUFqBmbibKb5s6bp3rGIDkyXU6xCoyuuLhijr4SFwPrXRoZjz0AZDN9tg==", + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", "dev": true, "dependencies": { - "acorn": "^8.8.0", + "acorn": "^8.9.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.0" + "eslint-visitor-keys": "^3.4.1" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -2323,9 +2406,9 @@ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, "node_modules/fast-glob": { - "version": "3.2.12", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", - "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", "dev": true, "dependencies": { "@nodelib/fs.stat": "^2.0.2", @@ -2371,9 +2454,9 @@ } }, "node_modules/fastq": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", - "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", "dev": true, "dependencies": { "reusify": "^1.0.4" @@ -2440,12 +2523,13 @@ } }, "node_modules/flat-cache": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", - "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", "dev": true, "dependencies": { - "flatted": "^3.1.0", + "flatted": "^3.2.9", + "keyv": "^4.5.3", "rimraf": "^3.0.2" }, "engines": { @@ -2453,9 +2537,9 @@ } }, "node_modules/flatted": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", - "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", + "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", "dev": true }, "node_modules/free-style": { @@ -2533,10 +2617,32 @@ "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", "dev": true }, + "node_modules/glob/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/glob/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/globals": { - "version": "13.20.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", - "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -2574,10 +2680,10 @@ "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "dev": true }, - "node_modules/grapheme-splitter": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", - "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", "dev": true }, "node_modules/gud": { @@ -2672,9 +2778,9 @@ } }, "node_modules/ignore": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", - "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", + "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", "dev": true, "engines": { "node": ">= 4" @@ -2910,16 +3016,6 @@ "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.4.tgz", "integrity": "sha512-v28EW9DWDFpzcD9O5iyJXg3R3+q+mET5JhnjJzQUZMHOv67bpSIHq81GEYpPNZHG+XXHsfSme3nxp/hndKEcsQ==" }, - "node_modules/js-sdsl": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.4.0.tgz", - "integrity": "sha512-FfVSdx6pJ41Oa+CF7RDaFmTnCaFhua+SNYQX74riGOpl96x+2jQCqEfQ2bnXu/5DPCqlRuiqyvTJM0Qjz26IVg==", - "dev": true, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/js-sdsl" - } - }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -2937,6 +3033,12 @@ "js-yaml": "bin/js-yaml.js" } }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true + }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", @@ -2991,6 +3093,15 @@ "node": ">=0.10.0" } }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "dependencies": { + "json-buffer": "3.0.1" + } + }, "node_modules/kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -3170,15 +3281,18 @@ } }, "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", "dev": true, "dependencies": { - "brace-expansion": "^1.1.7" + "brace-expansion": "^2.0.1" }, "engines": { - "node": "*" + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/minimist": { @@ -3226,12 +3340,6 @@ "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "dev": true }, - "node_modules/natural-compare-lite": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", - "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", - "dev": true - }, "node_modules/neo-async": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", @@ -3314,17 +3422,17 @@ } }, "node_modules/optionator": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", + "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", "dev": true, "dependencies": { + "@aashutoshrathi/word-wrap": "^1.2.3", "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", "levn": "^0.4.1", "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.3" + "type-check": "^0.4.0" }, "engines": { "node": ">= 0.8.0" @@ -4000,9 +4108,9 @@ "dev": true }, "node_modules/semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -4240,31 +4348,22 @@ "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" }, - "node_modules/tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" - }, - "node_modules/tsutils": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", - "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "node_modules/ts-api-utils": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", + "integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==", "dev": true, - "dependencies": { - "tslib": "^1.8.1" - }, "engines": { - "node": ">= 6" + "node": ">=16" }, "peerDependencies": { - "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" + "typescript": ">=4.2.0" } }, - "node_modules/tsutils/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true + "node_modules/tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" }, "node_modules/type-check": { "version": "0.4.0", @@ -4628,15 +4727,6 @@ "integrity": "sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==", "dev": true }, - "node_modules/word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", diff --git a/ipywidgets_bokeh/package.json b/ipywidgets_bokeh/package.json index 5f74983..a174057 100644 --- a/ipywidgets_bokeh/package.json +++ b/ipywidgets_bokeh/package.json @@ -25,9 +25,9 @@ "url-loader": "~4.1.1", "webpack": "~5.76.3", "webpack-cli": "~5.0.1", - "@typescript-eslint/eslint-plugin": "^5.49.0", - "@typescript-eslint/parser": "^5.49.0", - "eslint": "^8.32.0" + "@typescript-eslint/eslint-plugin": "^7.3.1", + "@typescript-eslint/parser": "^7.3.1", + "eslint": "^8.57.0" }, "scripts": { "dev": "tsc; webpack --mode=development", From 2e4b8c994c16485fe79acd7473752e46bd54bc50 Mon Sep 17 00:00:00 2001 From: Mateusz Paprocki Date: Sat, 23 Mar 2024 10:41:35 +0100 Subject: [PATCH 08/12] Remove unnecessary null check --- ipywidgets_bokeh/src/manager.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ipywidgets_bokeh/src/manager.ts b/ipywidgets_bokeh/src/manager.ts index 0ad7e79..e6086ae 100644 --- a/ipywidgets_bokeh/src/manager.ts +++ b/ipywidgets_bokeh/src/manager.ts @@ -138,10 +138,10 @@ export class WidgetManager extends HTMLManager { const comm_wrapper = new shims.services.Comm(comm) if (model == null) { this.handle_comm_open(comm_wrapper, msg).then((model) => { - if (model != null && !model.comm_live) { + if (!model.comm_live) { const comm_wrapper = new shims.services.Comm(comm) this._attach_comm(comm_wrapper, model) - } + } }) } else { this._attach_comm(comm_wrapper, model) From 911d58935d55ae2a9ae8b0a9ba18f05a82519577 Mon Sep 17 00:00:00 2001 From: Mateusz Paprocki Date: Sat, 23 Mar 2024 10:43:23 +0100 Subject: [PATCH 09/12] Upgrade to @bokeh/bokehjs 3.4 --- ipywidgets_bokeh/package-lock.json | 253 ++++++++++++++++++++++++++++- ipywidgets_bokeh/package.json | 2 +- 2 files changed, 250 insertions(+), 5 deletions(-) diff --git a/ipywidgets_bokeh/package-lock.json b/ipywidgets_bokeh/package-lock.json index 4ab6a5d..1984503 100644 --- a/ipywidgets_bokeh/package-lock.json +++ b/ipywidgets_bokeh/package-lock.json @@ -9,7 +9,7 @@ "version": "1.5.0", "license": "BSD-3-Clause", "dependencies": { - "@bokeh/bokehjs": "~3.1.0", + "@bokeh/bokehjs": "~3.4.0", "@jupyter-widgets/html-manager": "~1.0.5" }, "devDependencies": { @@ -101,14 +101,74 @@ } }, "node_modules/@bokeh/bokehjs": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@bokeh/bokehjs/-/bokehjs-3.1.0.tgz", - "integrity": "sha512-O0ndXpH0yhRVZYJO59qAcQ/6FrUXiqb8t9CUQJPon81eOcrlGQY0On9d89cfXg9g5cPAfsR6LUIJE5TW95xybg==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@bokeh/bokehjs/-/bokehjs-3.4.0.tgz", + "integrity": "sha512-gLqkj0RWuiGpgShqEgOHCPw0VtgAtPTCMldJA7AGdsamxFJsIyEnnybBtMcTYpDqjgMjQ/+1Kk7MOREY72gKRA==", + "workspaces": [ + "./make", + "./src/compiler", + "./src/lib", + "./src/server", + "./test" + ], + "dependencies": { + "@bokeh/numbro": "^1.6.2", + "@bokeh/slickgrid": "~2.4.4103", + "@types/geojson": "^7946.0.13", + "@types/google.maps": "^3.54.10", + "@types/proj4": "^2.5.5", + "@types/sprintf-js": "^1.1.4", + "choices.js": "^10.2.0", + "flatbush": "^4.2.0", + "flatpickr": "^4.6.13", + "mathjax-full": "^3.2.2", + "nouislider": "^15.7.1", + "proj4": "^2.9.2", + "regl": "^2.1.0", + "sprintf-js": "^1.1.3", + "timezone": "^1.0.23", + "tslib": "^2.6.2", + "underscore.template": "^0.1.7" + }, "engines": { "node": ">=16.0", "npm": ">=8.0" } }, + "node_modules/@bokeh/bokehjs/node_modules/nouislider": { + "version": "15.7.1", + "resolved": "https://registry.npmjs.org/nouislider/-/nouislider-15.7.1.tgz", + "integrity": "sha512-5N7C1ru/i8y3dg9+Z6ilj6+m1EfabvOoaRa7ztpxBSKKRZso4vA52DGSbBJjw5XLtFr/LZ9SgGAXqyVtlVHO5w==" + }, + "node_modules/@bokeh/bokehjs/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "node_modules/@bokeh/numbro": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/@bokeh/numbro/-/numbro-1.6.2.tgz", + "integrity": "sha512-owIECPc3T3QXHCb2v5Ez+/uE9SIxI7N4nd9iFlWnfBrOelr0/omvFn09VisRn37AAFAY39sJiCVgECwryHWUPA==", + "engines": { + "node": "*" + } + }, + "node_modules/@bokeh/slickgrid": { + "version": "2.4.4103", + "resolved": "https://registry.npmjs.org/@bokeh/slickgrid/-/slickgrid-2.4.4103.tgz", + "integrity": "sha512-wPitQJNUNUHw+86BPemvb1kIuV6UB4CpjEEDIXpU8G6Jges+8nx/iGHW8w9BwvICdeyhAmfX9Hmn5vRJMbe+uw==", + "dependencies": { + "@types/slickgrid": "^2.1.30", + "jquery": ">=3.4.0", + "jquery-ui": ">=1.8.0", + "tslib": "^1.10.0" + } + }, + "node_modules/@bokeh/slickgrid/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, "node_modules/@discoveryjs/json-ext": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", @@ -1050,6 +1110,16 @@ "integrity": "sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==", "dev": true }, + "node_modules/@types/geojson": { + "version": "7946.0.14", + "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.14.tgz", + "integrity": "sha512-WCfD5Ht3ZesJUsONdhvm84dmzWOiOzOAqOncN0++w0lBw1o8OuDNJF2McvvCef/yBqb/HYRahp1BYtODFQ8bRg==" + }, + "node_modules/@types/google.maps": { + "version": "3.55.5", + "resolved": "https://registry.npmjs.org/@types/google.maps/-/google.maps-3.55.5.tgz", + "integrity": "sha512-U1QwCo1GeeLm0YI/GoHvfd1VfwgnoUSBcKCMXXFAM+2izSSuqqwZUJ9XNO6NxZxmYKjBNI+NF5eGF6uUSb1aSg==" + }, "node_modules/@types/jquery": { "version": "3.5.16", "resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-3.5.16.tgz", @@ -1074,6 +1144,11 @@ "integrity": "sha512-E5Kwq2n4SbMzQOn6wnmBjuK9ouqlURrcZDVfbo9ftDDTFt3nk7ZKK4GMOzoYgnpQJKcxwQw+lGaBvvlMo0qN/Q==", "dev": true }, + "node_modules/@types/proj4": { + "version": "2.5.5", + "resolved": "https://registry.npmjs.org/@types/proj4/-/proj4-2.5.5.tgz", + "integrity": "sha512-y4tHUVVoMEOm2nxRLQ2/ET8upj/pBmoutGxFw2LZJTQWPgWXI+cbxVEUFFmIzr/bpFR83hGDOTSXX6HBeObvZA==" + }, "node_modules/@types/prop-types": { "version": "15.7.5", "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz", @@ -1105,6 +1180,19 @@ "resolved": "https://registry.npmjs.org/@types/sizzle/-/sizzle-2.3.3.tgz", "integrity": "sha512-JYM8x9EGF163bEyhdJBpR2QX1R5naCJHC8ucJylJ3w9/CVBaskdQ8WqBf8MmQrd1kRvp/a4TS8HJ+bxzR7ZJYQ==" }, + "node_modules/@types/slickgrid": { + "version": "2.1.40", + "resolved": "https://registry.npmjs.org/@types/slickgrid/-/slickgrid-2.1.40.tgz", + "integrity": "sha512-+HWaipRr4bw0cy4eS8PCWxo+Fi66aL+mh36unRLAWtatAvMnxpldTKfpe9T7zdNtgN+rq+/faux3JzFR1mj/dg==", + "dependencies": { + "@types/jquery": "*" + } + }, + "node_modules/@types/sprintf-js": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@types/sprintf-js/-/sprintf-js-1.1.4.tgz", + "integrity": "sha512-aWK1reDYWxcjgcIIPmQi3u+OQDuYa9b+lr6eIsGWrekJ9vr1NSjr4Eab8oQ1iKuH1ltFHpXGyerAv1a3FMKxzQ==" + }, "node_modules/@types/underscore": { "version": "1.11.4", "resolved": "https://registry.npmjs.org/@types/underscore/-/underscore-1.11.4.tgz", @@ -1746,6 +1834,16 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, + "node_modules/choices.js": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/choices.js/-/choices.js-10.2.0.tgz", + "integrity": "sha512-8PKy6wq7BMjNwDTZwr3+Zry6G2+opJaAJDDA/j3yxvqSCnvkKe7ZIFfIyOhoc7htIWFhsfzF9tJpGUATcpUtPg==", + "dependencies": { + "deepmerge": "^4.2.2", + "fuse.js": "^6.6.2", + "redux": "^4.2.0" + } + }, "node_modules/chrome-trace-event": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", @@ -2314,6 +2412,14 @@ "node": "*" } }, + "node_modules/esm": { + "version": "3.2.25", + "resolved": "https://registry.npmjs.org/esm/-/esm-3.2.25.tgz", + "integrity": "sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA==", + "engines": { + "node": ">=6" + } + }, "node_modules/espree": { "version": "9.6.1", "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", @@ -2536,6 +2642,27 @@ "node": "^10.12.0 || >=12.0.0" } }, + "node_modules/flatbush": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/flatbush/-/flatbush-4.4.0.tgz", + "integrity": "sha512-cf6G+sfy/+/FLH7Ls1URQ5GCRlXgwgqUZiEsMNrMZqb3Us3EkKmzUlKbnyoBy/4wI4oLJ+8cyCQoKJIVm92Fmg==", + "dependencies": { + "flatqueue": "^2.0.3" + } + }, + "node_modules/flatpickr": { + "version": "4.6.13", + "resolved": "https://registry.npmjs.org/flatpickr/-/flatpickr-4.6.13.tgz", + "integrity": "sha512-97PMG/aywoYpB4IvbvUJi0RQi8vearvU0oov1WW3k0WZPBMrTQVqekSX5CjSG/M4Q3i6A/0FKXC7RyAoAUUSPw==" + }, + "node_modules/flatqueue": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/flatqueue/-/flatqueue-2.0.3.tgz", + "integrity": "sha512-RZCWZNkmxzUOh8jqEcEGZCycb3B8KAfpPwg3H//cURasunYxsg1eIvE+QDSjX+ZPHTIVfINfK1aLTrVKKO0i4g==", + "engines": { + "node": ">= 12.17.0" + } + }, "node_modules/flatted": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", @@ -2566,6 +2693,14 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/fuse.js": { + "version": "6.6.2", + "resolved": "https://registry.npmjs.org/fuse.js/-/fuse.js-6.6.2.tgz", + "integrity": "sha512-cJaJkxCCxC8qIIcPBF9yGxY0W/tVZS3uEISDxhYIdtk8OL93pe+6Zj7LjCqVV4dzbqcriOZ+kQ/NE4RXZHsIGA==", + "engines": { + "node": ">=10" + } + }, "node_modules/get-intrinsic": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.0.tgz", @@ -3016,6 +3151,14 @@ "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.4.tgz", "integrity": "sha512-v28EW9DWDFpzcD9O5iyJXg3R3+q+mET5JhnjJzQUZMHOv67bpSIHq81GEYpPNZHG+XXHsfSme3nxp/hndKEcsQ==" }, + "node_modules/jquery-ui": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/jquery-ui/-/jquery-ui-1.13.2.tgz", + "integrity": "sha512-wBZPnqWs5GaYJmo1Jj0k/mrSkzdQzKDwhXNtHKcBdAcKVxMM3KNYFq+iJ2i1rwiG53Z8M4mTn3Qxrm17uH1D4Q==", + "dependencies": { + "jquery": ">=1.8.0 <4.0.0" + } + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -3231,6 +3374,17 @@ "node": ">= 12" } }, + "node_modules/mathjax-full": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/mathjax-full/-/mathjax-full-3.2.2.tgz", + "integrity": "sha512-+LfG9Fik+OuI8SLwsiR02IVdjcnRCy5MufYLi0C3TdMT56L/pjB0alMVGgoWJF8pN9Rc7FESycZB9BMNWIid5w==", + "dependencies": { + "esm": "^3.2.25", + "mhchemparser": "^4.1.0", + "mj-context-menu": "^0.6.1", + "speech-rule-engine": "^4.0.6" + } + }, "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", @@ -3246,6 +3400,16 @@ "node": ">= 8" } }, + "node_modules/mgrs": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/mgrs/-/mgrs-1.0.0.tgz", + "integrity": "sha512-awNbTOqCxK1DBGjalK3xqWIstBZgN6fxsMSiXLs9/spqWkF2pAhb2rrYCFSsr1/tT7PhcDGjZndG8SWYn0byYA==" + }, + "node_modules/mhchemparser": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/mhchemparser/-/mhchemparser-4.2.1.tgz", + "integrity": "sha512-kYmyrCirqJf3zZ9t/0wGgRZ4/ZJw//VwaRVGA75C4nhE60vtnIzhl9J9ndkX/h6hxSN7pjg/cE0VxbnNM+bnDQ==" + }, "node_modules/micromatch": { "version": "4.0.5", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", @@ -3303,6 +3467,11 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/mj-context-menu": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/mj-context-menu/-/mj-context-menu-0.6.1.tgz", + "integrity": "sha512-7NO5s6n10TIV96d4g2uDpG7ZDpIhMh0QNfGdJw/W47JswFcosz457wqz/b5sAKvl12sxINGFCn80NZHKwxQEXA==" + }, "node_modules/moment": { "version": "2.29.4", "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz", @@ -3742,6 +3911,15 @@ "node": ">= 0.8.0" } }, + "node_modules/proj4": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/proj4/-/proj4-2.11.0.tgz", + "integrity": "sha512-SasuTkAx8HnWQHfIyhkdUNJorSJqINHAN3EyMWYiQRVorftz9DHz650YraFgczwgtHOxqnfuDxSNv3C8MUnHeg==", + "dependencies": { + "mgrs": "1.0.0", + "wkt-parser": "^1.3.3" + } + }, "node_modules/prop-types": { "version": "15.8.1", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", @@ -3882,6 +4060,14 @@ "node": ">= 10.13.0" } }, + "node_modules/redux": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/redux/-/redux-4.2.1.tgz", + "integrity": "sha512-LAUYz4lc+Do8/g7aeRa8JkyDErK6ekstQaqWQrNRW//MY1TvCEpMtpTWvlQ+FPbWCx+Xixu/6SHt5N0HR+SB4w==", + "dependencies": { + "@babel/runtime": "^7.9.2" + } + }, "node_modules/regenerator-runtime": { "version": "0.13.11", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", @@ -3903,6 +4089,11 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/regl": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/regl/-/regl-2.1.0.tgz", + "integrity": "sha512-oWUce/aVoEvW5l2V0LK7O5KJMzUSKeiOwFuJehzpSFd43dO5spP9r+sSUfhKtsky4u6MCqWJaRL+abzExynfTg==" + }, "node_modules/require-from-string": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", @@ -4200,6 +4391,32 @@ "source-map": "^0.6.0" } }, + "node_modules/speech-rule-engine": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/speech-rule-engine/-/speech-rule-engine-4.0.7.tgz", + "integrity": "sha512-sJrL3/wHzNwJRLBdf6CjJWIlxC04iYKkyXvYSVsWVOiC2DSkHmxsqOhEeMsBA9XK+CHuNcsdkbFDnoUfAsmp9g==", + "dependencies": { + "commander": "9.2.0", + "wicked-good-xpath": "1.3.0", + "xmldom-sre": "0.1.31" + }, + "bin": { + "sre": "bin/sre" + } + }, + "node_modules/speech-rule-engine/node_modules/commander": { + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-9.2.0.tgz", + "integrity": "sha512-e2i4wANQiSXgnrBlIatyHtP1odfUp0BbV5Y5nEGbxtIrStkEOAAzCUirvLBNXHLr7kwLvJl6V+4V3XV9x7Wd9w==", + "engines": { + "node": "^12.20.0 || >=14" + } + }, + "node_modules/sprintf-js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", + "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==" + }, "node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -4331,6 +4548,11 @@ "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", "dev": true }, + "node_modules/timezone": { + "version": "1.0.23", + "resolved": "https://registry.npmjs.org/timezone/-/timezone-1.0.23.tgz", + "integrity": "sha512-yhQgk6qmSLB+TF8HGmApZAVI5bfzR1CoKUGr+WMZWmx75ED1uDewAZA8QMGCQ70TEv4GmM8pDB9jrHuxdaQ1PA==" + }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -4426,6 +4648,11 @@ "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.6.tgz", "integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==" }, + "node_modules/underscore.template": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/underscore.template/-/underscore.template-0.1.7.tgz", + "integrity": "sha512-wQ25n9/J0Olo3A92QDbSCkD04FKRrjVOn6wooaFDKsrmV9alkc7vZ3MmldbVo4NbJCk9ycWSEcfGn4NzFZIcvA==" + }, "node_modules/update-browserslist-db": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz", @@ -4721,12 +4948,22 @@ "node": ">= 8" } }, + "node_modules/wicked-good-xpath": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/wicked-good-xpath/-/wicked-good-xpath-1.3.0.tgz", + "integrity": "sha512-Gd9+TUn5nXdwj/hFsPVx5cuHHiF5Bwuc30jZ4+ronF1qHK5O7HD0sgmXWSEgwKquT3ClLoKPVbO6qGwVwLzvAw==" + }, "node_modules/wildcard": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.0.tgz", "integrity": "sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==", "dev": true }, + "node_modules/wkt-parser": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/wkt-parser/-/wkt-parser-1.3.3.tgz", + "integrity": "sha512-ZnV3yH8/k58ZPACOXeiHaMuXIiaTk1t0hSUVisbO0t4RjA5wPpUytcxeyiN2h+LZRrmuHIh/1UlrR9e7DHDvTw==" + }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", @@ -4753,6 +4990,14 @@ } } }, + "node_modules/xmldom-sre": { + "version": "0.1.31", + "resolved": "https://registry.npmjs.org/xmldom-sre/-/xmldom-sre-0.1.31.tgz", + "integrity": "sha512-f9s+fUkX04BxQf+7mMWAp5zk61pciie+fFLC9hX9UVvCeJQfNHRHXpeo5MPcR0EUf57PYLdt+ZO4f3Ipk2oZUw==", + "engines": { + "node": ">=0.1" + } + }, "node_modules/y-codemirror": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/y-codemirror/-/y-codemirror-3.0.1.tgz", diff --git a/ipywidgets_bokeh/package.json b/ipywidgets_bokeh/package.json index a174057..cf14b2a 100644 --- a/ipywidgets_bokeh/package.json +++ b/ipywidgets_bokeh/package.json @@ -14,7 +14,7 @@ "url": "https://github.com/bokeh/ipywidgets_bokeh.git" }, "dependencies": { - "@bokeh/bokehjs": "~3.1.0", + "@bokeh/bokehjs": "~3.4.0", "@jupyter-widgets/html-manager": "~1.0.5" }, "devDependencies": { From c4680817254b9d27a81fdb289ddea1e9d58eabb4 Mon Sep 17 00:00:00 2001 From: Mateusz Paprocki Date: Sun, 24 Mar 2024 18:40:25 +0100 Subject: [PATCH 10/12] Migrate to standard .eslintrc.js --- ipywidgets_bokeh/{eslint.json => .eslintrc.js} | 2 +- ipywidgets_bokeh/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename ipywidgets_bokeh/{eslint.json => .eslintrc.js} (99%) diff --git a/ipywidgets_bokeh/eslint.json b/ipywidgets_bokeh/.eslintrc.js similarity index 99% rename from ipywidgets_bokeh/eslint.json rename to ipywidgets_bokeh/.eslintrc.js index 9ed0a58..c129fac 100644 --- a/ipywidgets_bokeh/eslint.json +++ b/ipywidgets_bokeh/.eslintrc.js @@ -1,4 +1,4 @@ -{ +module.exports = { "parser": "@typescript-eslint/parser", "parserOptions": { "project": ["./tsconfig.json"], diff --git a/ipywidgets_bokeh/package.json b/ipywidgets_bokeh/package.json index cf14b2a..75a5be9 100644 --- a/ipywidgets_bokeh/package.json +++ b/ipywidgets_bokeh/package.json @@ -35,7 +35,7 @@ "clean": "rimraf dist", "prepack": "npm run clean && npm run build", "test": "echo 'TODO'", - "lint": "eslint -c eslint.json src/**/*.ts" + "lint": "eslint src/**" }, "files": [ "dist/lib/**/*.{js,js.map,d.ts}", From c274d654b25d3813f6f671fedf91904a2229dffd Mon Sep 17 00:00:00 2001 From: Mateusz Paprocki Date: Sun, 24 Mar 2024 19:29:49 +0100 Subject: [PATCH 11/12] Update eslint configuration --- ipywidgets_bokeh/.eslintrc.js | 158 +++++++++++++++++++--------------- 1 file changed, 89 insertions(+), 69 deletions(-) diff --git a/ipywidgets_bokeh/.eslintrc.js b/ipywidgets_bokeh/.eslintrc.js index c129fac..cd84e65 100644 --- a/ipywidgets_bokeh/.eslintrc.js +++ b/ipywidgets_bokeh/.eslintrc.js @@ -1,118 +1,138 @@ module.exports = { - "parser": "@typescript-eslint/parser", - "parserOptions": { - "project": ["./tsconfig.json"], - "tsconfigRootDir": ".", - "sourceType": "module" + parser: "@typescript-eslint/parser", + parserOptions: { + project: ["./tsconfig.json"], + tsconfigRootDir: __dirname, + sourceType: "module", }, - "plugins": ["@typescript-eslint"], - "extends": [], - "rules": { + plugins: ["@typescript-eslint"], + extends: [], + rules: { "@typescript-eslint/ban-types": ["error", { - "types": { - "Function": false, - "object": false, - "{}": false - } + types: { + Function: false, + object: false, + "{}": false, + }, }], "@typescript-eslint/consistent-type-assertions": "error", + "@typescript-eslint/consistent-type-imports": ["error", { + prefer: "type-imports", + fixStyle: "separate-type-imports", + }], "@typescript-eslint/member-delimiter-style": ["error", { - "multiline": { - "delimiter": "none", - "requireLast": true + multiline: { + delimiter: "none", + requireLast: true, + }, + singleline: { + delimiter: "comma", + requireLast: false, }, - "singleline": { - "delimiter": "comma", - "requireLast": false - } }], "@typescript-eslint/semi": ["error", "never"], "@typescript-eslint/type-annotation-spacing": ["error"], - "@typescript-eslint/no-unnecessary-condition": ["warn", {"allowConstantLoopConditions": true}], + "@typescript-eslint/no-unnecessary-condition": ["error", {allowConstantLoopConditions: true}], "@typescript-eslint/strict-boolean-expressions": ["error", { - "allowAny": true, - "allowString": false, - "allowNumber": false, - "allowNullableObject": false, - "allowNullableBoolean": false, - "allowNullableString": false, - "allowNullableNumber": false + allowAny: true, + allowString: false, + allowNumber: false, + allowNullableObject: false, + allowNullableBoolean: false, + allowNullableString: false, + allowNullableNumber: false, }], "@typescript-eslint/no-unnecessary-type-assertion": ["error"], "@typescript-eslint/no-unnecessary-type-constraint": ["error"], "@typescript-eslint/switch-exhaustiveness-check": ["error"], - "no-self-assign": ["error", {"props": false}], - "brace-style": ["error", "1tbs", {"allowSingleLine": true}], + "no-self-assign": ["error", { + props: false, + }], "comma-dangle": ["off"], "@typescript-eslint/comma-dangle": ["error", { - "arrays": "always-multiline", - "objects": "always-multiline", - "imports": "always-multiline", - "exports": "always-multiline", - "functions": "always-multiline", - "enums": "always-multiline", - "generics": "always-multiline", - "tuples": "always-multiline" + arrays: "always-multiline", + objects: "always-multiline", + imports: "always-multiline", + exports: "always-multiline", + functions: "always-multiline", + enums: "always-multiline", + generics: "always-multiline", + tuples: "always-multiline", }], - "comma-spacing": ["error", {"before": false, "after": true}], + "comma-spacing": ["error", {before: false, after: true}], "dot-notation": "error", "eol-last": ["error", "always"], - "indent": "off", + indent: "off", "@typescript-eslint/indent": ["error", 2, { - "SwitchCase": 1, - "outerIIFEBody": 1, - "ArrayExpression": "first", - "ObjectExpression": "first", - "ImportDeclaration": "first", - "VariableDeclarator": "first", - "CallExpression": {"arguments": 1}, - "FunctionDeclaration": {"body": 1, "parameters": "off"}, - "FunctionExpression": {"body": 1, "parameters": "off"}, - "ignoredNodes": ["ConditionalExpression"] + SwitchCase: 1, + outerIIFEBody: 1, + ArrayExpression: "first", + ObjectExpression: "first", + ImportDeclaration: "first", + VariableDeclarator: "first", + CallExpression: {arguments: 1}, + FunctionDeclaration: {body: 1, parameters: "off"}, + FunctionExpression: {body: 1, parameters: "off"}, + ignoredNodes: ["ConditionalExpression"], }], + "@typescript-eslint/no-floating-promises": ["error", {ignoreVoid: true}], "no-debugger": "error", "no-floating-decimal": ["error"], - "no-multiple-empty-lines": ["error", {"max": 1, "maxBOF": 0, "maxEOF": 0}], + "no-multiple-empty-lines": ["error", {max: 1, maxBOF: 0, maxEOF: 0}], "no-new-wrappers": "error", "no-template-curly-in-string": "error", "no-throw-literal": "error", "no-trailing-spaces": ["error"], "no-var": "error", "object-shorthand": "error", - "prefer-const": ["error", {"destructuring": "all"}], + "prefer-const": ["error", {destructuring: "all"}], "prefer-exponentiation-operator": "error", "quote-props": ["error", "as-needed"], "object-curly-spacing": ["error", "never"], "space-before-blocks": ["error", "always"], "space-before-function-paren": ["error", { - "anonymous": "never", - "named": "never", - "asyncArrow": "always" + anonymous: "never", + named: "never", + asyncArrow: "always", }], "space-in-parens": ["error", "never"], - "keyword-spacing": ["error", {"before": true, "after": true}], + "keyword-spacing": ["error", { + before: true, + after: true, + }], "func-call-spacing": ["error", "never"], "no-whitespace-before-property": ["error"], "block-spacing": ["error", "always"], "key-spacing": ["error", { - "beforeColon": false, - "afterColon": true, - "mode": "minimum" + beforeColon: false, + afterColon: true, + mode: "minimum", }], "space-unary-ops": ["error", { - "words": true, - "nonwords": false, - "overrides": {} + words: true, + nonwords: false, + overrides: {}, }], "guard-for-in": ["error"], - "quotes": ["error", "double", {"avoidEscape": true, "allowTemplateLiterals": false}], + quotes: ["error", "double", { + avoidEscape: true, + allowTemplateLiterals: false, + }], + "brace-style": ["error", "1tbs", {allowSingleLine: true}], + curly: ["error", "all"], "prefer-template": ["error"], "generator-star-spacing": ["error", { - "before": false, - "after": true, - "anonymous": {"before": false, "after": true}, - "method": {"before": true, "after": false} + before: false, + after: true, + anonymous: {before: false, after: true}, + method: {before: true, after: false}, }], - "yield-star-spacing": ["error", {"before": false, "after": true}] - } + "yield-star-spacing": ["error", {before: false, after: true}], + }, + overrides: [ + { + extends: ["plugin:@typescript-eslint/disable-type-checked"], + files: ["./**/*.js"], + }, + ], } From 6258f23973463b327ef7827ebf77a1ce4f57b3af Mon Sep 17 00:00:00 2001 From: Mateusz Paprocki Date: Sun, 24 Mar 2024 19:34:27 +0100 Subject: [PATCH 12/12] Fix newly discovered lint errors --- ipywidgets_bokeh/src/manager.ts | 16 ++++++++++------ ipywidgets_bokeh/src/widget.ts | 16 +++++++++------- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/ipywidgets_bokeh/src/manager.ts b/ipywidgets_bokeh/src/manager.ts index e6086ae..c3054dd 100644 --- a/ipywidgets_bokeh/src/manager.ts +++ b/ipywidgets_bokeh/src/manager.ts @@ -3,10 +3,12 @@ import * as outputWidgets from "@jupyter-widgets/output" import * as controls from "@jupyter-widgets/controls" import {HTMLManager} from "@jupyter-widgets/html-manager" -import {WidgetModel, WidgetView, IModelOptions, shims} from "@jupyter-widgets/base" -import {IState, IManagerState} from "@jupyter-widgets/base-manager" +import type {WidgetModel, WidgetView, IModelOptions} from "@jupyter-widgets/base" +import {shims} from "@jupyter-widgets/base" +import type {IState, IManagerState} from "@jupyter-widgets/base-manager" -import {Kernel, KernelManager, ServerConnection} from "@jupyterlab/services" +import type {Kernel, ServerConnection} from "@jupyterlab/services" +import {KernelManager} from "@jupyterlab/services" import {assert} from "@bokehjs/core/util/assert" import {isString} from "@bokehjs/core/util/types" @@ -137,7 +139,7 @@ export class WidgetManager extends HTMLManager { const model = this._model_objs.get(msg.content.comm_id) const comm_wrapper = new shims.services.Comm(comm) if (model == null) { - this.handle_comm_open(comm_wrapper, msg).then((model) => { + void this.handle_comm_open(comm_wrapper, msg).then((model) => { if (!model.comm_live) { const comm_wrapper = new shims.services.Comm(comm) this._attach_comm(comm_wrapper, model) @@ -171,8 +173,9 @@ export class WidgetManager extends HTMLManager { const models = await this.set_state(state) await this.set_state({...state, state: state.full_state as any}) for (const model of models) { - if (this._model_objs.has(model.model_id)) + if (this._model_objs.has(model.model_id)) { continue + } const comm = await this._create_comm(this.comm_target_name, model.model_id) this._attach_comm(comm, model) this._model_objs.set(model.model_id, model) @@ -232,8 +235,9 @@ export class WidgetManager extends HTMLManager { if (model_id != null && models.has(model_id)) { const model = models.get(model_id)! serialized_state = model.state - } else + } else { throw new Error("internal error in new_model()") + } } return super.new_model(options, serialized_state) } diff --git a/ipywidgets_bokeh/src/widget.ts b/ipywidgets_bokeh/src/widget.ts index 7bb8852..5d2320a 100644 --- a/ipywidgets_bokeh/src/widget.ts +++ b/ipywidgets_bokeh/src/widget.ts @@ -1,16 +1,18 @@ -import {div, InlineStyleSheet, StyleSheetLike} from "@bokehjs/core/dom" +import type {StyleSheetLike} from "@bokehjs/core/dom" +import {div, InlineStyleSheet} from "@bokehjs/core/dom" import {LayoutDOM, LayoutDOMView} from "@bokehjs/models/layouts/layout_dom" -import {UIElement} from "@bokehjs/models/ui/ui_element" -import {Document} from "@bokehjs/document" +import type {UIElement} from "@bokehjs/models/ui/ui_element" +import type {Document} from "@bokehjs/document" import {MessageSentEvent} from "@bokehjs/document/events" -import * as p from "@bokehjs/core/properties" +import type * as p from "@bokehjs/core/properties" import {isString} from "@bokehjs/core/util/types" import {assert} from "@bokehjs/core/util/assert" import {generate_require_loader} from "./loader" -import {WidgetManager, ModelBundle} from "./manager" +import type {ModelBundle} from "./manager" +import {WidgetManager} from "./manager" -import {WidgetView} from "@jupyter-widgets/base" +import type {WidgetView} from "@jupyter-widgets/base" const widget_managers: WeakMap = new WeakMap() @@ -65,7 +67,7 @@ export class IPyWidgetView extends LayoutDOMView { super.render() this.container = div({style: "display: contents;"}) // ipywidgets' APIs require HTMLElement, not DocumentFragment this.shadow_el.append(this.container) - this._render().then(() => { + void this._render().then(() => { this.invalidate_layout() // TODO: this may be overzealous; probably should be removed this.rendered = true this.notify_finished()