Skip to content

Commit

Permalink
Merge branch 'canary' into chore/add-return-types
Browse files Browse the repository at this point in the history
  • Loading branch information
tarunama authored Jan 5, 2021
2 parents 5263867 + a1a4af2 commit f9b774d
Show file tree
Hide file tree
Showing 90 changed files with 1,672 additions and 198 deletions.
42 changes: 0 additions & 42 deletions .github/ISSUE_TEMPLATE/1.Bug_report.md

This file was deleted.

61 changes: 61 additions & 0 deletions .github/ISSUE_TEMPLATE/1.bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Bug Report
about: Create a bug report for the Next.js core
title: ''
labels: 'template: bug'
issue_body: true
inputs:
- type: description
attributes:
value: Thanks for taking the time to file a bug report! Please fill out this form as completely as possible.
- type: description
attributes:
value: If you leave out sections there is a high likelihood it will be moved to the GitHub Discussions "Help" section.
- type: input
attributes:
label: What version of Next.js are you using?
description: 'For example: 10.0.1'
required: true
- type: input
attributes:
label: What version of Node.js are you using?
description: 'For example: 12.0.0'
required: true
- type: input
attributes:
label: What browser are you using?
description: 'For example: Chrome, Safari'
required: true
- type: input
attributes:
label: What operating system are you using?
description: 'For example: macOS, Windows'
required: true
- type: input
attributes:
label: How are you deploying your application?
description: 'For example: next start, next export, Vercel, Other platform'
required: true
- type: textarea
attributes:
label: Describe the Bug
description: A clear and concise description of what the bug is.
required: true
- type: textarea
attributes:
label: Expected Behavior
description: A clear and concise description of what you expected to happen.
required: true
- type: textarea
attributes:
label: To Reproduce
description: Steps to reproduce the behavior, please provide a clear code snippets that always reproduces the issue or a GitHub repository. Screenshots can be provided in the issue body below.
required: true
- type: description
attributes:
value: Before posting the issue go through the steps you've written down to make sure the steps provided are detailed and clear.
- type: description
attributes:
value: Contributors should be able to follow the steps provided in order to reproduce the bug.
- type: description
attributes:
value: These steps are used to add integration tests to ensure the same issue does not happen again. Thanks in advance!
25 changes: 0 additions & 25 deletions .github/ISSUE_TEMPLATE/2.Feature_request.md

This file was deleted.

66 changes: 66 additions & 0 deletions .github/ISSUE_TEMPLATE/2.example_bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Example Bug Report
about: Create a bug report for the examples
title: ''
labels: 'type: example,template: bug'
issue_body: true
inputs:
- type: description
attributes:
value: Thanks for taking the time to file a examples bug report! Please fill out this form as completely as possible.
- type: description
attributes:
value: If you leave out sections there is a high likelihood it will be moved to the GitHub Discussions "Help" section.
- type: input
attributes:
label: What example does this report relate to?
description: 'For example: with-styled-components'
required: true
- type: input
attributes:
label: What version of Next.js are you using?
description: 'For example: 10.0.1'
required: true
- type: input
attributes:
label: What version of Node.js are you using?
description: 'For example: 12.0.0'
required: true
- type: input
attributes:
label: What browser are you using?
description: 'For example: Chrome, Safari'
required: true
- type: input
attributes:
label: What operating system are you using?
description: 'For example: macOS, Windows'
required: true
- type: input
attributes:
label: How are you deploying your application?
description: 'For example: next start, next export, Vercel, Other platform'
required: true
- type: textarea
attributes:
label: Describe the Bug
description: A clear and concise description of what the bug is.
required: true
- type: textarea
attributes:
label: Expected Behavior
description: A clear and concise description of what you expected to happen.
required: true
- type: textarea
attributes:
label: To Reproduce
description: Steps to reproduce the behavior, please provide a clear code snippets that always reproduces the issue or a GitHub repository. Screenshots can be provided in the issue body below.
required: true
- type: description
attributes:
value: Before posting the issue go through the steps you've written down to make sure the steps provided are detailed and clear.
- type: description
attributes:
value: Contributors should be able to follow the steps provided in order to reproduce the bug.
- type: description
attributes:
value: Thanks in advance!
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/3.feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Feature Request
about: Create a feature request for the Next.js core
title: ''
labels: 'template: story'
issue_body: true
inputs:
- type: description
attributes:
value: Thanks for taking the time to file a feature request! Please fill out this form as completely as possible.
- type: description
attributes:
value: 'Feature requests will be converted to the GitHub Discussions "Ideas" section.'
- type: textarea
attributes:
label: Describe the feature you'd like to request
description: A clear and concise description of what you want and what your use case is.
required: true
- type: textarea
attributes:
label: Describe the solution you'd like
description: A clear and concise description of what you want to happen.
required: true
- type: textarea
attributes:
label: Describe alternatives you've considered
description: A clear and concise description of any alternative solutions or features you've considered.
required: true
11 changes: 2 additions & 9 deletions .github/workflows/build_test_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,20 +115,13 @@ jobs:
runs-on: ubuntu-latest
env:
NODE_OPTIONS: '--unhandled-rejections=strict'
YARN_COMPRESSION_LEVEL: '0'
steps:
- uses: actions/checkout@v2

- run: yarn install --frozen-lockfile --check-files

- run: |
mkdir -p ./e2e-tests/next-pnp
cp -r ./examples/with-typescript/. ./e2e-tests/next-pnp
cd ./e2e-tests/next-pnp
touch yarn.lock
yarn set version berry
yarn config set pnpFallbackMode none
yarn link --all --private ../..
yarn build
- run: bash ./test-pnp.sh

