Skip to content

Commit 7c5b185

Browse files
kanejschaable
andauthored
feat: plugin install validation (#5261)
Validates the plugins provided through the initial config object. If the plugin comes from an npm package check that the package has been installed. If the plugin is present further confirm that peer dependencies have been installed. It then checks that the installed version falls within the range of the originating package. This leverages the node require mechanism based on `process.cwd()` as the starting directory. It supports peer dependencies installed not in the top level `node_modules` but a sub-`node_modules` of the package of the plugin. Resolves #5256 --------- Co-authored-by: Luis Schaab <[email protected]>
1 parent 3c87b5f commit 7c5b185

File tree

26 files changed

+380
-40
lines changed

26 files changed

+380
-40
lines changed

pnpm-lock.yaml

+39-33
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

v-next/core/package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
"@nomicfoundation/eslint-plugin-slow-imports": "workspace:^",
5454
"@reporters/github": "^1.7.0",
5555
"@types/node": "^20.0.0",
56+
"@types/semver": "^7.5.8",
5657
"@typescript-eslint/eslint-plugin": "^7.7.1",
5758
"@typescript-eslint/parser": "^7.7.1",
5859
"c8": "^9.1.0",
@@ -73,6 +74,7 @@
7374
"dependencies": {
7475
"@nomicfoundation/hardhat-errors": "workspace:^3.0.0",
7576
"@nomicfoundation/hardhat-utils": "workspace:^3.0.0",
76-
"chalk": "^5.3.0"
77+
"chalk": "^5.3.0",
78+
"semver": "^7.6.2"
7779
}
7880
}

0 commit comments

Comments
 (0)