Ver código fonte

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

refactor: better API (top level await)
dragfyre 3 anos atrás
pai
commit
a8c916f2c6
1 arquivos alterados com 2 adições e 2 exclusões
  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)
 ));