1. 04 Aug, 2022 8 commits
  2. 03 Aug, 2022 13 commits
  3. 02 Aug, 2022 6 commits
  4. 01 Aug, 2022 7 commits
    • JJ Kasper's avatar
      v12.2.4-canary.9 · ad75204b
      JJ Kasper authored
      ad75204b
    • JJ Kasper's avatar
      Handle assetPrefix in app (#39236) · 7c0a504a
      JJ Kasper authored
      This ensures we properly leverage the `assetPrefix` for `app`. Note for reviewing the test changes are mostly spacing so hiding that may help. 
      
      ## Bug
      
      - [x] Related issues linked using `fixes #number`
      - [x] Integration tests added
      - [ ] Errors have helpful link attached, see `contributing.md`
      
      Fixes: [slack thread](https://vercel.slack.com/archives/C035J346QQL/p1659387244559979)
      7c0a504a
    • Steven's avatar
      Update tests to use random directory (#39230) · d56aadae
      Steven authored
      This PR fixes an issue where tests fail because the generated tmp directory already exists. This is likely caused from two tmp dirs being generated in the same millisecond.
      
      ```
      Failed to create next instance [Error: EEXIST: file already exists, mkdir '/tmp/next-repo-1659368089063/packages'] {
        errno: -17,
        code: 'EEXIST',
        syscall: 'mkdir',
        path: '/tmp/next-repo-1659368089063/packages'
      }
      ```
      
      https://github.com/vercel/next.js/runs/7615808051?check_suite_focus=true
      d56aadae
    • Alex Castle's avatar
      Add "fill" mode to `next/future/image` (#38855) · cbaaaeb0
      Alex Castle authored
      This PR adds a `fill` attribute to the future image component, that behave similarly to the fill mode on the existing image component.
      
      Functionally, it mainly adds `position: "absolute"` and `object-fit: "contain"` to the image element, along with `height: "100%"` and `width: "100%"` to preserve the image aspect ratio. All of these can be overwritten by the user, except for `position: "absolute"`, which will throw an error. This is because changing that property without height and width is likely to cause layout shift.
      
      Because we no longer have the wrapper element, this new version of `fill` requires that the user set `overflow: "hidden"` on the parent element themself, if they want that behavior.
      
      This PR also includes several runtime checks to catch instances where the fill mode may provide unexpected results. These runtime checks warn if:
      * The image doesn't have the `sizes` attribute and loads much smaller than the viewport
      * The containing element does not have `position: "relative"`
      * The image height value is 0
      Co-authored-by: 's avatarSteven <229881+styfle@users.noreply.github.com>
      cbaaaeb0
    • Jiachi Liu's avatar
      fix: react dev bundle is picked in prod mode (#39221) · e9d23d70
      Jiachi Liu authored
      When we detect if `reactRoot` rendering should be enabled we `require` the require to check the version. But at that time the `NODE_ENV` isn't set yet. Then the react dev build stays in the `require.cache` that any future require of react will get the wrong build. In that case, React dev bundle is picked in production mode.
      
      Fun fact: if you're using hooks, that seem not to effect you, but context consumer works different then you couldn't get the proper context from provider.
      
      Fixes #38176
      Fixes #38765
      Fixes #38332
      
      ## Bug
      
      - [x] Related issues linked using `fixes #number`
      - [ ] Integration tests added
      - [ ] Errors have helpful link attached, see `contributing.md`
      e9d23d70
    • Jiachi Liu's avatar
      Fix: only contain middleware in dev middleware manifest (#39217) · 582cb376
      Jiachi Liu authored
      x-ref #39199
      
      The change in #39199 isn't correct. Middleware manifest should only contain middleware route, so that when router navigates, it only try to apply middleware instead of checking all edge routes. This PR also changes the middleware manifest global value from array to object for easier access
      
      ## Bug
      
      - [ ] Related issues linked using `fixes #number`
      - [x] Integration tests added
      - [ ] Errors have helpful link attached, see `contributing.md`
      582cb376
    • NikhilNama18's avatar
      Replaces getStaticProps with getStaticPaths (#39218) · f0df2c27
      NikhilNama18 authored
      In `Generating paths on-demand` section 
      It was mentioned that `getStaticProps` allows you to control which pages are generated during the build. 
      But `getStaticPaths` will allows us to control which pages are generated during the build.
      
      
      
      ## 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 by running `pnpm lint`
      - [ ] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
      f0df2c27
  5. 31 Jul, 2022 3 commits
  6. 30 Jul, 2022 3 commits