Эх сурвалжийг харах

fix: supply `command-line-basics` with notifier info

Brett Zamir 4 сар өмнө
parent
commit
4703470036
2 өөрчлөгдсөн 5 нэмэгдсэн , 6 устгасан
  1. 4 5
      bin/bahai-date-api.js
  2. 1 1
      package.json

+ 4 - 5
bin/bahai-date-api.js

@@ -1,16 +1,15 @@
 #!/usr/bin/env node
 
-import {dirname, join} from 'path';
-import {fileURLToPath} from 'url';
 import {cliBasics} from 'command-line-basics';
 import {
   getDate, getTodayJSON
 } from '../api/controllers/bDateController.js';
 
-const __dirname = dirname(fileURLToPath(import.meta.url));
-
 const optionDefinitions = await cliBasics(
-  join(__dirname, './optionDefinitions.js')
+  import.meta.dirname + '/optionDefinitions.js',
+  {
+    packageJsonPath: import.meta.dirname + '/../package.json'
+  }
 );
 
 if (!optionDefinitions) { // cliBasics handled

+ 1 - 1
package.json

@@ -18,7 +18,7 @@
     "test": "echo \"Error: No test specified\" && exit 1"
   },
   "engines": {
-    "node": ">=14.8.0"
+    "node": "^20.11.0 || >=22.0.0"
   },
   "repository": {
     "type": "git",