Unverified Commit d1c9aec4 authored by JJ Kasper's avatar JJ Kasper Committed by GitHub

Remove unused nccd node-fetch (#76241)

This vendored packaged is no longer needed as we removed the last usage
of it.

x-ref: https://github.com/vercel/next.js/pull/75741
parent 47f35006
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
{"name":"node-fetch","main":"index.js","author":"David Frank","license":"MIT"}
......@@ -60,7 +60,6 @@ const externals = {
'caniuse-lite': 'caniuse-lite',
'/caniuse-lite(/.*)/': 'caniuse-lite$1',
'node-fetch': 'node-fetch',
postcss: 'postcss',
// Ensure latest version is used
'postcss-safe-parser': 'next/dist/compiled/postcss-safe-parser',
......@@ -241,15 +240,6 @@ export async function copy_vercel_og(task, opts) {
)
}
// eslint-disable-next-line camelcase
externals['node-fetch'] = 'next/dist/compiled/node-fetch'
export async function ncc_node_fetch(task, opts) {
await task
.source(relative(__dirname, require.resolve('node-fetch')))
.ncc({ packageName: 'node-fetch', externals })
.target('src/compiled/node-fetch')
}
externals['anser'] = 'next/dist/compiled/anser'
externals['next/dist/compiled/anser'] = 'next/dist/compiled/anser'
export async function ncc_node_anser(task, opts) {
......@@ -2310,7 +2300,6 @@ export async function ncc(task, opts) {
'ncc_image_size',
'ncc_hapi_accept',
'ncc_commander',
'ncc_node_fetch',
'ncc_node_anser',
'ncc_node_stacktrace_parser',
'ncc_node_data_uri_to_buffer',
......
......@@ -72,6 +72,10 @@ describe('next/font', () => {
})
}
it('should not have deprecation warning', async () => {
expect(next.cliOutput.toLowerCase()).not.toContain('deprecation')
})
describe('import values', () => {
test('page with font', async () => {
const html = await renderViaHTTP(next.url, '/with-fonts')
......
......@@ -60,6 +60,10 @@ describe('AMP Usage', () => {
return killApp(app)
})
it('should not have deprecation warning', async () => {
expect(output.toLowerCase()).not.toContain('deprecation')
})
it('should have amp optimizer in trace', async () => {
const trace = JSON.parse(
readFileSync(join(appDir, '.next/next-server.js.nft.json'), 'utf8')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment