Remove un-necessary undici warnings (#48970)

These warnings aren't actionable by users so this removes them from our
compiled undici version.

x-ref: [slack
thread](https://vercel.slack.com/archives/C04R82GSDBN/p1682704853867449?thread_ts=1682624317.557059&cid=C04R82GSDBN)
This commit is contained in:
JJ Kasper 2023-04-28 14:19:18 -05:00 committed by GitHub
parent 7b348fa0f2
commit d922e3d483
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 2 deletions

File diff suppressed because one or more lines are too long

View file

@ -292,6 +292,14 @@ export async function ncc_undici(task, opts) {
.source(relative(__dirname, require.resolve('undici')))
.ncc({ packageName: 'undici', externals })
.target('src/compiled/undici')
const outputFile = join('src/compiled/undici/index.js')
await fs.writeFile(
outputFile,
(
await fs.readFile(outputFile, 'utf8')
).replace(/process\.emitWarning/g, 'void')
)
}
// eslint-disable-next-line camelcase