From 94c1962ccd0a3fc40a51f3a9c77d47408c1b39c7 Mon Sep 17 00:00:00 2001 From: s0wa48 Date: Wed, 4 Mar 2026 20:13:59 +0100 Subject: [PATCH] refactor(deps): migrate d3 from v5.7.0 to v7.9.0 --- package.json | 4 ++-- tensorboard/components/tf_color_scale/colorScale.ts | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index f35eba88104..1a66ff3776f 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "@bazel/jasmine": "5.7.0", "@bazel/terser": "5.7.0", "@bazel/typescript": "5.7.0", - "@types/d3": "5.7.2", + "@types/d3": "7.4.0", "@types/jasmine": "^3.8.2", "@types/lodash": "^4.14.172", "@types/marked": "^2.0.4", @@ -117,7 +117,7 @@ "@tensorflow/tfjs-backend-webgl": "3.4.0", "@tensorflow/tfjs-core": "3.4.0", "@vaadin/vaadin-grid": "^20.0.2", - "d3": "5.7.0", + "d3": "7.9.0", "dagre": "^0.8.5", "lodash": "^4.17.19", "marked": "^4.0.10", diff --git a/tensorboard/components/tf_color_scale/colorScale.ts b/tensorboard/components/tf_color_scale/colorScale.ts index f92e6bfb9d0..707b7453556 100644 --- a/tensorboard/components/tf_color_scale/colorScale.ts +++ b/tensorboard/components/tf_color_scale/colorScale.ts @@ -12,7 +12,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -import * as d3 from 'd3'; import {BaseStore} from '../tf_backend/baseStore'; import {experimentsStore} from '../tf_backend/experimentsStore'; import {runsStore} from '../tf_backend/runsStore'; @@ -25,7 +24,7 @@ import {standard} from './palettes'; // ccs.getColor("train"); // ccs.getColor("test1"); export class ColorScale { - private identifiers = d3.map(); + private identifiers = new Map(); /** * Creates a color scale with optional custom palette. * @param {Array} palette The color palette to use, as an @@ -38,7 +37,7 @@ export class ColorScale { * domain for your scale. */ public setDomain(strings: string[]): this { - this.identifiers = d3.map(); + this.identifiers = new Map(); strings.forEach((s, i) => { this.identifiers.set(s, this.palette[i % this.palette.length]); });