🏗️✨ Add preinstall task to check package engines #2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR should alleviate some difficulty in determining causes of failure related to incorrect active versions of the Node.js toolchain described by @fusionstrings and myself #1. With this new task, prior to the installation of package dependencies (theoretically the step performed after cloning), a check will be performed to determine if the currently active tools satisfy SemVer version ranges specified in package engines. I wonder if this should also be performed prior to running the tests in case of version changes during development.
I may have put the cart before the horse by adding that initial sample. so I've moved it to another branch for now. It seems like a few more commits should follow this one to help ensure other environment-related problems don't bite us down the road (possibly something to guard against the difficulty @MylesBorins found). There are a few dependency-related checks I'd like to see (are pinned and up-to-date). The addition of a couple of GitHub actions or something like Renovate Bot may help here.