rsnext/packages/next
Luis Alvarez D 31a538d68b
Update @types/node-fetch to latest (#36953)
Currently, if you try the following code while developing with Next.js inside Middleware:

```ts
const url = new URL(MY_URL)
const res = await fetch(url)
```

The app will work as expected, and so will the dom types for TS 4.5+. However when running `next build` or `tsc` typescript fails with:

<img width="837" alt="image" src="https://user-images.githubusercontent.com/4278345/168647502-06b8b223-e0cf-4e8b-9a82-cdac51748789.png">

The types for `node-fetch` have been updated to include `URL` so this PR updates the dependency to fix it.

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`
2022-05-16 17:45:22 +00:00
..
bin Support graceful shutdowns (#36909) 2022-05-16 14:40:39 +00:00
build Add additional layer for server components case (#36921) 2022-05-16 11:46:45 +02:00
bundles update webpack (#35867) 2022-04-07 16:00:26 +00:00
cli chore: clarify CLI network errors (#36567) 2022-04-29 12:39:17 +00:00
client Drop the unstable web vital hook and remove exports of flush effects (#36912) 2022-05-14 21:20:24 +00:00
compiled replace use-subscription with use-sync-external-store (#36733) 2022-05-08 12:19:33 +00:00
export fix(#36855/#30300): export 404.html correctly (#36910) 2022-05-14 13:57:48 +00:00
image-types Don't import internally from types in next-env.d.ts (#34394) 2022-02-19 04:25:49 +01:00
lib Update client router for tests (#36822) 2022-05-12 20:52:59 +00:00
pages Tweak routing tests (#36667) 2022-05-05 13:15:32 +02:00
server Add additional layer for server components case (#36921) 2022-05-16 11:46:45 +02:00
shared/lib Drop the unstable web vital hook and remove exports of flush effects (#36912) 2022-05-14 21:20:24 +00:00
telemetry Telemetry: track usage of 'experimental/nextScriptWorkers' (#36812) 2022-05-11 19:18:44 +00:00
trace feat(trace): postprocess trace reporter for datadog (#35032) 2022-03-08 08:15:09 -08:00
types Add falling back to wasm swc build on native load failure (#36612) 2022-05-02 21:11:45 +00:00
amp.d.ts
amp.js
app.d.ts Improve exported root definitions (#32077) 2021-12-03 07:16:29 +00:00
app.js
babel.d.ts
babel.js
client.d.ts Improve exported root definitions (#32077) 2021-12-03 07:16:29 +00:00
client.js
config.d.ts Improve exported root definitions (#32077) 2021-12-03 07:16:29 +00:00
config.js
constants.d.ts
constants.js
data.d.ts
data.js
data.sqlite
document.d.ts Fix document type import path (#32117) 2021-12-04 10:23:15 +00:00
document.js
dynamic.d.ts Improve exported root definitions (#32077) 2021-12-03 07:16:29 +00:00
dynamic.js
error.d.ts Improve exported root definitions (#32077) 2021-12-03 07:16:29 +00:00
error.js
head.d.ts Improve exported root definitions (#32077) 2021-12-03 07:16:29 +00:00
head.js fix(#36435): apply correct fix (#36464) 2022-04-26 11:15:49 -05:00
image.d.ts Improve exported root definitions (#32077) 2021-12-03 07:16:29 +00:00
image.js
index.d.ts Include submodules in exported type definition (#28316) 2021-11-26 14:46:56 +01:00
jest.d.ts Improve exported root definitions (#32077) 2021-12-03 07:16:29 +00:00
jest.js fix(#36534): enable interopClientDefaultExport for next/jest (#36824) 2022-05-11 13:13:13 -05:00
license.md Update license year 2022-01-13 16:02:34 +01:00
link.d.ts Improve exported root definitions (#32077) 2021-12-03 07:16:29 +00:00
link.js
package.json Update @types/node-fetch to latest (#36953) 2022-05-16 17:45:22 +00:00
README.md
router.d.ts Improve exported root definitions (#32077) 2021-12-03 07:16:29 +00:00
router.js
script.d.ts Improve exported root definitions (#32077) 2021-12-03 07:16:29 +00:00
script.js
server.d.ts Add TS types for NextMiddleware (#30578) 2021-11-30 20:43:40 +00:00
server.js Convert server.js to module.exports (#35181) 2022-03-09 22:50:07 +00:00
streaming.d.ts Group streaming experimental apis (#33878) 2022-02-02 13:42:14 +00:00
streaming.js Group streaming experimental apis (#33878) 2022-02-02 13:42:14 +00:00
taskfile-ncc.js Update to latest ncc and ensure caniuse-lite data is external (#32064) 2021-12-08 10:41:35 -06:00
taskfile-swc.js Make esm default interpolation work with jest mock (#36877) 2022-05-13 16:39:38 +00:00
taskfile.js fix(#36534): enable interopClientDefaultExport for next/jest (#36824) 2022-05-11 13:13:13 -05:00
tsconfig.json Integrate tsec into the linting process (#33746) 2022-02-24 16:59:18 -08:00

Next.js

Getting Started

Visit https://nextjs.org/learn to get started with Next.js.

Documentation

Visit https://nextjs.org/docs to view the full documentation.

Who is using Next.js?

Next.js is used by the world's leading companies. Check out the Next.js Showcase to learn more.

Community

The Next.js community can be found on GitHub Discussions, where you can ask questions, voice ideas, and share your projects.

To chat with other community members you can join the Next.js Discord.

Our Code of Conduct applies to all Next.js community channels.

Contributing

Please see our contributing.md.

Good First Issues

We have a list of good first issues that contain bugs which have a relatively limited scope. This is a great place to get started, gain experience, and get familiar with our contribution process.

Authors