rsnext/packages/next
Chris Lloyd 52c2f8b4dd
Avoid fs write next-env.d.ts on read-only filesystems (#28206)
Next.js currently writes the TS type declarations on startup, regardless of the existing content of the file. This is good for ensuring the file content stays consistent. However, if the file content is already correct, this will perform an unnessecary write.

When running Next in read-only filesystems (such as the Bazel sandbox) this can cause the build to fail even if the content of the type declaration file is already correct.

This fixes this by only writing the contents of the file if the current contents don't match.

## Test Plan

Added an integration test for the general behavior of writing `next-env.d.ts`.
2021-08-18 00:41:51 +00:00
..
bin More React 17 clean up (#26775) 2021-08-02 19:14:31 +00:00
build let loaders automatically infer source map setting (#28204) 2021-08-17 17:48:48 +00:00
bundles update to webpack 5.50.0 (#27929) 2021-08-10 19:20:50 +00:00
cli [ESLint] Introduce a new setup process when next lint is run for the first time (#26584) 2021-08-04 21:53:15 +00:00
client fix development mode bug with pages with "+" and other special characters (#28122) 2021-08-17 12:13:33 -05:00
compiled Update to latest babel versions (#28174) 2021-08-17 09:18:08 +02:00
export Update to latest babel versions (#28174) 2021-08-17 09:18:08 +02:00
image-types Replace placeholder with blurDataURL in global StaticImageData type (#27916) 2021-08-10 15:51:08 +00:00
lib Avoid fs write next-env.d.ts on read-only filesystems (#28206) 2021-08-18 00:41:51 +00:00
native Next swc publish flow (redo) (#27984) 2021-08-12 12:22:50 +02:00
pages Update to latest babel versions (#28174) 2021-08-17 09:18:08 +02:00
server Update to latest babel versions (#28174) 2021-08-17 09:18:08 +02:00
shared/lib Update to latest babel versions (#28174) 2021-08-17 09:18:08 +02:00
telemetry Improve jaeger traces (#28168) 2021-08-17 09:18:47 +02:00
types Add entrypoint tracing (#25538) 2021-08-16 19:29:11 +00:00
amp.d.ts Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
amp.js Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
app.d.ts
app.js
babel.d.ts Remove re-exports of default when they don't exist (#9450) 2019-11-18 20:11:59 -06:00
babel.js
client.d.ts
client.js
config.d.ts Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
config.js Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
constants.d.ts Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
constants.js Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
data.d.ts Remove re-exports of default when they don't exist (#9450) 2019-11-18 20:11:59 -06:00
data.js
data.sqlite Fix export worker threads options (#25063) 2021-05-14 12:50:29 +02:00
document.d.ts
document.js
dynamic.d.ts Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
dynamic.js Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
error.d.ts
error.js
head.d.ts Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
head.js Move code shared between server/client to "shared" folder (#26734) 2021-06-30 11:43:31 +02:00
image.d.ts Image component foundation (#17343) 2020-10-14 11:57:10 +02:00
image.js Image component foundation (#17343) 2020-10-14 11:57:10 +02:00
license.md Update license year for all packages 2021-01-11 11:12:19 +01:00
link.d.ts
link.js
package.json v11.1.1-canary.10 2021-08-17 10:41:02 +02:00
README.md docs(readme.md): add good first issue section to readme (#25085) 2021-05-18 16:10:01 -05:00
router.d.ts
router.js
script.d.ts Remove experimental tag from Script component (#25435) 2021-06-03 13:56:50 +02:00
script.js Remove experimental tag from Script component (#25435) 2021-06-03 13:56:50 +02:00
taskfile-ncc.js Add nccing AMP optimizer (#21980) 2021-02-11 09:55:56 +00:00
taskfile-swc.js Update to latest babel versions (#28174) 2021-08-17 09:18:08 +02:00
taskfile.js Add entrypoint tracing (#25538) 2021-08-16 19:29:11 +00:00
tsconfig.json

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