# System map — d3/d3

> Canonical page: https://codevetter.com/unpack/d3/system-map

# System map — d3/d3

Scanned commit ca958d45217b4c15332d971b935451a6d4c978f4 (2026-05-28). Generated by codevetter codevetter 1.12.0 on 2026-09-22.

The runtime library boundary is a one-file barrel plus npm dependencies. Rollup turns bundle.js into dist/d3.js, dist/d3.mjs, and dist/d3.min.js. The docs app is VitePress under docs/, with the sidebar declared in docs/.vitepress/config.ts. There is no database or server. GitHub Actions tests on Node 20 with yarn, and the deploy workflow publishes the VitePress build to GitHub Pages after copying historical CDN assets from the sibling repo d3/d3.github.com.
- package.json names the package d3 at version 7.9.0, sets "type": "module", points main, module, and exports.default at ./src/index.js, and points exports.umd, jsdelivr, and unpkg at dist/d3.min.js. The npm files whitelist is dist/d3.js, dist/d3.min.js, and src/**/*.js, so the built dist/d3.mjs is not published. — [package.json#L1-36](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/package.json#L1-L36)
- src/index.js is the only library source file. It star-re-exports exactly thirty packages: d3-array, d3-axis, d3-brush, d3-chord, d3-color, d3-contour, d3-delaunay, d3-dispatch, d3-drag, d3-dsv, d3-ease, d3-fetch, d3-force, d3-format, d3-geo, d3-hierarchy, d3-interpolate, d3-path, d3-polygon, d3-quadtree, d3-random, d3-scale, d3-scale-chromatic, d3-selection, d3-shape, d3-time, d3-time-format, d3-timer, d3-transition, and d3-zoom. — [src/index.js#L1-30](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/src/index.js#L1-L30) [package.json#L37-68](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/package.json#L37-L68)
- bundle.js is the Rollup input. It re-exports version from ./package.json and star-re-exports ./src/index.js. — [bundle.js#L1-2](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/bundle.js#L1-L2) [rollup.config.js#L14-16](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/rollup.config.js#L14-L16)
- rollup.config.js reads Copyright lines from LICENSE into a banner, suppresses CIRCULAR_DEPENDENCY warnings, and emits three builds: dist/d3.js as UMD named d3 with extend true, dist/d3.mjs as ESM, and dist/d3.min.js as UMD minified by terser with InternMap and InternSet reserved from mangling. Plugins are @rollup/plugin-node-resolve and @rollup/plugin-json. — [rollup.config.js#L1-65](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/rollup.config.js#L1-L65) [LICENSE#L1-4](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/LICENSE#L1-L4)
- npm scripts: test runs mocha on test/**/*-test.js then eslint src test; prepublishOnly deletes dist and runs rollup -c; postpublish runs git push && git push --tags; docs:dev, docs:build, and docs:preview drive VitePress. docs:build prefixes the VitePress build with ./prebuild.sh. Docs scripts pass node --experimental-network-imports. engines.node is >=12. — [package.json#L81-91](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/package.json#L81-L91)
- The documentation site is VitePress. docs/.vitepress/config.ts sets title "D3 by Observable", description, appearance force-auto, cleanUrls, sitemap hostname https://d3js.org, a local search provider, and a themeConfig.sidebar that is the nav source of truth. Vite aliases the specifier d3 to ./dist/d3.mjs, swaps VPFooter.vue for CustomFooter.vue, and defines __APP_VERSION__ from npm_package_version. Custom elements whose tags start with observable- are allowed. — [docs/.vitepress/config.ts#L6-40](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/docs/.vitepress/config.ts#L6-L40) [docs/.vitepress/config.ts#L42-279](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/docs/.vitepress/config.ts#L42-L279)
- The VitePress theme extends vitepress/theme-without-fonts, replaces Layout with CustomLayout.vue, assigns globalThis.d3 for console use, and exposes $dark from useData().isDark. CustomLayout injects ExamplesGrid, ObservablePromo, and VersionAndStars into home and navbar slots. — [docs/.vitepress/theme/index.ts#L1-14](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/docs/.vitepress/theme/index.ts#L1-L14) [docs/.vitepress/theme/CustomLayout.vue#L1-27](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/docs/.vitepress/theme/CustomLayout.vue#L1-L27)
- Dev dependencies that bound the docs and build runtime are @observablehq/plot, @observablehq/runtime, rollup and its node-resolve, json, and terser plugins, eslint, mocha, topojson-client, and vitepress. There is no application server and no database; published state is the npm tarball plus the static site at docs/.vitepress/dist. — [package.json#L69-80](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/package.json#L69-L80) [.github/workflows/deploy.yml#L30-36](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/.github/workflows/deploy.yml#L30-L36)
- .github/workflows/test.yml runs on push and pull_request to main, on ubuntu-latest, with actions/setup-node node-version 20 and cache yarn. Steps are yarn --frozen-lockfile, eslint src test --format=compact using the problem matcher .github/eslint.json, yarn test, yarn prepublishOnly, and yarn docs:build. — [.github/workflows/test.yml#L1-25](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/.github/workflows/test.yml#L1-L25) [.github/eslint.json#L1-17](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/.github/eslint.json#L1-L17)
- .github/workflows/deploy.yml runs on workflow_dispatch and push to main. It checks out this repo, checks out d3/d3.github.com into build/d3.github.com, installs with yarn --frozen-lockfile on Node 20, runs yarn prepublishOnly and yarn docs:build, and deploys docs/.vitepress/dist via actions/upload-pages-artifact and actions/deploy-pages with pages:write and id-token:write on the github-pages environment. — [.github/workflows/deploy.yml#L1-36](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/.github/workflows/deploy.yml#L1-L36)
- prebuild.sh (no set -e) copies hundreds of historical files from ./build/d3.github.com into docs/public, then overwrites the current major-line bundles: dist/d3.js and dist/d3.min.js become docs/public/d3.v7.js and d3.v7.min.js, and each dependency's node_modules/<pkg>/dist bundle is copied to a versioned name such as d3-scale.v4.js, d3-contour.v4.js, d3-delaunay.v6.js, and d3-time-format.v4.js. .gitignore ignores dist/, node_modules, docs/.vitepress/cache, docs/.vitepress/dist, and those generated public bundles. — [prebuild.sh#L1-4](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/prebuild.sh#L1-L4) [prebuild.sh#L628-690](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/prebuild.sh#L628-L690) [.gitignore#L1-7](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/.gitignore#L1-L7)
- CHANGES.md states that D3 7.0 ships as pure ES modules and requires Node.js 12 or higher. API.md is only a pointer: the API reference now lives on the documentation website. README.md points readers at https://d3js.org, the Observable gallery, GitHub releases, and the community page. — [CHANGES.md#L1-7](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/CHANGES.md#L1-L7) [API.md#L1-3](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/API.md#L1-L3) [README.md#L1-22](https://github.com/d3/d3/blob/ca958d45217b4c15332d971b935451a6d4c978f4/README.md#L1-L22)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
