Tim Neutkens
c5b5c43e3d
Add codemod for files that do not support the new React JSX transform ( #21281 )
...
Previously our automatic React injection approach injected `import React from 'react'` automatically whenever JSX was detected. The new official JSX transform solves this by enforcing importing `React` when it is used.
This codemod automatically converted files that are using a "global React variable" to use `import React from 'react'`
2021-01-18 15:17:10 +00:00
kaykdm
699a7aeaaa
Move hydration mis-match test suite ( #21264 )
...
In this [PR](https://github.com/vercel/next.js/pull/21065 ), it was suggested to move the test suite, but it was merged before fixing.
This is the fix for that, moving link-with-hash test suite to client-navigation suite
detail: https://github.com/vercel/next.js/pull/21065/files#r558425551
2021-01-18 04:05:41 +00:00
Tim Neutkens
f534a5cad2
v10.0.6-canary.4
2021-01-17 20:13:41 +01:00
Tobias Koppers
b02df3f487
improve splitChunks config for webpack 5 ( #21208 )
2021-01-17 20:05:47 +01:00
Tobias Koppers
9c4d368459
use webpack resolve api to resolve in externals config ( #21205 )
2021-01-17 20:02:20 +01:00
Sumanth Ratna
f40a41cd6d
Update chromedriver brew install instructions in contributing doc ( #21251 )
...
`brew cask install` was recently deprecated in favor of `brew install --cask`
2021-01-17 18:55:44 +00:00
Peter Kellner
8e88282da5
Small spelling fix ( #21246 )
2021-01-17 16:50:46 +01:00
JJ Kasper
cfa9326c63
Minimal mode normalizing ( #21083 )
...
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-01-16 16:46:21 +01:00
kaykdm
cdab7bf831
fix hydration mismatch on href for url with anchor refs ( #21065 )
...
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-01-15 17:53:10 +01:00
Joe Haddad
ceef1566c3
v10.0.6-canary.3
2021-01-15 11:49:31 -05:00
Joe Haddad
54bee4fb4d
fix: resolve two peer dep install warnings ( #21176 )
...
This removes the peer dep on `webpack` from `react-dev-overlay`, as it is for types only.
This makes the peer dep on `webpack` optional for `react-refresh-utils`, as you can provide webpack via the constructor (how Next.js does).
2021-01-15 16:39:49 +00:00
Joe Haddad
598997f038
fix: lint
2021-01-15 10:24:16 -05:00
Tim Neutkens
8b02c1ba52
Update 1.bug_report.yml
2021-01-15 11:04:57 +01:00
Ben Botvinick
cf916f9906
Add useCreateIndex to mongoose connection options ( #21145 )
...
To prevent `DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead.`
2021-01-15 09:57:52 +01:00
Joe Haddad
dd2218adc9
v10.0.6-canary.2
2021-01-15 01:32:14 -05:00
Gerald Monaco
358d57dbae
Fix tests for React 16 + Webpack 4/5 ( #21146 )
2021-01-15 01:31:28 -05:00
Gerald Monaco
cd5ea7db1f
Bump minimum suggested React version ( #21046 )
...
* Upgrade React version warning
* Fix font/stylesheet plugin
* Fix size-limit tests
* Fix build-output test
* Add tests for React 16
* Fix react-dom version
2021-01-14 22:29:57 -05:00
Guy Bedford
005a8abe39
feat: Webpack loader inlining ( #21127 )
...
This picks up on the inlining work in https://github.com/vercel/next.js/pull/20598 to also include webpack loader inlining optimizations.
This includes:
* The dependencies of sass-loader
* resolve-url-loader
And for added benefit:
* babel-plugin-transform-define
* babel-plugin-transform-react-remove-prop-types
style-loader and css-loader didn't inline easily. Perhaps we can come back to these ones.
2021-01-15 01:51:45 +00:00
Lee Robinson
dc87a8436b
Update redirected or broken Vercel docs links. ( #21119 )
2021-01-14 15:37:21 +00:00
Joe Haddad
60a896f833
v10.0.6-canary.1
2021-01-14 10:18:03 -05:00
Ramiro Silveyra d'Avila
d72b2d6e36
fix: webpack 5 and worker-loader support ( #21050 )
...
Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2021-01-14 01:48:49 -05:00
François Billioud
9efe8eb019
Fix "rule.test.test is not a function" in @next/plugin-storybook ( #21032 )
...
Rookie mistake 😉
2021-01-14 03:14:57 +00:00
Ludovico Fischer
406c996189
fix: bump node-sass peer dependency ( #21084 )
...
Get rid of the unmet peer dependency warning when installing
a next.js project wtih node-sass 5.
node-sass 5 is the currently maintained version and removes
support one deprecated API and Node.js versions that Next.js does
not support either. Next.js uses node-sass 5 in devDependencies.
node-sass changelog: https://github.com/sass/node-sass/releases
On the other hand, as the docs encourage the sass package instead of node-sass,
(see errors/duplicate-sass.md)
I have updated examples which used node-sass 4 to the latest sass instead.
2021-01-14 02:26:01 +00:00
Guy Bedford
bddb02286f
feat: webpack inlining with configuration for v4 / v5 ( #20598 )
2021-01-13 20:59:08 -05:00
kaykdm
e1184fb060
Fix image cache for vector and animated images ( #20480 )
...
Fixes: https://github.com/vercel/next.js/issues/19100
> According to https://nextjs.org/docs/basic-features/image-optimization#caching Next.js populates a cache dir when using the new <Image /> component. This is not the case when using SVG files. This results in a performance penalty.
I created a function for writing images to cache directory (`wrirteToCacheDir`) and it is called for all images.
However, vector and animated images are not optimized before writing them to cache dir
Related to #18179
2021-01-13 18:06:04 +00:00
Ari Freyr Asgeirsson
69ff95f50e
Wrong index path revalidation timer ( #20818 )
...
Hello friends
Ran into this bug on our production site, prerenderManifest stores revalidation info for the index as `"/": { .. }`, but the code tries to access this information as `"/index"`.
This leads to our index page always having s-max-age: 1
2021-01-13 16:15:11 +00:00
Janicklas Ralph
e6e402e486
Font optimization - remove warning message ( #20874 )
2021-01-13 15:54:31 +00:00
JJ Kasper
417a712066
Update next/image test ( #20986 )
...
This ensures the page has transitioned fully before testing which should resolve the random failure seen in a couple of runs.
x-ref: https://github.com/vercel/next.js/pull/20918#issuecomment-758155230
2021-01-13 15:05:08 +00:00
Volodymyr Klymenko
334ce64cd7
Add missing word to Data Fetching docs ( #21018 )
...
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-01-13 15:35:32 +01:00
Lalit
a6ff7bd661
Update a link ( #20999 )
...
Update link from https://swr.now.sh to https://swr.vercel.app
2021-01-13 14:22:29 +00:00
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