* 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: JJ Kasper <jj@jjsweb.site>
Co-authored-by: JJ Kasper <jj@jjsweb.site>
* Rename getServerProps to getServerSideProps
* Remove unstable_ prefix from new methods
* Add error when legacy methods are detected
* Add legacy methods for babel transform
* Add unstable_getServerSideProps also
* Apply suggestions from code review
Co-Authored-By: Joe Haddad <joe.haddad@zeit.co>
* Update types import
Co-authored-by: Joe Haddad <timer150@gmail.com>
* WIP: rename get static paths
* Adjust logic
* Add warning
* rename constant
* Check for error when using old method
* Add friendly error message
* Test for message of invalid keys
* replace index with dots
* Drop Re-Exported iSSG Imports
This pull request adds loader support for the following export form:
```js
export { getStaticParams as unstable_getStaticParams } from '../../lib/docs/page';
export { getStaticProps as unstable_getStaticProps } from '../../lib/docs/page';
```
This will now result in correct detection and removal.
* Add unit tests for next page config behavior
* Test extra function is not dropped
* Catch-all Route Support
* Add SSR tests
* Add additional test
* Add unit tests
* Put the feature behind a flag
* Apply suggestions from code review
Co-Authored-By: JJ Kasper <jj@jjsweb.site>
* Fix test
* Add transparent JSX optimization.
* fix duplicate React import
* fix React not being imported when only a single Fragment node is present in a source module
* remove babel-plugin-react-require
* Fix JSX optimization for CommonJS source files.
* Add error message for duplicate slug name within a dynamic path
* Update based on feedback
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
* WIP - committed with no-verify - progress
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
* Remove old test placeholder
* Add test for re-used names
* Dynamic Routes: Change impl from $param to [param]
* Update expected test snapshot
* Update test to use new syntax
* Update test file
* Test more behavior
* Update route sorter for new param syntax
* Update dynamic routing tests
* Update danging test file
* Tweak test
* Fix dev and update tests
* replace recursive-copy with own implementation
* update yarn.lock
* do not filter out not directories
* do not fail if folder already exists
* replace `\` by `/` when sending pathes to filter
* use fs-extra only in tests
* investigate and test recursive-copy npm module
* improve test by creating fixtures programmatically
* remove recursive-copy npm module test
* add recursive-copy to bench
* add bench:recursive-copy script
* fix Sema import in recursive-copy.ts
* small improvements
* 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
* Moved server/lib/utils.js to Typescript
* moved _app.js to Typescript
* Moved _error.js to Typescript
* Added argument for custom props in _app and _error
* Moved _document.js to Typescript
* updated one test
* Updated types and added a validation for _document props
* Improved types
* Fixed some types
* Updated AppType
* Fixed some tests
* Added missing import
* Removed a not very useful type
* Fix missing type
* Move @types/styled-jsx
* Fix typescript errors
* Remove CLI and negative page building
* Remove select all tests
* Update test of getSpecifiedPages
* Prune old tests from snapshot
* Remove old flying shuttle tests