Skip to content

Commit 6f8d4bd

Browse files
committed
fix: move dotenv to dependencies and add Node.js version check
1 parent 89c9876 commit 6f8d4bd

3 files changed

Lines changed: 28 additions & 19 deletions

File tree

package-lock.json

Lines changed: 18 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
"@trustvc/trustvc": "^2.11.1",
3939
"@types/yargs": "^17.0.32",
4040
"chalk": "^4.1.2",
41+
"dotenv": "^16.0.0",
4142
"ethers": "^6.15.0",
4243
"inquirer": "^13.1.0",
4344
"node-fetch": "^3.3.2",
@@ -52,7 +53,6 @@
5253
"@types/tmp": "^0.2.6",
5354
"@typescript-eslint/eslint-plugin": "^8.50.1",
5455
"@typescript-eslint/parser": "^8.50.1",
55-
"dotenv": "^17.2.3",
5656
"eslint": "^8.57.0",
5757
"eslint-config-prettier": "^10.1.8",
5858
"eslint-formatter-table": "^7.32.1",

src/main.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
#!/usr/bin/env node
2+
const [major] = process.versions.node.split('.').map(Number);
3+
if (major < 22) {
4+
console.error(
5+
`Error: Node.js 22 or higher is required. You are using Node.js ${process.versions.node}.`,
6+
);
7+
console.error('Please upgrade: https://nodejs.org or use nvm: nvm install 22 && nvm use 22');
8+
process.exit(1);
9+
}
10+
211
import path from 'path';
312
import yargs from 'yargs';
413
import signale from 'signale';

0 commit comments

Comments
 (0)