This PR is adding validation for packages listed in package.json for actions. Specifically, it ensures that versions of packages stated in package.json comply with constraints specified for different versions of web3 action runtimes.
The validation occurs during the build phase, before the publish/deploy phase.
Two new files are being added to introduce the validation:
commands/util/packagejson/constraints.go, containing the mapping between constraints and runtimes;
commands/util/packagejson/validator.go, containing the validator logic.
The validator itself uses npm view command to fetch versions from the npm registry.
Description
This PR is adding validation for packages listed in
package.json
for actions. Specifically, it ensures that versions of packages stated inpackage.json
comply with constraints specified for different versions of web3 action runtimes.The validation occurs during the
build
phase, before thepublish
/deploy
phase.Two new files are being added to introduce the validation:
commands/util/packagejson/constraints.go
, containing the mapping between constraints and runtimes;commands/util/packagejson/validator.go
, containing the validator logic.The validator itself uses
npm view
command to fetch versions from the npm registry.