Commit graph

6701 commits

Author SHA1 Message Date
Joe Haddad
782d27e576
v9.5.2-canary.17 2020-08-10 16:49:03 -04:00
Yuhei Yasuda
052a9d2353
Don’t prevent the browser’s default behavior for Alt key (#16003)
In most browsers, clicking links with the Alt key has a special behavior, for example, Chrome downloads the target resource. As with other modifier keys, the router should stop the original navigation to avoid preventing the browser’s default behavior.

When users click a link while holding the Alt key together, the browsers behave as follows.

Windows 10:

| Browser    | Behavior                                    |
|:-----------|:--------------------------------------------|
| Chrome 84  | Download the target resource                |
| Firefox 79 | Prevent navigation and therefore do nothing |
| Edge 84    | Download the target resource                |
| IE 11      | No impact                                   |

macOS Catalina:

| Browser    | Behavior                                    |
|:-----------|:--------------------------------------------|
| Chrome 84  | Download the target resource                |
| Firefox 79 | Prevent navigation and therefore do nothing |
| Safari 13  | Download the target resource                |
2020-08-10 20:32:47 +00:00
Joe Haddad
378f092aaf
v9.5.2-canary.16 2020-08-10 15:46:43 -04:00
Prateek Bhatnagar
2ddfd84411
Improvements - Font optimizations (#16031)
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-08-10 14:06:38 -04:00
Joe Haddad
bd70354394
v9.5.2-canary.15 2020-08-10 13:55:06 -04:00
Joe Haddad
6d71eef518
Do not assign to readonly property in Safari (#16051) 2020-08-10 13:15:37 -04:00
Joe Haddad
4a04212d6b
v9.5.2-canary.14 2020-08-10 12:28:49 -04:00
Sebastian Benz
d6ad0d0843
upgrade @ampproject/toolbox-optimizer to 2.6.0 (#16043)
See [release notes](https://github.com/ampproject/amp-toolbox/releases/tag/v2.6.0).

**Highlight:** [hero images can now be server-side rendered](https://github.com/ampproject/amp-toolbox/tree/main/packages/optimizer#preloadheroimage) by annotating then with `data-hero`. This will greatly improves LCP when using large images in the first viewport.

```
<amp-img data-hero src="/hero.jpg" layout="responsive" width="640" height="480"></amp-img>
```

Also fixes #15979
2020-08-10 16:06:00 +00:00
Joe Haddad
e08b633c3a
Do not bundle caniuse-lite (#16048) 2020-08-10 11:27:21 -04:00
Tim Neutkens
1398aebf7b v9.5.2-canary.13 2020-08-10 16:29:13 +02:00
Tim Neutkens
89c5689dc9
Update labeler to include next-codemod (#16041) 2020-08-10 16:24:28 +02:00
Tim Neutkens
7acfd7eea7
Add files array to @next/codemod (#16049) 2020-08-10 16:24:01 +02:00
Joe Haddad
06d0ba4199
Fix typos in @next/codemod CLI (#16042) 2020-08-10 15:09:47 +02:00
Tim Neutkens
e8e59a175e v9.5.2-canary.12 2020-08-10 14:35:25 +02:00
Tim Neutkens
d1701091b8
Add cli for @next/codemod (#16039)
Largely based on the code @threepointone wrote for react-codemod.

Co-Authored-By: Sunil Pai <threepointone@gmail.com>

Co-authored-by: Sunil Pai <threepointone@gmail.com>
2020-08-10 14:34:35 +02:00
Tim Neutkens
281318d50e v9.5.2-canary.11 2020-08-10 11:49:45 +02:00
Tim Neutkens
1738c02ae0 Update version of next-codemod to prepare for publishing 2020-08-10 11:49:13 +02:00
Tim Neutkens
37d2d15b6e
Resolve aliases modules (#16033)
Co-authored-by: Kristoffer K. <merceyz@users.noreply.github.com>
2020-08-10 11:45:10 +02:00
Tim Neutkens
62031ff24f
Move next-codemod to Next.js monorepo (#15536) 2020-08-10 11:14:53 +02:00
Tim Neutkens
f4433ceaa2 v9.5.2-canary.10 2020-08-10 09:50:15 +02:00
Tim Neutkens
843d58425b
Add browser polyfils for Node.js modules (webpack 5 backwards compat) (#16022)
This adds the following Node.js core polyfills only when the import is used:

- `path`
- `stream`
- `vm`
- `crypto`
- `buffer`

Fixes #15948

We'll have a separate issue about adding warnings for the usage of these modules in the browser, some polyfills like crypto are quite heavy and generally not needed for most applications (included accidentally through node_modules).
2020-08-10 01:26:21 +00:00
Riccardo Di Maio
394e24073d
Typo fix (built time -> build time) (#16006) 2020-08-08 17:23:25 +00:00
Riccardo Di Maio
bdaedd220a
Remove another broken demo link from with-graphql-faunadb (#16007)
The link used to appear twice in the README, but it has only been removed once (#15267) to fix #15219. This commit removes the other link to the broken demo.
2020-08-08 17:05:29 +00:00
Caleb Fetzer
79bab9771c
DOCS: Typo fixes - data-fetching (#16004)
Few typos, missing spaces, some small cleanup on grammar.
2020-08-08 15:33:34 +00:00
Amirali Esmaeili
4b6e9a45a3
Fix amphtml link rel not respecting basePath (#15949)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2020-08-08 15:15:00 +02:00
Prateek Bhatnagar
d8edb2eaa5
Bug fix: Font optimization (#15984)
Bug fix
- Do not remove spaces as it might mangle font names
2020-08-08 13:14:03 +00:00
Tim Neutkens
6f7dfe111c
Make helpers.ts compatible with ie11 (#15973)
Fixes #15680

This does not solve the issue that an error triggered will fail on shadowroots being created, however it does fix the general failure

Closes https://github.com/vercel/next.js/pull/15825
2020-08-07 14:13:24 +00:00
Tim Neutkens
7fc92a6c78 v9.5.2-canary.9 2020-08-07 09:39:18 +02:00
Tim Neutkens
856b531e47 Remove common PR title prefixes 2020-08-07 09:34:50 +02:00
Kazuhito Hokamura
7a9ee4b9e5
Update Sentry example to improve display of server errors (#15495)
In the Sentry example, sourcemaps is not enabled in server error.

I solved this problem by using `RewriteFrames`. On the client side, the sourcemaps path is `~/_next`, but on the server side it needs to be `~/.next` (distDir), so I rewrite it using the `iteratee`.

ref. https://docs.sentry.io/platforms/node/sourcemaps/#updating-sentry-sdk-configuration-to-support-source-maps

-----

## before
<img width="983" alt="ss2" src="https://user-images.githubusercontent.com/39471/88479997-29188580-cf8e-11ea-8d16-10ccfa6fc1a4.png">

## after
<img width="989" alt="ss1" src="https://user-images.githubusercontent.com/39471/88479995-26b62b80-cf8e-11ea-8b1f-7784b32b9e6d.png">
2020-08-07 07:22:08 +00:00
JJ Kasper
b1ef76df31
Fix asPath normalizing for non-dynamic pages (#15960) 2020-08-07 09:01:34 +02:00
Sven Anderson
db69e4747a
example application on Redis (Lambda.store) (#15532)
This example application guides you to build a next.js application and integrate lambda.store as data store. See readme for details.
2020-08-07 01:34:02 +00:00
Markoz Peña
6375026a41
Added Friendly error for res.redirect 🐝 (#15844)
## Which solves this PR

 Displaying a friendly error, when the user is only passing `statusOrUrl`(type number) and the second argument `url` is ignored.

**Example**

`res.redirect(307);` // Show friendly error

Closes: https://github.com/vercel/next.js/issues/15594
x-ref: https://github.com/vercel/next.js/pull/15603
2020-08-06 22:53:09 +00:00
Tom Dohnal
eb4be226fd
notify component when route hash changes (#13894)
This resolves https://github.com/vercel/next.js/issues/13659
2020-08-06 22:04:47 +00:00
Arsalan Khattak
ebd1434a84
Add PWA Example (#15433)
Co-authored-by: Luis Alvarez D. <luis@vercel.com>
2020-08-06 13:14:35 -04:00
Evil Rabbit
8fed0c3ab5
Improve Vercel's badge (#15946) 2020-08-06 12:35:36 -04:00
Raibima Putra
3922fa0584
with-react-native-web: move meta viewport to _app.js (#15945) 2020-08-06 12:35:03 -04:00
Eric Piacentini
e18f74fe2d
Update Fast Refresh doc (#15923)
Co-authored-by: Luis Alvarez D <luis@vercel.com>
Co-authored-by: Tim Neutkens <timneutkens@me.com>
Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-08-06 12:34:05 -04:00
Jan Potoms
cbfb8cbcc7
Remove querystring from the client (#15378) 2020-08-06 12:32:58 -04:00
Joe Haddad
882288b532
Warn when Fast Refresh is disabled (React <16.10) (#15931) 2020-08-06 10:41:11 -04:00
Joe Haddad
2d42b8e076
Delay server start message until it's listening (#15929)
Fixes #15928

---

This would cause us to print the message too early and open the browser to a server that wasn't started yet. This waits until we're listening, but before the app is ready fully.
2020-08-06 06:47:01 +00:00
Joe Haddad
817d558a6d
Add missing gitignore 2020-08-06 00:07:15 -04:00
Joe Haddad
c86466f4ee
Add variable expansion note (#15917)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2020-08-05 23:39:32 -04:00
Aubrey
7d8e0c512f
updated active-class-name example to also demo a [slug] path (#15924)
updated example for [active-class-name](f00ad581a1/examples/active-class-name) to also support a `[slug].js` page that matches on `as` instead of `href` (as `href` would be `/[slug]`)

> This does not demo `[..slug].js` as this requires possible custom code for determining the slug path part for the active classname. i.e. page tree active nodes. A possible other example or another PR on this example.

Has possible information for:
 * https://github.com/vercel/next.js/issues/7410
2020-08-06 01:26:48 +00:00
matamatanot
2c424446b8
fix typo in export-all-in-page (#15925) 2020-08-06 00:11:11 +00:00
Luis Alvarez D
c11ee1d857
[Examples] Remove horizontal scroll in CMS examples (#15921)
This is the same fix from https://github.com/vercel/next.js/pull/15729 - Adding it in a new PR as I can't update the current one.

Closes #15729
Fixes #15676
2020-08-05 22:39:44 +00:00
Robin Tom
5218e76818
Example for Redirects (Custom routes) (#15411)
This PR adds example for #15073 
> - [ ] `redirects` For [docs/api-reference/next.config.js/redirects.md](https://github.com/vercel/next.js/blob/canary/docs/api-reference/next.config.js/redirects.md)
2020-08-05 22:20:49 +00:00
Joe Haddad
0923ee6db4
v9.5.2-canary.8 2020-08-05 16:46:28 -04:00
Joris
0fd1958ae4
Disallow re-export all exports from Next.js pages (#14325)
Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-08-05 16:21:40 -04:00
Joe Haddad
3c04111c9c
Adjust overlay modal padding on mobile (#15915)
This PR reduces padding on all [iPhone models](https://developer.apple.com/library/archive/documentation/DeviceInformation/Reference/iOSDeviceCompatibility/Displays/Displays.html) to make the error easier to see when you have the debugger open.

Before
![image](https://user-images.githubusercontent.com/616428/89454188-5a334b80-d72e-11ea-8e0b-ce392615d814.png)


After
![image](https://user-images.githubusercontent.com/616428/89454129-40920400-d72e-11ea-903d-8a8178da2966.png)

---

Fixes #14702
Closes #14767
2020-08-05 19:51:46 +00:00