- 11 11月, 2020 11 次提交
-
-
由 Kanitkorn Sujautra 提交于
In `with-typescript-eslint-jest` example, `identity-obj-proxy` is being used here, but it's not in `package.json` yet. https://github.com/vercel/next.js/blob/5b1be2bb980c4cad7e543a9f150c1a1c50a6c0f3/examples/with-typescript-eslint-jest/jest.config.js#L14 This PR adds `identity-obj-proxy` to `package.json`.
-
由 Lyderic Dutillieux 提交于
Changed function name from "getStaticProps" to "getStaticPaths" in Exception message thrown when 'paths' is invalid.
-
由 Ante Sepic 提交于
If the example is cloned and ran with no further setup (no environment variables set up), it will error out because `extractPostEntries` will return `undefined` which can not be serialized by `getStaticProps `. This PR basically ensures that we return an empty array instead of the `undefined` for a collection of posts, and a `null` instead of the `undefined` for a single post.
-
由 Callum Booth 提交于
Helps with https://github.com/pmndrs/zustand/issues/182 I have seen the comments from this PR https://github.com/vercel/next.js/pull/11222#pullrequestreview-406998918 and this PR matches the with-redux example.
-
由 Ash Connell 提交于
* Add with-knex example * Fix with-knex README typo Co-authored-by: NAsh Connell <hello@ashconnell.com> Co-authored-by: Nkodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
-
由 Joe Haddad 提交于
-
由 Gerald Monaco 提交于
Co-authored-by: NJoe Haddad <joe.haddad@zeit.co>
-
由 WeichienHung 提交于
Fixes https://github.com/vercel/next.js/issues/16550 Add a graphql mutation operation in this example. The changes are: 1. Define mutation in schema `type-defs.graphqls` 2. Add mutation to `viewer.graphql ` that compiled to typescript code. 3. Add mutation resolver in `resolvers.ts` 4. [UI] add a input box and button to submit mutation request to change name. screenshot of change ![mutation_example](https://user-images.githubusercontent.com/1462027/91797123-5ffc4e00-ec54-11ea-910b-3ddb399b42f0.gif)
-
由 Steven 提交于
We fixed this in a previous PR but there were no tests for `.ico` so this PR adds a test for it to ensure we don't regress. Similar to SVG, we bypass ICO because it typically contains multiple sizes in a single file. Closes #18600
-
由 JJ Kasper 提交于
-
由 Steven 提交于
This PR moves the `<a>` element inside the `<svg>` element.
-
- 10 11月, 2020 6 次提交
-
-
由 Joe Haddad 提交于
-
由 Steven 提交于
Fixes #18563 by adding the etag header to the optimized image response. This does _not_ change the expireAt (TTL) for cached files on the server, which still uses the max-age of the upstream response. The new file format on disk for cached image files is the following: ``` .next/cache/images/<HASHED_QUERYSTRING>/<EXPIREAT>.<ETAG>.<EXT> ```
-
由 David Golden 提交于
upgrade mobx dependencies for with-mobx example and make all necessary code changes as per https://mobx.js.org/migrating-from-4-or-5.html addresses #17809
-
由 Galanggg 提交于
This PR adds an example Next.js project with GSAP ![example-next-gsap](https://user-images.githubusercontent.com/21099312/93552465-170dfe80-f9a3-11ea-978c-4e1dc01731e8.gif)
-
由 Joe Haddad 提交于
-
由 Weston Thayer 提交于
## New features - Example of how to use `Sentry.captureException()` in API routes https://github.com/vercel/next.js/commit/5a35982717bc7f916022dd713b3b1f9e0921d503 ## Bug fixes - Server-side source maps now work in Sentry when deployed to Vercel https://github.com/vercel/next.js/commit/629a9ed5048629dc12670ef457fe6efaa2e8d3b6 - If uploading source maps, `Sentry.init()` now sets the `release`, so that exceptions are correctly associated with the source maps in that release ## Open issues ### `_error.js` is unused for `getServerSideProps` errors when deployed to Vercel Instead of rendering this example's overridden `_error.js` (like it does when testing locally with `NODE_ENV='production'`), when deployed to Vercel and an Error is thrown from `getServerSideProps`, this page is shown: ![Screenshot of Vercel Application Error page](https://user-images.githubusercontent.com/709153/90968889-aa3c3d00-e4a6-11ea-9eff-fafee3d1ff33.png) This confuses me because the Error is still successfully sent to Sentry, but I would've expected it to be sent by the call to `Sentry.captureException()` in `_error.js`. I'm not sure why it works. ### API test 2 & 3 don't work in the "server" build config They don't work when deployed to Vercel in the "serverless" config either, but that's expected because there aren't any handlers to flush the Sentry queue. I can't figure out why they don't work in the long-lived "server" config.
-
- 09 11月, 2020 11 次提交
-
-
由 iczero 提交于
`node-sass` v5 introduced support for Node.js v15, which is not supported by v4. However, Next.js currently errors with ``` Error: Node Sass version 5.0.0 is incompatible with ^4.0.0. ``` when attempting to build with `node-sass` 5.0.0. This error comes from `sass-loader`. They have recently released version 10.0.5 which supports `node-sass` 5.0.0 (PR <https://github.com/webpack-contrib/sass-loader/pull/899>, release <https://github.com/webpack-contrib/sass-loader/releases/tag/v10.0.5>).
-
由 tolfino 提交于
This replaces the seen set with a newly instantiated map of refs per value in the array. This corrects the behavior that the refs map passed into isSerializable contains only values along the path to the current value: previously, because the refs map was shared among all values in the array, this would trigger on instances such as: ```js const x = []; isSerializableProps('/', 'test', { arr: [x, [x]] }); ``` ... where the reference is shared but there is no cycle formed, as the presence of elements is disjoint. Fixes #18228.
-
由 James George 提交于
Prevent `catch` assertions in tests.
-
由 Davidson Nascimento 提交于
- Changed script `start` to `dev` and improved it #18934 adding commando to transpile electron code; - Added some folders into `.gitignore`; - Updated react to avoid issues as #18916 Fixes #18934
-
由 JJ Kasper 提交于
This updates to use the `Build.SourceVersion` value from the [predefined variables](https://docs.microsoft.com/en-us/azure/devops/pipelines/build/variables?view=azure-devops&tabs=yaml) for the cache key instead of the pull request value since it isn't available after merging to canary. x-ref: https://github.com/vercel/next.js/pull/18931
-
由 Tadao Iseki 提交于
This allows to import the type `ImageProps` from `next/image` like `next/link`. https://github.com/vercel/next.js/blob/a6660729ea82fbcb26cfe7c89637b1af37255c9f/packages/next/client/link.tsx#L21 ## Usage ```tsx import Image, { ImageProps } from 'next/image' const CustomImage: React.FC<ImageProps> = (props) => ( <Image {...props} unsized /> ) ```
-
由 JJ Kasper 提交于
-
由 Michael McQuade 提交于
The other examples are using the typescript `import type` style, which gets stripped during the build, so I added it to the API Routes example too.
-
由 Jesse Jafa 提交于
Resolves https://github.com/vercel/next.js/issues/18941
-
由 Luis Alvarez D 提交于
Notes: - I use "blank page" to refer to that state where a new tab is waiting for the initial HTML. Lmk if there are better words to describe that. - I did not add an usage example because it's the same thing of `fallback: true` and `fallback: false`, but with a config change. It's also explained below them and mentions the similarity with `fallback: true` --- Fixes #18468
-
由 JJ Kasper 提交于
-
- 08 11月, 2020 4 次提交
-
-
由 JJ Kasper 提交于
This ensures dynamic routes are correctly generated for `next start` with i18n and adds tests to the i18n suite to ensure they are working correctly. Closes: https://github.com/vercel/next.js/issues/18397
-
由 Davidson Nascimento 提交于
-
由 Joe Haddad 提交于
-
由 Steven 提交于
This PR fixes two bugs causing HTML validators to complain. - Error: Bad value data:image/svg+xml;charset=utf-8, for attribute src on element img: Illegal character in scheme data: < is not allowed. - Fixed by using base64 for svg during `layout=intrinsic` to avoid angle brackets - Error: Element img is missing required attribute src. - Fixed by using base64 transparent gif for `loading=lazy` placeholder Fixes #18850
-
- 07 11月, 2020 8 次提交
-
-
由 Dinesh Balaji 提交于
When `create-next-app` is initialized a git repo, it now uses 'main' as the initial branch. The branch master does not actually exist initially. The branches don't get created only when they have at least one commit. Until the branch gets created, the branch only exists in .git/HEAD. So there is no master branch initialized in the repo. Closes: https://github.com/vercel/next.js/issues/17733 <img width="639" alt="Screenshot 2020-10-09 at 17 26 30" src="https://user-images.githubusercontent.com/4656109/95580229-9f3c6c80-0a54-11eb-967f-180eb9601c1a.png">
-
由 Joe Haddad 提交于
This PR adds additional security tests.
-
由 JJ Kasper 提交于
This makes sure to compile query values for rewrites/redirects as non-path items to prevent param like values e.g. `https://` from causing the destination to fail to compile. Fixes: https://github.com/vercel/next.js/issues/17440 x-ref: https://github.com/vercel/next.js/issues/18670
-
由 Ante Sepic 提交于
Now that all Contentful spaces support GraphQL, we are looking into switching the example from using a JS library to a simple fetch with GraphQL. @stefanjudis
☝ ️ -
由 Joe Haddad 提交于
This pull request fixes `<Image />` not updating when new props are passed by removing external DOM mutations and relying on React to do it instead. As an added bonus, I've extracted the intersection observer from both the `<Image />` and `<Link />` component, as their instance can be shared! The increase in size is minor (+3B), and actually a decrease for apps using both `<Image />` and `<Link />`. --- Fixes #18698 Fixes #18369
-
由 Steven 提交于
Fixes #18908
-
由 JJ Kasper 提交于
-
由 Bruno Crosier 提交于
Co-authored-by: NLuis Alvarez <luis@vercel.com>
-