1. 23 Oct, 2022 11 commits
  2. 22 Oct, 2022 15 commits
  3. 21 Oct, 2022 5 commits
    • Steven's avatar
      Update `next-image-experimental` codemod to handle loaders (#41633) · 6fb9a192
      Steven authored
      As a follow up to #41585, this PR updates the `next-image-experimental`
      codemod to change `loader` to `loaderFile`.
      6fb9a192
    • Tim Neutkens's avatar
      BREAKING CHANGE: Remove React 17 (#41629) · 14c93768
      Tim Neutkens authored
      Next.js 13 will require React 18.
      
      In this PR I've only updated the peerDependency and removed the test runs in GH actions. Further cleanup will follow later, this allows us to remove the code supporting it later.
      
      
      
      ## 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 avatarJiachi Liu <4800338+huozhi@users.noreply.github.com>
      14c93768
    • Steven's avatar
      Add support for `images.loaderFile` config (#41585) · 7102050e
      Steven authored
      This PR adds a new configure property, `images.loaderFile` that allow
      you to define a path to a file with an exported image loader function.
      
      This is useful when migrating from `next/legacy/image` to `next/image`
      because it lets you configure the loader for every instance of
      `next/image` once, similar to the legacy "built-in loaders".
      7102050e
    • Damien Simonin Feugas's avatar
      feat(edge): adds AsyncLocalStorage support to the edge function sandbox (#41622) · 6f43c90b
      Damien Simonin Feugas authored
      
      
      ## 📖  Feature
      
      Adds `AsyncLocalStorage` as a global variable to any edge function (middleware, Edge API routes).
      Falls back to Node.js' implementation. 
      
      ## 🧪 How to test
      
      1. `pnpm build`
      2. `pnpm testheadless --testPathPattern async-local`
      6f43c90b
    • Hannes Bornö's avatar
      Root layout head not required (#41621) · bdc53ef6
      Hannes Bornö authored
      Remove head as required in root layout.
      
      ## 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)
      bdc53ef6
  4. 20 Oct, 2022 9 commits
    • Steven's avatar
      Add test fixture `e2e/app-dir/next-image` (#41609) · 001a67df
      Steven authored
      This PR adds a test fixture `e2e/app-dir/next-image` to ensure `next/image` works with the `app` dir.
      001a67df
    • Ismael's avatar
      remove next/future/image ref (#41610) · 75aab126
      Ismael 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)
      75aab126
    • Shu Ding's avatar
      Fix missing JSON.stringify in loader (#41599) · 6bd789da
      Shu Ding authored
      We can't directly put `filePath` in the generated code as it can contain in valid JavaScript string such as `"\2"` in `"C:\Users\foo\2022\bar.js"`. Reference: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Deprecated_octal
      
      Reported issue in Next.js:
      
      ![image](https://user-images.githubusercontent.com/3676859/196962933-0a3bf4b4-9142-426f-9ac5-bdcfb3c5ebf0.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)
      6bd789da
    • Janicklas Ralph's avatar
      Updating size-adjust calculation (#41406) · 56b097a8
      Janicklas Ralph 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:
      
      
      
      
      ## 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)
      -->
      
      Updating size-adjust calc to use azAvgWidth instead of xAvgCharWidth
      Co-authored-by: 's avatarHannes Bornö <hannes.borno@vercel.com>
      Co-authored-by: 's avatarBalázs Orbán <info@balazsorban.com>
      Co-authored-by: 's avatarJJ Kasper <jj@jjsweb.site>
      56b097a8
    • Hannes Bornö's avatar
      Font loader types (#41591) · 77ba4a86
      Hannes Bornö authored
      Make local and google font loaders more similar. Both should define `weight: string` and `style: string`.
      
      ## 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)
      77ba4a86
    • Shu Ding's avatar
      Add transpilePackages option (#41583) · 138a7bfd
      Shu Ding authored
      This is a new experimental feature to specify a list of packages (or
      subpaths in packages, like `pkg/src/index.ts`), to opt-in Next.js
      transpilation in the server build.
      
      cc @jescalan 
      
      ## 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`
      - [x] 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)
      138a7bfd
    • Jimmy Lai's avatar
      perf: refactor path logic in router + add LRU cache (#41365) · 6d297130
      Jimmy Lai authored
      I'm investigating the runtime perf of the node server and this was one of the hot spot I stumbled upon.
      
      This diff:
      - refactors getPagePath to not throw when it doesn't find a path: this function is used to check if a path exists, we don't want that kind of overhead there
      - adds a LRU cache to cache the result of the evaluation
      
      Results:
      
      before:
      > 110k requests in 11.01s, 285 MB read
      
      after
      >135k requests in 11.01s, 348 MB read
      
      on an autocannon run
      
      
      
      ## 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)
      6d297130
    • Yohann MARTZOLFF's avatar
    • Balázs Orbán's avatar
      2cafe367