-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add check for min required node version. Currently supported version …
…19.9.0 Add check for min required node version. Currently supported version 19.9.0
- Loading branch information
Showing
4 changed files
with
46 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,12 @@ | ||
export * from './neynar-api' | ||
const semver = require("semver"); | ||
const requiredVersion = require("../package.json").engines.node; | ||
|
||
// Check Node.js version before requiring/doing anything else | ||
if (!semver.satisfies(process.version, requiredVersion)) { | ||
console.error( | ||
`Unsupported Node.js version! Your version: ${process.version}. Required version: ${requiredVersion}.` | ||
); | ||
process.exit(1); | ||
} | ||
|
||
export * from "./neynar-api"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters