victory-vendor

中文文档
38.0.0发布于 2026/11/04MIT AND ISC AND BSD-3-ClauseTypeScriptES Module构建来源已验证近 30 天下载 2亿

Vendored dependencies for Victory

原始使用文档
文档目录6 节
  1. Background
  2. Packages
  3. How it works
  4. ESM
  5. CommonJS
  6. Licenses

VictoryVendor

Vendored dependencies for Victory.

Background

D3 has released most of its libraries as ESM-only. This means that consumers in Node.js applications can no longer just require() anything with a d3 transitive dependency, including much of Victory.

To help provide an easy path to folks still using CommonJS in their Node.js applications that consume Victory, we now provide this package to vendor in various d3-related packages.

Packages

We presently provide the following top-level libraries:

  • d3-ease
  • d3-interpolate
  • d3-scale
  • d3-shape
  • d3-timer

This is the total list of top and transitive libraries we vendor:

  • d3-array
  • d3-color
  • d3-ease
  • d3-format
  • d3-interpolate
  • d3-path
  • d3-scale
  • d3-shape
  • d3-time
  • d3-time-format
  • d3-timer
  • internmap

Note that this does not include the following D3 libraries that still support CommonJS:

  • d3-voronoi

How it works

We provide two alternate paths and behaviors -- for ESM and CommonJS

ESM

If you do a Node.js import like:

import { interpolate } from "victory-vendor/d3-interpolate";

under the hood it's going to just re-export and pass you through to node_modules/d3-interpolate, the real ESM library from D3.

CommonJS

If you do a Node.js import like:

const { interpolate } = require("victory-vendor/d3-interpolate");

under the hood it's going to will go to an alternate path that contains the transpiled version of the underlying d3 library to be found at victory-vendor/lib-vendor/d3-interpolate/**/*.js. This futher has internally consistent import references to other victory-vendor/lib-vendor/<pkg-name> paths.

Note that for some tooling (like Jest) that doesn't play well with package.json:exports routing to this CommonJS path, we also output a root file in the form of victory-vendor/d3-interpolate.js.

Licenses

victory-vendor itself is released under the MIT license. It also bundles transpiled copies of third-party libraries (in lib-vendor/, used by the CommonJS build) that carry their own licenses:

LibraryLicense
d3-array, d3-color, d3-format, d3-interpolate, d3-path, d3-scale, d3-shape, d3-time, d3-time-format, d3-timer, internmapISC
d3-ease (includes Robert Penner's easing equations)BSD-3-Clause
d3-voronoi (includes Raymond Hill's Javascript-Voronoi, MIT)BSD-3-Clause AND MIT

The combined SPDX expression is MIT AND ISC AND BSD-3-Clause (see package.json:license). The full text of every license is in the published package's LICENSE.txt, and each library's original license is also kept at lib-vendor/<library>/LICENSE.

The ESM build (es/) re-exports the installed d3-* dependencies rather than bundling them, so ESM consumers get those licenses from the upstream packages directly.

版本与发布记录

victory-vendor 共发布 54 个版本,首次发布于 2022/05/11;过去 12 个月发布了 6 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
38.0.0latest2026/11/041 天前
38.0.0-canary-20261103184440next2026/11/041 天前
38.0.0-canary-202610280422222026/10/288 天前
37.4.12026/10/279 天前
37.4.02026/10/279 天前
37.4.0-canary-202610261809582026/10/279 天前

关于 victory-vendor 的常见问题

victory-vendor 是什么?

Vendored dependencies for Victory

如何安装 victory-vendor?

在项目目录运行 npm install victory-vendor,或使用 pnpm add / yarn add / bun add。

victory-vendor 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

victory-vendor 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

victory-vendor 可以商用吗?

victory-vendor 使用 MIT AND ISC AND BSD-3-Clause 许可。声明的许可为 MIT AND ISC AND BSD-3-Clause,请阅读许可原文确认使用条件。以上为概括,不构成法律意见,请以许可原文为准。

victory-vendor 的下载量有多少?

根据 npm 官方下载统计,victory-vendor 在 2026/10/05 – 2026/11/03 这 30 天内被下载 202,012,591 次,日均约 6,733,753 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

victory-vendor 还在维护吗?

最新版本 38.0.0 发布于 2026/11/04(1 天前);至今共发布 54 个版本,其中过去 12 个月发布了 6 个;首次发布于 2022/05/11。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。