Commit graph

4492 commits

Author SHA1 Message Date
JJ Kasper
18fc5488f9
Fix publish native including non-packages (#30589) 2021-10-28 19:36:30 -05:00
Steven
c4ee78f2a7
Relax warning for next/image loader width (#30562)
Some users reported false hits when using complex loaders that implement Art Direction.

We can relax the warnings so that query string params named width should not warn.
2021-10-28 22:32:10 +00:00
jj@jjsweb.site
ee062aee20
v12.0.2-canary.7 2021-10-28 16:07:34 -05:00
George Karagkiaouris
450552ddba
Split Set-Cookie header correctly (#30560)
## Bug

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

Fixes #30430 

There's some more discussion in the issue, but in summary:
- web `Headers` implementation combines all header values with `', '`
- For `Set-Cookie` headers, you're supposed to set them as separate values, not combine them
- web `Headers` forbids the use of `Cookie`, `Set-Cookie` and some more headers, so they don't have custom implementation for those, and still joins them with `,`
- We currently just split them using `split(',')`, but this breaks when the header contains a date (expires, max-age) that also includes a `,`

I used this method to split the Set-Cookie header properly: https://www.npmjs.com/package/set-cookie-parser#splitcookiestringcombinedsetcookieheader as suggested [here](https://github.com/whatwg/fetch/issues/973#issuecomment-559678813)

I didn't add it as a dependency, since we only needed that one method and I wasn't sure what the process is for adding dependencies, so I just added the method in the middleware utils
2021-10-28 17:46:58 +00:00
Jiachi Liu
5b4ad4a1c1
Simplify rsc related configs and fix test (#30546)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2021-10-28 19:02:55 +02:00
jj@jjsweb.site
7232415081
v12.0.2-canary.6 2021-10-28 12:00:00 -05:00
JJ Kasper
63024d32b4
Update publish-native to not block on error (#30565) 2021-10-28 11:26:09 -05:00
Keen Yee Liau
7077bf8c26
add warning to update featureName in FEATURE_USAGE backend (#30283)
`featureName` is restricted to certain values for security reasons.
Before any change is made in the client, backend code has to be updated first.
2021-10-28 11:16:42 -05:00
Akira Tsuboi
cb3ce2105f
Fix file path overflowing in error popup (#27575)
## Bug

- [x] Related issues linked using `fixes #number`

fixes #27170

### Before
![before](https://user-images.githubusercontent.com/29579847/127415669-8eecf6e3-aba0-408f-9af5-0014da7bb3ad.png)

### After
![after](https://user-images.githubusercontent.com/29579847/127415724-c5082e06-6a68-4f80-828b-ed8ef939b9fb.png)
2021-10-28 16:05:09 +00:00
Tobias Koppers
ac58857d7d v12.0.2-canary.5 2021-10-28 17:08:30 +02:00
Tobias Koppers
93341345db
Update swc (#30552)
Co-authored-by: Donny/강동윤 <kdy1997.dev@gmail.com>
2021-10-28 17:07:48 +02:00
Tobias Koppers
c0dd481ea6
exclude musl from target (#30557) 2021-10-28 16:58:58 +02:00
Tobias Koppers
0d924ca025 v12.0.2-canary.4 2021-10-28 15:17:08 +02:00
Tobias Koppers
215fa85c8e
Revert "Update swc to fix minifier issue (#30540)" (#30551)
This reverts commit 387d6564ae.
2021-10-28 15:11:55 +02:00
Donny/강동윤
14d3f01a98
Exclude musl from target (#30548) 2021-10-28 14:59:20 +02:00
Donny/강동윤
387d6564ae
Update swc to fix minifier issue (#30540)
Co-authored-by: kdy1 <kdy1@users.noreply.github.com>
2021-10-28 13:59:45 +02:00
Donny/강동윤
3a9f008c99
Update swc (#30509)
Co-authored-by: kdy1 <kdy1@users.noreply.github.com>
2021-10-28 12:25:54 +02:00
JJ Kasper
215cc58562
Update to copy necessary RSC files from dep (#30505)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-10-28 11:07:13 +02:00
Tim Neutkens
88131eb704 v12.0.2-canary.3 2021-10-28 10:17:16 +02:00
JJ Kasper
82001f2d54
Share resolve logic for trace and externals (#30499)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-10-28 10:14:09 +02:00
Maia Teegarden
fe16ab0f22
Fix issue with placeholder followed by numbers (#30493)
* Fix issue with placeholder followed by numbers

* Build next-swc binaries
2021-10-27 17:07:45 -07:00
JJ Kasper
e465e90fe5
Fix native-url containing non-es5 usage (#30474)
This ensures we don't add non-es5 code from ncc'ing 

Fixes: https://github.com/vercel/next.js/issues/30450

## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added
- [x] Errors have helpful link attached, see `contributing.md`
2021-10-27 20:13:28 +00:00
Tim Neutkens
207e8add0e v12.0.2-canary.2 2021-10-27 19:48:49 +02:00
Tim Neutkens
aadc653665
Make sure externals is an array (#30466)
Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com>
2021-10-27 19:48:10 +02:00
Steven
3292713654
Relax warning for next/image parent element (#30453)
This warning was incorrectly displaying for the "background" use case demonstrated here: https://image-component.nextjs.gallery/background
2021-10-27 16:43:02 +00:00
Tobias Koppers
02ba241105 v12.0.2-canary.1 2021-10-27 17:16:48 +02:00
Tobias Koppers
ddc916ce74
remove console.log (#30447) 2021-10-27 17:13:57 +02:00
Donny/강동윤
ddcfab4447
Update swc (#30426)
Co-authored-by: kdy1 <kdy1@users.noreply.github.com>
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2021-10-27 16:55:35 +02:00
Tim Neutkens
ecc7f6f86a v12.0.2-canary.0 2021-10-27 16:31:15 +02:00
Tobias Koppers
f7048b55ec
fix external fallback for invalid packages (#30427)
fallback to alternative external version also when it fails because of base resolve mismatch#

fix resolved .mjs modules treated as external

fixes #30330
2021-10-27 13:53:44 +00:00
Donny/강동윤
979e9bd94f
Update swc (#30404)
## 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`


This includes

 - https://github.com/swc-project/swc/pull/2530
   - Strip out `declare`-d class properties properly.

 - https://github.com/swc-project/swc/pull/2538
   - Marks method properties as a scope while renaming variables.
   - Fix regression of object-rest pattern handler.
   - Improve name mangler a bit, by marking it as a scope.

 - https://github.com/swc-project/swc/pull/2551
   - Fix a bug of the property inlining pass which can break many react apps.

There is a minor regression in the minifier due to added aliasing check.


(I manually selected crates to update)
2021-10-27 08:18:21 +00:00
Tobias Koppers
431178bf53
update tsconfig correctly when compilerOptions is not set yet (#30355)
A tsconfig like:

```
{
  "extends": "..."
}
```

currently fails the build if the config that is extended from has not the expected configuration (and we want to update it)

Fixes: https://github.com/vercel/next.js/issues/30360
2021-10-27 04:11:07 +00:00
Oscar Busk
718003c8a7
Add incremental to template/tsconfig.json to avoid changes on first build (#30357)
I used `create-next-app` to create a new fancy Next 12 app, ran `yarn build` and got a git diff. The tsconfig.json had a `incremental` added by next. Just running build shouldn't need I have uncommitted changes.
2021-10-27 03:11:45 +00:00
jj@jjsweb.site
ff926d5c1b
v12.0.1 2021-10-26 20:59:41 -05:00
jj@jjsweb.site
6467de14b2
v12.0.1-canary.5 2021-10-26 20:02:05 -05:00
Steven
3bdf80dde5
Fix PerformanceObserver usage for older browsers and CI (#30387)
Browsers older than 2017 don't have PerformanceObserver https://caniuse.com/mdn-api_performanceobserver


- Fixes https://github.com/vercel/next.js/issues/30322
- Fixes https://twitter.com/fmgordillo/status/1453037730141716492
2021-10-27 00:37:19 +00:00
jj@jjsweb.site
89e244ec41
v12.0.1-canary.4 2021-10-26 18:56:13 -05:00
Donny/강동윤
a796cedf97
Disable loading of .swcrc (#30384)
We found that `.swcrc` was unintentionally loaded breaking applications as it is not tested for that yet, customization will be added at a later point in time



## 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-10-26 23:54:55 +00:00
Jiachi Liu
8e4055433e
Fix exportRuntime and react-18 concurrent tests (#30381)
* disable concurrent test cases in short term to improve them later
* remove bad alias in next.config.js
2021-10-26 23:17:55 +00:00
Jiachi Liu
8077f4213d
lint: remove unused (#30370) 2021-10-26 23:02:51 +02:00
Kristóf Poduszló
bc0b50d60d
feat: ignore incremental TS compilation build info (#30362) 2021-10-26 22:52:40 +02:00
Jiachi Liu
da1f8adfef v12.0.1-canary.3 2021-10-26 22:26:30 +02:00
Tobias Koppers
3d035cea3c
fix rsc on windows (#30364) 2021-10-26 22:24:28 +02:00
Tobias Koppers
95607130a0
keep sortedMiddleware intact as it's used by the runtime (#30361)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-10-26 22:18:08 +02:00
jj@jjsweb.site
17c91ccb8c
v12.0.1-canary.2 2021-10-26 13:14:23 -05:00
Jiachi Liu
c2541e2fd9
Fix flight loader parsing (#30345) 2021-10-26 20:13:51 +02:00
JJ Kasper
4c83292a84
Update SWC OS and CPU fields (#30341)
* Update SWC OS and CPU fields

* co-authored-by: CanKolay5677 <80613396+CanKolay5677@users.noreply.github.com>
2021-10-26 13:11:31 -05:00
Tobias Koppers
520c5a4083
fix missed hmr events (#30309)
When an compilation happens in the timespan between "page loaded client bundle" and "web socket got initial sync event" it didn't apply the hmr update.
2021-10-26 20:06:29 +02:00
Tim Neutkens
2fa8caa999
Clear up confusion around SWC being disabled for Babel while swcMinify is on (#30337) 2021-10-26 12:59:37 -05:00
jj@jjsweb.site
0d236f7380
v12.0.1-canary.1 2021-10-26 11:52:16 -05:00