1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 01:47:00 +01:00

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.
This commit is contained in:
Mark Stacey 2023-03-21 15:07:22 -02:30 committed by GitHub
parent 5e3770eb13
commit be63190b97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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) => {