Commit graph

1017 commits

Author SHA1 Message Date
Joe Haddad
7eed8380f1 Comment out GIP in Custom <App> (#8055) 2019-07-22 09:54:26 -05:00
Joe Haddad
5a54e8715a
v9.0.3-canary.2 2019-07-19 16:52:53 -04:00
Joe Haddad
104d18c607
Rewrite Create Next App (#8030)
* Completely rewrite Create Next App

* Sort imports

* Show what package manager is being used

* Fix project name suggestion

* Update tests for new implementation

* Use normal prepublish command for on-install

* Upgrade Node version

* Switch to 8.16

* Disable v8 cache

* Swap out update check package and fix CLI boot
2019-07-19 15:55:30 -04:00
JJ Kasper
1cbb5958ec Fix syntax error in ie11 from next-server/amp (#8032) 2019-07-18 22:09:41 -04:00
Joe Haddad
2758060bfc
v9.0.3-canary.1 2019-07-17 23:43:17 -04:00
Joe Haddad
8fb32de0ab
Fix CNA README typo 2019-07-17 23:32:27 -04:00
Joe Haddad
bcd8eb6b78
Update CNA links to examples 2019-07-17 23:27:27 -04:00
Joe Haddad
d486152b98
Remove old media images 2019-07-17 23:23:40 -04:00
Joe Haddad
7f5f981800
Reference correct repository 2019-07-17 23:23:06 -04:00
Joe Haddad
a07f40a5ec
v9.0.3-canary.0 2019-07-17 23:09:09 -04:00
Joe Haddad
4eb8aba692
Add Create Next App package (#8018)
* Add Create Next App package

* Fix Create Next App tests

* Fix company name

* Update package.json
2019-07-17 16:53:56 -04:00
JJ Kasper
3c1355686a Handle windows backslashes when checking ssr-prepass (#8016) 2019-07-17 20:21:24 +02:00
Xinzi Zhou
9609fe453d Replace fs.exists with fs.access (#7742)
* Replace deprecated fs.exists with fs.access.

* Update packages/next/lib/file-exists.ts

Co-Authored-By: Joe Haddad <timer150@gmail.com>

* Update packages/next/lib/file-exists.ts

Co-Authored-By: Joe Haddad <timer150@gmail.com>
2019-07-16 23:01:21 -07:00
Lukáš Huvar
fce7e4eaee Avoid sending user errors to client (#8005)
* Avoid sending user error to client Closes #7526

* Small improvments

* Update sending errors
2019-07-16 17:35:13 -07:00
Luis Fernando Alvarez D
34a9cddfe1 Rework dynamic routing <Link> documentation (#8001) 2019-07-16 12:26:01 -07:00
Adam Wathan
0b496a45e8
Import isomorphic-unfetch in data fetching example (#7895)
Following this example confused me at first because it looked like it was using native fetch, and when that didn't work server-side I wasn't sure if that was my mistake or an issue with the docs.
2019-07-16 12:35:32 -04:00
Joe Haddad
becd07402e
v9.0.2 2019-07-16 11:50:20 -04:00
Joe Haddad
2a2ebfae74
v9.0.2-canary.1 2019-07-16 09:32:51 -04:00
Tim Neutkens
5030486a5d
Don’t add loadable if it’s not used (#7995) 2019-07-16 14:52:01 +02:00
Dmitry Vasilev
4347fa4d56 Add babel option to use styled-jsx/babel-test in the preset (#7747)
* Add babel option to use styled-jsx/babel-test in the preset

* Fix the types
2019-07-16 14:23:19 +02:00
Jack Tomaszewski
17773a6203 Correct info about export limitations (#7729)
* Correct info about export limitations

In `next export` `req` and `res` objects are present, but they are empty ( https://github.com/zeit/next.js/blob/master/packages/next/export/worker.js#L42-L43 ).

* Update README.md
2019-07-16 13:38:17 +02:00
Adam Misiorny
90280c864b Add support for 412 Precondition Failed status for static files (#7944)
* Add support for Precondition Failed status for static files

* Add test

* Trigger tests

* Update next-server.ts
2019-07-16 13:30:29 +02:00
JJ Kasper
e5e74dabdc Add warning for experimental config usage (#7985)
* Add warning for experimental config usage

* Update config.ts
2019-07-16 13:07:07 +02:00
Lukáš Huvar
718a36e127 Fix build for API routes conflict pages (#7992)
* Fixes #7991

* Fix tests
2019-07-16 12:59:09 +02:00
Joe Haddad
571eb9817a
v9.0.2-canary.0 2019-07-15 20:13:10 -04:00
JJ Kasper
a10b3dff33 Add default value for pageConfig for custom _error (#7984)
* Add default value for pageConfig for custom _error

* Add serverless mode for custom-error test
2019-07-15 17:06:16 -07:00
Joe Haddad
590a3adefe
Only copy public/ directory if enabled (#7988) 2019-07-15 16:33:20 -07:00
Lukáš Huvar
c6928dcfd8 Fix GIP type in /_error page (#7952) 2019-07-15 16:16:40 -07:00
Joe Haddad
60b4e678b0
Fix client-side hydration with dynamic routes (#7986)
* Add a test for the hash case

* Add a special hydration option to router

* Add additional tests wrt scrolling
2019-07-15 16:07:04 -07:00
JJ Kasper
86b6a4b6fe
Add handling for invalid page config (#7921) 2019-07-15 13:54:35 -07:00
Lukáš Huvar
be3eab2ad7 Example for API routes with middleware (#7958) 2019-07-15 17:39:16 +02:00
Natalie Marleny
e68a5a793a fix: Ensure ergonomic handling of non-page in ./pages/ (#7955)
* Update autoExport wording to automatic static optimization

* Add sufficiently informative error message

- Update other Next error message for consistency

* Implement feedback - add missing character

Co-Authored-By: Lukáš Huvar <lukas@huvar.cz>

* Fix TypeScript errors

* Update test from autoExport to automatic static optimization

- Also reflect new wording of error message for readability

* Add test for handle non-page in pages

- When target: severless
2019-07-15 17:16:35 +02:00
JJ Kasper
fad4ec3958 Don't externalize ssr-prepass if added by user (#7966) 2019-07-15 16:41:53 +02:00
Felix Mosheev
8c5e85d44c Check if dynamicOptions has the deprecated method property, (#7973)
* Check if dynamicOptions has the deprecated `method` property, closes #7972

* Update dynamic.tsx
2019-07-15 16:35:36 +02:00
JJ Kasper
4adef73ab8
Update link ref handling to clean up previous listeners (#7943) 2019-07-14 10:23:13 -07:00
JJ Kasper
10614e8465 Replace windows backslashes with forward (#7942)
slashes for better handling
2019-07-13 22:24:44 +02:00
Anthony Maki
002ddbe1b9 Checks if object is not empty instead of whether the reference (object) is truthy (#7911)
* Checks if object is not empty instead of whether the reference (object) is truthy

* Update publicRuntimeConfig check
2019-07-12 15:16:56 -07:00
not
a4355b0d0f Prevent blocking while hidden (#7930)
Allows clickthrough after indicator has been hidden.
2019-07-12 22:59:26 +02:00
Sudhir Mitharwal
9b7a2f5ab4 Update docs for AMP export behavior (#7940)
In versions prior to ^9, default export with AMP was to create a
`index.html` file for each page. This has changed in ^9.0 with intruduction of a new
configuration options `exportTrailingSlash`. Current docs for AMP
exports are not correct for this behaviour.

Fixes #7931
2019-07-12 12:53:06 -07:00
Joe Haddad
45f80409dc Remove duplicated client code (#7907) 2019-07-11 23:23:07 +02:00
Joe Haddad
47160fb0aa
v9.0.1 2019-07-11 16:31:30 -04:00
Joe Haddad
a7fbd308be
Adjust README to mention Link 2019-07-11 16:25:35 -04:00
Joe Haddad
bbe1e0f8a6
v9.0.1-canary.2 2019-07-11 14:53:10 -04:00
Luis Fernando Alvarez D
7b25e2995e Export types for link props (#7905)
* export LinkProps

* Add test
2019-07-11 14:52:21 -04:00
Luis Fernando Alvarez D
b94123ccc9 Improve exported router types (#7853)
* Added the RouteUrl type and improved router types

* Added more tests for router types

* Add build test for typescript types

* Add next-env.d.ts to the typescript test

* Removed next-env.d.ts

* Added next-env.d.ts to gitignore

* Remove route url re-exports

* renamed PublicRouterInstance to be NextRouter

* export the Url type

* Replaced BaseRouter with NextRouter in server/utils

* Don't export the Url type

* Update tsconfig.json
2019-07-11 13:35:39 -04:00
Joe Haddad
13cf664898
Add support for legacy server npm modules (#7898)
Notably, this PR fixes `faunadb` which relies on `formidable`.

n.b. `formidable` is an unmaintained legacy npm package that uses practices not compatible with the modern ecosystem.
2019-07-11 13:02:43 -04:00
Lukáš Huvar
2450c85e81 exportPathMap dynamic routes params fix (#7846)
* Fix dynamic page export fixes #7829

* Adding handling of unmatched path

* Remove logs

* Fix newline

* Tests

* Fix promise

* Fix amp tests

* Revert test

* Adjust error document

* Remove old argument

* Simplify export test

* Ensure page !== path for this check
2019-07-10 17:13:44 -04:00
JJ Kasper
41cb3b3bc0 Stop PageConfig plugin from running on non-pages (#7884)
* Add test for PageConfig

* Make sure PageConfig plugin is only run for pages
2019-07-10 15:27:11 -04:00
JJ Kasper
268ac93685 Fix placeholder values being added when exporting from serverless (#7883)
* Add testing serverless in dynamic routes suite

* Fix placeholder dynamic values being added
when exporting from serverless
2019-07-10 15:23:28 -04:00
Tim Neutkens
8122d82130 Handle empty directory (#7876)
* Add test for empty directory

* Fix test re-runs

* Handle empty `pages/` directory
2019-07-10 11:45:53 -04:00