Skip to content

Commit d1c9aec

Browse files
authored
Remove unused nccd node-fetch (#76241)
This vendored packaged is no longer needed as we removed the last usage of it. x-ref: #75741
1 parent 47f3500 commit d1c9aec

File tree

6 files changed

+9
-14
lines changed

6 files changed

+9
-14
lines changed

packages/next/src/compiled/@ampproject/toolbox-optimizer/index.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/next/src/compiled/node-fetch/index.js

-1
This file was deleted.

packages/next/src/compiled/node-fetch/package.json

-1
This file was deleted.

packages/next/taskfile.js

-11
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ const externals = {
6060
'caniuse-lite': 'caniuse-lite',
6161
'/caniuse-lite(/.*)/': 'caniuse-lite$1',
6262

63-
'node-fetch': 'node-fetch',
6463
postcss: 'postcss',
6564
// Ensure latest version is used
6665
'postcss-safe-parser': 'next/dist/compiled/postcss-safe-parser',
@@ -241,15 +240,6 @@ export async function copy_vercel_og(task, opts) {
241240
)
242241
}
243242

244-
// eslint-disable-next-line camelcase
245-
externals['node-fetch'] = 'next/dist/compiled/node-fetch'
246-
export async function ncc_node_fetch(task, opts) {
247-
await task
248-
.source(relative(__dirname, require.resolve('node-fetch')))
249-
.ncc({ packageName: 'node-fetch', externals })
250-
.target('src/compiled/node-fetch')
251-
}
252-
253243
externals['anser'] = 'next/dist/compiled/anser'
254244
externals['next/dist/compiled/anser'] = 'next/dist/compiled/anser'
255245
export async function ncc_node_anser(task, opts) {
@@ -2310,7 +2300,6 @@ export async function ncc(task, opts) {
23102300
'ncc_image_size',
23112301
'ncc_hapi_accept',
23122302
'ncc_commander',
2313-
'ncc_node_fetch',
23142303
'ncc_node_anser',
23152304
'ncc_node_stacktrace_parser',
23162305
'ncc_node_data_uri_to_buffer',

test/e2e/next-font/index.test.ts

+4
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ describe('next/font', () => {
7272
})
7373
}
7474

75+
it('should not have deprecation warning', async () => {
76+
expect(next.cliOutput.toLowerCase()).not.toContain('deprecation')
77+
})
78+
7579
describe('import values', () => {
7680
test('page with font', async () => {
7781
const html = await renderViaHTTP(next.url, '/with-fonts')

test/integration/amphtml/test/index.test.js

+4
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ describe('AMP Usage', () => {
6060
return killApp(app)
6161
})
6262

63+
it('should not have deprecation warning', async () => {
64+
expect(output.toLowerCase()).not.toContain('deprecation')
65+
})
66+
6367
it('should have amp optimizer in trace', async () => {
6468
const trace = JSON.parse(
6569
readFileSync(join(appDir, '.next/next-server.js.nft.json'), 'utf8')

0 commit comments

Comments
 (0)