Commit graph

8999 commits

Author SHA1 Message Date
Behzad Mehrabi
d6e82484f4
fix link to global stylesheet in from-create-react-app.md (#28327) 2021-08-20 12:18:27 +00:00
Aryan Beezadhur
864a1893c3
Update supported-browsers-features.md (#28326) 2021-08-20 11:52:20 +00:00
Jiachi Liu
b74ffffa96
Fix next env vars injection in dynamic (#28309)
* Treat `next/dynamic` as non external modules
* add feature flags to webpack cache version
2021-08-20 03:50:11 +00:00
hiro
a9c1bd797d
Fixed typos that existed on some files (#28314)
* fix: naviagtion -> navigation

* fix: compatability -> compatibility
2021-08-19 21:54:13 -05:00
stefanprobst
da4203d032
Add eslint rule for id attribute on inline next/script (#27853)
This adds a new ESLint rule to `eslint-plugin-next` to check that `next/script` components with inline content have the required `id` attribute.

Also adjusted the code example for inline scripts in the `next/script` docs, which were actually missing an `id` attribute.
And also updated the `next/scripts` integration test to also have the required `id` attribute.

Unsure about the required heading levels in the errors .md document (other examples have h1 and h4??)

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [x] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [x] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes
2021-08-19 20:08:04 +00:00
jj@jjsweb.site
52b858a4ea
v11.1.1-canary.13 2021-08-19 12:27:49 -05:00
JJ Kasper
f525ab6909
Use temp repo copy while linking packages (#28301)
* Use temp repo copy while linking packages

* Apply suggestions from code review

Co-authored-by: Jiachi Liu <inbox@huozhi.im>

Co-authored-by: Jiachi Liu <inbox@huozhi.im>
2021-08-19 12:23:18 -05:00
Houssein Djirdeh
4e7691139f
[ESLint] Adds process.exit to next lint success output (#28299)
This PR ensures that `next lint` always exits after the process is complete. This fixes #28194.
2021-08-19 17:16:59 +00:00
jj@jjsweb.site
517ea6dc20
v11.1.1-canary.12 2021-08-19 11:25:39 -05:00
Tobias Koppers
426d732feb
upgrade webpack to 5.51.1 (#28291)
https://github.com/webpack/webpack/releases/tag/v5.51.0
2021-08-19 15:32:17 +00:00
Brody McKee
0d3fb75cb6
Add docs for ESLint plugin settings and rule options (#28059)
This PR adds documentation for the new `rootDir` setting (#27918), and for `next/no-html-link-for-pages`.

## Documentation / Examples

- [x] Make sure the linting passes
2021-08-19 09:07:30 +00:00
JJ Kasper
9b09b92a14
Ensure adding _app/_document HMRs correctly (#28279)
This is a follow-up to https://github.com/vercel/next.js/pull/28227 to ensure `_app` and `_document` HMR correctly when you start the dev server and then add `_app` and `_document`. 

## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added
- [x] Errors have helpful link attached, see `contributing.md`

x-ref: https://github.com/vercel/next.js/issues/27888
2021-08-19 08:12:12 +00:00
Steven
53f0973aba
Fix next/image blur placeholder when JS is disabled (#28269)
This PR does a few things:

- Moves `<noscript>` usage below the blur image since so that the `<noscript>` image renders on top of the blur image
- Remove the `isVisible` check for `<noscript>` since we can't rely on client-side JS
- Add `loading=lazy` to the `<noscript>` image to take advantage of native lazy loading (can't rely on JS lazy loading)

Fixes #28251
2021-08-19 04:26:07 +00:00
JJ Kasper
f2fa4f34fe
Ensure all packages are packed while tracing (#28263)
* Ensure all packages are packed while tracing

* bump
2021-08-18 16:30:04 -05:00
JJ Kasper
a342fba00a
Update polling env var for tests in CI (#28264)
* Update polling env var for tests in CI

* Update polling value

* always use polling

* Revert "always use polling"

This reverts commit 281875de921874592a6755d67acaad7441c06e22.

* test disabling tcp/udp offloading

* fix quotes
2021-08-18 15:29:15 -05:00
jj@jjsweb.site
f4b85dc9e8
v11.1.1-canary.11 2021-08-18 11:30:31 -05:00
JJ Kasper
15e8019263
Update generating next-server dependencies (#28223)
* Update generating next-server dependencies

* Update tests

* ensure stale cache is not used
2021-08-18 10:41:40 -05:00
Tim Neutkens
e920dbc6e6
Add relationship between issuer and module to traces (#28192) 2021-08-18 14:22:53 +02:00
JJ Kasper
17d7e59339
Fix HMR when custom _app or _document is removed (#28227)
This adds the fallback webpack alias handling to handle a custom `_app` or `_document` being removed in development gracefully. 
 
## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added
- [x] Errors have helpful link attached, see `contributing.md`

Fixes: https://github.com/vercel/next.js/issues/27888
2021-08-18 11:01:02 +00:00
Gerald Monaco
51559f5c64
Use zen-observable library (#28214)
Our `Observable` use has gotten sufficiently complex that it makes sense to just use a 3rd party implementation and not worry about maintaining it ourselves. As a bonus, it doesn't rely on Node APIs.
2021-08-18 03:29:43 +00:00
Steven
ce187563ef
Add warning when parent styles break next/image (#28221)
Fixes #27644
2021-08-18 02:05:10 +00:00
Jiachi Liu
7ea7c23866
Document usage of suspense option of next/dynamic (#28210)
## Documentation / Examples

- [x] Make sure the linting passes
- [x] Errors have helpful link attached, see `contributing.md` (for #28165, #27611)
- [x] Update test case
2021-08-18 01:21:22 +00:00
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
C. Lewis
baeb98e847
docs: make contributing.md more contributor-friendly (#27913)
I originally sought out to add a statement about chromedriver before investing time in making the document as clear as possible for new contributors on the first read. Any notes are very welcome.

- add Ubuntu/Debian `apt install chromedriver` tip
- consistent heading names, subheadings
- formatting
- order changes:
    1. Developing
    2. Building
    3. Testing
    4. Adding warning/error descriptions
    5. Adding examples

## Documentation / Examples

- [x] Make sure the linting passes
2021-08-17 20:50:33 +00:00
Kevin Old
fe246bae36
docs: Add link to Cypress GitHub Actions Guide to Testing docs (#28207)
@leerob 

This pull request points to our [Cypress GitHub Actions Guide](https://on.cypress.io/github-actions) in the Cypress Documentation site.  It contains a guided walkthrough of using GitHub Actions with Cypress in text and our [recently released videos](https://on.cypress.io/ci-gha-playlist) in context. 

## Documentation / Examples

- [x] Make sure the linting passes
2021-08-17 17:55:24 +00:00
Tobias Koppers
b594f5bcc0
let loaders automatically infer source map setting (#28204)
These loaders automatically use the global source map setting when this option is omitted
2021-08-17 17:48:48 +00:00
dave
1b2e0799c3
fix development mode bug with pages with "+" and other special characters (#28122)
* add encodeURIComponent so certain characters don't bug out (fixes #22099)

* add integration test for pr #28122
2021-08-17 12:13:33 -05:00
Urko Pineda
5d4d8802b8
Update testing.md (#28190)
Removed "`" with "'".



## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [x] Make sure the linting passes
2021-08-17 14:06:21 +00:00
Tim Neutkens
71cecc2ba7 v11.1.1-canary.10 2021-08-17 10:41:02 +02:00
Tim Neutkens
2b7d4619ed
Improve jaeger traces (#28168)
Co-authored-by: Harsh Karande <harshskarande@gmail.com>
2021-08-17 09:18:47 +02:00
JJ Kasper
5544adc481
Update to latest babel versions (#28174) 2021-08-17 09:18:08 +02:00
jj@jjsweb.site
4dad4fb7bf
v11.1.1-canary.9 2021-08-16 17:45:02 -05:00
Tim Neutkens
f28b965add
Add module type to build-module trace (#28128)
Add `-js` `-ts` `-tsx` `-css` to `build-module` in traces to allow for easier filtering. 

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes
2021-08-16 20:05:57 +00:00
JJ Kasper
24b09ad4f8
Add entrypoint tracing (#25538)
This adds tracing entrypoints directly after they have have been transpiled to allow us to trace before the webpack runtime has been added to the modules. This should allow for more accurate tracing of entrypoints and allow the trace step to be cached. 

## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added


x-ref: https://github.com/vercel/next.js/issues/24700
x-ref: https://github.com/vercel/next.js/issues/26200
x-ref: https://github.com/vercel/next.js/issues/23894
x-ref: https://github.com/vercel/next.js/issues/25431
2021-08-16 19:29:11 +00:00
Rahul Gaba
da4d65252f
ESLint Plugin: Prefer next script component when using the inline script for Google Analytics. (#25147)
* Add a lint rule for using next script component when using inline script for Google Analytics.

* Apply suggestions from code review

Co-authored-by: JJ Kasper <jj@jjsweb.site>

* Update errors/next-script-for-ga.md

Co-authored-by: JJ Kasper <jj@jjsweb.site>

* Apply suggestions from code review

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2021-08-16 13:55:07 -05:00
Shun Tedokon
385ac94afd
docs: corrected the link to the example (#28175)
## Documentation

- Corrected the link in the **Next.js Testing Docs** to the correct one.
2021-08-16 17:15:21 +00:00
Jiachi Liu
90eae2c00f
Fix crash of lint rule no-document-import-in-page (#28148)
Fixes #28030 
Fixes #28169

## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added
- [x] Errors have helpful link attached, see `contributing.md`
2021-08-16 16:04:42 +00:00
Jiachi Liu
531342691d
Enable pure client suspense in blocking rendering (#28165)
Do not fallback to loadable component when `reactRoot` is enabled but without `concurrentFeatures`. Thus we can enable pure client suspense:

`fallback` is always rendered on server side, but client side can work with fully functional suspense.

Closes #28117
2021-08-16 15:06:39 +00:00
Brian Muenzenmeyer
49c3e0a201
fix(tests): fixes typo in basic integration test (#28158)
## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [x] Make sure the linting passes


While reading the code I noticed this typo.
2021-08-16 14:35:18 +00:00
Aryan Beezadhur
876cbbaf01
Replace CSS tag with JS import (#28143)
Replaces `<link />` tag import with JS import to fix ESLint warning: https://nextjs.org/docs/messages/no-css-tags
2021-08-16 03:01:57 +00:00
Oscar Fuentes
639b4d7d1f
doc: fix typo (#28146)
Given the context of the surrounding sentence, I believe the intention here was to use the word `increasing`. 



## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes
2021-08-16 02:51:06 +00:00
Tim Neutkens
76cc01f6b5
Add support for Jaeger trace target (#28129)
Adds support for Jaeger next to Zipkin as a trace target.

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes
2021-08-15 19:26:02 +00:00
Maia Teegarden
ebe3d93f59
v11.1.1-canary.8 2021-08-15 11:46:11 -07:00
Maia Teegarden
97f9b64cf6
Add setup for m1 build (#28138)
* Add setup for m1 build

* Add workflow to cache key

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-08-15 11:44:28 -07:00
Lee Robinson
d5dc968134
Improve React Strict Mode documentation. (#28139)
The current text linked wasn't obvious. Plus, the best description of what Strict Mode is was at the bottom of the document.
2021-08-15 17:44:00 +00:00
Jiachi Liu
4cdb585962
Fix: wrong link error message (#28127)
Fixes: #28126

## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added
- [x] Errors have helpful link attached, see `contributing.md`
2021-08-15 11:49:21 +00:00
Oscar Busk
971b17f1e9
Add ci script to check examples (#28009)
* Add ci script to check examples

* Install moreutils for `sponge` command.

It's not very pretty, but I'm not sure how to replace sponge in a good way in the shell script

* Prettier names in the workflow

* Move "check-examples" into build_test_deploy workflow

* Start breaking the jq script into multiple lines

* Add checks for cleanups in vercel/next.js#27121

* Run the `check-examples.sh` script to cleanup all remaining examples.
2021-08-14 13:34:40 -05:00
Oscar Busk
077097b7f8
Remove licence from all example/package.json that has them (#28007)
* Add licences to all example/package.json that lack them

* Revert "Add licences to all example/package.json that lack them"

This reverts commit 5d4e25012f7334772b8ef5924bc355277e827cba.

* Update check-examples to remove `license` field from examples

* Remove `license` from all examples.

This was mentioned in vercel/next.js#27121 but it looks like it didn't end up being in the merge?

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2021-08-14 10:48:39 -05:00
JJ Kasper
c3dcc965f3
Skip native ci steps for docs only changes (#28101) 2021-08-14 09:28:42 -05:00
JJ Kasper
039735350c
Add proper error when failing to load next.config.js (#28099)
This adds a proper error when we fail to load a user's `next.config.js` as the default node error can be confusing on its own and makes it seem like something failed internally in Next.js. We can expand on the included error doc added and potentially also add better syntax errors by parsing with acorn when we fail to load this file in the future. 

<details>

<summary>screenshot</summary>

<img width="962" alt="Screen Shot 2021-08-13 at 21 46 09" src="https://user-images.githubusercontent.com/22380829/129432211-6d858062-eea0-4bb9-8725-5bde98bdc47b.png">

</details>
2021-08-14 13:52:18 +00:00