mirror of
https://github.com/grpc/grpc-node.git
synced 2025-12-08 18:23:54 +00:00
Merge pull request #897 from cjihrig/version-string
grpc-js: load semver range from package.json
This commit is contained in:
commit
f92e2a3a70
@ -41,7 +41,7 @@ import { Metadata } from './metadata';
|
||||
import { KeyCertPair, ServerCredentials } from './server-credentials';
|
||||
import { StatusBuilder } from './status-builder';
|
||||
|
||||
const supportedNodeVersions = '^8.13.0 || >=10.10.0';
|
||||
const supportedNodeVersions = require('../../package.json').engines.node;
|
||||
if (!semver.satisfies(process.version, supportedNodeVersions)) {
|
||||
throw new Error(`@grpc/grpc-js only works on Node ${supportedNodeVersions}`);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user