Ver código fonte

refactor: better API (top level await)

Brett Zamir 3 anos atrás
pai
commit
46c09f741f
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)
 ));