Commit graph

9194 commits

Author SHA1 Message Date
x4th
37c66dcd84
Update router.prefetch section to clarify it supports dynamic routes (#29070)
* Update router.prefetch section to clarify it supports dynamic routes

* Apply suggestions from code review

Co-authored-by: Lee Robinson <me@leerob.io>
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2021-09-17 11:18:02 -05:00
Ty Mick
4452366e19
Fix dependency in api-routes example (#29181)
* Upgrade SWR dependency

* Fix capitalization of "Beru Whitesun Lars"
2021-09-17 11:04:05 -05:00
Colin Sidoti
713a5aa701
Use new @clerk/nextjs package in with-clerk example, update Next.js authentication docs (#28906)
* Update headings to clarify that we're describing. Add heading for Authentication API Routes

* Start adding API route examples

* Start adding API route examples

* Start adding API route examples

* Start adding API route examples

* auth: Replace clerk packages with @clerk/nextjs

* Add API authentication example to with-clerk

* Fix footer links

* Proofread, ensure consistency

* Update example's props to use new version

* Update example links

* Add rel tag to _blank link

* Obscure the authentication provider in the example

* Replace example

* Reset authentication docs, list Clerk as vendor

* Re-fix typo

* Change sample to example

* Add the example

* Update examples/with-clerk/package.json

Co-authored-by: Lee Robinson <me@leerob.io>

Co-authored-by: Peter Perlepes <p.perlepes@gmail.com>
Co-authored-by: Lee Robinson <me@leerob.io>
2021-09-17 10:54:34 -05:00
Reza Baharvand
e9cafaa3cd
bugfix: remark/webpack conflict (#29180)
## Bug

- [x] Related issues linked using [`#29179`](https://github.com/vercel/next.js/issues/29179)
- [ ] 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

Fixes: https://github.com/vercel/next.js/issues/29179
2021-09-17 15:52:55 +00:00
Tobias Koppers
fa9ee197a4
suggest incremental typescript for typescript >= 4.4.2 (#29169)
This is now safe to enable since it no longer causes performance regressions
2021-09-17 15:42:27 +00:00
Katie Byers
cee1565688
fix(with-sentry example): Small tweaks (#28359)
This PR makes two changes:

- It updates the index page to reflect the fact that `withSentry` should now be working for API routes deployed to Vercel.
- It changes the route which returns a promise rejection to be more obvious about the fact that that's what it's doing.
2021-09-17 14:14:52 +00:00
Tim Neutkens
367f8d6e6d v11.1.3-canary.23 2021-09-17 09:35:40 +02:00
Tim Neutkens
002ed25087
Add name to invalidated span (#29170) 2021-09-17 09:34:37 +02:00
Maia Teegarden
29ab433222
Remove tag workflow trigger (#29155) 2021-09-16 16:36:02 -05:00
JJ Kasper
7a7cb91e80
Update swc dependencies (#29151)
Updates to the latest `@swc/core` and `@swc/jest` versions that we use for running tests with jest.
2021-09-16 19:34:33 +00:00
Tim Neutkens
84ce15bba5 v11.1.3-canary.22 2021-09-16 19:48:00 +02:00
Tim Neutkens
3e8f470e49
Ensure traces are flushed in development when there is an error (#29149) 2021-09-16 19:43:28 +02:00
Maia Teegarden
16a737d9b5
Update expected test output (#29146) 2021-09-16 11:52:16 -05:00
Tobias Koppers
d78bb6fe46
upgrade to typescript 4.4.3 (#29112)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-09-16 18:06:57 +02:00
JJ Kasper
cefd9cf283
Add crawler blocking for fallback: true (#29121)
* Add crawler blocking for fallback: true

* update test

* Update check

* Add note to docs

* use browser agent for non-crawler test
2021-09-16 11:01:28 -05:00
Tim Neutkens
e98690c307 v11.1.3-canary.21 2021-09-16 17:13:46 +02:00
Tim Neutkens
2ac5e1c1f0
Build next-swc binaries (#29144)
Co-authored-by: timneutkens <timneutkens@users.noreply.github.com>
2021-09-16 17:12:08 +02:00
강동윤
81c5511b74
next-ssg: Don't inject __N_SSP for files without server props. (#29141) 2021-09-16 16:26:38 +02:00
Tim Neutkens
10daef9607
Ensure Next.js dist files are commonjs compatible with swcLoader enabled (#29138)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-09-16 16:11:30 +02:00
Tim Neutkens
60560a941d v11.1.3-canary.20 2021-09-16 15:48:46 +02:00
Tim Neutkens
c39b7d19bd
Update next-swc binaries (#29140)
Co-authored-by: timneutkens <timneutkens@users.noreply.github.com>
2021-09-16 15:47:46 +02:00
강동윤
2c82615bde
Fix transform of ` in styled-jsx (#29136) 2021-09-16 15:08:42 +02:00
Ty Mick
c7e187f893
Add client-side debugging instructions (#28815)
Fixes #16442

The current instructions on the Debugging page currently only work for server-side code, and furthermore, the page doesn't actually _say_ that they only work for server-side code.

This update adds instructions for debugging client-side code in both VS Code and Chrome DevTools. It also improves the suggested VS Code launch configurations to take advantages of some relatively recent features in VS Code's [built-in JavaScript debugger][1]. Using the `node-terminal` and `pwa-chrome` launch types removes the need to manually pass an `--inspect` flag to the underlying Node.js process.

[1]: https://github.com/microsoft/vscode-js-debug

Let me know if there are any edge cases I didn't consider with these VS Code launch configs!



## Documentation / Examples

- [x] Make sure the linting passes
2021-09-16 07:07:56 +00:00
Tim Neutkens
c491adfe12 v11.1.3-canary.19 2021-09-16 08:59:20 +02:00
Tim Neutkens
172a536c61
Update next-swc binaries (#29132)
Co-authored-by: timneutkens <timneutkens@users.noreply.github.com>
2021-09-16 08:58:36 +02:00
Maia Teegarden
c6cec752c7
Fix partial one off global selectors (#29128) 2021-09-16 08:16:10 +02:00
JJ Kasper
e313398468
Update trace ignores for next import (#29119) 2021-09-15 15:00:52 -05:00
Tim Neutkens
1f788b5430
Development tracing improvements (#29076) 2021-09-15 20:06:24 +02:00
JJ Kasper
85b8399856
Remove log from failing to parse source map (#29118)
This removes the log when we fail to parse the source maps in the `wellknown-errors-plugin` since this log isn't really actionable by users and clutters the error output. 

x-ref: https://github.com/vercel/next.js/issues/27783#issuecomment-915654054
2021-09-15 17:53:22 +00:00
Janicklas Ralph
73408211aa
Remove inert font tag in font optimization (#28869)
* Remove inert font tag in font optimization

* Fix lint

* Remove inert font tag during font optimization

* Fix lint

* Fix lint

* Fix lint

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2021-09-15 11:43:13 -05:00
Tim Neutkens
807beac580 Merge branch 'canary' of github.com:vercel/next.js into canary 2021-09-15 17:34:47 +02:00
Tim Neutkens
4b41b48a8e v11.1.3-canary.18 2021-09-15 17:34:32 +02:00
Lee Robinson
dd4215b81e
Update Redux example to use Toolkit + update dependencies. (#29104)
After talking with markerikson, I've made some updates to the Redux examples:

- Updated the `with-redux` example to use the Redux Toolkit + TypeScript example
- Updated dependencies of `with-redux` to work with latest testing setup
- Removed `with-redux-toolkit` in favor of `with-redux`
- Removed `with-redux-toolkit-typescript` in favor of `with-redux`
- Removed `with-redux-code-splitting` in favor of `with-redux`
2021-09-15 15:34:31 +00:00
JJ Kasper
6a9cda5726
Ensure browser instances are not re-created un-necessarily (#29091) 2021-09-15 10:03:33 -05:00
Tim Neutkens
ae305f6aa9
Update styled-jsx (#29103)
Includes a fix for when a tree is rendered without the styled-jsx registry being provided. It'll noop in this new version.

## 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-09-15 14:19:20 +00:00
Tim Neutkens
ca27e34167 v11.1.3-canary.17 2021-09-15 09:32:44 +02:00
Maia Teegarden
4a2d5a1b49
Add/styled jsx swc (#29005)
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
Co-authored-by: Tim Neutkens <timneutkens@me.com>
2021-09-15 09:24:31 +02:00
jj@jjsweb.site
2cfdc68650
v11.1.3-canary.16 2021-09-14 16:05:21 -05:00
JJ Kasper
49c99cc323
Fix host segment replacing for custom routes (#29090)
This fixes segments inside of the host of the destination failing to parse with url.parse due to the unexpected colon by escaping the colon for segments and then unescaping them after we have parsed the URL.

## 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/vercel/pull/6713
2021-09-14 20:13:46 +00:00
Tim Neutkens
7d664d5b36
Add stats config for SWC (#28883)
* Add stats config for SWC

* Remove stats for deprecated mode

* Include native binaries in local linking

* Expose minify in next-swc

* Build next-swc binaries

* Only upload changed binary artifact

* Build next-swc binaries

* Expose minify in js binding

* Use new minify function in terser plugin

* Build next-swc binaries

* Build next-swc binaries

* Build next-swc binaries

* Pass pagesDir option to SWC for next/dynamic

* Build next-swc binaries

* Add spans for next-trace-entrypoints-plugin

* Fix linting

Co-authored-by: Maia Teegarden <dev@padmaia.rocks>
Co-authored-by: padmaia <padmaia@users.noreply.github.com>
Co-authored-by: timneutkens <timneutkens@users.noreply.github.com>
2021-09-14 18:13:11 +02:00
Tobias Koppers
0e29a2d08f
reload the page to show 404 when receiving invalid event from on-demand-entries (#29074) 2021-09-14 17:11:00 +02:00
Jeff Wen
07fe406bd5
Add crossOrigin type to the NextConfig (#29033) 2021-09-14 09:51:10 -05:00
Maia Teegarden
a784d54ab5
Fix/upload binary artifact (#29069)
* Fix upload of binary artifacts

* Build next-swc binaries

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-09-13 16:40:06 -07:00
Kara
41484f62cc
Throw error if res is accessed after gSSP returns (#29010)
* Throw error if res is accessed after gSSP returns

Currently it's possible to access the `ServerResponse` through `context.res`
in `getServerSideProps()`. If one was to store that response and mutate
its headers or status code after gSSP returns (e.g. during rendering), it
would currently happen to work because of when headers are sent. However,
this is an anti-pattern that relies an implementation detail of the framework
and shouldn't be allowed. This will be particularly important once Next.js
starts to support basic streaming (two-part flush: routing then data) because
then the headers will be sent as soon as gSSP returns, which explicitly breaks
this pattern.

With this commit, the framework now throws an error in development mode if
the ServerResponse is accessed after gSSP returns.

* fixup! Throw error if res is accessed after gSSP returns
2021-09-13 17:10:46 -05:00
Lee Robinson
a5bc3f2f8c
Add note about using Sharp for next/image to deployment docs. (#29067)
I also removed the custom server link here, because I think it's making too strong of a correlation between custom server and Node.js server using `next start`, which aren't the same.
2021-09-13 20:31:04 +00:00
Konstantin Popov
16c3e6f613
Fix minor typo in index.test.js (#29065)
Fix minor typo:

suits -> suites
2021-09-13 14:56:56 -05:00
JJ Kasper
0a6ae5c3c2
Remove extra macOS test workflow (#29064)
This is a follow-up to https://github.com/vercel/next.js/pull/29060 removing the `test_macos` workflow since it is redundant to run these tests in macOS as it should be very unlikely the tests fail in the mac environment but pass in the ubuntu environment. It also seems the snapshot tests are incorrect inside of the GitHub actions macOS environment so these tests will not work correctly anyways.
2021-09-13 18:40:17 +00:00
Houssein Djirdeh
01d3539b04
[Examples] Updates with-google-tag-manager example to use <Script> component (#29061)
Updates the `with-google-tag-manager` to use Next.js' Script component with strategy set to `afterInteractive`

CC @janicklas-ralph 

Closes: https://github.com/vercel/next.js/issues/26507
2021-09-13 17:43:35 +00:00
JJ Kasper
ce870babb7
Update test workflows for mac/react (#29060)
* Update test workflows for mac/react

* share timings as well

* update macos
2021-09-13 12:13:22 -05:00
JJ Kasper
e49829bb8e
Fix webpack version and safari test and update compiled (#29059)
* Fix webpack version and safari test and update compiled

* Update compiled again
2021-09-13 10:56:07 -05:00