Commit graph

9187 commits

Author SHA1 Message Date
Tobias Koppers
dc1e906eb2
update webpack to 5.52.0 (#28771) 2021-09-06 10:59:23 +02:00
Tobias Koppers
289edaea16
mini-css-extract-plugin should not bundle webpack code (#28822) 2021-09-06 10:53:06 +02:00
Tim Neutkens
16d6eba1c9
Reuse warning from postcss-loader (#28727)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2021-09-05 14:22:34 +02:00
Gerald Monaco
7f83e6d15d
Add RenderResult class (#28776) 2021-09-04 09:41:06 -05:00
JJ Kasper
85366a0244
v11.1.3-canary.8 2021-09-03 16:48:00 -05:00
Pablo Espinosa
a8088bfd67
feat: Adding generic typing for previewData (#28668)
on GetServerSidePropsContext and GetStaticPropsContext

As discussed on #21574 having a generic type will give it more flexibility and remove linting errors.

## 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 #21574 
- [ ] 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`
2021-09-03 21:27:17 +00:00
Burak
1b8bc249c7
Change create-next-app getting started text in TypeScript template (#28718)
## 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-09-03 20:39:19 +00:00
Houssein Djirdeh
d0563127c6
[ESLint Plugin] Updates no-document-import-in-page rule to use path separators (#28768)
Context: https://github.com/vercel/next.js/pull/28745/files#r701418932
2021-09-03 18:51:21 +00:00
Brody McKee
1d08172116
Update to new npm publish token (#28772) 2021-09-03 11:58:11 -05:00
JJ Kasper
14a999ed73
Ensure build trace handles mixed modules (#28770) 2021-09-03 11:30:00 -05:00
Steven
fcdf73202d
Update github labeler with eslint-plugin-next (#28751)
The `eslint-plugin-next` package should be considered a "core" package since it powers the `next lint` command
2021-09-03 03:45:53 +00:00
Steven
1eb3bd9240 v11.1.3-canary.7 2021-09-02 19:09:08 -04:00
Steven
2b46871394
Fix lerna publish for automation token (#28750)
Related to https://github.com/lerna/lerna/issues/2788
2021-09-02 19:08:16 -04:00
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
Steven
801e48eae9
Update docs to clarify that image imports are static (#28744)
This PR clarifies the usage for static image imports.
2021-09-02 18:51:30 +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
Anderson Leite
e00b946785
router-is-ready test. Clean up unused vars. (#28723)
Variable `isDev` is not used in both tests.
The tests run dev/prod modes based on the different test scenarios.

## Bug

- [x] Integration tests clean up

## Documentation / Examples

- [x] Make sure the linting passes
2021-09-02 15:16:53 +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
Alex Castle
c9efbe1818
Update image styling doc (#28724)
In talking to partners, I've seen a lot of confusion about the number of wrapping `<div>`s around the image element rendered by `next/image`. There's always just one single wrapper--this PR updates the docs to make that a little more explicit.
2021-09-02 05:48:55 +00: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
Aleksa Cukovic
501bfe6969
Update docs about exposing env vars to the browser (#28673)
Current docs on exposing environment variables to the browser are slightly misleading as they say that variables loaded from `.env.local` are only available in node by default, but this is the case for all environment variables not just those loaded from `.env.local`.

## Documentation

- [x] Make sure the linting passes
2021-08-31 21:18:22 +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
matamatanot
71771df6fa
Add error page path for next-script-for-ga (#28643)
## Documentation / Examples

- [x] Make sure the linting passes

**My console**

> src/pages/_document.tsx#L14
> Use the `next/script` component for loading third party scripts. See: https://nextjs.org/docs/messages/next-script-for-ga

https://nextjs.org/docs/messages/next-script-for-ga is 404 now.
2021-08-31 07:41:27 +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
Knut Melvær
36d922fbda
Add apiVersion to config (#28610)
The client now warns against missing `apiVersion` ([docs](https://www.sanity.io/docs/api-versioning)). This PR adds the config for using the latest API version. There shouldn't be breaking changes in this app.



## 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-08-30 17:37:13 +00: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
Anderson Leite
8711c5ca53
Tests: Remove unnecessary await (#28594)
'await' has no effect on the type of this expression.ts(80007)

## Bug

- [X] Integration tests clean up

## Documentation / Examples

- [x] Make sure the linting passes
2021-08-29 06:50:00 +00:00