1. 08 Jul, 2021 6 commits
  2. 07 Jul, 2021 10 commits
    • Steven's avatar
      Loosen `next/image` TS types for `src` (#26996) · b6c590bc
      Steven authored
      ### Description
      This changes the strict TS types to a looser implementation such that the user can pass `src` without TS errors.
      
      ### Pros vs Cons
      - **Pros**: better support for wrapping `next/image` so that TS won't report false errors
      - **Cons**: using `src: string` without `blurDataURL` will no longer show TS errors and instead fail with a runtime error
      
      ### Issues
      - Fixes #26892 
      - Related to #26991 
      b6c590bc
    • destruc7i0n's avatar
      Fix hash change events not firing with i18n (#26994) · 12aa5612
      destruc7i0n authored
      
      
      My last PR (#26205) made the hash change events not fire when in i18n was enabled, as seen in #26853. This PR fixes that and adds a test for this case.
      
      fixes #26853 
      
      ## Bug
      
      - [x] Related issues linked using `fixes #number`
      - [x] 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
      12aa5612
    • Darsh Patel's avatar
      Add `dangerously-unoptimized` loader for next/image (#26847) · 226e81c7
      Darsh Patel authored
      * add support for static loader
      
      * update existing test
      
      * add test
      
      * add prettier-ignore
      
      * update docs
      
      * apply suggestions from review
      
      * remove un-needed normalize
      
      * Apply suggestions from code review
      Co-authored-by: 's avatarSteven <steven@ceriously.com>
      
      * update test
      Co-authored-by: 's avatarJJ Kasper <jj@jjsweb.site>
      Co-authored-by: 's avatarSteven <steven@ceriously.com>
      226e81c7
    • Steven's avatar
      Loosen `next/image` TS types for `width` and `height` (#26991) · 23a47b9f
      Steven authored
      ### Description
      This changes the strict TS types to a looser implementation such that the user can always pass `width` and `height` (even when `layout=fill`) without TS errors.
      
      ### Pros vs Cons
      - **Pros**: better support for wrapping `next/image` so that TS won't report false errors with `layout=fill`
      - **Cons**: omitting width/height when using other `layout` will no longer show TS errors and instead fail with a runtime error
      
      ### Issues
      - Fixes #26531 
      - Fixes #25440 
      23a47b9f
    • Alex Castle's avatar
      Don't lazy-load already-loaded image in client-side transition (#26968) · 8066e423
      Alex Castle authored
      fixes #19074 
      This change disables image lazy-loading when both of the following are true:
      1) A image is being rendered following a client-side page transition
      2) The image has been previously loaded during this session.
      
      Before this change, all images with lazy-loading enabled have a visible flicker during client-side page transitions, even though they're already loaded.
      
      With this change, there's are two performance risks:
      
      1) There's a chance that some offscreen images will have lazy-loading disabled unnecessarily because they were previously loaded. I think the performance hit here is pretty negligible and the situation is unlikely to come up very often.
      
      2) There's a chance a different-sized version of the image will be selected by the browser, but lazy-loading will be disabled anyway. This seems even more unlikely to me, and anyway the performance hit from a stray un-lazy-loaded image (on a client-side transition) is very minor.
      
      In both cases, I think the performance risk is outweighed by the UX improvement of getting rid of the image flicker on page transition.
      8066e423
    • Steven's avatar
      Rename `next/script` interface Props to ScriptProps (#26990) · f1e6bc9e
      Steven authored
      This will ensure `next/script` follows the same naming convention as `next/image`. For example:
      
      ```js
      import Image, { ImageProps } from 'next/image'
      import Script, { ScriptProps } from 'next/script'
      ```
      
      Fixes #26290 
      f1e6bc9e
    • JJ Kasper's avatar
      Add page with next/image to stats-app (#26973) · 556216b1
      JJ Kasper authored
      * Add page with next/image to stats-app
      
      * Update stats-config
      
      * Update globs
      
      * Only run prettier on js outputs
      
      * only add image page for non-webpack 4 mode
      
      * update config
      
      * Re-add moving page chunks
      556216b1
    • Anindya Dey's avatar
    • Tim Neutkens's avatar
      v11.0.2-canary.7 · 1dd19f57
      Tim Neutkens authored
      1dd19f57
    • Tobias Koppers's avatar
      update webpack to 5.43.0 (#26979) · 75ca8c0e
      Tobias Koppers authored
      75ca8c0e
  3. 06 Jul, 2021 9 commits
    • JJ Kasper's avatar
      v11.0.2-canary.6 · 697756f8
      JJ Kasper authored
      697756f8
    • JJ Kasper's avatar
      c53b60a8
    • Alexander's avatar
      Fix: (rewrites) incorrect parsing of destination query (#26619) · f8269fd4
      Alexander authored
      fixes #26609
      
      ## Bug
      
      - [x]  Related issues linked using fixes #number
      - [x]   Integration tests added
      
      ## Documentation / Examples
      
      - [x]  Make sure the linting passes
      f8269fd4
    • Paul Schultz's avatar
      Updated next-transpile-modules to 8.0.0 (#26971) · 5b1c3e39
      Paul Schultz authored
      
      
      ## Bug
      
      - [x] Related issues linked using `fixes #26970`
      - [ ] Integration tests added
      - [ ] Errors have helpful link attached, see `contributing.md`
      5b1c3e39
    • Theo Strahlen's avatar
      (next/image): Merge query string params in imgix loader (#26719) · 38a4e56c
      Theo Strahlen authored
      If the `Image` src url had existing query params, the imgix loader would simply append another query string with `?` causing both query strings to break.
      
      This PR adds a way to safely merge query strings if needed using [URLSearchParams](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams).
      
      ## Bug
      
      - [X] fixes #26288
      - [X] Integration tests added
      38a4e56c
    • Gerald Monaco's avatar
      f7bc8f4b
    • Gerald Monaco's avatar
      More explicit typing for `IncrementalCache` API (#26941) · 53123ad6
      Gerald Monaco authored
      Make the typing for `IncrementalCache` more explicit. With streaming, we’ll want to stream page data as well as HTML. This is a bit complicated now because we’re overloading `pageData` for both redirects and pages.
      
      This PR makes the different types explicit. With streaming, the data for redirects is synchronously available, while the data for pages will become a stream.
      
      A follow up PR will add a “stream through” cache in front of `IncrementalCache` 
      53123ad6
    • Jeongyeon Lee 이정연's avatar
      d476c91a
    • Gerald Monaco's avatar
      Add initial `ResponsePayload` support (#26938) · 2795b799
      Gerald Monaco authored
      Refactors the internals of `next-server` to use `ResponsePayload` instead of `string | null` and manual `sendPayload` calls. This is the first step toward streaming support.
      
      I split `renderToResponseWithComponents` into a separate `renderToResponseWithComponentsInternal` function for ease of review: GitHub's diff rendering was highly misleading, making it seem as though more of the function had changed. The separate function just makes the actual change clearer: we split `renderToHTMLWithComponents` into two promises; one that represents the actual render result, and one that represents all of the work (including background work for e.g. revalidation) that needs to be done as part of generating the result.
      
      These changes make it easier to bubble up a `ResponsePayload`, instead of sometimes calling `sendPayload` out-of-band, centralizing all payload handling in `sendResponse` and eventually a similar function for public APIs that return a string. This centralization will make it much easier to handle a response that needs to be streamed, which is coming soon in another PR.
      2795b799
  4. 05 Jul, 2021 2 commits
  5. 04 Jul, 2021 1 commit
    • Sachin Raja's avatar
      include image types in `create-next-app` next-env.d.ts (#26890) · ba88bfde
      Sachin Raja authored
      
      Previous TypeScript template in `create-next-app` only had the following in `next-env.d.ts`
      ```ts
      /// <reference types="next" />
      /// <reference types="next/types/global" />
      ```
      
      New `next-env.d.ts` has this:
      ```ts
      /// <reference types="next" />
      /// <reference types="next/types/global" />
      /// <reference types="next/image-types/global" />
      ```
      
      Next.js automatically adds the `image-types` reference, but it won't be included in the initial commit. 
      ## Documentation / Examples
      
      - [x] Make sure the linting passes
      ba88bfde
  6. 02 Jul, 2021 12 commits