1. 24 Mar, 2025 2 commits
  2. 23 Mar, 2025 3 commits
  3. 22 Mar, 2025 1 commit
  4. 21 Nov, 2022 2 commits
  5. 09 Nov, 2022 3 commits
  6. 08 Nov, 2022 3 commits
  7. 30 Oct, 2022 2 commits
  8. 27 Oct, 2022 2 commits
  9. 19 Sep, 2022 19 commits
    • JJ Kasper's avatar
      v12.3.1 · 980095d5
      JJ Kasper authored
      980095d5
    • JJ Kasper's avatar
      v12.3.1-canary.5 · 4901fc73
      JJ Kasper authored
      4901fc73
    • chornos13's avatar
      docs(examples): fix error connection handling (#40633) · a03cdc6d
      chornos13 authored
      
      
      When there's an error while connect to mongodb (timeout for example), it will be cached and need to restart next.js, by handling the error correctly (clear cached promise) it will try to reconnect to mongodb if the function is called again
      
      ## 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 <22380829+ijjk@users.noreply.github.com>
      a03cdc6d
    • Jiachi Liu's avatar
      Drop legacy RSC server and client extension (#40692) · 5a50a998
      Jiachi Liu authored
      Drop the support for `.server.js` and `.client.js` extension in RSC, only consume the pages with configured file extensions as page entry
      5a50a998
    • JJ Kasper's avatar
      v12.3.1-canary.4 · 35098a14
      JJ Kasper authored
      35098a14
    • Henrik Wenz's avatar
      chore: Refactor active-class-name example (#40670) · 7f9fe8ca
      Henrik Wenz authored
      ## Changes
      
      - Migrated missing file to typescript
      
      ## Documentation / Examples
      
      - [x] Make sure the linting passes by running `pnpm lint`
      - [x] The "examples guidelines" are followed from [our contributing
      doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
      7f9fe8ca
    • Henrik Wenz's avatar
      chore: Migrate with-prefetching example to typescript (#40671) · 24b20dd1
      Henrik Wenz authored
      ## Documentation / Examples
      
      - [x] Make sure the linting passes by running `pnpm lint`
      - [x] The "examples guidelines" are followed from [our contributing
      doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
      24b20dd1
    • Shu Ding's avatar
      Avoid direct React client API imports in the server graph (#40686) · 6279dba3
      Shu Ding authored
      We have heuristic checks in the SWC transform to make sure you are not
      using client-only APIs such as `useState` inside the Server Components
      graph. However inside our server graph compilation we also have to
      import the framework and renderer itself (not just the component), and
      some utility files import these client APIs (because they can be shared
      by the SSR or client code). Hence we have errors like
      https://github.com/vercel/next.js/actions/runs/3083270196/jobs/4984135491.
      
      To manually opt-out these errors, you can do `import React from 'react'`
      and use these APIs via `React.useState`.
      
      cc @feedthejim 
      
      ## 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)
      6279dba3
    • JJ Kasper's avatar
    • Sukka's avatar
      fix(image): preload should respect crossOrigin (#40676) · 4a53582e
      Sukka authored
      
      
      ## Bug
      
      - [ ] Related issues linked using `fixes #number`
      - [x] Integration tests added
      - [ ] Errors have a helpful link attached, see `contributing.md`
      
      Currently, `link[rel=preload]` inserted by `priority` will not have the `crossOrigin` attribute, which will cause the preloaded response not to be used, since the CORS policy mismatches. The PR fixes that.
      4a53582e
    • Jiachi Liu's avatar
      Remove non existed exports and files (#40685) · db3b8446
      Jiachi Liu authored
      We don't have `next/lib/data`, the entry files and types should be removed
      db3b8446
    • Jimmy Lai's avatar
      misc: update caniuse-lite to latest (#40680) · 9b0c00a5
      Jimmy Lai authored
      Fixes build errors related to
      https://github.com/browserslist/caniuse-lite/issues/102
      
      see
      https://github.com/vercel/next.js/actions/runs/3082979772/jobs/4983345078
      
      
      ## 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)
      9b0c00a5
    • Jiachi Liu's avatar
      Incldue styled-jsx in swc compiling (#40679) · ce82c60d
      Jiachi Liu authored
      Tree share the `typeof window` conditions in styled-jsx for edge runtime. Let swc loader go through the styled-jsx assets under node_modules, applying the optimization as well
      
      `test-app/server/edge-ssr.js` -155B
      ce82c60d
    • Shu Ding's avatar
      Refine error messages (#40661) · 44afc376
      Shu Ding authored
      As per @sebmarkbage's suggestion, this PR refines the error message to
      be more readable and friendly:
      
      ```
      error - ./components/qux.js
      
      You're importing a component that needs useEffect. It only works in a Client Component but none of its parents are marked with "client", so they're Server Components by default.
      
         ,----
       5 | import { useEffect } from 'react'
         :          ^^^^^^^^^
         `----
      
      Maybe one of these should be marked as a "client" entry:
      
      ./components/qux.js
      ./components/baz.js
      ./components/bar.js
      ./app/dashboard/index/page.js
      ```
      
      It's more ideal to put error codes inside the SWC transform and format
      it in the Next.js logging layer. A future improvement is to tweak the
      message a bit more for these specific cases:
      
      - [ ] The error already happens inside an entry point (page or layout),
      so itself should have "client" added (or removed), not it parents.
      - [ ] When importing `"server-only"` inside a client component, we can
      directly hint to the user which module in the import chain is marked
      with `"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)
      44afc376
    • Tim Neutkens's avatar
      Upgrade to latest React experimental (#40672) · 6df87707
      Tim Neutkens authored
      Only upgrade react-exp.
      
      
      ## 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)
      6df87707
    • Tim Neutkens's avatar
    • Shu Ding's avatar
      Port page and layout level API assertions to SWC transform (#40653) · c742c038
      Shu Ding authored
      We used to do an extra pass of SWR `parse` and loop over the AST inside
      JavaScript to check if `getServerSideProps` or `getStaticProps` is used
      in a client page or layout. Instead this can be done in the same
      `react_server_components` SWC transform now.
      
      ## 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)
      c742c038
    • Tim Neutkens's avatar
      Refactor fetchServerResponse (#40674) · c7e26193
      Tim Neutkens authored
      c7e26193
    • Hannes Bornö's avatar
      Send web vitals to Vercel analytics in app (#40669) · 356b6cec
      Hannes Bornö authored
      Sends web vitals to Vercel analytics.
      
      My plan for the test was to assert the data sent by the client but there's a bug where it's always null when sending a blob https://github.com/microsoft/playwright/issues/6479.
      
      When adding support for a custom web vitals reporter it will be easier to assert the values sent by the reporter.
      356b6cec
  10. 18 Sep, 2022 3 commits
    • Tim Neutkens's avatar
      Change Flight response content type to application/octet-stream (#40665) · d41ca43d
      Tim Neutkens authored
      Ensures Flight responses are not loaded as HTML.
      
      
      ## 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)
      d41ca43d
    • Tim Neutkens's avatar
      Use createFromFetch instead of createFromReadableStream to fetch Flight (#40656) · 1bf7d4d9
      Tim Neutkens authored
      Small change leveraging the `createFromFetch` method instead.
      
      
      ## 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)
      1bf7d4d9
    • Shu Ding's avatar
      Attach module trace for RSC related errors (#40652) · 34df81e7
      Shu Ding authored
      When the error comes from the RSC transform in SWC, we want to enforce the verbose mode because the module trace can be critical here. An example:
      
      <img width="635" alt="CleanShot 2022-09-18 at 12 37 02@2x" src="https://user-images.githubusercontent.com/3676859/190898135-7b258ae1-64e4-4c7b-b4d3-b2e9d2ee0245.png">
      
      Also in this PR I changed `trace.originName` to `trace.moduleName` in the output as the former can contain loader information and options:
      
      ```
      Import trace for requested module:
      ./app/dashboard/index/page.js
      ../../../../packages/next/dist/build/webpack/loaders/next-app-loader.js?name=app%2Fdashboard%2Findex%2Fpage&appPaths=%2Fdashboard%2Findex%2Fpage&pagePath=private-next-app-dir%2Fdashboard%2Findex%2Fpage.js&appDir=%2FUsers%2Fshu%2FDocuments%2Fgit%2Fnext.js%2Ftest%2Fe2e%2Fapp-dir%2Fapp%2Fapp&pageExtensions=tsx&pageExtensions=server.tsx&pageExtensions=client.tsx&pageExtensions=ts&pageExtensions=server.ts&pageExtensions=client.ts&pageExtensions=jsx&pageExtensions=server.jsx&pageExtensions=client.jsx&pageExtensions=js&pageExtensions=server.js&pageExtensions=client.js!
      ```
      
      ## 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)
      34df81e7