1. 11 3月, 2021 2 次提交
    • J
      v10.0.9-canary.5 · 014a2f84
      JJ Kasper 提交于
      014a2f84
    • D
      Telemetry-compatible tracing (#22713) · e27b7e99
      Dale Bustad 提交于
      A number of changes here.  I recommend viewing the diff with the <a href="?w=1">whitespace flag enabled</a>.
      
      - OpenTelemetry is replaced with a custom and lightweight tracing solution.
      - Three trace targets are currently supported: console, Zipkin, and NextJS.
      - Tracing is now governed by environment variables rather than `--require instrument.js`.
        + `TRACE_TARGET`: one of `CONSOLE`, `ZIPKIN`, or `TELEMETRY`; defaults to `TELEMETRY` if unset or invalid.
        + `TRACE_ID`: an 8-byte hex-encoded value used as the Zipkin trace ID; if not provided, this value will be randomly generated and passed down to subprocesses.
      
      Other sundry:
      
      - I'm missing something, probably a setup step, with the Zipkin target.  Traces are captured successfully, but you have to manually enter the Trace ID in order to view the trace - it doesn't show up in queries.
      - I'm generally unhappy with [this commit](https://github.com/vercel/next.js/pull/22713/commits/235cedcb3ead76b630b4c8aa695f904489da2831).  It is... untidy to provide a telemetry object via `setGlobal`, but I don't have a ready alternative.  Is `distDir` strictly required when creating a new Telemetry object?  I didn't dig too deep here.
      
      As noted, there are a lot of changes, so it'd be great if a reviewer could:
      
      - [ ] pull down the branch and try to break it
      - [ ] check the Zipkin traces and identify possible regressions in the functionality
      
      Closes #22570
      Fixes #22574
      e27b7e99
  2. 10 3月, 2021 3 次提交
  3. 09 3月, 2021 4 次提交
  4. 08 3月, 2021 4 次提交
  5. 06 3月, 2021 3 次提交
    • J
      v10.0.9-canary.0 · e17398f4
      JJ Kasper 提交于
      e17398f4
    • S
      Dedupe in-flight server data requests (#22781) · 2d207fb1
      Shu Ding 提交于
      This PR adds request deduplication for `_getServerData`. If a request with the same URL is already in-flight, we don't send another new request. When a request succeeds or fails, we delete the cache.
      
      A potential improvement this brings is, when `getServerSideProps` of a new route is slow to load, the user might keep clicking on the link which causes new requests, and the route will never update because results of old requests were ditched. Also adds a test case for this scenario.
      
      Closes #19238.
      2d207fb1
    • S
      Fix idleTimeout error being thrown in route loader (#22775) · afc8ce4d
      Shu Ding 提交于
      In the current implementation, `idleTimeout` will always be thrown even if it didn't time out and `Promise.race` was resolved. This causes the error `Error: Route did not complete loading` on every route transition and Chrome Devtools will pause code execution if you have "Pause on exceptions" enabled.
      
      This PR adds `resolvePromiseWithTimeout` which does the same thing as `Promise.race` and `idleTimeout`, but it cancels the rejection when it resolves successfully, in which case the error won't be thrown.
      
      Fixes #21543.
      afc8ce4d
  6. 05 3月, 2021 4 次提交
  7. 04 3月, 2021 3 次提交
  8. 03 3月, 2021 6 次提交
  9. 02 3月, 2021 1 次提交
  10. 01 3月, 2021 1 次提交
  11. 27 2月, 2021 2 次提交
  12. 26 2月, 2021 2 次提交
  13. 25 2月, 2021 5 次提交
    • J
      v10.0.8-canary.9 · 0088caa1
      JJ Kasper 提交于
      0088caa1
    • J
      Fix experimental optimizeCss for SSR (#22513) · 6d068aed
      JJ Kasper 提交于
      This ensures `distDir` is set under `renderOpts` in `next-server` so that it is present when experimental `optimizeCss` is enabled. 
      
      x-ref: https://github.com/vercel/next.js/pull/16539
      6d068aed
    • A
      Allow smaller sizes in srcset for image with fill layout and sizes prop (#21670) · a0d44ca3
      Alex Castle 提交于
      Currently, the image component doesn't handle use of the `sizes` property with `layout="fill"` and `layout="responsive"` very well for small viewports. It will never include sizes smaller than the smallest viewport (640px) in the srcset, so even if you specify `sizes="30vw"` in your image, you have to download the full-viewport-width image on small devices. 
      
      This PR adds logic such that if you use `layout="fill"` and include a `sizes` property, the image component will include the full range of image sizes in the `srcset`.
      
      It also includes an optimization where it finds the smallest `vw` value in the sizes value and combines that with the smallest viewport width, and uses that as the floor of the srcset. It does this so it doesn't unnecessarily increase transfer size by including ALL sizes. This is still a conservative optimization--for 95% of cases, taking the _largest_ `vw` size would work, but I don't see a way to do that without breaking a few corner cases.
      
      The case of a sizes prop with `px` values is fixed but not optimized--though generally that case is less of a good fit for the fill or responsive layout anyway.
      a0d44ca3
    • J
      v10.0.8-canary.8 · b90b4b50
      JJ Kasper 提交于
      b90b4b50
    • J
      fix: correctly handle fallbacks for webpack 5 (#22497) · 775bdc34
      Joe Haddad 提交于
      Co-authored-by: NJJ Kasper <jj@jjsweb.site>
      775bdc34