1. 18 Oct, 2022 17 commits
    • JJ Kasper's avatar
      v12.3.2-canary.30 · cf1c0b60
      JJ Kasper authored
      cf1c0b60
    • Shu Ding's avatar
      Fix next-app-loader bug in windows (#41520) · 761d7646
      Shu Ding authored
      There is this `createAbsolutePath` function that concatenates a virtual
      route and a dir path. The virtual route uses the posix separator `/` but
      the dir path uses `\` in Windows.
      
      Here's an example of the error:
      
      ```
      error - ./node_modules/.pnpm/next@12.3.2-canary.29_ikefsjgelhtr3cq7h24gohqzbe/node_modules/next/dist/build/webpack/loaders/next-app-loader.js?name=app%2Fpage&appPaths=%2Fpage&pagePath=private-next-app-dir%
      2Fpage.tsx&appDir=E%3A%5CWorkSpace%5C2022%5Csongbook.studio%5Capp&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js!
      Module parse failed: Octal literal in strict mode (9:41)
      ```
      
      ## Bug
      
      - [ ] Related issues linked using `fixes #number`
      - [ ] Integration tests added
      - [ ] Errors have a 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 a 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/examples/adding-examples.md)
      761d7646
    • Steven's avatar
      BREAKING CHANGE: Remove `target: serverless` (#41495) · 9c5bb5bf
      Steven authored
      The `target: serverless` config was deprecated a year ago starting in
      [Next.js 12](https://nextjs.org/blog/next-12).
      
      Tests were disabled in #41252 so we can now remove `target: serverless`
      and all usage of `target` in `next.config.js`.
      Co-authored-by: 's avatarBalázs Orbán <info@balazsorban.com>
      Co-authored-by: 's avatarJJ Kasper <jj@jjsweb.site>
      9c5bb5bf
    • Kiko Beats's avatar
    • Steven's avatar
      Add `swcMinify` to the Upgrade Guide (#41521) · 9775111a
      Steven authored
      Follow up to:
      
      - #41506 
      9775111a
    • Balázs Orbán's avatar
      a3679896
    • JJ Kasper's avatar
      Fix app sc_client componet HMR server-side (#41510) · df0e61b0
      JJ Kasper authored
      This ensures we properly clear the `sc_client` component cache from
      `react-server-dom-webpack` in development so that HMR works properly
      after a refresh.
      
      ## Bug
      
      - [x] Related issues linked using `fixes #number`
      - [x] Integration tests added
      - [ ] Errors have a helpful link attached, see `contributing.md`
      
      Fixes: [slack
      thread](https://vercel.slack.com/archives/C043ANYDB24/p1666051202574509)
      df0e61b0
    • Jiachi Liu's avatar
    • Anish Paudel's avatar
    • JJ Kasper's avatar
    • Tim Neutkens's avatar
      Add vary header to fix incorrectly caching RSC as HTML response (#41479) · c5896f28
      Tim Neutkens authored
      Add failing test for the back button download bug. Created it as a new
      app given that adding it to the existing `app` suite did not reproduce
      the issue for some reason.
      
      The underlying reason is that we need to add `Vary: __rsc__,
      __next_router_prefetch__` to ensure Chrome does not cache the response
      and serve it on back button.
      
      The download was caused by the `application/octet-stream` content type,
      but that was just a consequence of serving the wrong response.
      
      <!--
      Thanks for opening a PR! Your contribution is much appreciated.
      To make sure your PR is handled as smoothly as possible we request that
      you follow the checklist sections below.
      Choose the right checklist for the change that you're making:
      -->
      
      ## Bug
      
      - [ ] Related issues linked using `fixes #number`
      - [ ] Integration tests added
      - [ ] Errors have a 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 a 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/examples/adding-examples.md)
      Co-authored-by: 's avatarJJ Kasper <jj@jjsweb.site>
      c5896f28
    • Lee Robinson's avatar
      Add `remotePatterns` link to next-image-unconfigured-host (#41504) · 6101bf69
      Lee Robinson authored
      Didn't realize the `remotePatterns` usage was already in here (not live
      yet, but merged into `canary`) - so just also added on this link for the
      end 👍
      6101bf69
    • Seiya Nuta's avatar
      Append the fragment in NextUrl.toString() (#41501) · 366da263
      Seiya Nuta authored
      <!--
      Thanks for opening a PR! Your contribution is much appreciated.
      To make sure your PR is handled as smoothly as possible we request that
      you follow the checklist sections below.
      Choose the right checklist for the change that you're making:
      -->
      
      Consider the following middleware which redirects to
      `/path/to#fragment`.
      
      ```ts
      import { NextResponse } from 'next/server';
      
      export async function middleware(request) {
        const url = new URL('/path/to#fragment', request.url);
        return NextResponse.redirect(url);
      }
      ```
      
      However, it actually redirects to `/path/to`, namely it discards the
      fragment part in the destination URL `#fragment`. This is because
      `NextURL.toString()` does not append that part. This PR fixes the bug.
      
      ## Bug
      
      - [ ] Related issues linked using `fixes #number`
      - [x] Integration tests added
      - [ ] Errors have a 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 a 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/examples/adding-examples.md)
      366da263
    • Shu Ding's avatar
      Fix global css being marked as side effect free (#41481) · c5c2c9d3
      Shu Ding authored
      It’s possible that global CSS imports, that come from node_modules, are
      marked as side effect free because of possible `sideEffects: false` in
      the external package's package.json. In that case, we still need to
      handle global CSS imports as side effects on the server because we need
      to collect them and avoid tree-shaking for these modules.
      
      You can take a look at the test case to see what exactly happened.
      
      ## Bug
      
      - [ ] Related issues linked using `fixes #number`
      - [x] Integration tests added
      - [ ] Errors have a 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 a 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/examples/adding-examples.md)
      c5c2c9d3
    • Shu Ding's avatar
      Avoid using the CSS href as the link tag key (#41493) · 0c2c48e5
      Shu Ding authored
      There is no need to use the href as key in our case because it's pure
      during SSR and it won't re-order on the client. By using `index` we can
      avoid some duplicate bytes here:
      
      ![CleanShot 2022-10-18 at 00 21
      20@2x](https://user-images.githubusercontent.com/3676859/196295175-c5b437f7-0ae9-4d89-9d96-9594686168ae.png)
      
      ## Bug
      
      - [ ] Related issues linked using `fixes #number`
      - [ ] Integration tests added
      - [ ] Errors have a 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 a 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/examples/adding-examples.md)
      0c2c48e5
    • Tonye Jack's avatar
      chore(examples): fix typo (#41496) · 3a19b8ae
      Tonye Jack authored
      
      
      ## Bug
      
      - [ ] Related issues linked using `fixes #number`
      - [ ] Integration tests added
      - [ ] Errors have a 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 a 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/examples/adding-examples.md)
      3a19b8ae
    • Tim Neutkens's avatar
      BREAKING CHANGE: Enable newNextLinkBehavior (#41459) · f2603289
      Tim Neutkens authored
      - Enable newNextLinkBehavior. See #36436 
      - Run next/link codemod on test suite
      
      Note that from when this lands on apps trying canary will need to run
      the new-link codemod in order to upgrade.
      Ideally we have to detect `<a>` while rendering the new link and warn
      for it.
      Co-authored-by: 's avatarSteven <steven@ceriously.com>
      f2603289
  2. 17 Oct, 2022 9 commits
  3. 16 Oct, 2022 4 commits
    • Tim Neutkens's avatar
      Ignore serverComponentChanges in pages (#41464) · 7be2ef0f
      Tim Neutkens authored
      Slightly different version of #41020 where it does not end up being an unknown event.
      
      
      
      ## Bug
      
      - [ ] Related issues linked using `fixes #number`
      - [ ] Integration tests added
      - [ ] Errors have a 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 a 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/examples/adding-examples.md)
      7be2ef0f
    • Sukka's avatar
      fix(app-render): make css and font respect assetPrefix (#41455) · 7c2fd345
      Sukka authored
      Add missing `assetPrefix` for link tags (`@next/font` and CSS).
      The PR also merges multiple duplicated `renderOpt.assetPrefix || ''`.
      7c2fd345
    • Tim Neutkens's avatar
      Disable isNavigatingToNewRootLayout (#41457) · 1d37afb3
      Tim Neutkens authored
      Hannes is going to change the approach to be compatible with static.
      
      
      
      ## Bug
      
      - [ ] Related issues linked using `fixes #number`
      - [ ] Integration tests added
      - [ ] Errors have a 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 a 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/examples/adding-examples.md)
      1d37afb3
    • Tim Neutkens's avatar
      v12.3.2-canary.29 · bc3d8be4
      Tim Neutkens authored
      bc3d8be4
  4. 15 Oct, 2022 9 commits
  5. 14 Oct, 2022 1 commit
    • Hannes Bornö's avatar
      Move root layout validation (#41338) · 974e8b61
      Hannes Bornö authored
      Moves where the validation is made to make sure the error reaches the
      client. Tests that an error overlay is shown on the client.
      
      ## Bug
      
      - [ ] Related issues linked using `fixes #number`
      - [ ] Integration tests added
      - [ ] Errors have a 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 a 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/examples/adding-examples.md)
      Co-authored-by: 's avatarJJ Kasper <jj@jjsweb.site>
      974e8b61