From 2dacb49d64c1c41be8e80a8e66d76d5a2f50200c Mon Sep 17 00:00:00 2001 From: Luke Karrys Date: Mon, 8 Apr 2024 09:56:17 -0700 Subject: [PATCH] fix: use fs/promises instead of util.promisify --- lib/is.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/is.js b/lib/is.js index e2542f2..f5a0e87 100644 --- a/lib/is.js +++ b/lib/is.js @@ -1,6 +1,4 @@ // not an airtight indicator, but a good gut-check to even bother trying -const { promisify } = require('util') -const fs = require('fs') -const stat = promisify(fs.stat) +const { stat } = require('fs/promises') module.exports = ({ cwd = process.cwd() } = {}) => stat(cwd + '/.git').then(() => true, () => false)