d3-cloud を 1.x から 2.x へアップグレード
d3-cloud 1.2.9 と 2.0.0 の公開 API を、TypeScript の型から自動的に比較したものです。シグネチャの変更は破壊的変更の候補であり、確定ではありません。
概要
| 削除されたインポートパス | 0 |
|---|---|
| 削除されたエクスポート | 0 |
| 変更されたシグネチャ | 0 |
| 削除されたクラス/インターフェースのメンバー | 0 |
| 変更されたクラス/インターフェースのメンバー | 0 |
| 新たに非推奨 | 0 |
| 要件の変更(engines、peer 依存関係) | 1 |
| 新しいエクスポート | 23 |
削除されたエクスポート
検出されませんでした。
変更されたシグネチャ
検出されませんでした。
削除されたクラス/インターフェースのメンバー
検出されませんでした。
変更されたクラス/インターフェースのメンバー
検出されませんでした。
新たに非推奨
検出されませんでした。
要件の変更(engines、peer 依存関係)
| 変更前 | 変更後 | |
|---|---|---|
engines.node | — | >=20 |
新しいエクスポート (23)
| import | export | kind |
|---|---|---|
d3-cloud | Bounds | type |
d3-cloud | default | class |
d3-cloud | ImageLike | type |
d3-cloud | CanvasLike | interface |
d3-cloud | TextSource | type |
d3-cloud | BoundsPoint | interface |
d3-cloud | CloudLayout | class |
d3-cloud | CloudSprite | class |
d3-cloud | PlaceOptions | interface |
d3-cloud | PlacedSprite | interface |
d3-cloud | RandomSource | type |
d3-cloud | StrategyName | type |
d3-cloud | StrategySeed | interface |
d3-cloud | noneStrategy | function |
d3-cloud | CanvasFactory | type |
d3-cloud | SpriteOptions | interface |
d3-cloud | StrategyContext | interface |
d3-cloud | StrategyFactory | type |
d3-cloud | StrategyCandidate | type |
d3-cloud | StrategyGenerator | type |
d3-cloud | ImageSpriteOptions | interface |
d3-cloud | archimedeanStrategy | function |
d3-cloud | rectangularStrategy | function |
これらのバージョン間の changelog
パッケージ作者が公開したテキストをそのまま表示しています。
2.0.0
See the [1.x to 2.x migration guide](./MIGRATING.md) before upgrading.
Dependencies constrained to 1.x continue to use the old API.
### Breaking
- Set the minimum Node.js version to 20, matching the CI test matrix.
- Switched the package to ESM-only publishing and removed the old Browserify /
CommonJS distribution shape.
- Removed the UMD/script-tag build, the `d3.layout.cloud` global, and the
`d3-dispatch` dependency. Browser scripts must use ESM imports.
- Changed the default rotation from random multiples of 30 degrees to zero,
and the default font size from `sqrt(value)` to 1. Set styling explicitly.
- Input word objects are no longer mutated. Placement returns separate plain
words, and callers control the word ordering.
- Custom data is carried in a single `datum` option, stored by reference on
sprites and placed words. Other option fields are ignored rather than copied
onto sprites and results, so built-in field names are no longer reserved.
- Replaced the old event-driven factory API (`start()`, `stop()`, `on()`,
`words()`, `timeInterval()`, accessor-based text/font configuration) with the
class-based `CloudLayout` / `CloudSprite` API.
- Replaced the old `spiral()` API with `strategy()`.
- Moved source files under `src/` and renamed the browser bundle to
`build/d3-cloud.js`.
- Changed placement configuration so `size([width, height])` defines the
centered layout box, while `overflow(true | false)` controls whether
placement may extend beyond that box.
- Text padding now uses round stroke joins instead of the canvas default miter
joins, so padding extends exactly `padding` pixels from the glyph outline
rather than up to ten times that at sharp corners. Padded masks, and layouts
that depend on them, differ from 1.x.
- The rectangular strategy now visits every point of a 4-pixel grid in rings
shaped to the aspect ratio, instead of stepping four pixels times the aspect
ratio along the longer axis. Rectangular layouts differ from 1.x, and pack
densely at any aspect ratio.
- Both built-in spirals stretch to the aspect ratio only up to 64:1. Beyond
that they barely moved along the shorter axis, so a search starting in a
blocked column or row could take minutes and then fail. Layouts with more
extreme aspect ratios differ from 1.x.
- Invalid arguments throw instead of being silently replaced: non-finite
coordinates, sizes, rotations, padding, image dimensions and strategy
candidates; negative padding; `size()` dimensions outside 0–16,777,216;
`blockSize()` outside 1–4096; a `random()` that is not a function or returns
anything but a number in `[0, 1)`; fonts the canvas rejects; canvases
without a 2d context; and canvases whose `getImageData()` returns more than
one pixel per canvas unit, as some old high-density WebKit canvases did.
### Added
- Added `CloudLayout.getSprite(...)` for explicit sprite preparation and
`place()` for caller-controlled placement. Sprites are immutable masks with
このデータを AI エージェントに渡す
Vigia は無料の MCP サーバーです。コーディングエージェントがコードを書く前に、バージョン・破壊的変更・脆弱性を確認できます。登録も API キーも不要です。
claude mcp add --transport http vigia https://vigia.coredls.cloud/mcp
Cursor に追加VS Code に追加★ GitHub でスターを付ける
その他の MCP クライアント
{ "mcpServers": { "vigia": { "url": "https://vigia.coredls.cloud/mcp" } } }エージェント用スキル (SKILL.md):Vigia を使うタイミングをエージェントに伝えます · プルリクエスト用 GitHub Action
よくある質問
d3-cloud を 1 から 2 にアップグレードする際の破壊的変更は?
d3-cloud 1.2.9 と 2.0.0 の間で、Vigia は削除されたエクスポートを 0 件、変更されたシグネチャを 0 件、削除または変更されたクラス/インターフェースのメンバーを 0 件検出しました。
d3-cloud 2 で非推奨になったものは?
d3-cloud 2.0.0 では 0 件のエクスポートまたはメンバーが新たに非推奨になりました。
エージェント向け
GET https://vigia.coredls.cloud/v1/packages/npm/d3-cloud/upgrade?from=1.2.9&to=2.0.0