Lee Robinson
92637a9b08
Update with-polyfills example. ( #20996 )
...
From https://github.com/vercel/next.js/discussions/20992 .
2021-01-13 14:00:50 +00:00
Baheya Khalifa
f9b7a391b7
Fix teeny tiny typo ( #21005 )
2021-01-12 15:05:32 +00:00
Lee Robinson
e30c5a8eb8
Add "Migrating from React Router" docs. ( #20982 )
...
Please let me know if anything is missing from this document 😄
2021-01-12 01:44:14 +00:00
JJ Kasper
9caca2784c
Add proper error when conflicting paths are detected ( #20918 )
...
This helps catch conflicting paths returned from `getStaticPaths` with a friendly error
<details>
<summary>
Preview of error
</summary>
<img width="962" alt="Screen Shot 2021-01-08 at 5 03 04 PM" src="https://user-images.githubusercontent.com/22380829/104074719-6e481100-51d6-11eb-9397-938aee3ae30b.png ">
<img width="962" alt="Screen Shot 2021-01-08 at 5 03 41 PM" src="https://user-images.githubusercontent.com/22380829/104074722-6f793e00-51d6-11eb-90f6-7cdf9882bf00.png ">
</details>
Closes: https://github.com/vercel/next.js/issues/19527
2021-01-11 20:50:17 +00:00
JJ Kasper
e0a44d98ef
Skip GitHub actions tests for irrelevant changes ( #20867 )
...
* Skip GitHub actions tests for irrelevant changes
* add docs lint step
* Add lint-no-typescript
* Update docs lint
* Skip at the job level
* Update steps
* remove un-needed dep
* Update compare branch
* log remotes
* output to stderr
* fetch origin
* Update fetch
* update diffing
* Update command handling
* test output
* Update check
* Log output
* Update outputs
* Add id for build job
* Update output
* Update precompiled
* remove testing check
2021-01-11 13:24:17 -06:00
Joe Haddad
1a1c7c980f
v10.0.6-canary.0
2021-01-11 12:32:53 -05:00
Joe Haddad
d0e28549af
feat(css): add strictPostcssConfiguration flag ( #20914 )
...
This pull request adds `future.strictPostcssConfiguration`, allowing users to opt-into the more strict PostCSS configuration loading.
This stricter PostCSS configuration loading ensures that CSS can be cached across builds.
2021-01-11 17:19:56 +00:00
Spencer Elliott
16ff4390a0
Add pnpm integration test ( #17882 )
2021-01-11 17:50:12 +01:00
Kristoffer K
1c75bf789b
perf(next): use require.resolve instead of resolve ( #19518 )
...
**What's the problem this PR addresses?**
- ~~https://github.com/vercel/next.js/pull/18768 started to ncc babel and thus it's version of resolve which breaks PnP support~~
Babel replaced `resolve` with the builtin `require.resolve` and a polyfill for older node versions in https://github.com/babel/babel/pull/12439 which was upgraded in https://github.com/vercel/next.js/pull/20586
- `next` unnecessarily bundles the `resolve` package when `require.resolve` is builtin and can do the same job
**How did you fix it?**
- ~~Avoid running `resolve` through ncc~~
Added a test for https://github.com/vercel/next.js/issues/19334 (closes https://github.com/vercel/next.js/issues/19334 )
- Replace `resolve` with `require.resolve`
2021-01-11 14:43:08 +00:00
Kristoffer K
4e3eb733c8
fix(next): always enable absoluteRuntime when running under webpack ( #19538 )
...
**What's the problem this PR addresses?**
In https://github.com/vercel/next.js/pull/18921 I enabled `absoluteRuntime` for everyone (it was only enabled for PnP users) but didn't consider that people used the babel preset outside of the webpack build.
Fixes https://github.com/vercel/next.js/issues/19448 - ~~Since it doesn't contain a repro I can't be certain but based on feedback from @koshea in https://github.com/vercel/next.js/pull/18921#issuecomment-733744645 I'll assume @RossMcMillan92 is doing the same thing, because when next is building it doesn't leave absolute paths as external.~~
Confirmed in https://github.com/vercel/next.js/pull/18921#issuecomment-734224014
**How did you fix it?**
Only enable `absoluteRuntime` when the preset is running under `babel-loader`
2021-01-11 14:21:58 +00:00
Ludovico Fischer
b3a631305d
fix(examples): make with-graphql-hooks run correctly again ( #20929 )
...
Fixes #20474
* Switch API url to working URL used in apollo example
* Update deps
* Move styled jsx out of the way to avoid demonstrating too many
unfamiliar concepts at once
dev, build and start work now.
2021-01-11 13:55:18 +00:00
Tim Neutkens
4dc077956d
Error when exporting to static
directory ( #20969 )
...
Fixes #20408
Fixes #20925
2021-01-11 13:34:58 +00:00
Vlad Frolov
7bb5f1a2fc
fix: Replace all backslashes when normalizing path in getFormattedDiagnostic ( #17915 )
...
I have not bumped into any bug, I was just playing around https://lgtm.com/projects/g/vercel/next.js/ , and this looked like a legit suggestion to fix
2021-01-11 13:13:48 +00:00
Almad
920c22157c
Use archive link for electron-next in the examples ( #20879 )
...
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2021-01-11 13:53:31 +01:00
Hyeon Kim (김지현)
552aa9df1a
Prevent unpredictable dependency hosting by explicitly resolve module path on webpack.ProvidePlugin ( #20971 )
...
ProvidePlugin replaces certain identifiers with another modules. As a result, 'buffer' and 'process' modules are added as implicit dependencies to all Next.js plugins. This can be problematic. With "Plug'n'Play" strategy, it don't work at all since they fail-fast with implicit dependencies. With "node_modules" strategy, it might seem OK but actually it can be result into unpredictable behavior since in uses dependency [hoisting](https://yarnpkg.com/advanced/lexicon#hoisting ).
For example, currently users cannot use next-auth plugin with Plug'n'Play strategy:
![image](https://user-images.githubusercontent.com/4435445/103481517-d5547700-4e1e-11eb-9f23-bc2c9939418e.png )
This patch let Next.js properly handles such cases with `require.resolve`.
Closes https://github.com/vercel/next.js/issues/20955
###### References:
- https://github.com/nextauthjs/next-auth/pull/1034
2021-01-11 12:31:31 +00:00
Lachlan Campbell
4d282f929f
Add note on destructuring to Env Variables docs ( #20869 )
...
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
Co-authored-by: Tim Neutkens <timneutkens@me.com>
2021-01-11 11:13:24 +01:00
Tim Neutkens
5e701daab9
Update license year for all packages
...
Fixes #20887
2021-01-11 11:12:19 +01:00
Tom
06efca998a
Update Supabase Quickstart Screen + Tailwind 1.x to 2.x ( #20770 )
...
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-01-11 10:44:38 +01:00
Tom
8bfe06e899
GraphCMS example - Upgrade to React 17 / Tailwind 2 and next/image ( #20772 )
2021-01-11 10:29:05 +01:00
taisei mima
d0f1e33d53
Fix with-three-js example ( #20897 )
2021-01-11 10:28:43 +01:00
Michael McQuade
d9f1cf007f
Fix error in example ( #20934 )
2021-01-11 10:28:31 +01:00
Michael McQuade
8d7e7d526c
Update PostCSS plugin list in README ( #20956 )
2021-01-11 10:27:21 +01:00
Victor Assis
86bb064578
Improve with firebase cloud messaging ( #20868 )
2021-01-11 10:14:14 +01:00
Tim Neutkens
90ad2cbc44
Update profiling approach to cover webpack runs ( #20900 )
2021-01-09 20:12:13 -05:00
JJ Kasper
8bdff57b15
Update redbox tests ( #20866 )
...
This adds retrying for getting redbox content and ensures the `next.config.js` file is cleaned up for the dynamic-routing test suite.
x-ref: https://github.com/vercel/next.js/pull/20786#issuecomment-755929891
2021-01-07 18:06:40 +00:00
Daniel Stumme
d49c47427b
Adding small note to ENV documentation ( #20860 )
...
This single sentence addition would have saved me about a day of troubleshooting. This doc doesn't mention how the inline occurs. The only place I could eventually find that mentions this is the server & public runtime config pages.
2021-01-07 16:54:15 +00:00
Zain Fathoni
77a2eeb194
Fix an error in Kontent CMS example caused by a file name typo ( #20863 )
...
![image](https://user-images.githubusercontent.com/6315466/103914132-57f17500-5144-11eb-9a21-ff27bea14f29.png )
2021-01-07 16:18:01 +00:00
tarunama
629a7e8085
refactor(next): client/index.tsx ( #20806 )
...
## summary
- add return types
- move `locale` variable const from let
- ~use [strict equality](https://github.com/vercel/next.js/pull/20806/files#diff-2433946f9a058f1b070138d12c20f10a9128e46408033629181f9f7fc3b9b9b2R275 )~
2021-01-07 15:02:10 +00:00
Luc Leray
b442acbe1c
Replace zeit/next.js
with vercel/next.js
( #20849 )
2021-01-07 08:41:04 -05:00
Jeremy Balog
bb05e42698
Fix typo in error markdown ( #20825 )
2021-01-07 10:22:43 +01:00
Luc Leray
8eaabe2fb0
Fix deploy buttons URLs ( #20834 )
...
Fix all deploy button URLs in the Next.js repo to follow the following format:
```
https://vercel.com/new/git/external?repository-url=https://github.com/vercel/next.js/tree/canary/examples/ <EXAMPLE_NAME>&project-name=<EXAMPLE_NAME>&repository-name=<EXAMPLE_NAME>
```
The detailed docs for the Deploy Button can be found here: https://vercel.com/docs/more/deploy-button .
Also updates legacy Vercel import flow URLs (starting with vercel.com/import or with vercel.com/new/project), to use the new vercel.com/new URLs.
---
For example, for the `hello-world` example:
The URL is https://vercel.com/new/git/external?repository-url=https://github.com/vercel/next.js/tree/canary/examples/hello-world&project-name=hello-world&repository-name=hello-world
And the deploy button looks like this:
[![Deploy with Vercel](https://vercel.com/button )](https://vercel.com/new/git/external?repository-url=https://github.com/vercel/next.js/tree/canary/examples/hello-world&project-name=hello-world&repository-name=hello-world )
---
For reference, I used the following regexes to search for the incorrect URLs
```
\(https://vercel.com/import/git\?s=https://github.com/vercel/next.js/tree/canary/examples/(.*) \)
\(https://vercel.com/import/git\?c=1&s=https://github.com/vercel/next.js/tree/canary/examples/ ([^&]*)(.*)\)
\(https://vercel.com/import/project\?template=https://github.com/vercel/next.js/tree/canary/examples/(.*) \)
https://vercel.com/import/git
https://vercel.com/import/select-scope
https://vercel.com/import
https://vercel.com/new/project
```
2021-01-07 01:40:29 +00:00
Joe Haddad
ef32e16fb1
v10.0.5
2021-01-06 18:30:00 -05:00
Joe Haddad
b2c6115bf2
v10.0.5-canary.12
2021-01-06 15:13:19 -05:00
Simon Taggart
66a49721d5
feat: add Twilio Paste example ( #20587 )
...
* feat: add Twilio Paste example
* Updated readme
Co-authored-by: Luis Alvarez <luis@vercel.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-01-06 13:49:57 -05:00
Bar
54102b0a04
Update gtm.js ( #20807 )
2021-01-06 13:15:26 -05:00
Joe Haddad
b580bea250
tests: add isReady
field test for TS ( #20821 )
2021-01-06 13:14:52 -05:00
Shu Uesugi
817cffdcbe
Use vercel.app for blog starter URL ( #20820 )
...
Rename https://next-blog-starter.now.sh to https://next-blog-starter.vercel.app (@lfades renamed the domain name)
2021-01-06 18:13:40 +00:00
David ALLIX
79e5615d2b
Add missing isReady declaration to NextRouter type ( #20819 )
...
Follow https://github.com/vercel/next.js/pull/20628
2021-01-06 17:44:35 +00:00
Sebastian König
5fc8d48732
Added with-mqtt-js example ( #17939 )
...
* Added with-mqtt-js example
* Fixed eslint/prettier errors
* Update README.md
* Updated with-mqtt-js to latest next/react versions, WIP: Refactoring useMqtt()
* A2PC
* Working example, unrefactored
* A2PC
* Ran prettier
* Used NEXT_PUBLIC_ prefix instead of keys as props
* Updated readme and added .env.local.example
Co-authored-by: Sebastian König <sebastian_koenig@cotyinc.com>
Co-authored-by: Luis Alvarez D <luis@vercel.com>
2021-01-06 12:06:56 -05:00
Joe Haddad
35a02d97b7
v10.0.5-canary.11
2021-01-06 11:28:41 -05:00
Farhan Ullah
9a73db703f
Fix: Build time error for with-mysql example #19635 ( #19636 )
2021-01-06 11:27:59 -05:00
Damien Varron
55afe80c31
Only prefetch Link if router is in context ( #19857 )
...
Fixes #16864
The `router` can be missing in a test environment when trying to render a `Link` component. This PR bails out of `router.prefetch()` when `router` is missing.
The alternative is for users to mock `next/link` or to mock the `router` and wrap their test components.
Please let me know any feedback.
2021-01-06 16:19:57 +00:00
Michael Aufreiter
ccf26a850d
Guard useSwr() to avoid sending invalid request ( #20671 )
2021-01-06 10:59:18 -05:00
Tim Neutkens
fb9ca49401
Update static file serving doc to mention Next.js 10 ( #20815 )
...
Fixes #20403
2021-01-06 15:21:34 +00:00
JJ Kasper
991ad9225a
Update error for mis-matching path in getStaticPaths ( #20767 )
...
This updates the error shown when a path doesn't match the dynamic route in `getStaticPaths` to not include the `locale` since this isn't considered when matching against the dynamic route.
2021-01-06 10:27:32 +00:00
JJ Kasper
b9ba264bd6
Ensure i18n + API rewrite is handled correctly ( #20751 )
...
This ensures rewrites to API routes with i18n enabled handles as an API route correctly. This also adds tests for API routes in the i18n test suite
Fixes: https://github.com/vercel/next.js/issues/20725
2021-01-06 09:54:45 +00:00
Benjamin Bender
1a3adaa5d9
Fix mini typo in with-cookie-auth-fauna-example ( #20808 )
...
Fix mini typo
2021-01-06 09:13:45 +00:00
Lee Robinson
9afc0f58c4
Add docs for custom image loaders. ( #20788 )
...
Docs for https://github.com/vercel/next.js/pull/20216/ .
2021-01-06 02:16:09 +00:00
Joe Haddad
9f6bcd47b6
v10.0.5-canary.10
2021-01-05 20:20:36 -05:00
JJ Kasper
47b7660aec
Ensure path starts with / when deleting index basePath with query ( #20766 )
...
This is a follow-up to https://github.com/vercel/next.js/pull/20596 and https://github.com/vercel/next.js/pull/20658 ensuring the `as` value is prefixed with the `basePath` correctly with a query. This updates the test to also ensure no errors are shown when a query is present on the index `basePath` route.
Fixes: https://github.com/vercel/next.js/pull/20757#issuecomment-754338510
2021-01-06 01:20:04 +00:00