1. 30 9月, 2019 1 次提交
  2. 27 9月, 2019 1 次提交
    • J
      Remove `stale-if-error` header from SPR (#8866) · e3d15f98
      Joe Haddad 提交于
      The Now CDN does not support the `stale-if-error` header and already behaves like that for `stale-while-revalidate`.
      
      Removing this header allows Now CDN to use its default headers instead of sending _only_ `stale-if-error` after stripping `s-maxage` and `stale-while-revalidate`.
      e3d15f98
  3. 25 9月, 2019 1 次提交
    • J
      SPR follow ups (#8846) · 2ae475e0
      JJ Kasper 提交于
      * Add revalidate header and error when invalid
      object from getStaticProps
      
      * Make sprCache no-op in dev mode
      
      * Update packages/next/next-server/server/next-server.ts
      
      * Update tests for fixes
      
      * Update getStaticProps error and add test
      
      * Update manifest test
      
      * Add validating revalidate value
      
      * Apply suggestions from code review
      Co-Authored-By: NJoe Haddad <joe.haddad@zeit.co>
      
      * Change from error to warning high revalidate value
      2ae475e0
  4. 24 9月, 2019 2 次提交
    • J
      Add `src` directory support (#8735) · a8e3b022
      JJ Kasper 提交于
      * Add find-pages-dir
      
      * Add support for src directory
      
      * Add test for pages dir preference
      
      * Update comment
      a8e3b022
    • J
      Add experimental SPR support (#8832) · 85e720a0
      JJ Kasper 提交于
      * initial commit for SPRv2
      
      * Add initial SPR cache handling
      
      * update SPR handling
      
      * Implement SPR handling in render
      
      * Update tests, handle caching with serverless next
      start, add TODOs, and update manifest generating
      
      * Handle no prerender-manifest from not being used
      
      * Fix url.parse error
      
      * Apply suggestions from code review
      Co-Authored-By: NJoe Haddad <joe.haddad@zeit.co>
      
      * Replace set with constants in next-page-config
      
      * simplify sprStatus.used
      
      * Add error if getStaticProps is used with getInitialProps
      
      * Remove stale TODO
      
      * Update revalidate values in SPR cache for non-seeded routes
      
      * Apply suggestions from code review
      
      * Remove concurrency type
      
      * Rename variable for clarity
      
      * Add copying prerender files during export
      
      * Add comment for clarity
      
      * Fix exporting
      
      * Update comment
      
      * Add additional note
      
      * Rename variable
      
      * Update to not re-export SPR pages from build
      
      * Hard navigate when fetching data fails
      
      * Remove default extension
      
      * Add brackets
      
      * Add checking output files to prerender tests
      
      * Adjust export move logic
      
      * Clarify behavior of export aggregation
      
      * Update variable names for clarity
      
      * Update tests
      
      * Add comment
      
      * s/an oxymoron/contradictory/
      
      * rename
      
      * Extract error case
      
      * Add tests for exporting SPR pages and update
      /_next/data endpoint to end with .json
      
      * Relocate variable
      
      * Adjust route building
      
      * Rename to unstable
      
      * Rename unstable_getStaticParams
      
      * Fix linting
      
      * Only add this when a data request
      
      * Update prerender data tests
      
      * s/isServerless/isLikeServerless/
      
      * Don't rely on query for `next start` in serverless mode
      
      * Rename var
      
      * Update renderedDuringBuild check
      
      * Add test for dynamic param with bracket
      
      * Fix serverless next start handling
      
      * remove todo
      
      * Adjust comment
      
      * Update calculateRevalidate
      
      * Remove cache logic from render.tsx
      
      * Remove extra imports
      
      * Move SPR cache logic to next-server
      
      * Remove old isDynamic prop
      
      * Add calling App getInitialProps for SPR pages
      
      * Update revalidate logic
      
      * Add isStale to SprCacheValue
      
      * Update headers for SPR
      
      * add awaiting pendingRevalidation
      
      * Dont return null for revalidation render
      
      * Adjust logic
      
      * Be sure to remove coalesced render
      
      * Fix data for serverless
      
      * Create a method coalescing utility
      
      * Remove TODO
      
      * Extract send payload helper
      
      * Wrap in-line
      
      * Move around some code
      
      * Add tests for de-duping and revalidating
      
      * Update prerender manifest test
      85e720a0
  5. 18 9月, 2019 1 次提交
    • J
      Global CSS Support (#8710) · 65358b7a
      Joe Haddad 提交于
      * Global CSS Support
      
      * Fix webpack configuration
      
      * oneOf rule isn't necessary yet
      
      * Adjust CSS chunk naming
      
      * Begin testing CSS behavior
      
      * Add another test TODO
      
      * Replace null-loader with ignore-loader
      
      * Turn on chunks for new CSS feature
      
      * Fix multi test suite
      
      * Test CSS import order
      
      * Test style HMR
      
      * Test CSS compilation
      
      * Test compilation and prefixing together
      
      * Verify CSS styling works for Development and Production
      
      * Add missing TODO
      
      * Remove unnecessary test
      
      * Adjust TODO message
      
      * Hide page until React hydrates
      
      * Revert "Hide page until React hydrates"
      
      This reverts commit 898d4e0ee547b003d5790e2b11476740d645b907.
      
      * Hide FOUC during development
      
      * Test CSS imports
      
      * Update tests TODO
      
      * Add fixture for url() test
      
      * Test `file-loader` support in CSS files
      
      * Use a simple variant of cssnano
      
      * Self-import
      
      * Undo bundling
      
      * Implement suggestion
      65358b7a
  6. 04 9月, 2019 1 次提交
    • T
      Move next-server back into `next` package (#8613) · 2ba352da
      Tim Neutkens 提交于
      * Initial move
      
      * Make emitting work
      
      * Update paths
      
      * Remove leftover files
      
      * Add correct externals configuration
      
      * Import correct path
      
      * Update path to work with ts-server test
      
      * Update lib directory
      
      * Compile next-server/lib
      2ba352da
  7. 30 8月, 2019 1 次提交
  8. 11 8月, 2019 1 次提交
  9. 06 8月, 2019 1 次提交
    • J
      Experimental: Serverless Trace target (#8246) · b31c2967
      Joe Haddad 提交于
      * Experimental: Serverless Trace target
      The Serverless Trace target produces Serverless-handler wrapped entrypoints, but does not bundle all of `node_modules`.
      
      This behavior increases bundling performance to be more akin to `target: 'server'`.
      
      This mode is expected to be used with smart platforms (like [ZEIT Now](https://zeit.co/now) that can trace a program to its minimum dependencies.
      
      * Use more generic variables
      
      * Add asset relocator for production mode of serverless trace
      
      * Verify Firebase compatiblity
      
      * Revert "Add asset relocator for production mode of serverless trace"
      
      This reverts commit 8404f1dcf28b60edab41a56c94b38dcd3fddec20.
      
      * Add serverless trace tests
      
      * Add _isLikeServerless helper
      
      * Make constants
      
      * Fix export
      
      * Update packages/next-server/server/config.ts
      Co-Authored-By: NJJ Kasper <jj@jjsweb.site>
      
      * Use a global helper for is like serverless
      
      * Update import for isTargetLikeServerless
      
      * Update packages/next/build/index.ts
      Co-Authored-By: NJJ Kasper <jj@jjsweb.site>
      b31c2967
  10. 30 7月, 2019 1 次提交
  11. 17 7月, 2019 1 次提交
  12. 16 7月, 2019 1 次提交
  13. 10 7月, 2019 1 次提交
    • J
      Add default values for runtime config (#7847) · bf7af1d1
      JJ Kasper 提交于
      * Add default values for runtime config
      
      * Add test to ensure default values are set
      for runtime config
      
      * Only add runtimeConfig if it's not empty
      
      * Only add runtimeConfig if it's not empty
      
      * Simplify default value adding
      
      * Reduce bundle size
      
      * remove comment changes
      
      * Fix typos
      
      * Add test for runtimeConfig in __NEXT_DATA__
      bf7af1d1
  14. 09 7月, 2019 1 次提交
  15. 08 7月, 2019 2 次提交
  16. 04 7月, 2019 1 次提交
    • L
      Http methods update for static files and pages (#7721) · 87acbdb5
      Lukáš Huvar 提交于
      * Change static method handling and pages revert
      
      * Allow and reflect old behaviour
      
      * Post should return 501
      
      * Add back old test
      
      * Invert logic
      
      * Handle 501 for pages in separate location
      
      * Remove usage of 501 HTTP status code
      
      * Prevent information leak
      
      * Add test
      
      * Only 405 if the page exists -- 404 if it doesn't
      
      * Handle sent responses
      
      * Revert "Handle sent responses"
      
      This reverts commit 5e9012ae29b611c25ed1e090756a25dbe3437182.
      
      * Fix bad test
      
      * Switch back to quiet
      
      * Update test/integration/production/test/index.test.js
      Co-Authored-By: NJJ Kasper <jj@jjsweb.site>
      87acbdb5
  17. 02 7月, 2019 1 次提交
    • J
      Add `prerender` PageConfig option (#7699) · 0ca80875
      JJ Kasper 提交于
      * Add prerender PageConfig option
      
      * Update PageConfig type
      
      * Add inlining of data when pre-render is set and add tests
      
      * Update types import
      
      * Add check for props
      
      * Rename prerender to experimentalPrerender for now
      0ca80875
  18. 29 6月, 2019 1 次提交
    • J
      Unflag Automatic Prerendering (#7666) · 3aed76fa
      Joe Haddad 提交于
      * Unflag Dynamic Routing
      
      * Unflag Automatic Prerendering
      
      * Ensure pages are lambdas for test
      
      * Fix file check
      
      * Fix tests
      
      * oof
      
      * Use lambda for document middleware test
      3aed76fa
  19. 28 6月, 2019 2 次提交
  20. 25 6月, 2019 1 次提交
  21. 24 6月, 2019 1 次提交
  22. 21 6月, 2019 2 次提交
  23. 20 6月, 2019 1 次提交
  24. 10 6月, 2019 3 次提交
  25. 05 6月, 2019 1 次提交
    • L
      API interface extensions (#7363) · c821e830
      Lukáš Huvar 提交于
      * Cookies and Query parsing for API request
      
      * Adding JSON and SEND
      
      * First body parsing
      
      * Body parsing
      
      * Remove extra try catch
      
      * Fix tests
      
      * Only server bundling for API routes
      
      * Update packages/next-server/server/api-utils.ts
      Co-Authored-By: NTim Neutkens <tim@timneutkens.nl>
      
      * Revert on demand server changes
      
      * Use content-type for parsing
      
      * Update packages/next-server/server/api-utils.ts
      Co-Authored-By: NJan Potoms <potoms.jan@gmail.com>
      
      * Add tests for server compilation
      
      * Add body limit
      
      * Change API to function chaining
      
      * Limit test
      c821e830
  26. 31 5月, 2019 2 次提交
    • J
      Consolidate import statements · f8e9cbba
      Joe Haddad 提交于
      f8e9cbba
    • J
      Revise dynamic route generation (mark 3) (#7473) · c782fa41
      Joe Haddad 提交于
      * Revise dynamic route generation
      This implements a new tree-based route sorting algorithm that uses a Depth-First-Traversal approach to correctly sort the routes.
      
      This provides better clarity over a `.sort()` based approach and will scale well as we add new features in the future.
      
      * Update import
      c782fa41
  27. 29 5月, 2019 2 次提交
    • T
      Move syntax formatting to prettier (#7454) · 3e51ddb8
      Tim Neutkens 提交于
      * Run prettier over packages/**/*.js
      
      * Run prettier over packages/**/*.ts
      
      * Run prettier over examples
      
      * Remove tslint
      
      * Run prettier over examples
      
      * Run prettier over all markdown files
      
      * Run prettier over json files
      3e51ddb8
    • J
      Add amp.canonicalBase option to set absolute URL (#7262) · 24034ec9
      JJ Kasper 提交于
      * Add canonicalBase config to allow setting
      absolute path for canonical link
      
      * Make sure canonicalBase is set for
      export and serverless
      
      * Move canonicalBase to amp.canonicalBase
      
      * Update tests with canonicalBase config
      
      * Update tests
      
      * run lint-fix
      
      * Fix canonicalBase config parsing
      
      * Fix canonicalBase during export
      
      * Update amphtml tests
      24034ec9
  28. 28 5月, 2019 1 次提交
    • J
      Dynamic routing mark 2 (#7432) · e27203f8
      Joe Haddad 提交于
      * Update escape string regexp operators
      
      * temp
      
      * Extract getRouteRegex func
      
      * First iteration of dynamic routing for production only
      
      * Correctly order prod
      
      * Add serverless support
      
      * Single line it
      
      * noop routes
      
      * Format doc
      
      * Fix dynamic routing for dev
      
      * Add flag for dynamic routing
      
      * Update packages/next-server/lib/router/router.ts
      Co-Authored-By: NJJ Kasper <jj@jjsweb.site>
      
      * remove example
      
      * Add router tests
      
      * Format code
      
      * Sort routes
      
      * Update to not use posix path methods
      e27203f8
  29. 27 5月, 2019 1 次提交
    • J
      Refactor server router (#7431) · 51b9eabe
      Joe Haddad 提交于
      * Format next server
      
      * Extract findPageComponents logic from renderToHTMLWithComponents
      
      * Apply a little formatting
      
      * Lift up component loading
      51b9eabe
  30. 24 5月, 2019 1 次提交
  31. 23 5月, 2019 2 次提交
    • J
    • J
      Add auto static/dynamic (#7293) · cdd54afb
      JJ Kasper 提交于
      * Add automatic exporting of pages with no getInitialProps
      
      * Add support for exporting serverless to static
      and serving the html files during next start
      
      * Fix missing runtimeEnv when requiring page, re-add warning
      when trying to export with serverless, and update tests
      
      * Update flying-shuttle test
      
      * revert un-used pagesManifest change
      
      * remove query.amp RegExp test
      
      * Fix windows backslashes not being replaced
      
      * Re-enable serverless support for next start
      
      * bump
      
      * Fix getInitialProps check
      
      * Fix incorrect error check
      
      * Re-add check for reserved pages
      
      * Fix static check
      
      * Update to ignore /api pages and clean up some tests
      
      * Re-add needed next.config for test and correct behavior
      
      * Update RegExp for ignored pages for auto-static
      
      * Add checking for custom getInitialProps in pages/_app
      
      * Update isPageStatic logic to only use default export
      
      * Re-add retrying to CircleCi
      
      * Update query during dev to only have values
      available during export for static pages
      
      * Fix test
      
      * Add warning when page without default export is
      found and make sure to update pages-manifest
      correctly in flying-shuttle mode
      
      * Fix backslashes not being replaced
      
      * Integrate auto-static with flying-shuttle
      and make sure AMP is handled in flying-shuttle
      
      * Add autoExport for opting in
      cdd54afb