1. 16 Feb, 2022 9 commits
  2. 15 Feb, 2022 11 commits
    • JJ Kasper's avatar
      v12.0.11-canary.17 · 4f054260
      JJ Kasper authored
      4f054260
    • Aman Mittal's avatar
      Add Error Handing section for ISR (#34360) · 634926d8
      Aman Mittal authored
      * Add Error Handing section for ISR
      
      * Apply suggestions from code review
      
      * update check
      Co-authored-by: 's avatarJJ Kasper <jj@jjsweb.site>
      634926d8
    • Jiachi Liu's avatar
      test: add inline flight response reuse test (#34364) · 00ca8df2
      Jiachi Liu authored
      To collect the requests starting from page load, we need to register event listeners before page loading (`page.goto` API invocation). By default webdriver will wait for hydration, so we need to register events inside `browser.loadPage` to ensure we can collect the requests before hydration is done.
      
      ### Changes
      * Add `beforePageLoad` for next webdriver
      * registry page `'request'` event before loading page
      * update related tests for agruments change
      
      ### Usage
      
      ```js
      browser = await webdriver(appPort, '/path', {
         waitHydration, // default true
         retryWaitHydration, // default false
         disableCache, // default false
         beforePageLoad, // default undefined
      })
      
      ```
      00ca8df2
    • Tim Neutkens's avatar
      v12.0.11-canary.16 · 01998188
      Tim Neutkens authored
      01998188
    • JJ Kasper's avatar
      Ensure invalid request to static page is handled correctly (#34346) · 982b65a3
      JJ Kasper authored
      * Ensure invalid request to static page is handled correctly
      
      * update test
      982b65a3
    • Donny/강동윤's avatar
    • Tim Neutkens's avatar
      Add support for "type": "module" in package.json (#33637) · 62b1704e
      Tim Neutkens authored
      - [x] Add failing test for development / production
      - [x] Add failing test for client-side JavaScript
      - [x] Write `.next/package.json` with `"type": "commonjs"
      - [x] Fix issue with client-side JavaScript showing `module` is not defined
      
      Production works after these changes. Development breaks on module not existing because of the Fast Refresh loader. Working with @sokra to add alternatives to what is being used in the loader to webpack so that it can be updated.
      
      Fixes #23029, Fixes #24334
      
      
      
      ## Bug
      
      - [x] Related issues linked using `fixes #number`
      - [x] Integration tests added
      - [x] 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 `yarn lint`
      62b1704e
    • Rich Haines's avatar
      Updated failed to load error page to include info about node versions (#34362) · 127f94dc
      Rich Haines authored
      This PR updates the [failed loading swc](https://nextjs.org/docs/messages/failed-loading-swc) error page with information about switching node version and installing deps again.
      
      ## 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 `yarn lint`
      127f94dc
    • Qilin Yang's avatar
      Update image.md (#34374) · 74d0329b
      Qilin Yang authored
      - Replaced outdated Vercel Image Optimization page URL
      
      
      
      ## 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 `yarn lint`
      74d0329b
    • Syed Basim's avatar
      4c8bc158
    • Alex Castle's avatar
      Remove experimental image optimization feature (#34349) · f5163046
      Alex Castle authored
      This PR removes the experimental `optimizeImages` flag. This feature was designed to automatically add preload tags for images, but I was never able to get it to do a very good job of selecting the images that actually need preloading.
      
      This feature never graduated from experimental and in fact we never even publicized it as an experimental feature for people to try.
      
      Additionally, even if someone was using this feature, it wouldn't have a functional effect, only a performance effect (removal of some preloads).
      
      For those reasons, I believe it is safe to remove this functionality and that it is not a breaking change.
      f5163046
  3. 14 Feb, 2022 10 commits
    • Tobias Koppers's avatar
      Allow dismissing full refresh warning for session (#33868) · c20e8297
      Tobias Koppers authored
      x-ref: #31827
      x-ref: #34212
      
      ![image](https://user-images.githubusercontent.com/1365881/151994766-b9afb349-1a9a-4220-9387-de10165e34e3.png)
      
      
      
      
      ## 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 `yarn lint`
      Co-authored-by: 's avatarJJ Kasper <22380829+ijjk@users.noreply.github.com>
      c20e8297
    • David Burrows's avatar
      Update MDX Custom Elements setup (#34175) · 5402f099
      David Burrows authored
      The current documentation for MDX Custom Element setup was not clear, ended up on https://github.com/vercel/next.js/issues/30812 before I had this configured correctly, have tried to make the config steps more explicit.
      
      
      
      
      ## Documentation / Examples
      
      - [x] Make sure the linting passes by running `yarn lint`
      5402f099
    • Shu Ding's avatar
    • T•Ø•R•Ü•S's avatar
      Few touch-ups to the docs on web forms in Next (#34286) · c0c11ad9
      T•Ø•R•Ü•S authored
      ## Beyond the minor changes...
      
      - Added a warning that back-end validation is more secure
      - Fixed a RegEx that I'm damn-near sure is wrong.
      - Returned status codes in the first back-end serverless example
      - Added a link the user can click on to learn what a HTTP method is
      
      ## Changes that must be reviewed:
      
      - Does the `script` tag need explanation? I think all that needs to be said is that you can indeed use it in Next.JS, without much trouble.
      
      
      
      ## Documentation / Examples
      
      - [x] Make sure the linting passes by running `yarn lint`
      Co-authored-by: 's avatarJJ Kasper <22380829+ijjk@users.noreply.github.com>
      c0c11ad9
    • Aman Mittal's avatar
      Add an example to Write server-side code directly section (#34319) · d9eba570
      Aman Mittal authored
      In addition to https://github.com/vercel/front/pull/12473, this PR adds an example to the section :Write server-side code directly.
      
      
      ## 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
      - [x] 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 `yarn lint`
      d9eba570
    • Shu Ding's avatar
      Fix `<RouteAnnouncer/>` shouldn't announce initial path under strict mode and React 18 (#34338) · 468833e0
      Shu Ding authored
      As the comment mentioned, React 18 with Strict Mode enabled might cause double invocation of lifecycle methods. This makes the `<RouteAnnouncer/>` being non-empty for the initial page, which is a bug (it should only announce page change whenever a navigation happens).
      
      ## Bug
      
      - [ ] 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 by running `yarn lint`
      468833e0
    • Ben Ilegbodu's avatar
      docs: Add link to pageExtensions config in page-without-valid-component.md (#34285) · 41ecd5e6
      Ben Ilegbodu authored
      The [Page Without Valid React Component](https://nextjs.org/docs/messages/page-without-valid-component) explains some ways to fix the problem of Next finding a non-React Component. However, if someone is trying to use `.mdx` as an extension, or wants to include tests, stories or other non-page files in their `pages` folder there's nothing for them.
      
      The [Custom Page Extensions](https://nextjs.org/docs/api-reference/next.config.js/custom-page-extensions) has all the info to help them out, but adding it to this error page should make it more discoverable.
      
      
      
      ## 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
      
      - [x] Make sure the linting passes by running `yarn lint`
      41ecd5e6
    • hjaber's avatar
      Update missing curly brace in image.md (#34307) · 8a5e1ceb
      hjaber authored
      * Update missing curly brace in image.md
      
      Missing curly brace in lazyRoot component code example
      
      * add return
      Co-authored-by: 's avatarJJ Kasper <jj@jjsweb.site>
      8a5e1ceb
    • Jiachi Liu's avatar
      Align reactRoot config between server and webpack config (#34328) · 1aee9358
      Jiachi Liu authored
      ### Changes
      
      * node server and webpack should share the same logic: auto detect react 18 and enable `reactRoot`
      * fallback `_error` should use functional document if concurrent rendering is enabled
      
      ### Test
      
      * Remove the hard code `reactRoot: true` in test suite
      * Test some react-18 test suite with nodejs runtime
      1aee9358
    • Zeno Rocha's avatar
      Fix typo on `getInitialProps` (#34309) · 7be6359a
      Zeno Rocha authored
      
      
      ## 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
      - [x] 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 `yarn lint`
      7be6359a
  4. 13 Feb, 2022 6 commits
  5. 12 Feb, 2022 3 commits
    • Hassan El Mghari's avatar
      Update frequently asked questions in documentation (#34252) · d5c815e5
      Hassan El Mghari authored
      This is a rewrite of the FAQ section as it's quite outdated. Thank you to @styfle and @leerob for the suggestions. 
      
      **Here's a list of changes I've made:**
      - Removed “How big is it”
      - Removed “What syntactic features are compiled? How do I change them?”
      - Replaced all occurances of "it" with "Next.js"
      - Changed "Is Next.js production ready?" to mention showcase
      - Started the answer to each question with either yes or no for yes/no questions
      - Listed more pros for router section, changed question name, and backlined to migrating from react router docs
      - Revamped "fetching data" answer to list all our data fetching methods and  backlink to docs
      - Made "Can I use Next.js with my favorite JavaScript library?" more clear and emphasized the large number of examples we have
      - Reorganized questions to make more sense
      - Made wording more consistent throughout
      
      **Additional Questions:**
      1. Do we want to keep the "What inspired Next.js" section the same? One option could be to only keep the first sentence linking to G's article and not talk about PHP because of its reputation among newer web developers as an old & outdated  technology.
      2. What's the advantage of routes always being lazy-loadable? I'd like to add this to the last bullet point of the new router question to make it obvious what the benefit is.
      Co-authored-by: 's avatarLee Robinson <9113740+leerob@users.noreply.github.com>
      d5c815e5
    • Lee Robinson's avatar
    • JJ Kasper's avatar
      Update link for includeFiles glob reference (#34269) · 2351e5b7
      JJ Kasper authored
      This ensures we reference [minimatch](https://www.npmjs.com/package/minimatch) since the globs there can have different syntax. 
      
      ## Documentation / Examples
      
      - [x] Make sure the linting passes by running `yarn lint`
      
      Closes: https://github.com/vercel/next.js/issues/34246
      2351e5b7
  6. 11 Feb, 2022 1 commit