Commit graph

4063 commits

Author SHA1 Message Date
Steven
31fef9ae5d v11.1.3-canary.6 2021-09-02 18:24:42 -04:00
jj@jjsweb.site
2c27f995e4
v11.1.3-canary.5 2021-09-02 16:48:25 -05:00
Steven
7980bcd453 v11.1.3-canary.4 2021-09-02 17:32:48 -04:00
Steven
9bbba98c01
Fix next lint no-document-import-in-page on Windows (#28745)
Fixes #28596
2021-09-02 20:51:22 +00:00
Jiachi Liu
7f09df3483
Fix typings of dynamic suspense (#28740)
x-ref: https://github.com/vercel/next.js/pull/27611#issuecomment-911743160
2021-09-02 16:14:48 +00:00
Tim Neutkens
d310009c9b v11.1.3-canary.3 2021-09-02 13:40:21 +02:00
Tim Neutkens
5a2634e015
Update css-loader runtime to use compiled files (#28735) 2021-09-02 13:39:19 +02:00
Tim Neutkens
eaea8cb294
Remove .next/traces directory as it's not used (#28728)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-09-02 13:28:51 +02:00
Prateek Bhatnagar
7c29a262e1
Bug fix for lint rule (#28677) 2021-09-02 10:45:27 +02:00
Tim Neutkens
3693ed2e0e v11.1.3-canary.2 2021-09-02 08:55:58 +02:00
Tim Neutkens
9a56fdba82
Use consistent postcss version for all transforms (#28529)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2021-09-02 08:45:35 +02:00
jj@jjsweb.site
899683c3d5
v11.1.3-canary.1 2021-09-01 14:44:53 -05:00
JJ Kasper
2d1cb8fe8b
Ensure @babel/core is not duplicated (#28716)
Follow-up to https://github.com/vercel/next.js/pull/28713 this ensures we also don't duplicate `@babel/core` in our `babel-packages` bundle. This was occurring from us re-using the `@babel/core` package name which causes us to remove it from the externals [here](77c0e09371/packages/next/taskfile-ncc.js (L18-L21)).
2021-09-01 19:29:35 +00:00
JJ Kasper
77c0e09371
Ensure @babel/types is not duplicated (#28713)
This is a follow-up to https://github.com/vercel/next.js/pull/28174 to ensure we de-dupe `@babel/types` correctly as this increased the compiled `babel` packages quite a bit.
2021-09-01 17:46:50 +00:00
Jiachi Liu
ed9b8863b4
fix: should allow nullable param for res.end (#28694)
## Bug
Fixes #28693

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`
2021-09-01 17:01:00 +00:00
JJ Kasper
9a6542ba68
Ensure build trace is correct with extra entries (#28667)
* Ensure build trace is correct with extra entries

* lint-fix

* fix check on windows
2021-09-01 10:56:04 -05:00
Eungyeol
c1dbc12609
Do not have the required package error fix (#28662)
The following error occurred 
when I created a project with the typecript template of createp-next-app 
and did the 'next build'.

```shell
It looks like you're trying to use TypeScript but do not have the required package(s) installed.

Please install @types/node by running:

        yarn add --dev @types/node

If you are not trying to use TypeScript, please remove the tsconfig.json file from your package root (and any TypeScript files in your pages directory).
```

This issue was resolved by adding @types/node.
So I added @types/node to the devDependencies of the create-next-app typecript template.
2021-09-01 02:01:55 +00:00
jj@jjsweb.site
c1a97e557b
v11.1.3-canary.0 2021-08-31 16:11:16 -05:00
Rahul Gaba
c21cbdf899
Fix for next-script-for-ga ESLint rule crashing when a method is used in dangerouslySetInnerHTML (#28675)
Fixes #28635



## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added
- [x] Errors have helpful link attached, see `contributing.md`
2021-08-31 20:23:21 +00:00
Steven
acf65f92dc
Fix TS type conflict for <img> tag (#28672)
This type was added in PR #28269 but doesn't need to be public and was causing conflicts with `@types/react@17`.

We currently use `@types/react@16` so ideally we should upgrade to `@types/react@17` and then remove the `ts-ignore`.

Fixes #28647
2021-08-31 19:03:08 +00:00
Tobias Koppers
f6d8a112df
fix esm externals edge case with "module" condition (#28612)
prefer commonjs externals even if "module" condition is used in package.json



## Bug

- [ ] Related issues linked using `fixes #number`
- [x] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`
2021-08-31 08:32:33 +00:00
Tim Neutkens
97456e81ce v11.1.2 2021-08-31 07:15:17 +02:00
jj@jjsweb.site
248b34105b
v11.1.2-canary.0 2021-08-30 21:48:53 -05:00
JJ Kasper
ff9dcc6a47
Ensure custom app regex is correct for Windows (#28631)
* Ensure custom app regex is correct for Windows

* lint-fix

* update test for ie

* update test

* lint-fix
2021-08-30 20:09:48 -05:00
Kara
9be387c7f4
getServerSideProps should support props value as Promise (#28607)
Previous to this change, getServerSideProps could only return plain objects
for props, e.g.:

```javascript
export async function getServerSideProps() {
  return {
    props: {
      text: 'some value',
    }
  }
}
```

With this commit, the props object can also be a Promise, e.g.

```javascript
export async function getServerSideProps() {
  return {
    props: (async function () {
      return {
        text: 'promise value',
      }
    })(),
  }
}
```

For now, the framework simply waits for the results of the props Promise to resolve,
but this small change sets the groundwork for later allowing props to be streamed (cc @devknoll).

## Feature

- [x] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. -- *This is part of @devknoll's ongoing work to support streaming.*
- [ ] Related issues linked using `fixes #number`
- [x] Integration tests added
- [x] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not. *not sure if this applies here*
- [ ] Errors have helpful link attached, see `contributing.md`
2021-08-30 19:52:15 +00:00
Jiachi Liu
8c553e8dc0
chore: upgrade styled-jsx to 4.0.1 (#28626)
Fix warning of peer dep on yarn (berry version) install
2021-08-30 19:15:14 +00:00
Steven
804971fd9a v11.1.1 2021-08-30 14:24:52 -04:00
jj@jjsweb.site
194d70f068
v11.1.1-canary.19 2021-08-30 13:20:57 -05:00
Steven
a60690f59b v11.1.1-canary.18 2021-08-30 13:06:42 -04:00
Steven
7afc97c574
Add CSP to Image Optimization API (#28620)
Add CSP header to Image Optimization API
2021-08-30 16:51:47 +00:00
JJ Kasper
f1dbc9260d
Ensure dev server side errors are correct (#28520) 2021-08-27 14:29:30 +02:00
Gerald Monaco
2cc2cb4f77
Support for functional Document components (#28515) 2021-08-26 10:05:01 -05:00
Steven
d8093ec4b4
Update warning when parent styles break next/image (#28517)
- Follow up to #28221 
- Fixes #27644
2021-08-26 00:09:04 +00:00
Steven
ed6ce1ae27 v11.1.1-canary.17 2021-08-25 15:25:53 -04:00
Houssein Djirdeh
9442925f50
handle edge case for no-import-document rule (#28261)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2021-08-25 13:30:49 -05:00
Steven
d835402f28 v11.1.1-canary.16 2021-08-25 12:53:06 -04:00
JJ Kasper
ead10f1f81
Fix handling for 204 status code with a body (#28479)
This ensures we handle 204 and 304 status codes correctly in API routes.  

## Bug

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

Fixes: https://github.com/vercel/next.js/issues/28464
2021-08-25 15:52:43 +00:00
JJ Kasper
f21685549a
Update i18n locales limit to warning (#28429)
* Update i18n locales limit to warning

* update version -> versions

* bump

* Use Log.warn instead

* Apply suggestions from code review

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


Co-authored-by: Lee Robinson <me@leerob.io>
2021-08-25 08:54:38 -05:00
Tim Neutkens
c65248d732 Remove unused imports 2021-08-25 11:11:45 +02:00
Tim Neutkens
a509d906a6 v11.1.1-canary.15 2021-08-25 10:49:43 +02:00
Tim Neutkens
9316dc0a8e
Add default trace format that is exported automatically (#28461)
Co-authored-by: Steven <steven@ceriously.com>
2021-08-25 10:47:16 +02:00
JJ Kasper
706547e0c3
Ensure error is shown correctly for empty headers field (#28430)
* Ensure error is shown correctly for empty headers field

* Apply suggestions from code review

Co-authored-by: Steven <steven@ceriously.com>

Co-authored-by: Steven <steven@ceriously.com>
2021-08-24 19:26:33 -05:00
Janicklas Ralph
fd1c56e66a
next/script fix duplicate scripts (#28428)
* Fix #27747

* Fix lint error

* Add data attribute to script component

* Fix #28036

* Fix tests

* Fix tests

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2021-08-24 11:07:38 -05:00
jj@jjsweb.site
ee462442c8
v11.1.1-canary.14 2021-08-24 09:54:07 -05:00
Mateusz Burzyński
c1a09471ff
Add missing typescript property to NextConfig (#28459)
This is similar to https://github.com/vercel/next.js/pull/27126 , https://github.com/vercel/next.js/pull/27446 and https://github.com/vercel/next.js/pull/27974

## 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

- [x] Make sure the linting passes
2021-08-24 14:08:18 +00:00
JJ Kasper
ece79a4e00
Update test config to leverage swc (#28400)
This updates our `jest` configuration to no longer use `babel-jest` and instead uses `@swc/jest` which is much faster. This also updates to the latest version of `jest`, fixes our `tsconfig.json` used for tests (previously types in `node_modules` weren't resolved correctly), and ensures `next/dist` isn't un-necessarily transpiled in `jest`. 

Timings for `yarn testheadless test/unit/` on CI
- before: 3m 30s - 4m ([example run](https://github.com/vercel/next.js/runs/3394701995))
- after: under 1m ([example run](https://github.com/vercel/next.js/pull/28400/checks?check_run_id=3395161621))

Timings for `yarn testheadless test/unit/` locally on m1 mac 
- before: 90.16 seconds
- after: 29.92 seconds
2021-08-23 18:36:56 +00:00
Houssein Djirdeh
80921b6a54
enables eslint caching by default (#28349)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2021-08-23 12:56:21 -05:00
vcnc-hex
00f1519ae7
Fix forked NODE_OPTIONS except for inspect (#28420) 2021-08-23 12:14:17 -05:00
JJ Kasper
83209a4be4
Ensure @babel/core is de-duped when nccing (#28384)
* Ensure @babel/core is de-duped when nccing

* lint-fix

* ncc babel packages together

* remove un-needed env

* bump
2021-08-22 14:06:58 -05:00
Janicklas Ralph
26255a685d
Add data attribute to script component (#28310)
Add data attribute `data-nscript` to the script component
2021-08-20 20:48:48 +00:00