1. 17 Dec, 2018 7 commits
    • Tim Neutkens's avatar
      v7.0.2-canary.49 · bd2dee21
      Tim Neutkens authored
      bd2dee21
    • Tim Neutkens's avatar
    • Tim Neutkens's avatar
      Check if App / Document are valid React Components (#5907) · 581e193a
      Tim Neutkens authored
      We already checked if Document is a valid component, but we didn't yet for App.
      581e193a
    • Tim Neutkens's avatar
      Add prettier for examples directory (#5909) · 9c4eefcd
      Tim Neutkens authored
      * Add prettier for examples directory
      
      * Fix files
      
      * Fix linting
      
      * Add prettier script in case it has to be ran again
      9c4eefcd
    • Tim Neutkens's avatar
      v7.0.2-canary.48 · 6e2cbfaf
      Tim Neutkens authored
      6e2cbfaf
    • Kyle Holmberg's avatar
      Change page export validity check on client and server in development (#5857) · 72e79292
      Kyle Holmberg authored
      Resolves #4055 
      
      Credit: https://github.com/zeit/next.js/pull/5095
      
      I didn't use the ignore webpack plugin from the original PR and tested bundle size with https://github.com/zeit/next.js/pull/5339 - seems to be safe on that front.
      
      Was able to get tests to pass locally, unsure of what goes wrong in CI 🤷‍♂️ 
      
      **Questions**
      1) The initial PR didn't include changes to `next-server/lib/router` in `getRouteInfo()`. Should the same changes be made within?
      
      2) Should we add a test for rendering a component created via `forwardRef()`?
      
      `component-with-forwardedRef`:
      ```javascript
      export default React.forwardRef((props, ref) => <span {...props} forwardedRef={ref}>This is a component with a forwarded ref</span>);
      ```
      
      some test:
      ```javascript
      test('renders from forwardRef', async () => {
        const $ = await get$('/component-with-forwardedRef')
        const span = $('span')
        expect(span.text()).toMatch(/This is a component with a forwarded ref/)
      })
      ```
      72e79292
    • Brian Beck's avatar
      Improve dev experience by listening faster (#5902) · b91a9601
      Brian Beck authored
      As I detailed in [this thread on Spectrum](https://spectrum.chat/?t=3df7b1fb-7331-4ca4-af35-d9a8b1cacb2c), the dev experience would be a lot nicer if the server started listening as soon as possible, before the slow initialization steps. That way, instead of manually polling the dev URL until the server's up (this can take a long time!), I can open it right away and the responses will be delivered when the dev server is done initializing.
      
      This makes a few changes to the dev server:
      
      * Move `HotReloader` creation to `prepare`. Ideally, more things (from the non-dev `Server`) would be moved to a later point as well, because creating `next({ ... })` is quite slow.
      * In `run`, wait for a promise to resolve before doing anything. This promise automatically gets resolved whenever `prepare` finishes successfully.
      
      And the `next dev` and `next start` scripts:
      
      * Since we want to log that the server is ready/listening before the intensive build process kicks off, we return the app instance from `startServer` and the scripts call `app.prepare()`.
      
      This should all be backwards compatible, including with all existing custom server recommendations that essentially say `app.prepare().then(listen)`. But now, we could make an even better recommendation: start listening right away, then call `app.prepare()` in the `listen` callback. Users would be free to make that change and get better DX.
      
      Try it and I doubt you'll want to go back to the old way. :)
      b91a9601
  2. 16 Dec, 2018 6 commits
  3. 15 Dec, 2018 3 commits
  4. 14 Dec, 2018 4 commits
  5. 13 Dec, 2018 7 commits
  6. 12 Dec, 2018 4 commits
    • adrianoted's avatar
      Removing link ref style.css (#5871) · 81a2a6c4
      adrianoted authored
      This link ref is no more necessary to include in the Head Section.  It cause error 404 in the console: http://localhost:3000/_next/static/style.css net::ERR_ABORTED 404 (Not Found)
      81a2a6c4
    • Benjamin Kniffler's avatar
      multi-threaded export with nice progress indication (#5870) · e6c36866
      Benjamin Kniffler authored
      This PR will
      
      - allow nextjs export to use all available CPU cores for rendering & writing pages by using child_process
      - make use of async-sema to allow each thread to concurrently write multiple paths
      - show a fancy progress bar while processing pages (with non-TTY fallback for CI web consoles)
      
      The performance gain for my MacBook with 4 CPU cores went from ~25 pages per second to ~75 pages per second. Beefy CI machines with lots of cores should profit even more.
      e6c36866
    • Oscar Busk's avatar
      Fix/update "examples/custom-server-typescript" (#5865) · 71d1d363
      Oscar Busk authored
      * Update all dependencies and remove redundant ones from package.json. (60f9ee5)
      * Fixes #5596 by adjusting nodemon scripts (d4b7d3a)
      * Fixes `npm start` on windows by using `cross-env` (9555217)
      * Move compiled server out from `.next`. Compiling other JS into `.next` seems incorrect. (79fce02, 
      9ce7086)
      * Partly fixes #5753 by making sure typescript compiles with `es2017` as target, at least ensuring code is runnable on node 8. Previously it was compiled with `esnext`. (9176e92)
      
      --- 
      
      I tried improving the structure by keeping source in `src/app` and `src/server` and then building to `dist/server` and `dist/app` but I didn't really get it to work and made most configs more complicated. Moved the built server out from `.next` anyway.
      71d1d363
    • Brian Beck's avatar
      Fix initialNow in react-intl example (#5867) · 50662c6a
      Brian Beck authored
      The `initialNow` prop is used to avoid content mismatches when Universal/SSR apps render date values using components like `<FormattedRelative>`.
      
      If this value is created in `render()`, then the server will generate it and then the client will also generate it during hydration / initial render, resulting in two different values and content mismatches like:
      
      > Warning: Text content did not match. Server: "in 1,741,545 seconds" Client: "in 1,741,543 seconds"
      
      If the value is instead generated in `getInitialProps`, then the client's initial rendering will match because it will use the same value sent down by the server.
      50662c6a
  7. 11 Dec, 2018 5 commits
  8. 10 Dec, 2018 4 commits