From be63190b97894e9f4b1f4d6529435f513dfb4fdf Mon Sep 17 00:00:00 2001 From: Mark Stacey Date: Tue, 21 Mar 2023 15:07:22 -0230 Subject: [PATCH] Remove use of `pify` from the static-server script (#18239) The static server script no longer uses `pify`. `pify` was being used to promisify the `fs.stat` function, but that function has a built-in Promise-supporting API that is now used instead. --- development/static-server.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/development/static-server.js b/development/static-server.js index facdc915b..bb15133d6 100755 --- a/development/static-server.js +++ b/development/static-server.js @@ -1,14 +1,13 @@ #!/usr/bin/env node -const fs = require('fs'); +const fs = require('fs').promises; const path = require('path'); const chalk = require('chalk'); -const pify = require('pify'); const createStaticServer = require('./create-static-server'); const { parsePort } = require('./lib/parse-port'); -const fsStat = pify(fs.stat); +const fsStat = fs.stat; const DEFAULT_PORT = 9080; const onResponse = (request, response) => {