Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused nccd node-fetch #76241

Merged
merged 4 commits into from
Feb 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion packages/next/src/compiled/node-fetch/index.js

This file was deleted.

1 change: 0 additions & 1 deletion packages/next/src/compiled/node-fetch/package.json

This file was deleted.

11 changes: 0 additions & 11 deletions packages/next/taskfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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',
Expand Down
4 changes: 4 additions & 0 deletions test/e2e/next-font/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
4 changes: 4 additions & 0 deletions test/integration/amphtml/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
Loading