Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for AVIF #20381

Closed
wants to merge 129 commits into from
Closed

Add support for AVIF #20381

wants to merge 129 commits into from

Conversation

paambaati
Copy link
Contributor

@paambaati paambaati commented Dec 22, 2020

sharp v0.27.0 should land tomorrow with support for AVIF (see lovell/sharp#2289 (comment)). Lock file can be rebuilt once the release lands.

I generated the test.avif file by running the test.bmp file through https://squoosh.app/editor

sharp v0.27.0 should land tomorrow with support for AVIF (see lovell/sharp#2289 (comment)).
@vercel vercel bot temporarily deployed to Preview December 22, 2020 04:54 Inactive
@vercel vercel bot temporarily deployed to Preview December 22, 2020 14:06 Inactive
@paambaati
Copy link
Contributor Author

paambaati commented Dec 22, 2020

CI is red because the type definitions for sharp aren't updated. Waiting for DefinitelyTyped/DefinitelyTyped#50237 DefinitelyTyped/DefinitelyTyped#50243 to land.

@vercel vercel bot temporarily deployed to Preview December 22, 2020 14:48 Inactive
@paambaati
Copy link
Contributor Author

DefinitelyTyped/DefinitelyTyped#50243 has been merged! Now waiting for the package to be published to npm.

rfinkley and others added 20 commits January 5, 2021 08:28
Changed reference from 'master' to 'main' branch under DPS section in line with GitHub's recent switch from master to main branch as base repo branch names.
Co-authored-by: Luis Alvarez D. <[email protected]>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This makes sure redirects to the index route properly end with a trailing slash or don't based on the `trailingSlash` config to ensure an additional redirect doesn't need to take place un-necessarily. 

Fixes: #19405
This ensures we show an error for string values for `revalidate` since we currently don't handle these and instead it results in `revalidate: false` being used. This also adds tests for our `revalidate` checks to ensure they are triggered correctly and not triggered for valid values. 

x-ref: #20310
Hi ✌️

I've seen that many people have problem with implement Google Tag Manager, I've created an example of how insert "Google Tag Manager" in a NextJs app
I've looked at the example code and saw some consistent issues related to code style. The changes applied to this PR fixes the following points:

- Differences of line breaks styles between multiple files
- Differences of if statements styles
- Unnecessary comment
- A typo on a JSDocs

---

There were line breaks between statements on `pages/index.js`
````
export async function getServerSideProps(context) {
  const { client } = await connectToDatabase()

  const isConnected = await client.isConnected() 

  return {
    props: { isConnected },
  }
}
```` 

And this wasn't being applied to the MongoDB utility:

````
export async function connectToDatabase() {
  if (cached.conn) return cached.conn
  if (!cached.promise) {
    const conn = {}
    const opts = {
      useNewUrlParser: true,
      useUnifiedTopology: true,
    }
{...}
````

And also, as shown in the snippet above, there are different styles of if statements being used. 

With that being said, the reason I made this PR is because I think that this kind of inconsistent arises questions when a contributor looks to the codebase, even if this is a simple example.
This PR fixes some typos found on examples docs
Change README from outdated @emotion/core to @emotion/react
Normally I wouldn't make a PR for a minor version upgrade, but the 2.0.2 version contains some important performance improvements.
tailwindlabs/tailwindcss#3032
This makes sure the query isn't dropped when doing a history navigation with i18n. Additional tests have been added to ensure this is working correctly as well. 

Fixes: #20212
This makes sure we don't generate the wrong locale source variant for the rewrite requiring a `/` on the end which won't ever be added causing the rewrite to never match. Additional tests have been added to ensure this specific rewrite is working correctly. 


Fixes: #20508
This PR is an alternative to #20247 which contains tests for the expected behavior.

---

Fixes #20198
Closes #20247
* Docs typo fix

* Update docs/basic-features/environment-variables.md

Co-authored-by: Lachlan Campbell <[email protected]>

Co-authored-by: Joe Haddad <[email protected]>
Co-authored-by: Lachlan Campbell <[email protected]>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
timneutkens and others added 24 commits January 5, 2021 08:35
**What's the problem this PR addresses?**

`@next/mdx` adds the webpack loader `@mdx-js/loader` without resolving it to an absolute path

Depends on #17606

**How did you fix it?**

`require.resolve` the webpack loader before adding it
As with `const width`, it should be declared just before it is used.
This pull request correctly assigns boolean attributes for `<script />` to match the element as it is created by a server-side render.

Prior to this pull request, we'd double-execute `<script>` tags with the `async`, `defer`, or `nomodule` property.

---

Fixes #9070
I made the following changes.

- Addition of procedure for setting private_key
- Addition of procedure for creating a database and setting database_url
Hi, 

I'm submitting this PR for consideration as a new example app showing Styled JSX with SCSS working inside and outside storybook with example components.

Only known issue: I noticed that when running this example with:

`$ yarn next ./examples/with-storybook-styled-jsx-scss`

I receive the following error:

```
error - ./pages/_app.js
Error: [BABEL] .../next.js/examples/with-storybook-styled-jsx-scss/pages/_app.js: Cannot find module 'styled-jsx-plugin-sass' (While processing: ".../next.js/node_modules/next/babel.js")
```

However I notice that this same missing module error is triggered when running this existing example app "with-styled-jsx-scss".

Any changes/tweaks needed?

Thanks!
https://ant.design/docs/react/getting-started#Import-on-Demand
At the document, We don't need to use `babel-import-plugin` to `Import on Demand`.
Closes #19481

The current text implies `query` is a string. IMO it would be better if it clarified that `query` is an object containing the query string's keys and values

Edit:
Relevant docs url: https://nextjs.org/docs/basic-features/data-fetching#getserversideprops-server-side-rendering
Adds an example using `lru-cache` to implement a simple rate limiter for API routes ([Serverless Functions](https://vercel.com/docs/serverless-functions/introduction)).

**Demo: https://nextjs-rate-limit.vercel.app/**
Currently pages with `notFound: false` from `getServerSideProps` behave the same as `notFound: true`, i.e. just having the key is enough to result in a 404. This fixes the check in render.tsx and adds tests for it.
@ijjk ijjk added create-next-app Related to our CLI tool for quickly starting a new Next.js application. examples Issue/PR related to examples labels Jan 5, 2021
@paambaati paambaati closed this Jan 5, 2021
@paambaati paambaati mentioned this pull request Jan 5, 2021
@paambaati
Copy link
Contributor Author

paambaati commented Jan 5, 2021

Closing in favor of #20765.

@vercel vercel locked as resolved and limited conversation to collaborators Jan 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
create-next-app Related to our CLI tool for quickly starting a new Next.js application. examples Issue/PR related to examples type: next
Projects
None yet
Development

Successfully merging this pull request may close these issues.