Commit graph

705 commits

Author SHA1 Message Date
Jiachi Liu
d2cef24d5d
Fix image related link prop warning with react 18 beta (#31895)
## Bug

Fixes #31892 

react 18: requires camelcase for those props 
```
Warning: Invalid DOM property `imagesrcset`. Did you mean `imageSrcSet`
```
react 17: requires lowercase for those props

```
Warning: React does not recognize the `imageSrcSet` prop on a DOM element.
```

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`


### Utils

* Add command `yarn next-react-18 test/integration/any-react-18-app/`
* Add util `withReact18`

```js
const withReact18 = require('../../react-18/test/with-react-18')

module.exports = withReact18({
  experimental: {
    concurrentFeatures: true,
  },
})
```
2021-11-30 18:37:22 +00:00
Jiachi Liu
cf64e9130e
fix: rsc headers (#31854)
`headers` type should align with `NodeHeaders`
2021-11-26 18:04:36 +00:00
Tobias Koppers
db099c5668
update webpack (#31798)
https://github.com/webpack/webpack/releases/tag/v5.64.4
2021-11-25 18:31:25 +00:00
Tobias Koppers
03ecbcf182
Remove some watcher hacks and update version (#31768)
## 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 by running `yarn lint`
2021-11-25 08:31:20 +00:00
Tobias Koppers
719fe5291c
update webpack (#31759)
https://github.com/webpack/webpack/releases/tag/v5.64.2
https://github.com/webpack/webpack/releases/tag/v5.64.3
2021-11-24 15:22:24 +00:00
wendell
226944d3d3
Fix pwa demo (#31734)
* Fix pwa demo

* Revert unnecessary change
2021-11-23 11:17:56 -05:00
Steven
44b4dbcd41
Adjust AVIF size so that its smaller than WebP size (#31494)
Generally, AVIF quality can be lower compared to WebP so we can adjust this for the user so that it looks roughly the same depending on if the browser supports AVIF or WebP.

- Fixes #31254 
- Related to https://github.com/lovell/sharp/issues/2850
2021-11-17 20:31:16 +00:00
Tobias Koppers
bf973165fe
update webpack (#31455)
https://github.com/webpack/webpack/releases/tag/v5.64.1
2021-11-16 17:28:42 +00:00
Yamagishi Kazutoshi
32f0c9a403
Support ESLint v8 (#29865)
Co-authored-by: Michaël De Boey <info@michaeldeboey.be>
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2021-11-16 10:18:27 +01:00
Jiachi Liu
6abc6699e9
Upgrade webpack (#31313)
Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2021-11-11 19:02:27 +00:00
Tobias Koppers
8c8642898f
upgrade webpack (#31034)
* upgrade webpack

* ⚙ Update compiled files

Co-authored-by: sokra <sokra@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-11-09 22:34:53 +01:00
Donny/강동윤
54ca8f41ce
next-swc: Add displayNameAndId of styled-components (#31189)
## 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 by running `yarn lint`




Related to: https://github.com/vercel/next.js/issues/30802
2021-11-09 10:05:31 +00:00
Tobias Koppers
283af4e69b
use loader-utils 2 for resolve-url-loader to fix ./data: urls in sass (#31134)
upgrade to loader-utils 3.1.2 for hash fix

fixes #31016
fixes #30998
2021-11-08 18:37:25 +00:00
Maia Teegarden
bc88831619
Add next-swc jest transform (#30993)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2021-11-08 17:35:04 +01:00
Shu Ding
5e185fc5da
Upgrade React alpha and experimental dependencies to latest (#31039)
Ensuring that our tests are not broken with latest React changes.

## 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 by running `yarn lint`
2021-11-06 12:08:03 +00:00
Tobias Koppers
c7d0883fc9
upgrade webpack-sources (#30944)
fixes #30920
2021-11-04 11:33:02 +00:00
JJ Kasper
a3a592629a
Update to use repo specific napi instead of npx (#30914)
* Update to use repo specific napi instead of npx

* download build cache

* test running musl build

* Ensure napi is available for build-native-dev

* install globally in docker

* re-add isRelease check
2021-11-03 16:58:22 -05:00
Maia Teegarden
b2b7e78cef
Add postinstall script to install native packages (#30850)
* Add postinstall script to install native packages

* Use a subdirectory of tmpdir

* Ensure tmpdir exists

* Remove tmpdir once done

Co-authored-by: JJ Kasper <jj@jjsweb.site>

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2021-11-02 16:37:25 -07:00
Tobias Koppers
3674ccb3df
update mini-css-plugin and remove experimentalUseImportModule (#30617)
- Fixes #30366
- Closes #30367
2021-11-02 21:56:11 +00:00
Tim Neutkens
cbc52d1b31
Update loader-utils (#30743)
Co-authored-by: jj@jjsweb.site <jj@jjsweb.site>
Co-authored-by: Steven <steven@ceriously.com>
Co-authored-by: Jiachi Liu <inbox@huozhi.im>
2021-11-02 16:13:15 +01:00
PrashoonB
147b0f9ebc
Upgraded the node-notifier version to 8.0.1 (#30777)
## 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 by running `yarn lint`
2021-11-02 10:05:26 +00:00
ihmpavel
2027d1fe7d
Fix invalid character in next/image header "Content-Disposition" (#30287)
* Image content disposition

* Add tests

* Fixed import

* Add TS types

* Revert readme.md

* Alphabet sorting

* Compile `content-disposition`

* Rename for tests

* Fix test

* Fix accidentally added letter

Co-authored-by: Steven <steven@ceriously.com>
2021-11-01 19:23:24 -04:00
Tobias Koppers
f363cc8d44
update webpack (#30634)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2021-10-29 15:46:05 -05:00
Maia Teegarden
b5a89160f7
Chore/rust workflow (#30577)
* Remove prebuilt binaries from repo

* Prefer locally built binary

* Add binary packages as optionalDependencies

* Remove build-native workflow for prebuilt binaries

* Remove binaries from checkCompiled job

* Change build-native command to default to dev

* Add build-native-dev and have tests depend on it

* Update contributing

* Run ls to make inspect artifact download

* Use correct artifact download path

* Try using reusable workflows

* Resort to duplication for now

* Inspect artifact download

* Ensure native is copied for PR stats

* Copy after ref checkout and log binaries for PR stats

* fix typo

* copy right before linking/packing

* Use fs.copy

* fix test for now

Co-authored-by: jj@jjsweb.site <jj@jjsweb.site>
2021-10-29 13:56:56 -05:00
Tobias Koppers
c03e28425b
make sure "webpack" exists in the repo for typings (#30371)
fixes "yarn types" needed before "yarn dev"
use incremental typescript for next package
2021-10-29 17:57:55 +00:00
JJ Kasper
842a130218
Update to latest shell-quote (#30621) 2021-10-29 11:12:46 -05:00
Shu Ding
5ddee4494b
Add new target for middleware (#30299)
Co-authored-by: Jiachi Liu <inbox@huozhi.im>
Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com>
Co-authored-by: Tim Neutkens <timneutkens@me.com>
2021-10-26 18:50:56 +02:00
Tobias Koppers
149353b8c9
update webpack (#30268) 2021-10-25 13:06:51 -05:00
Tim Neutkens
467bf08a8a
Add events polyfill (#30256) 2021-10-25 15:32:01 +02:00
Tobias Koppers
04e1e01f18
test, fix and document all possible import types for URL imports (#30165)
resolve absolute URLs in CSS when using urlImports
remove `[path]` from static static image output path
replace file-loader with asset module, remove file-loader
2021-10-25 01:54:16 +02:00
Tim Neutkens
08a7f7f31a
Enable SWC by default when there is no custom Babel config (#29811)
Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com>
Co-authored-by: jj@jjsweb.site <jj@jjsweb.site>
Co-authored-by: Maia Teegarden <dev@padmaia.rocks>
Co-authored-by: padmaia <padmaia@users.noreply.github.com>
2021-10-23 10:21:44 +02:00
Jiachi Liu
79c25a4a87
Upgrade styled-jsx for react 18 improvement (#30179)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-10-23 08:07:28 +02:00
JJ Kasper
3274efc398
Update to latest caniuse-lite version (#30194) 2021-10-22 20:36:33 -05:00
JJ Kasper
ff474b01db
Update include/exclude handling for output tracing (#30184)
* Use micromatch for excludes and add tests

* update compiled

* check glob array once per file
2021-10-22 13:55:45 -05:00
Tobias Koppers
ecf2ee9c51
automatically enable managed paths for all node_modules (#30089)
This improves caching performance in monorepos where there are multiple node_modules folders
Automatically enable immutable paths for Yarn PnP
2021-10-21 01:25:45 +00:00
Javi Velasco
a815ba9f79
Implement Middleware RFC (#30081)
This PR adds support for [Middleware as per RFC ](https://github.com/vercel/next.js/discussions/29750). 

## 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-10-20 17:52:11 +00:00
Tobias Koppers
6f3dc0162f
update webpack (#30073)
https://github.com/webpack/webpack/releases/tag/v5.59.0

We need:
* experiments.buildHttp improvements for the new experimental flag
* managedPaths improvements from the monorepo improvements
* module build hooks for tracing
2021-10-19 21:03:12 +00:00
Jiachi Liu
33c687ac42
Update react 18 streaming api (#30038) 2021-10-18 18:36:51 -05:00
JJ Kasper
071ecb0b7b
Update tracing to collect from reasons (#29975)
This updates the `outputFileTracing` to fix a few cases we noticed where files weren't caught and also ensures we match webpack's `esm` resolving so that we don't include `cjs` files when webpack expects `esm`, it also updates to the latest `@vercel/nft` version which removes the caching in favor of ensuring the `reasons` map contains all parents allowing us to trace all entries in one `nodeFileTrace` run and the collect the separate files for each entry from the `reasons` map giving us much better performance/reliability.  

This also ensures we don't include static image imports when enabled in the traces since they can drastically increase deployment size on larger projects.
2021-10-18 17:01:02 +00:00
Steven
777957e6b1
Compile native-url and node-libs-browser (#30032)
This prevents useless warnings about querystring.

```
warning next > native-url > querystring@0.2.1: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
warning next > node-libs-browser > url > querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
```
2021-10-18 15:46:39 +00:00
Tim Neutkens
7e370134fb
Use import() to load next.config.js (#29935)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
Co-authored-by: Steven <steven@ceriously.com>
2021-10-16 14:22:42 +02:00
JJ Kasper
75748caf7f
Migrate server-sent events HMR connection to WebSocket (#29903)
This replaces the server-sent events HMR connection with a WebSocket connection to prevent hitting browser connection limits, allow sending events back from the browser, and overall better performance. 

This approach sets up the the `upgrade` event listener on the server immediately when created via `next dev` and on the first request using `req.socket.server` when created via a custom server. In a follow-up PR we can push the files changed via the WebSocket as well. 

x-ref: https://github.com/vercel/next.js/issues/10061
x-ref: https://github.com/vercel/next.js/issues/8064
x-ref: https://github.com/vercel/next.js/issues/4495

## 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-10-15 07:09:54 +00:00
Thibaut SABOT
ba39ee458b
upgrade strip-ansi in react-dev-overlay (#29906)
* upgrade strip-ansi in react-dev-overlay

* use the non-breaking version of strip-ansi
2021-10-14 10:57:29 -05:00
JJ Kasper
6f3c338745
Update to latest @vercel/nft (#29902)
This updates to the latest version of `@vercel/nft` which includes better shared caching between runs. 

x-ref: https://github.com/vercel/nft/pull/239
x-ref: https://github.com/vercel/nft/pull/238
x-ref: https://github.com/vercel/nft/pull/237
2021-10-14 06:12:33 +00:00
Tobias Koppers
ecd31ab62f
update webpack (#29870) 2021-10-13 17:21:15 +02:00
Tobias Koppers
4d50ff30ba
update webpack (#29738) 2021-10-08 15:56:23 +02:00
Tobias Koppers
20aecdebc0
update webpack (#29708)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-10-08 10:29:56 +02:00
Tim Neutkens
351d225fc5
Remove isWebpack5 checks (#29677)
* Remove isWebpack5 checks

* Remove next-babel-loader (replaced by babel-turbo-loader), hotSelfAccept, and BuildStatsPlugin

* Remove cacache file

* Remove unused variable

* remove old test

* lint-fix

* update babel-loader tests

* lint-fix

* update compiled

Co-authored-by: jj@jjsweb.site <jj@jjsweb.site>
2021-10-06 18:46:46 -05:00
Tim Neutkens
aa8a885599
Remove webpack 4 support (#29660)
Co-authored-by: jj@jjsweb.site <jj@jjsweb.site>
2021-10-06 17:40:01 +02:00
Tobias Koppers
761eadbd42
update webpack (#29644)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-10-06 12:02:36 +02:00