-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: bump d3-color to 3.1.0, add postinstall hook to fix export path (
#167)
- Loading branch information
Showing
3 changed files
with
21 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// We need to use the UMD version of the d3-color package, but we also | ||
// need to bump to a version where the ESM version has been made the default | ||
// due to a vulnerability (see https://github.com/d3/d3-color/issues/97). | ||
// Yarn v1 does not understand the package.json "exports" property, so we | ||
// must write the UMD export path into the "main" property. | ||
const d3ColorPackageJsonPath = '/node_modules/d3-color/package.json'; | ||
// eslint-disable-next-line import/no-dynamic-require | ||
const d3ColorPackageJson = require(process.cwd() + d3ColorPackageJsonPath); | ||
d3ColorPackageJson.main = d3ColorPackageJson.exports.umd; | ||
require('fs').writeFileSync(process.cwd() + d3ColorPackageJsonPath, JSON.stringify(d3ColorPackageJson, null, 2)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6217,6 +6217,11 @@ d3-color@1: | |
resolved "https://registry.yarnpkg.com/d3-color/-/d3-color-2.0.0.tgz#8d625cab42ed9b8f601a1760a389f7ea9189d62e" | ||
integrity sha512-SPXi0TSKPD4g9tw0NMZFnR95XVgUZiBH+uUTqQuDu1OsE2zomHU7ho0FISciaPvosimixwHFl3WHLGabv6dDgQ== | ||
|
||
[email protected]: | ||
version "3.1.0" | ||
resolved "https://registry.yarnpkg.com/d3-color/-/d3-color-3.1.0.tgz#395b2833dfac71507f12ac2f7af23bf819de24e2" | ||
integrity sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA== | ||
|
||
d3-dispatch@1: | ||
version "1.0.6" | ||
resolved "https://registry.yarnpkg.com/d3-dispatch/-/d3-dispatch-1.0.6.tgz#00d37bcee4dd8cd97729dd893a0ac29caaba5d58" | ||
|