Skip to content

refactor(deps): migrate d3 from v5.7.0 to v7.9.0#7067

Open
digital-wizard48 wants to merge 1 commit intotensorflow:masterfrom
digital-wizard48:deps/upgrade-d3-7.9.0
Open

refactor(deps): migrate d3 from v5.7.0 to v7.9.0#7067
digital-wizard48 wants to merge 1 commit intotensorflow:masterfrom
digital-wizard48:deps/upgrade-d3-7.9.0

Conversation

@digital-wizard48
Copy link

Changes

Version bumps

  • Updated d3 from 5.7.0 to 7.9.0 in package.json
  • Updated @types/d3 from 5.7.2 to 7.4.0 in package.json to match the new d3 major version

Breaking API changes addressed

d3.map() removed (d3 v6+)

In d3 v6, the d3.map(), d3.set(), d3.keys(), d3.values(), and d3.entries() collection helpers were removed in favor of native JavaScript Map, Set, Object.keys(), Object.values(), and Object.entries().

  • tensorboard/components/tf_color_scale/colorScale.ts: Replaced d3.map() usages with native new Map<string, string>(). The d3 import was also removed from this file since it is no longer needed after this migration.

Other d3 v6/v7 breaking changes (not present in provided files)

  • d3.event was removed; event handlers now receive the event as their first argument
  • d3.mouse, d3.touch, d3.touches, d3.clientPoint were removed in favor of d3.pointer
  • selection.on callbacks now receive (event, datum) instead of (datum, index, groups) with d3.event
  • d3.histogram was renamed to d3.bin
  • d3.ascending/d3.descending comparator argument order changed

These changes may affect other files in the codebase not included in this review.


This PR was auto-generated by Gittensor upgrade bot using Claude AI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants