* 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
* Add checking of react versions to make sure it
meets the minimum set in peerDependencies
* Simplify react check
* Update error wording
Co-Authored-By: timneutkens <tim@timneutkens.nl>
* Add err.sh
* Update test-production circleci job name
* Add react error message to next-dev-server
* Update test for new wording
- Removed `fetchRoute` as it was only used once (internal method, non-breaking)
- Convert files to TypeScript
- Don't extend `ServerRouter` from `Router` as it introduces unneeded overhead, we only have to provide `pathname` `asPath` and `query` for `withRouter`. Also added `events` even though it shouldn't be called on SSR, just making sure we don't break things.
* make router UrlIsNew comparing method work as expected
* Remove shallow-equals from router and update urlIsNew check
* Remove shallow-equals test since it is no longer used
* Add integration test for asPath query