Skip to content

Commit

Permalink
Update d3 TypeScript definitions from v5.16.0 to v7.4.0
Browse files Browse the repository at this point in the history
Update the d3 types in node_modules/@types from v5.16.0 to v7.4.0. Also
add more d3-*/ type files which are needed for type checking in the
upcoming chrome shopping side panel page.

Bug: b:277248593
Change-Id: Ia3a8f58a0346c65e4986b08779be70cb285155c2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4443317
Commit-Queue: Zhiyuan Cai <zhiyuancai@chromium.org>
Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1132563}
  • Loading branch information
Zhiyuan Cai authored and Chromium LUCI CQ committed Apr 19, 2023
1 parent f2af423 commit dc78b58
Show file tree
Hide file tree
Showing 6 changed files with 93 additions and 100 deletions.
8 changes: 3 additions & 5 deletions third_party/node/README.chromium
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,16 @@ https://github.com/microsoft/TypeScript/issues/30024
Name: Type Definition for D3 library
Short Name: @types/d3
URL: https://www.npmjs.com/package/@types/d3
Version: 5.16.0
Version: 7.4.0
License: MIT
Security Critical: No. The types are only used when type checking the discards
page.
Security Critical: No. The types are only used when type checking in Chrome.

Description:
This package contains type definitions for d3.

Local Modifications:
See chromium_d3_types_index.patch, which is used to reduce the types to only
the necessary parts of the library:
d3-drag, d3-force, d3-scale-chromatic, d3-selection, d3-transition.
the necessary parts of the library.

Name: Type Definition for W3C MediaStream Recording
Short Name: @types/dom-mediacapture-record
Expand Down
31 changes: 14 additions & 17 deletions third_party/node/chromium_d3_types_index.patch
Original file line number Diff line number Diff line change
@@ -1,38 +1,35 @@
diff -u a/index.d.ts b/index.d.ts
--- a/index.d.ts 2022-03-14 12:45:14.281492632 -0700
+++ b/index.d.ts 2022-03-14 12:44:58.281583117 -0700
@@ -20,34 +20,8 @@
*/
export const version: string;
--- a/index.d.ts 2023-04-18 22:15:22.964321937 +0000
+++ b/index.d.ts 2023-04-18 23:40:36.717062410 +0000
@@ -19,31 +19,16 @@

-export * from 'd3-array';
-export * from 'd3-axis';
export * from 'd3-array';
export * from 'd3-axis';
-export * from 'd3-brush';
-export * from 'd3-chord';
-export * from 'd3-collection';
-export * from 'd3-color';
export * from 'd3-color';
-export * from 'd3-contour';
-export * from 'd3-delaunay';
-export * from 'd3-dispatch';
export * from 'd3-drag';
-export * from 'd3-dsv';
-export * from 'd3-ease';
-export * from 'd3-fetch';
export * from 'd3-force';
-export * from 'd3-format';
export * from 'd3-format';
-export * from 'd3-geo';
-export * from 'd3-hierarchy';
-export * from 'd3-interpolate';
-export * from 'd3-path';
export * from 'd3-interpolate';
export * from 'd3-path';
-export * from 'd3-polygon';
-export * from 'd3-quadtree';
-export * from 'd3-random';
-export * from 'd3-scale';
export * from 'd3-scale';
export * from 'd3-scale-chromatic';
export * from 'd3-selection';
-export * from 'd3-shape';
-export * from 'd3-time';
-export * from 'd3-time-format';
export * from 'd3-shape';
export * from 'd3-time';
export * from 'd3-time-format';
-export * from 'd3-timer';
export * from 'd3-transition';
-export * from 'd3-voronoi';
-export * from 'd3-zoom';
2 changes: 1 addition & 1 deletion third_party/node/node_modules.tar.gz.sha1
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2531a8ebc9097c59eebfe21f167e1cc4cf265e2e
de0af8ec3401004cd1a420ab25892880330464c8
10 changes: 10 additions & 0 deletions third_party/node/npm_include.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
@types/chai/index.d.ts
@types/d3/index.d.ts
@types/d3-array/index.d.ts
@types/d3-axis/index.d.ts
@types/d3-color/index.d.ts
@types/d3-drag/index.d.ts
@types/d3-force/index.d.ts
@types/d3-format/index.d.ts
@types/d3-interpolate/index.d.ts
@types/d3-path/index.d.ts
@types/d3-scale/index.d.ts
@types/d3-scale-chromatic/index.d.ts
@types/d3-selection/index.d.ts
@types/d3-shape/index.d.ts
@types/d3-time/index.d.ts
@types/d3-time-format/index.d.ts
@types/d3-transition/index.d.ts
@types/dom-mediacapture-record
@types/dom-mediacapture-record/*.d.ts
Expand Down
140 changes: 64 additions & 76 deletions third_party/node/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion third_party/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"author": "dpapad@chromium.org",
"dependencies": {
"@types/chai": "4.2.22",
"@types/d3": "5.16.0",
"@types/d3": "7.4.0",
"@types/dom-mediacapture-transform": "0.1.4",
"@types/dom-speech-recognition": "0.0.1",
"@types/dom-webcodecs": "0.1.5",
Expand Down

0 comments on commit dc78b58

Please sign in to comment.