mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-02 02:00:49 +08:00
chore: restrict node version (#3120)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user