testsPass:
name: thank you, next
Expand Down
19 changes: 15 additions & 4 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ trigger:
include:
- '*'
exclude:
- bench/*
- docs/*
- errors/*
- examples/*
- bench
- docs
- errors
- examples
# Do not run Azure on `canary`, `master`, or release tags. This unnecessarily
# increases the backlog, and the change was already tested on the PR.
branches:
Expand All @@ -20,6 +20,17 @@ trigger:
- master
- refs/tags/*

pr:
# Do not run Azure CI for docs-only/example-only changes:
paths:
include:
- '*'
exclude:
- bench
- docs
- errors
- examples

variables:
YARN_CACHE_FOLDER: $(Pipeline.Workspace)/.yarn
NEXT_TELEMETRY_DISABLED: '1'
Expand Down
47 changes: 0 additions & 47 deletions docs/api-reference/next.config.js/build-target.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/api-reference/next.config.js/compression.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Next.js provides gzip compression to compress rendered content and

# Compression

Next.js provides [**gzip**](https://tools.ietf.org/html/rfc6713#section-3) compression to compress rendered content and static files. Compression only works with the [`server` target](/docs/api-reference/next.config.js/build-target.md#server-target). In general you will want to enable compression on a HTTP proxy like [nginx](https://www.nginx.com/), to offload load from the `Node.js` process.
Next.js provides [**gzip**](https://tools.ietf.org/html/rfc6713#section-3) compression to compress rendered content and static files. In general you will want to enable compression on a HTTP proxy like [nginx](https://www.nginx.com/), to offload load from the `Node.js` process.

To disable **compression**, open `next.config.js` and disable the `compress` config:

Expand Down
21 changes: 21 additions & 0 deletions docs/api-reference/next.config.js/static-optimization-indicator.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
description: Optimized pages include an indicator to let you know if it's being statically optimized. You can opt-out of it here.
---

# Static Optimization Indicator

> **Note:** This indicator was removed in Next.js version 10.0.1. We recommend upgrading to the latest version of Next.js.
When a page qualifies for [Automatic Static Optimization](/docs/advanced-features/automatic-static-optimization.md) we show an indicator to let you know.

This is helpful since automatic static optimization can be very beneficial and knowing immediately in development if the page qualifies can be useful.

In some cases this indicator might not be useful, like when working on electron applications. To remove it open `next.config.js` and disable the `autoPrerender` config in `devIndicators`:

```js
module.exports = {
devIndicators: {
autoPrerender: false,
},
}
```
2 changes: 1 addition & 1 deletion docs/basic-features/data-fetching.md
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ The `context` parameter is an object containing the following keys:
- `params`: If this page uses a dynamic route, `params` contains the route parameters. If the page name is `[id].js` , then `params` will look like `{ id: ... }`. To learn more, take a look at the [Dynamic Routing documentation](/docs/routing/dynamic-routes.md).
- `req`: [The HTTP IncomingMessage object](https://nodejs.org/api/http.html#http_class_http_incomingmessage).
- `res`: [The HTTP response object](https://nodejs.org/api/http.html#http_class_http_serverresponse).
- `query`: The query string.
- `query`: An object representing the query string.
- `preview`: `preview` is `true` if the page is in the preview mode and `false` otherwise. See the [Preview Mode documentation](/docs/advanced-features/preview-mode.md).
- `previewData`: The preview data set by `setPreviewData`. See the [Preview Mode documentation](/docs/advanced-features/preview-mode.md).
- `resolvedUrl`: A normalized version of the request URL that strips the `_next/data` prefix for client transitions and includes original query values.
Expand Down
8 changes: 5 additions & 3 deletions docs/basic-features/environment-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,16 +109,18 @@ Next.js allows you to set defaults in `.env` (all environments), `.env.developme
## Environment Variables on Vercel
When deploying on [Vercel](https://vercel.com) you can configure secrets in the [Environment Variables](https://vercel.com/docs/v2/build-step#environment-variables) section of the project in the Vercel dashboard.
When deploying your Next.js application to [Vercel](https://vercel.com), Environment Variables can be configured [in the Project Settings](https://vercel.com/docs/environment-variables).
You can still use `.env`, `.env.development` and `.env.production` to add defaults.
All types of Environment Variables should be configured there. Even Environment Variables used in Development – which can be [downloaded onto your local device](https://vercel.com/docs/environment-variables#development-environment-variables) afterwards.
If you've configured [Development Environment Variables](https://vercel.com/docs/v2/build-step#development-environment-variables) you can pull them into a `.env.local` for usage on your local machine using the following command:
If you've configured [Development Environment Variables](https://vercel.com/docs/environment-variables#development-environment-variables) you can pull them into a `.env.local` for usage on your local machine using the following command:
```bash
vercel env pull .env.local
```
When using the Vercel CLI to deploy make sure you add a [`.vercelignore`](https://vercel.com/guides/prevent-uploading-sourcepaths-with-vercelignore?query=vercelignore#allowlist) that includes files that should not be uploaded, generally these are the same files included in `.gitignore`.
## Test Environment Variables
Apart from `development` and `production` environments, there is a 3rd option available: `test`. In the same way you can set defaults for development or production environments, you can do the same with `.env.test` file for testing environment (though this one is not so common as the previous two).
Expand Down
Loading

0 comments on commit f9b774d

Please sign in to comment.