Commit graph

816 commits

Author SHA1 Message Date
Joe Haddad
b31c296730
Experimental: Serverless Trace target (#8246)
* 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: JJ 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: JJ Kasper <jj@jjsweb.site>
2019-08-05 18:26:20 -04:00
Luis Fernando Alvarez D
485dd9ea53 Make Azure CI (sometimes) work (#8230) 2019-08-03 16:44:05 -04:00
JJ Kasper
22aee7f246
tests(circleci): Update chromedriver to latest (#8192) 2019-07-31 16:07:14 -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
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
Luis Fernando Alvarez D
6f9387f6cf Add declaration files to the contributing guide (#7885) 2019-07-10 20:59:53 -04:00
Joe Haddad
70b8bed4ad
Add a dev2 command 2019-07-10 10:45:38 -04:00
JJ Kasper
5f40306575 Remove coveralls (#7689) 2019-06-28 09:09:27 -04:00
Tim Neutkens
7e7f2c0a6d
Simplify a few parts of the codebase (#7506)
* Move client-side dev JS to dev folder

* Move eventsource polyfill

* Move source-map-support

* Move error boundary

* Deprecate Container in _app

* Make initialRender check better

* Remove unused code

* Only support one subscription as there is only one

* Don’t spread object

* Shorten property name

* Add container in development too

* Simplify query update logic
2019-06-05 20:15:42 +02:00
JJ Kasper
875b205b57 Upgrade to latest typescript (#7477) 2019-05-31 04:36:59 -07:00
Joe Haddad
b3170d2648
Format missed files (#7464)
* Format missed files

* Remove unnecessary rule

* Fix type error
2019-05-29 18:19:32 -07:00
JJ Kasper
598cce8711 Don't run standard for tsx files in husky to match lint-fix (#7463)
* Don't run standard for tsx files in husky to
match lint-fix

* Apply suggestions from code review

Co-Authored-By: Joe Haddad <timer150@gmail.com>
2019-05-29 17:53:35 -07:00
Tim Neutkens
c8a4682d4a
Remove react-ssr-prepass as it’s only needed for experimental feature (#7455)
* Remove react-ssr-prepass as it’s only needed for experimental feature

* Add react-ssr-prepass to devdeps
2019-05-29 15:19:21 +02:00
Tim Neutkens
3e51ddb8af
Move syntax formatting to prettier (#7454)
* 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
2019-05-29 13:57:26 +02:00
Joe Haddad
c7276bcbef
Run lint-fix 2019-05-28 16:06:13 -07:00
JJ Kasper
091a81e659
Revert fs-extra upgrade due to issue in latest version with jest (#7414)
* Remove async from describe callback
2019-05-23 11:53:28 -05:00
Joe Haddad
f9f80dffe5
Upgrade dependencies (#7412)
* ⬆️ Upgrade workspace dependencies

* Run new prettier against examples

* Upgrade some next-server packages

* Upgrade Next.js dependencies

* Upgrade webpack deps

* Upgrade async sema

* Fix compilation

* Revert broken plugin
2019-05-23 00:52:36 -07:00
terry chay
c0e4b56fdb Update to latest webpack-bundle-analyzer (#7389) 2019-05-21 19:12:25 -05:00
Lukáš Huvar
fedfbd9d5c Experimental API support (#7296)
* First basic API support

* Change require functionality

* Change 501 to 404

* Change wording

* Fix test
2019-05-11 13:18:56 +02:00
JJ Kasper
0eab07b7e8
Add automatic TypeScript setup (#7125)
* replace fkill with tree-kill
2019-05-08 21:51:23 -05:00
JJ Kasper
cd4e2a2214 Update to latest version of browserstack-local (#7236) 2019-05-06 15:16:21 +02:00
Joe Haddad
13f6804503
Don't resolve ts|tsx for non-TypeScript users (#7173)
* Don't resolve ts|tsx for non-TypeScript users

* Add missing prettier file

* Add tsconfig.json file
2019-04-27 01:12:40 +09:00
JJ Kasper
c0ee49b4fb
Move type generating (#7147)
* Move types to run on prepublish in each package

* Update circleci to list dist
2019-04-24 15:43:04 -05:00
Tim Neutkens
c9d599b698
Add .d.ts for next-server (#7133)
* Add .d.ts files

* Drop next declarations from index.d.ts

* Bring back number of errors

* Fix more errors

* Fix rewriteUrlForExport
2019-04-24 16:47:50 +02:00
Joe Haddad
510815a7ac
Add Flying Shuttle tests (#7000)
* Add Flying Shuttle tests

* Test second version of server

* Finish first version of tests

* Apply suggestions from code review

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

* Apply suggestions from code review

Co-Authored-By: Timer <timer150@gmail.com>
2019-04-10 17:08:19 -04:00
Justin Chase
52dd42a6bb Do not clear the console (#6758)
* Do not clear the console

Its rude to clear the console, you may be sharing output with other processes even in tty mode.

* Remove unused dependency

* Dedupe and cleanup dev output without clearing

* use logError

* Remove exit handler

* Add next helper

* Add log helpers

* Switch store to log helpers and a shallow object compare

* Update other files to use new logging utility

* request => build

* Update ready on messages

* Use case insensitive matching
2019-04-09 11:52:03 -04:00
Tim Neutkens
84bb620bef
Temporarily only do one pass (#6900)
* Temporarily only do one pass

* Add types
2019-04-05 12:32:00 +02:00
Tim Neutkens
b1fdffec75
amp-bind data injection (#6840) 2019-04-02 16:09:34 +02:00
JJ Kasper
533018f7d0 Update tests for BrowserStack (#6810)
Update tests to setup webdriver stuff in `jest-environment` and re-use one browser session instead of spawning one for each webdriver call to prevent creating too many BrowserStack sessions.
2019-03-29 16:05:53 +01:00
JJ Kasper
7d0919a784 Break up basic test suite (#6730)
* Break out client-navigation and rendering
test from basic test

* Try with parallelism dialed back to 3

* Update jest-junit for more compatible timings in CircleCI

* Bump to test timings

* Use filepath for suitename in jest-junit

* Store reports as artifacts

* Try using classname for timings

* Bump

* Remove reports from artifacts
2019-03-20 11:01:32 +01:00
Joe Haddad
e906e4bd77
Adjust CircleCI flow (#6728)
* Format circleci config

* Tweak configuration into multiple steps

* Persist whole repo to workspace

* Attach workspace for tests

* Run tests in parallelism x4

* Test circleci parallelism

* parallel x6 times

* Save test timing

* Use env var instead

* run in ci mode

* test speed
2019-03-19 21:55:43 -04:00
JJ Kasper
87bd1c3b09
Add error handling for error being thrown in _app getinitialProps (#6680)
* Fix handling of undefined being thrown
in getInitialProps and update integration test

* Update test

* Move test to app-document
2019-03-17 11:43:03 -05:00
JJ Kasper
1e4372c627
Show a better error when someone throws undefined (#6646)
* Show a better error when someone throws undefined

* Update error wording

Co-Authored-By: ijjk <22380829+ijjk@users.noreply.github.com>

* Update error wording in test

Co-Authored-By: ijjk <22380829+ijjk@users.noreply.github.com>

* Update test and add check for statusCode
before updating error
2019-03-13 13:39:05 -05:00
JJ Kasper
a3356c5edb Try restarting chromedriver on timeout (#6566)
Also added `HEADLESS` env var for local testing
2019-03-08 10:23:57 +01:00
JJ Kasper
491f9a2c49 Move next-mdx from zeit/next-plugins to zeit/next.js (#6443)
At request of @timneutkens I moved the `next-mdx` plugin from the next-plugins repo into Next.js. Also fixed small typo in README under setup.
2019-03-04 18:02:45 +01:00
Connor Davis
7dc50f3867
Remove cross-spawn (#6450) 2019-02-26 14:57:32 -06:00
Connor Davis
61de215e04
Move webpack config to TypeScript (#6348) 2019-02-20 13:24:02 -06:00
Connor Davis
fcf1167cd4 Upgrade standard and fix files (#6358)
Upgrades `standard` to major version 12
2019-02-19 22:45:07 +01:00
JJ Kasper
bf69357f27 Remove onDemandEntries WebSocket server in favor of EventSource connection (#6354)
After talking with @timneutkens it was decided it'd be more streamlined to replace the onDemandEntries WebSocket with an alternative. Using the EventSource connection gives us these benefits over the WebSocket one:

- less code needed
- no extra server running
- no extra config for onDemandEntries
2019-02-19 21:58:47 +01:00
Tim Neutkens
4051ffcb01 [experimental] Rendering to AMP (#6218)
* Add initial AMP implementation

* Implement experimental feature flag

* Implement feedback from sbenz

* Add next/amp and `useAmp` hook

* Use /:path*/amp instead

* Add canonical

* Add amphtml tag

* Add ampEnabled for rel=“amphtml”

* Remove extra type
2019-02-14 10:22:57 -05:00
Joe Haddad
36946f9709
Remove lerna bootstrap (#6289) 2019-02-14 08:33:00 -05:00
Tim Neutkens
4fea345f5d Merge branch 'master' into canary
# Conflicts:
#	lerna.json
#	packages/next-server/package.json
#	packages/next/package.json
2019-02-13 07:19:58 +01:00
Connor Davis
e1056e32cf Add yarn check to test (#6257) 2019-02-11 23:26:42 +01:00
Tim Neutkens
a2bb542f39 Allow publishing the master branch using Lerna 2019-02-11 08:44:28 +01:00
Tim Neutkens
45f5663558
Bring in terser-webpack-plugin (#6231)
* Bring in terser-webpack-plugin

* Ignore terser from linting
2019-02-10 04:55:09 +01:00
Alexander Nanberg
cc0b3ef451 Remove extraneous benchmark dependency (#6222)
AFAIK this dependency isn't being used anywhere so it should be safe to remove it.
2019-02-07 21:50:35 +01:00
damian
ca39752bc6 Remove unnecessary check for files to be linted and combine ts & tsx lint staged command (#6145) 2019-01-26 22:44:44 +01:00
Tim Neutkens
adfdc79842
Move next/head to Typescript (#6131)
Solves a bunch of inconsistencies in handling React elements too.
2019-01-25 16:43:12 +01:00
Connor Davis
b20b371a41
Add release cli to prepublish 2019-01-21 09:24:39 -06:00
Tim Neutkens
bbc346869e
Remove Typescript helpers in favor of babel helpers (#6087)
There's still a few Typescript helpers in use, but regenerator is added by Babel after this change, as it was already in the bundle it'll drop bundle sizes by quite a bit, eg _app.js becomes half the size.
2019-01-18 22:00:15 +01:00