Explorar o código

Merge pull request #31 from brettz9/top-level-await

refactor: better API (top level await)
dragfyre %!s(int64=3) %!d(string=hai) anos
pai
achega
a8c916f2c6
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      bin/optionDefinitions.js

+ 2 - 2
bin/optionDefinitions.js

@@ -1,6 +1,6 @@
-import {readFileSync} from 'fs';
+import {readFile} from 'fs/promises';
 
-const pkg = JSON.parse(readFileSync(
+const pkg = JSON.parse(await readFile(
   new URL('../package.json', import.meta.url)
 ));