chore: restrict node version (#3120)

This commit is contained in:
Alex Yang authored and GitHub committed 2023-07-10 06:19:59 +00:00
1 parent 8bcc4d6a57
commit 05291a8a36
6 files changed
+43 -1

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
import semver from 'semver';
import packageJson from '../package.json' assert { type: 'json' };
const { engines } = packageJson;
const version = engines.node;
if (!semver.satisfies(process.version, version)) {
console.log(
`Required node version ${version} not satisfied with current version ${process.version}.`
);
process.exit(1);
}