1. 23 6月, 2020 3 次提交
    • J
      Fix prerendered nested index handling (#14383) · bc2cb221
      Jan Potoms 提交于
      Noticed this while reviewing https://github.com/vercel/next.js/pull/14376. After having done https://github.com/vercel/next.js/pull/13699, this code didn't feel right to me:
      ```js
      function prepareRoute(path: string) {
        path = delBasePath(path || '')
        // this /index rewrite is problematic, it makes pages/index.js 
        // and pages/index/index.js point to the same thing:
        return toRoute(!path || path === '/' ? '/index' : path)
      }
      ```
      Added a nested index page to the prerender tests and found it was rendering the `/` route on navigation. This uncovered 2 more places around the dataroute where the index path was not translated correctly.
      
      **edit:**
      
      Just to note that there was nothing wrong with https://github.com/vercel/next.js/pull/14376, the issue was already there, I just noticed it while reading that PR
      bc2cb221
    • T
      Remove buildId from server-side files (#14413) · 6c2ce706
      Tim Neutkens 提交于
      Gets rid of the custom function for naming files by removing buildId from the file paths.
      6c2ce706
    • J
      Update route regex for optional catch-all parameters in named regexes (#14456) · a7af0133
      Jan Potoms 提交于
      Noticed while working on https://github.com/vercel/next.js/pull/14400 that the optional catch-all handling was missing in `namedRegex`.
      
      This whole file also seemed quite regex heavy so I took a look at the overall logic and changed a few things. It worked by regex escaping the whole route then unescape the dynamic parts. I changed it to only regex escape the static parts, this eliminates unnecessary back and forth escaping. It also makes the dynamic parts handling more readable. The whole logic is less reliant on regexes and just uses simple string manipulation to translate the route into a regex, I didn't measure anything but as an effect this should make it more performant.
      a7af0133
  2. 22 6月, 2020 1 次提交
  3. 16 6月, 2020 1 次提交
  4. 10 6月, 2020 1 次提交
  5. 05 6月, 2020 1 次提交
    • J
      Update rewrite dynamic SSG error (#13724) · 4e6eb5b3
      JJ Kasper 提交于
      This error isn't specific to just fallback SSG pages since any dynamic SSG page that is rewritten to can cause the `/_next/data` request to fail also since it currently derived from the the URL. 
      
      This can also fail for `getServerSideProps` since it derives the `/_next/data` URL the same way so might need to be updated to show in that case also
      4e6eb5b3
  6. 02 6月, 2020 1 次提交
  7. 01 6月, 2020 1 次提交
    • J
      Handle encoding for data requests and fix fallback response (#13622) · c0368e1b
      JJ Kasper 提交于
      This addresses some errors for `/_next/data` requests where encoded `/` values in dynamic route param would cause invalid behavior, a headers already sent error would be shown when sending the fallback page in development, and when rendering the `_error` page for a data request the error response would still be treated as a data request. 
      
      This also adds test cases for these errors to prevent regression
      c0368e1b
  8. 30 5月, 2020 1 次提交
  9. 29 5月, 2020 1 次提交
    • J
      Speedup tests (#13461) · 30fbd9ad
      Joe Haddad 提交于
      This PR checks if our tests can be ran faster by disabling source maps unless they're used for the purpose of testing.
      30fbd9ad
  10. 19 5月, 2020 4 次提交
  11. 17 5月, 2020 1 次提交
  12. 11 5月, 2020 1 次提交
  13. 28 4月, 2020 1 次提交
  14. 03 4月, 2020 1 次提交
  15. 26 3月, 2020 1 次提交
  16. 10 3月, 2020 1 次提交
    • J
      Verify GS(S)P Serializability (#10857) · 8443a809
      Joe Haddad 提交于
      * Verify GS(S)P Serializability
      
      * Add support for cyclic refs
      
      * Add unit tests
      
      * Test for error in development mode
      
      * Fix prerender preview tests
      
      * Fix gssp preview tests
      
      * fix 2x test cases
      
      * Add desired test
      
      * fix some more tests
      
      * Fix route manifest expect
      
      * Fix test expects
      
      * Test that `getServerSideProps` does not error in production
      
      * Test that getStaticProps is not checked in production
      
      * Test serialization check during build
      
      * Fix export detection for serverless
      
      * Update test/unit/is-serializable-props.test.js
      Co-Authored-By: NJJ Kasper <jj@jjsweb.site>
      Co-authored-by: NJJ Kasper <jj@jjsweb.site>
      8443a809
  17. 06 3月, 2020 2 次提交
  18. 04 3月, 2020 1 次提交
  19. 29 2月, 2020 1 次提交
  20. 28 2月, 2020 1 次提交
  21. 27 2月, 2020 3 次提交
  22. 25 2月, 2020 3 次提交
  23. 24 2月, 2020 1 次提交
  24. 21 2月, 2020 1 次提交
  25. 16 2月, 2020 1 次提交
  26. 13 2月, 2020 2 次提交
  27. 08 2月, 2020 2 次提交
  28. 07 2月, 2020 1 次提交
    • J
      Add initial SSG fallback handling (#10424) · 3099f088
      JJ Kasper 提交于
      * Add initial SSG fallback handling
      
      * Remove extra changes and update fallback handling
      
      * Remove extra timeout for testing
      
      * Update SSG tests in dynamic-routing suite
      
      * Add racing to decide between rendering fallback and data
      
      * Update size-limit test
      
      * Update comment
      
      * Make sure to follow correct route change order
      
      * Make comment more verbose for racing
      
      * Revert getStaticData to only return Promise
      
      * Make sure to update URL on fallback
      
      * Add retrying for data, de-dupe initial fallback request, and merge fallback replace
      
      * Update to add preload for fallback pages data
      
      * Add test for data preload link
      
      * Use pre-built fallback in production mode
      
      * Remove preload link for fallback from _document
      
      * Update to make sure fallback is rendered correctly for serverless
      3099f088