* Add error messages for dynamic SSG page without getStaticPaths
* Update error check
* Update test file
* Update another test file
* Adjust
Co-authored-by: Joe Haddad <timer150@gmail.com>
* Adding native-url package
* Bumping native-url version
* Upgrading native-url
* Logging stats object for debugging
* Logging stats object for debugging
* Adding try catch to the error lines
* Experimenting with regex
* Experimenting with regex
* Experimenting with regex
* Testing regex changes
* Fixing defer-script test case to not include polyfill.js
* Meging changes with existing polyfill work
* Bumping version
* adjust webpack config
* Reduce size in size test
* Remove 1kb from legacy
* Bumping native-url version, includes fix for IE11
* Update lock file
* Updating native-url, fixes issue on IE11
* Fix sourcemap being added in document
* Adding Router as an app level dep. Fixes Router not being added as a dep to pages without Link when granularChunks is enabled
* Fix typescript error
* Fix modern + granularChunks hydration failing
* Fix TS error
* Update native-url version
* Adding native-url with safari fix
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
Co-authored-by: JJ Kasper <jj@jjsweb.site>
Co-authored-by: Joe Haddad <timer150@gmail.com>
* Clean up landed experimental flags
* Remove check for experimental flags from build too
* Remove /_errors/404 in favor of /404
* Remove unneeded check for pathname
* Update test paths
* Fix test
* Update test
* Remove test for disabled config
* Set pages404 always to true
Co-authored-by: Joe Haddad <timer150@gmail.com>
Co-authored-by: JJ Kasper <jj@jjsweb.site>
* Fixed pathname check in router
Remove the query portion of the URL when checking paths
* Updated change and added trial test
* Update test
Co-authored-by: JJ Kasper <jj@jjsweb.site>
* Fix dynamic route rename failing for case change
* Update normalizing curPageFiles
* Remove using webpacks file info since its inaccurate
* Revert changes in favor of fixing upstream
* Update to latest watchpack with case rename fix
This adds a `isFallback` property to detect if the page is being rendered in "fallback" mode or normal mode.
Accessed via the `useRouter()` hook.
---
Closes#10527
* Remove any type and fix edge cases
Removed the "as any" and use the @babel/types typeguards instead. This revealed some edge cases that would just error.
* Remove ts-ignore
Co-authored-by: Joe Haddad <timer150@gmail.com>
* Adjust SSG Loading Behavior
* Update expected preview behavior
* Rename two corrections
* Only use skeleton in production for now
* Fix "should SSR SPR page correctly" test
* fix tests
* fix trailing comment letter
* disable test for now
* checkpoint: api impl
* Add support for tryGetPreviewData
* snapshot: server(less) support
* Add X-Prerender-Bypass-Mode header support
* Pass preview data to getStaticProps call
* add TODO
* setPreviewData
* 100k iterations
* Handle jwt error
* Write out preview values
* forgot file
* set preview props
* Send preview props
* add preview props
* Pass around more data
* update yarn lock
* Fail on Invalid Prerender Manifest
* Make Missing Prerender Manifest Fatal
* fix ts errors
* fix test
* Fix setting cookies + maxage
* Secure is not needed as we encrypt necessary data
* Set on domain root
* Set cookie max ages
* Render a fallback on-demand for non-dynamic pages
* Test preview mode
* remove old build
* remove snapshots
* Add serverless tests
* use afterAll
* Remove object assigns
* fix cookie spread
* add comment
* Update next-server routes order for expected priority
* Update router to allow disabling page routes
* Fix headers having check: true behavior when they should not
Co-authored-by: Joe Haddad <timer150@gmail.com>
* 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
* Add support for rewriting to external resources
* Update rewrite proxying test
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
Co-authored-by: Joe Haddad <timer150@gmail.com>
* Fix#8655, skip rendering meta tags with undefined props
* Filter all tags, not just meta
* Only render defined props
* Remove filtering of undefined strings
Co-Authored-By: Tim Neutkens <tim@timneutkens.nl>
* Replace Object.entries
* Remove filtering code
* Simplify code
* Add test
* Add tests for undefined head prop value and tweak check
* Update to strip undefined prop values to match react
* Update head.js
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
Co-authored-by: Joe Haddad <timer150@gmail.com>
Co-authored-by: JJ Kasper <jj@jjsweb.site>
* Implement experimental pages/404.js for custom 404 page
* Make sure to show error for getInitialProps in pages/404 in dev mode also
* Update routes-manifest tests for new value
* Make sure page404 is boolean in routes-manifest
* Rename variables for consistency
* Make sure to only use 404 page for 404 error
* fix: 9919 no exported config found
* fix: 9919 remove isolated test, add integration
* fix: 9919 add check for successfull compilation and fix warnin check
* Add test for development output
* fix: 9919 add error page and link to it in warning
* Update empty-configuration.md
Co-authored-by: JJ Kasper <jj@jjsweb.site>
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
* Run resolve-url-loader after sass-loader
* Add regression test
* Update test to match
* Revert global.ts
* Make `preProcessors` readonly
Co-authored-by: Joe Haddad <timer150@gmail.com>
* Update actions config for canary jobs
* Update exiting for mising value and size limit test
* Update config
* Update check
* Update check
* Remove extra check
* Add support for unstable_getServerProps
* Apply suggestions from review
* Add no-cache header and update types
* Revert sharing of load-components type
* Add catchall test and update routes-manifest field
* Update header check
* Update to pass query for getServerProps data requests
* Update to not cache getServerProps requests
* Rename server side props identifier
* Update to nest props for getServerProps
* Add no-cache header in serverless-loader also
* Update to throw error for mixed SSG/serverProps earlier
* Add comment explaining params chosing in serverless-loader
* Update invalidKeysMsg to return a string and inline throwing
* Inline throwing mixed SSG/serverProps error
* Update setting cache header in serverless-loader
* Add separate getServerData method in router
* Update checkIsSSG -> isDataIdentifier
* Refactor router getData back to ternary
* Apply suggestions to build/index.ts
* drop return
* De-dupe extra escape regex
* Add param test
* Add initial config
* Comment out other action
* Update config
* Update config
* Update configs
* rename requires -> needs
* Update configs
* Update configs
* Enable headless mode
* Disable circleci while testing
* Disable build-test-deploy in circle
* Update build step
* Disable fail fast
* Update configs
* Add runs-on to publish steps
* bump
* Update config
* Update group count
* Update checkout path
* Update test all concurrency
* Handle EPIPE errors
* Revert "Handle EPIPE errors"
This reverts commit a993565bbdd77df136e07d54eb83ed32b18e5963.
* Update test to handle EPIPE in test
* Remove CircleCi config
* Revert "Update test to handle EPIPE in test"
This reverts commit c8cb72d5303b5fd165016f9eba6c8c888d8a1907.
* Update to use node 10 and see if EPIPE error is still present
* Revert "Revert "Update test to handle EPIPE in test""
This reverts commit efd2abe7c35c12bf78530064796d853c171efcf1.
* Revert "Update to use node 10 and see if EPIPE error is still present"
This reverts commit 893da4f31279228ebec6fa208c34ef179a6ebaf4.
* Add todo for node issue
* undo lint change as it should be correct
* Add dummy step to require
* Add runs-on for dummy job
* Add splitting by timings for Azure
* Add --timings flag for azure
* Update timings API
* Update timings var
* Fix test directory not being reset before re-trying
* Update to re-use CircleCI timing data
* Bump concurrency for Azure
* Remove extra logging
* Update timeout for create-next-app tests
Co-authored-by: Joe Haddad <timer150@gmail.com>
* Disable core-js on Next.js core files as it's not transforming anything important
* Move babel options to taskr plugin
* Disable transform-runtime for pages dir
* Disable correctly
* Disable corejs for core files
* Temporarily check if this fixes the error
* Use builtIns and exclude async-to-generator
* Update index.test.js
* Allow mismatch href and as when manually provided
* Swap warning and error and throw error in production also
* Add test for mismatch error in production
* Update to only show warning in development
* added option to changeState when onlyAHashChange
* added integration tests
* segregated tests because they caused other tests to fail
Co-authored-by: JJ Kasper <jj@jjsweb.site>
* Add failing hydration test
* Add importing of next/router to _app
* Fix type
* Update _app check for windows
* Remove babel fix
* Update to use webpack to require next/router
* Add warning when providing query values in exportPathMap for auto-export page
* Update test for SSG page also
* Update to error instead of warn
* Update warn -> Error and check exit code
* Support unnamed parameters in custom-routes correctly
* Update unnamed params checking to be strict
* Removed un-used regexKeys
* Update test routes
Co-authored-by: Joe Haddad <timer150@gmail.com>
* Add permanent field for redirects
* Update printing redirect status code
* Don't add permanent to routes-manifest
Co-authored-by: Joe Haddad <timer150@gmail.com>
* Add error when API resolves without the request being finished
* Update to only show warning in development instead
* Update packages/next/next-server/server/api-utils.ts
Co-authored-by: Joe Haddad <timer150@gmail.com>
* Update serving of files from public folder to handle special chars
* Update tests and match handling in dev mode
* Fix windows public file handling
* Remove colon test to make git on windows happy
* Remove un-used files
* Add missing await
* Enable New CSS Support by Default
* Adjust configs
* Fix invisible AMP body
* Fix AMP validation warning
* test fix
* Use expression that won't be eliminated by babel
* switches analytics relay test from dev to prod
* Update test/integration/relay-analytics/test/index.test.js
Co-Authored-By: Joe Haddad <joe.haddad@zeit.co>
Co-authored-by: Joe Haddad <timer150@gmail.com>
* Add assetPrefix when fetching script and style dependencies for granularChunks
* Lint
* Fix assetPrefix usage with granularChunks
* Add tests for granularChunks with assetPrefix
* Cleanup
* Use smaller name as it's not shortened
* Remove export as it's not used and it'll be shortened
* Update size
Co-authored-by: Joe Haddad <timer150@gmail.com>
* Use Cached SSG Data on History Navigation
* Add data caching test
* Create a static data cache
* Eliminate an if / return
* Do not cache in dev mode
* bump
* bump
* bump
* bump
Co-authored-by: JJ Kasper <jj@jjsweb.site>
* Expose CSS Issuer When Error
This introduces a friendlier error for invalid CSS imports by telling you the offending file.
---
Fixes#9847
* fix test matches
* Migrate from wd to selenium-webdriver
* Add chaining for next-webdriver
* Re-add browserStackLocal global for teardown
* Add additional element methods
* Use freshWindow helper for chrome
* Add selenium-server
* Add cross-env for windows compat
* Fix single quote windows
* Update production preload tests
* Update preload tests count
* Update CircleCi for testing other browsers
* Update CI configs
* Update config
* Add browser.url command
* Add more methods
* Update xcode version
* Make sure to add chromedriver to path
* Add forceExit flag
* Update config
* Update config
* Disable safari
* Fix bug in test
* Add teardown logging
* Update jest teardown
* Move testing ie11 to Azure
* Update job names
* Remove force exiting on long teardown
* Update Azure config
* Re-add safari testing with BrowserStack
* Update config
* Update prefetch tests for ie11
* Update prefetch for safari and ids for ie11 testing
* trigger prefetching manually in ie
* Optimize Prefetching
* fix css client nav test
* fix preload viewport test
* fix production test
* patch tests more
* Make page loader wait on prefetch
* no unhandled rejection
* Save some bytes
* Add check: true behavior to custom routes
* Update adding dev routes
* Add checking of pages and dynamic routes for check: true
* Fix hasPage binding
* Add tests for check: true behavior
* Update regex checking
* Make changes based on review
* Update to handle rewrites in serverless loader
* Update to not change req.url
* Make sure to always parse dynamic route params
* Export all of pathToRegexp from path-match
Co-authored-by: Joe Haddad <timer150@gmail.com>