File tree Expand file tree Collapse file tree 3 files changed +16
-0
lines changed
Expand file tree Collapse file tree 3 files changed +16
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @graphprotocol/graph-cli ' : patch
3+ ---
4+
5+ error out if node is too old
Original file line number Diff line number Diff line change 11#!/usr/bin/env node
2+ import process from 'node:process' ;
3+ import semver from 'semver' ;
24import { execute } from '@oclif/core' ;
5+ import { nodeVersion } from '../dist/version.js' ;
6+
7+ if ( ! semver . satisfies ( process . version , nodeVersion ) ) {
8+ process . stderr . write (
9+ `Node.js version ${ nodeVersion } is required. Current version: ${ process . version } \n` ,
10+ ) ;
11+ process . exit ( 1 ) ;
12+ }
313
414await execute ( { dir : import . meta. url } ) ;
Original file line number Diff line number Diff line change @@ -15,3 +15,4 @@ const packageJson = JSON.parse(
1515) ;
1616
1717export const version = packageJson . version as string ;
18+ export const nodeVersion = ( packageJson . engines ?. node ?? '' ) as string ;
You can’t perform that action at this time.
0 commit comments