Commit graph

7765 commits

Author SHA1 Message Date
Janicklas Ralph
dc2de37014
Font optimization - Pass nonce to inlined font definition (#21346) 2021-01-26 18:32:39 +00:00
Roko Bekavac
004ad62d6b
Allow undefined body sent to sendData() (#20981)
Co-authored-by: rokobekavac0 <roko.beakavac2003@gmail.com>
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2021-01-26 10:24:48 -05:00
Kazutaka NAKAMURA
07d4af9307
suppressing eslint warning (#21163) 2021-01-26 10:22:43 -05:00
Ondřej Chrastina
7aa397f32e
Add Kontent example to preview section (#21542)
Kontent example also contains the implementation of the preview capabilities in the example.

Including the example as it is [Data fetching section](https://nextjs.org/docs/basic-features/data-fetching).
2021-01-26 15:00:29 +00:00
Andre Hsu
a47d47e07a
Change type of GetServerSidePropsContext.req.cookies the be the same as NextApiRequest.cookies (#21336)
The original type for `GetServerSidePropsContext.req.cookies` was introduced in #19724. In the PR, the test at `test/integration/typescript/test/index.test.js` expects req.cookies to always exist, so `req.cookies` will never be undefined.

I'm guessing that req.cookies is parsed using the same cookie middleware as `NextApiRequest`, in which case `req.cookies` should be `{ [key: string]: string }`, not `{ [key: string]: any }`.
2021-01-26 14:26:59 +00:00
Chulki Lee
f6cc0dedaa
Remove mkdirp (#21365)
Closes #17042

I removed mkdirp from package.json taskfil.js, and ran `yarn && ./check-pre-compiled.sh `. Please let me know if anything else is needed!

(Extracted from #20411)

Note that now compiled webpack has mkdirP function
2021-01-26 14:02:16 +00:00
youngvform
3368fdde48
Fix to parse REACT_EDITOR in env (#21331)
I made an issue #[21330](https://github.com/vercel/next.js/issues/21330).

I think this line 0bd175264b/packages/react-dev-overlay/src/internal/helpers/launchEditor.ts (L216) return string array and toLowerCase is undefined in string array so throw error.

I fixed it by referring to [launchEditor](7e4949a20f/packages/react-dev-utils/launchEditor.js) of create react app.
2021-01-26 12:08:06 +00:00
mcha
c619f41f92
Doc: pageExtensions - note regarding affected files (#21326)
#21279 

This is just a comment explaining that changing `pageExtensions` not only applies to `pages/*` but other files as well.
2021-01-26 11:49:36 +00:00
tarunama
b40fd6ce25
refactor: add types to name-default-components.ts (#21291)
- Add.type to variables and function, arguments
2021-01-26 11:43:52 +00:00
Azeez Lukman
00d453d74b
expanded on No Router Instance (#21248)
Added more detailed explanation of why there is no router instance, and other ways to fix the error
2021-01-26 10:27:53 +00:00
tarunama
c110e45b62
refactor: server/api-utils.ts (#21148)
- Add return type to function
- Add [isNotValidData](https://github.com/vercel/next.js/pull/21148/files#diff-64466461287cc1a70ce5597e3e1d18ac22755f9aeb7ff1865160a8c057540983R374) function for readability
2021-01-26 09:52:00 +00:00
JJ Kasper
235b4cd0a8
Fix docs only check for CI (#21530) 2021-01-25 16:11:27 -05:00
Lee Robinson
d82672c397
Add Next.js Analytics to documentation. (#21527) 2021-01-25 19:12:33 +00:00
kaykdm
47cb4cf850
Fix aspath for getInitialProps (#20572)
Fixes: https://github.com/vercel/next.js/issues/20370

> AsPath is incorrect on Server if you use rewrites and getInitialProps. On the server, asPath is the rewritten asPath while on the client asPath ist as given in the request URL.

The same issue was used to happen on `getServersideProps`, but it was fixed in this PR (https://github.com/vercel/next.js/pull/17121).
`getInitialProps` needs same fix except when the target is serverless, which has correct `asPath` value.

Additional tests have been added in the `getInitialProps` suite to ensure correct asPath with rewrites.
2021-01-25 18:26:32 +00:00
Joe Haddad
88b6ea416d
v10.0.6-canary.8 2021-01-25 12:59:39 -05:00
Janicklas Ralph
cf95146a51
Critical css fix (#21462)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2021-01-25 12:43:05 -05:00
JJ Kasper
1f79519e04
Filter canary branch for GitHub actions cancelling (#21524) 2021-01-25 12:39:30 -05:00
Ymir
9a63f3ca8a
Corrected links in with-yarn-workspaces (#21523) 2021-01-25 12:34:40 -05:00
Dominik Felber
1dc430883e
Update dependencies of with-tailwindcss example (#21517) 2021-01-25 12:10:32 -05:00
Ryan
8798c40c96
Require only build directory to be writeable for build (#20977)
Allows building without permission to write to the application directory, useful for containers and sandboxes.
2021-01-25 12:09:22 -05:00
Joe Haddad
75c504708b
fix: upgrade pinned deps for tests (#21515) 2021-01-25 12:08:08 -05:00
Chulki Lee
fc34f89a80
Fix hostname message in dev/start (#20409) 2021-01-25 16:13:12 +01:00
Faizan Virani
6c51ad96ac
Added Typescript example for withRouter (#18116)
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-01-25 14:48:28 +01:00
Burak Tokak
130039c3e5
Add "title" as the source for "slug" in cms-sanity example (#19867)
* add "title" as the source for "slug"

* Fix linting

Co-authored-by: Tim Neutkens <timneutkens@me.com>
2021-01-25 14:46:51 +01:00
Nick Carchedi
379c4c4e33
Bring Tailwind CSS example in line with official Tailwind docs (#19750)
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
Co-authored-by: Tim Neutkens <timneutkens@me.com>
2021-01-25 14:20:14 +01:00
Justin Smith
8d92010979
Update headers.md to clarify Cache-Control gets overwritten in prod (#19967)
Co-authored-by: Tim Neutkens <timneutkens@me.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-01-24 17:14:19 +01:00
Robin
c47f3d84c4
Unify installation scripts for example apps (#19808) 2021-01-24 17:05:49 +01:00
Calmon Ribeiro
783b9d86ff
fix(next): respect extends in tsconfig with exclude and include (#16619) 2021-01-24 14:24:36 +01:00
Dylan R. Johnston
5baedf5567
Update data-fetching.md to use async file loading (#17518)
Co-authored-by: Tim Neutkens <timneutkens@me.com>
2021-01-23 17:28:33 +01:00
Mohsen Azimi
caf95e1e35
Add a VSCode Launch configuration for debugging examples (#16940)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-01-23 16:40:30 +01:00
Darsh Patel
d68d21c329
Test: serverless target should set correct revalidation (cache-control) header (#15512) 2021-01-23 16:15:13 +01:00
Kevin Jennison
450e7130b0
Add example: Firebase authentication + SSR (#15202)
Co-authored-by: Luis Alvarez D. <luis@vercel.com>
2021-01-23 15:49:14 +01:00
kaykdm
a5b0094677
Fix shallow routing scroll (#21437)
This ensures that Next.js will not scroll to the top of the page in shallow routing.

Fixes: https://github.com/vercel/next.js/issues/21386
Fixes: https://github.com/vercel/next.js/issues/21366
2021-01-22 18:03:29 +00:00
Joe Haddad
74b6389bd6
ci: fix webpack 5 enabling for tests (#21436)
* ci: fix webpack 5 enabling for tests

* refactor: move default location

* Disable incompatible suite
2021-01-22 11:20:53 -06:00
Max Nowack
f2de5a08b8
Fix typo in Header component of with-iron-session example (#21428)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-01-22 14:14:55 +01:00
Hank Andre
372fb5dc53
refactor(with-tailwindcss-emotion): example remove styles directory (#21368)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-01-22 12:16:57 +01:00
MMT-LD
60b0267400
feature/vanilla-emotion - add an example of vanilla emotion (#20228)
Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2021-01-22 12:16:50 +01:00
Tim Neutkens
4dc32ec0a7 v10.0.6-canary.7 2021-01-22 09:56:40 +01:00
Michael McQuade
ded6e24b3d
Use autoprefixer instead of postcss-preset-env (#21215)
I realized while looking over this that the `autoprefixer` plugin isn't being used by postcss because it's not included in the `postcss.config.js`. Additionally, since `postcss-preset-env` doesn't support PostCSS 8 yet, and it includes PostCSS 7 as a dependency, I've removed that package. 

There is an open issue to add PostCSS 8 support to `postcss-preset-env` [here](https://github.com/csstools/postcss-preset-env/issues/191). @kripod's comments on my other PR #20956 are what prompted me to check this out. 

On a side note, it looks like all the CMS examples use Tailwind CSS v1 still, so that's something someone (possibly myself) could tackle later.
2021-01-22 06:13:33 +00:00
Lindsey Simon
7602cfad32
Adds optional REDIS_PASSWORD env var to make setup with RedisLabs work easily for the with-redis example (#21432)
Easy to add one more optional password env var locally and a few lines of code to make the example app work with RedisLabs as well.
2021-01-22 00:28:27 +00:00
JJ Kasper
5b70802f61
Preserve asPath while resolving rewrites (#21410)
* Preserve asPath while resolving rewrites

* remove un-needed alias

* Add new alias

* Add return type for resolve rewrites
2021-01-21 17:40:23 -06:00
Shashi Srinath
9fd9d83221
added an ipcRenderer usage sample to the electron-typescript example (#20000)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-01-21 16:37:40 +01:00
Tim Neutkens
d991e3c957
Update manifest.json 2021-01-21 15:06:53 +01:00
David Spiessens
0fc46d0b70
Add Note to i18n-routing Docs for Subdomains for Locale Domains (#21387) 2021-01-20 17:08:55 +00:00
JJ Kasper
f6304cde92
Add additional dynamic route hash tests (#21363)
This adds tests for https://github.com/vercel/next.js/issues/18601 to ensure we don't regress on this feature working correctly. 

Closes: https://github.com/vercel/next.js/issues/18601
2021-01-20 09:45:58 +00:00
Joe Haddad
a1b8fb49e6
v10.0.6-canary.6 2021-01-20 00:48:30 -05:00
Joe Haddad
47ec677127
chore: compile css-loader (#21357)
This PR compiles `css-loader` to resolve a peer dep warning.
2021-01-20 05:47:25 +00:00
Joe Haddad
55b8502dd0
chore: compile style-loader dep (#21355)
This PR compiles `style-loader` to resolve a peer dep warning.

---

Closes #21359
2021-01-20 05:25:46 +00:00
Joe Haddad
0d0db45c72
v10.0.6-canary.5 2021-01-19 15:11:46 -05:00
Joe Haddad
ab158c0aee
chore: compile resolve-url-loader (#21351)
Closes #21166
2021-01-19 20:08:24 +00:00