victory-vendor: published package ships no license file, and the `license` field misses BSD-3-Clause
Summary
The published victory-vendor package (checked with 37.3.6) contains no license file in its package root. Its own MIT license (Formidable Labs) isn't included at all, and the vendored d3 license notices are only available inside lib-vendor/*/LICENSE. In addition, the license field says "MIT AND ISC", but two of the vendored libraries are BSD-3-Clause.
Details
1. No license file in the package root
curl -sL https://registry.npmjs.org/victory-vendor/-/victory-vendor-37.3.6.tgz | tar -tz | grep -i -E '^package/(licen|copying|notice)'
# (no output)packages/victory-vendor/.npmignore already allows LICENSE.txt (!LICENSE.txt), but the file doesn't exist in packages/victory-vendor/. Other packages from this monorepo do ship it: [email protected] contains package/LICENSE.txt with the Formidable Labs MIT license, even though packages/victory-core/ doesn't contain the file either. So some publish step seems to add it for the other packages but not for victory-vendor.
2. The CommonJS build contains copies of d3, but their notices can't be found from the package root
The default (CommonJS) export condition points to lib/d3-*.js, which loads the copies in lib-vendor/d3-*/src/. lib-vendor/d3-*/ has no package.json, so tooling counts this code as part of victory-vendor. The d3 license files next to it (lib-vendor/d3-*/LICENSE, copied by scripts/build.js) are not discovered by tools that only read the package root, which is what license tooling usually does. For example, Vite's build.license looks for a LICENSE* / LICENCE* / COPYING* file only in the root of the package a bundled module belongs to.
The ESM build (es/d3-*.js) only contains export * from "d3-*" and uses the installed d3-* dependencies, so ESM consumers get the d3 notices from those packages. For them, only the MIT notice for victory-vendor itself is missing.
3. license field is incomplete
Licenses of the vendored copies in lib-vendor/ of 37.3.6:
| Library | License |
|---|---|
| d3-array, d3-color, d3-format, d3-interpolate, d3-path, d3-scale, d3-shape, d3-time, d3-time-format, d3-timer, internmap | ISC |
| d3-ease (includes Robert Penner's easing equations) | BSD-3-Clause |
| d3-voronoi | BSD-3-Clause |
So the SPDX expression would be MIT AND ISC AND BSD-3-Clause.
Impact
Tools that generate third-party notices for bundled code can't find a license text for victory-vendor:
- Vite's
build.licenselistsvictory-vendor - 37.3.6 (MIT AND ISC)with no text. @quantco/pnpm-licensesdrops the package from its output entirely (reported in Quantco/pnpm-licenses#17).
Every project that bundles recharts (which depends on victory-vendor) and ships license notices has to fix this by hand. For CommonJS consumers, the d3 notices for the vendored copies are also missing.
Proposed fix
- Ship a
LICENSE.txtin thevictory-vendorpackage root that contains the Formidable Labs MIT license, followed by the notices of the vendored libraries. Alternatively, a separate third-party notices file, referenced fromLICENSE.txt.scripts/build.jsalready copies each vendored library'sLICENSEintolib-vendor/, so it could concatenate them into the root file as well. - Change the
licensefield to"MIT AND ISC AND BSD-3-Clause".
Assisted-by: Claude Code (Opus 5.5)
Source: FormidableLabs/victory