Commit graph

927 commits

Author SHA1 Message Date
JJ Kasper
573fbff88a Add yarn check to tests (#9163)
* Add yarn check to tests

* Update yarn.lock

* Update lockfile some more

* Use resolutions to bump browserslist
2019-10-22 21:02:59 -04:00
Joe Haddad
ae3410c3f3
Upgrade Lockfile (#9158)
* Upgrade Lockfile

* Fix types version mismatch

* Upgrade amphtml-validator

* Revert "Upgrade amphtml-validator"

This reverts commit 05068b2ad9f2f53429cf514b47b4f7924b0b9623.

* Disable AMP Tests

* Skip 2x more AMP tests
2019-10-22 11:42:43 -04:00
Joe Haddad
94c2c084ad
Upgrade React dependencies (#9152)
* Upgrade React dependencies

* Disable data tests

* Increase allowed default sizes
2019-10-21 14:27:21 -04:00
JJ Kasper
ba07cc6237 Revert "Add hard retrying for Azure test runs (#8761)" (#8772)
This reverts commit 664cd3fa04.
2019-09-17 19:01:46 +02:00
JJ Kasper
664cd3fa04 Add hard retrying for Azure test runs (#8761)
* Test killing proceses before retrying on Azure

* catch error while killing process
2019-09-17 12:17:34 -04:00
JJ Kasper
204028d6ab Update build feedback with dots indicating activity (#8382)
* Add progress for analyzing and auto-prerendering

* Add typing for tty-aware-progress and use stdout

* Add fancier spinners

* Update spinner and add handling for logs while spinning

* Remove un-needed types package

* Remove progress and combine analyzing/prerendering messages
2019-09-16 17:37:00 +02:00
Azim Atefi
a0341ea150 Convert Readme Custom Error Pages To Functional Component (#8513)
* Convert Readme Custom Error Pages To Functional Component

* Update packages/next/README.md

Co-Authored-By: Tim Neutkens <tim@timneutkens.nl>

* Run readme through prettier
2019-09-16 14:30:50 +02:00
JJ Kasper
7b933f675a Optimize test setup (#8644)
* Tweak test set-up

* Update azure config

* Add cleaning test files and windows handling

* Limit windows test to one at a time

* Tweak test settings

* Update tests splitting

* remove custom concurrency for azure

* Test Azure var

* Update Azure config

* bump

* Simplify cleaning up
2019-09-10 13:11:55 -04:00
Jason Miller
8bd2e433de Initial optimizeLibraries experimental flag (#8345)
* Add experimental optimizeLibraries flag, currently prunes Moment.js locales

* expose moment for use in assertion

* try with the same setup as the production integration test

* Apply optimiztaions in dev and on server so they're consistent.

* fix build (oh dear)

* Update index.test.js

* Rename flag to future.excludeDefaultMomentLocales

* Adjust impl
2019-08-20 15:19:45 -04:00
Joe Haddad
5a8ed815fc
Define typeof window for application code only (#8355) 2019-08-13 22:02:53 -04:00
Houssein Djirdeh
d190f2e112 Adds user timing marks and measures for hydration/render (#8069)
* adds user timing marks for hydration step

* changes measure names and removes window namespaces by adding performance as a global to standard

* separates hydrate and render marks

* Add performance mark to router change instead of link click

* Changes performance mark name at router change

* adds checks for performance

* creates constants utils for performance and user timings
2019-08-09 15:43:29 -04:00
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
Anderson Leite
20fe65ce41 Implement tslint for core files (#5952)
Fixes #5845 

Implement tslint for core files

**What is this?**
Implements tslint for both next and next-server, but keeps standardjs/eslint for the .js files that are still there, we're gradually migrating to Typescript.

**How does it work?**
Before every commit (pre-commit) we execute the following `tslint` command:
`tslint -c tslint.json 'packages/**/*.ts`

**TSLint Rules**
In order to avoid as much changes as possible I marked some rules as false. This way we can improve the linter but making sure this step will not break things. (see tslint.json)

**Note**
After merging this PR, you'll need to update your dependencies since it adds tslint to package.json
2018-12-31 14:44:27 +01:00
Tim Neutkens
9c4eefcdbf
Add prettier for examples directory (#5909)
* Add prettier for examples directory

* Fix files

* Fix linting

* Add prettier script in case it has to be ran again
2018-12-17 17:34:32 +01:00
Kyle Holmberg
d58cecc92a Upgrade React from 16.4.2 to 16.6.3 (#5861)
* Upgrade React version

* Update size-limit test to account for React change
2018-12-11 22:10:55 +01:00
Tim Neutkens
6b7864e57e Fix linting 2018-12-10 22:05:53 +01:00
Tim Neutkens
8b6173917a
Convert next-server.js to typescript (#5844) 2018-12-09 22:46:45 +01:00
Tim Neutkens
dd556bf90b
Add tsc type checking (#5826)
* Add tsc type checking

* Add linting on circle

* Add node-fetch types

* Use strict mode
2018-12-05 21:45:50 +01:00
Tim Neutkens
29ed67b020
Add test for generateBuildId (#5816)
* Add docs for returning `null` from generateBuildId

* Add test for setting custom buildid

* Fix linting
2018-12-04 16:42:25 +01:00
Tim Neutkens
d11a3aa34e
Add tests for isomorphic-unfetch bundling issue (#5805)
* Add tests for isomorphic-unfetch bundling issue

* Remove unneeded extra option

* Remove isomorphic-fetch
2018-12-04 10:59:12 +01:00
Tim Neutkens
58f5dd297a
Add Typescript types for builds functions (#5791) 2018-12-03 14:18:52 +01:00
Tim Neutkens
15bb1c5e79
Use Typescript to transpile Next.js core files instead of Babel (#5747)
- Replaces taskr-babel with taskr-typescript for the `next` package
- Makes sure Node 8+ is used, no unneeded transpilation
- Compile Next.js client side files through babel the same way pages are
- Compile Next.js client side files to esmodules, not commonjs, so that tree shaking works.
- Move error-debug.js out of next-server as it's only used/require in development
- Drop ansi-html as dependency from next-server
- Make next/link esmodule (for tree-shaking)
- Make next/router esmodule (for tree-shaking)
- add typescript compilation to next-server
- Remove last remains of Flow
- Move hoist-non-react-statics to next, out of next-server
- Move htmlescape to next, out of next-server
- Remove runtime-corejs2 from next-server
2018-11-28 15:03:02 +01:00
Vagisha Nidhi
d43d305092 Test reports are not being published to Azure Pipelines (#5715)
This PR is related to the issue #5713 
The PR helps to publish test results for reporting in Azure Pipelines.

Azure Pipelines provides excellent reporting capabilities that can be leveraged by this PR.
An example report is shown in the image below.
![image](https://user-images.githubusercontent.com/13175100/48767951-e8a73580-ecdd-11e8-8e6a-20d7767d7c1b.png)
2018-11-22 10:12:12 +01:00
Tim Neutkens
c2eaf26ea9
Remove flow types (#5704)
* Remove flow-typed

* Remove flow types

* Remove the last types

* Bring back taskr dependency

* Revert "Bring back taskr dependency"

This reverts commit 38cb95d7274d63fe63c6ac3c95ca358a28c17895.

* Bring back preset-flow as it’s used for tests

* Revert "Revert "Bring back taskr dependency""

This reverts commit b4c933ef133f4039f544fb10bf31d5c95d3b27a2.
2018-11-21 16:04:37 +01:00
Adam Lane
c870d03aa0 update package dependencies for tests (#5676) 2018-11-20 15:54:28 +01:00
Tim Neutkens
9547e77820
use native http instead of micro (#5706) 2018-11-19 16:36:18 +01:00
Tim Neutkens
bdd6fba29a Remove yarn prefix in publish command 2018-11-04 03:34:46 +01:00
Tim Neutkens
e5fc980b04 Add publish-canary script 2018-11-03 19:51:01 +01:00
Radovan Šmitala
1aa965226e Add engines to package.json (#5585)
Based on this PR https://github.com/zeit/next.js/pull/5520 there should be `engines` definition in package.json as first warn.

Why i choose Node 8 as minimum? @timneutkens said (https://github.com/zeit/next.js/pull/5520/files#r228330327) that next.js should work on version 7.5 but automated tests in TravisCI are with versions 8 and 10. Version 7 was development branch. I think only production ready should be recommended.
2018-11-03 17:42:43 +01:00
Henrik Wenz
18488f47b0 Fix linter (#5350)
* Fix linter

* Add test env

* Fix lint errors
2018-10-20 17:00:01 +02:00
Henrik Wenz
95a6a872b6 Refactor test setup (#5391)
- [x] Move jest config from npm scripts to `jest.config.js`
- [x] Remove obsolete cross-env package (we don't need it anymore 🎉)
- [x] Fix bug where tests are not waiting for webdriver to be ready.
2018-10-12 15:32:17 +02:00
Henrik Wenz
d4785eb013 Fix coverage (#5435)
* removed nyc in favor of jest
* fixed coverage
2018-10-12 14:38:35 +02:00
Henrik Wenz
61fe50a493 Update husky & lint-staged (#5389)
* Update husky & lint-staged

* Move to pre-commit package

* Include bin files

* Remove husky
2018-10-10 11:58:44 +02:00
Henrik Wenz
ef01f13e5d Improve test setup (#5388)
* Update jest

* Let jest start chromedriver

This makes sure chromedriver always ends even if the test was canceled by the user.

* Properly close browser in production-config test

* Properly close browser in production/security test

* Properly close browser in export test

* Properly close browser in app-aspath test

* Remove taskr from project root

This isn’t needed anymore

* Readd taskr to project root (temporary)

* Improve global setup/teardown

* Properly close browser in basic/client-navigation test

Clicking an target=_blank link will open a second browser window. We can only close this by using broser.quit()
2018-10-07 15:04:43 +02:00
Tim Neutkens
51577eac1a Update contributing.md with the new way of running build 2018-10-06 07:32:50 +02:00
Tim Neutkens
b1c4f3aec4
Monorepo (#5341)
- Implements Lerna
- Moves all source code into `packages/next`
- Keeps integration tests in the root directory
2018-10-01 01:02:10 +02:00
Tim Neutkens
ae56c7847f 7.0.1 2018-09-29 13:00:49 +02:00
Tim Neutkens
c0945392f4
Upgrade webpack (#5330) 2018-09-29 12:43:55 +02:00
Tim Neutkens
7f9d244d1f 7.0.1-canary.6 2018-09-29 10:15:27 +02:00
Tim Neutkens
2f618581cf Remove disabled plugin 2018-09-29 07:53:08 +02:00
Tim Neutkens
6c0ea2d424 7.0.1-canary.5 2018-09-29 07:25:47 +02:00
Tim Neutkens
30924ea1be 7.0.1-canary.4 2018-09-28 21:37:37 +02:00
Tim Neutkens
0461413348
Don't require package.json at runtime (#5321)
* Remove obsolete check in dev-server

* Don’t require package.json at runtime

Inline the Next.js version at publish time, so that there’s no runtime dependency for this
2018-09-28 14:53:28 +02:00
Tim Neutkens
881e5426e5 7.0.1-canary.3 2018-09-28 14:07:08 +02:00
Tim Neutkens
20f3b6b284 7.0.1-canary.2 2018-09-27 17:46:42 +02:00
Tim Neutkens
4b18f00eee
Upgrade styled-jsx (#5312) 2018-09-27 17:42:20 +02:00
Tim Neutkens
944696e767 7.0.1-canary.1 2018-09-27 16:54:57 +02:00
Henrik Wenz
f0f8229009 Update with-mobx-state-tree-typescript example (#5266)
To work with babel7 & next7.
2018-09-27 16:39:11 +02:00
Henrik Wenz
28a2bb36d6 Fix swallowed unhandled rejections on the server (#5273)
An upstream bug in webpack-dev-middleware caused unhandled rejections to be swallowed.
2018-09-26 02:12:00 +02:00
Tim Neutkens
db216e0086
Even more reliable error-recovery tests (#5284) 2018-09-26 01:04:15 +02:00
Tim Neutkens
bb06f50747 7.0.1-canary.0 2018-09-25 15:28:51 +02:00
Tim Neutkens
42736c061a
Introduce dynamic(() => import()) (#5249)
* Add failing tests

* Upgrade wd module

* Pass dynamic import webpack ids to the client side

* Pass through webpack ids to initalializer and only use those

* Compile dynamic(import()) to dynamic(() => import())

* Default dynamicIds

* Use forked hard-source-plugin

* Possibly fix test

* Make tests fail less intermittently

* Temporarily disable hard-source in production

* Make sure dynamic import chunks are unique

* Disable hard-source

* Log html if error is thrown

* Fix test
2018-09-25 15:27:09 +02:00
Tim Neutkens
3a059688a8 7.0.0 2018-09-19 18:17:06 +02:00
Tim Neutkens
200ba0de4e 7.0.0-canary.20 2018-09-17 15:59:34 +02:00
Tim Neutkens
14c07f059e 7.0.0-canary.19 2018-09-17 13:48:52 +02:00
Tim Neutkens
35c2103e57 7.0.0-canary.18 2018-09-16 18:11:03 +02:00
Tim Neutkens
d3f57fb215 7.0.0-canary.17 2018-09-16 17:03:34 +02:00
Tim Neutkens
b475e619b9
Implement hard-source-webpack-plugin (#5181)
Follow-up of #5176

Closes #5173 as it led to inconsistencies in DX.
2018-09-16 17:02:32 +02:00
Tim Neutkens
459c1c13d0
Improvements to on-demand-entries (#5176)
First wave of changes. Just landing this first so that there is a base to build on.
2018-09-16 16:06:02 +02:00
René Keller
864ea5d0a1 Remove reference to ./css.js from npm files list (#5179)
./css.js has been removed with [e093441](e093441bad (diff-b9cfc7f2cdf78a7f4b91a753d10865a2))
2018-09-16 13:20:28 +02:00
Tim Neutkens
12c0c9fd40 7.0.0-canary.16 2018-09-11 20:05:36 +02:00
Tim Neutkens
b5003ffb8b 7.0.0-canary.15 2018-09-09 22:34:48 +02:00
Tim Neutkens
d21603707e
Set cwd on babel-loader (#5127)
Fixes #5125

I'm not sure if this is a bug in babel-loader / babel-core or not. But this will at least temporary fix it till I hear back from @loganfsmyth 🙏
2018-09-09 01:10:47 +02:00
Tim Neutkens
fd67f22b65 7.0.0-canary.14 2018-09-07 14:43:44 +02:00
Evan Jacobs
7c0de2c397 update hoist-non-react-statics (#5117)
you folks should really use semver ranges, but since greenkeeper
is no longer running for this branch things have fallen behind

in particular, there seems to be an incompatibility with multiple
v2.x versions of this package in the same bundle as displayed here:

styled-components/styled-components#1972

When I force resolution to a particular h-n-r-s version, the issue
goes away. This is true for both next 6 and next 7 canary.
2018-09-07 12:11:25 +02:00
Tim Neutkens
48c48975c4 7.0.0-canary.13 2018-09-06 09:59:55 +02:00
Tim Neutkens
e7c41690b4 7.0.0-canary.12 2018-09-04 17:30:33 +02:00
Tim Neutkens
52a4dfc8a5 7.0.0-canary.11 2018-09-03 21:04:06 +02:00
Tim Neutkens
1cdc25ff79
Use terser for minification (#5083)
Fixes #5021
2018-09-03 20:59:11 +02:00
Tim Neutkens
b97fc82aa1
Use preset-react's development option + enable modules transform in test env (#5081)
## Minor changes

When `NODE_ENV=test` is used we'll now apply the `'auto'` configuration for modules transformation. Which causes Babel to check if the current environment needs to be transformed or not. In practice this means that the following `.babelrc` is not needed anymore:

**OLD**:

```json
{
  "env": {
    "development": {
      "presets": ["next/babel"]
    },
    "production": {
      "presets": ["next/babel"]
    },
    "test": {
      "presets": [["next/babel", { "preset-env": { "modules": "commonjs" } }]]
    }
  }
}
```

**NEW**:

```
{
  "presets": ["next/babel"]
}
```

## Patches

`@babel/preset-react` has a `development` option that automatically applies a development-time plugin we manually applied before (`@babel/plugin-transform-react-jsx-source`). It also adds another development-time plugin that is said to make debugging/errors clearer: `@babel/plugin-transform-react-jsx-self` which we didn't apply before. Overall this means we can take advantage of preset-react to provide these plugins.
2018-09-03 16:41:52 +02:00
Tim Neutkens
6b9b7d44aa 7.0.0-canary.10 2018-09-03 12:10:36 +02:00
Tim Neutkens
cdf44c4f91 7.0.0-canary.9 2018-09-02 19:18:46 +02:00
Tim Neutkens
ff35d2e747 7.0.0-canary.8 2018-09-01 13:01:04 +02:00
Tim Neutkens
3b35e5be14
Upgrade to styled-jsx@canary (#5067)
This fixes an issue with styles jumping around when using `transition: all`
2018-08-31 21:10:20 +02:00
Popuguy
4ef3788613 Update dependencies in package.json (#5066)
Babel loader v8 now for babel v7
other update fix bugs and performance improvements
2018-08-31 10:42:11 +02:00
Tim Neutkens
4247a13ff1 7.0.0-canary.7 2018-08-30 15:11:11 +02:00
Tim Neutkens
3ede818252 7.0.0-canary.6 2018-08-30 14:07:05 +02:00
Tim Neutkens
e1c544cd75
Fix loading... issue (#5058)
This fixes intermittent `loading...` on some requests which surfaced on zeit.co when upgrading
2018-08-30 14:02:18 +02:00
Tim Neutkens
99c509e449 7.0.0-canary.5 2018-08-28 18:02:29 +02:00
Tim Neutkens
d0df0e497b 7.0.0-canary.4 2018-08-28 12:46:21 +02:00
Tim Neutkens
4c891a7e8a
Upgrade to Babel 7 stable (#5042) (major)
🎉 https://twitter.com/left_pad/status/1034204330352500736
2018-08-28 12:44:15 +02:00
Tim Neutkens
e0c74948d0 7.0.0-canary.3 2018-08-25 20:41:36 +02:00
Michael Fix
9532cc1256 Remove old UNSAFE_ lifecycle methods (#5020)
~I am not sure if this is a valid fix yet, but I was going to let CI run the tests for me. I'll close and look into it if the build fails.~

Let me know if this will cause issues, but I don't think it should. The React docs recommends moving `componentWillMount` logic into the constructor
2018-08-25 17:26:11 +02:00
Tim Neutkens
1babde1026 7.0.0-canary.2 2018-08-24 16:47:33 +02:00
HaNdTriX
11816537c3 Open editor from error-overlay (minor) (#4979)
This PR adds links to the [react-error-overlay](https://www.npmjs.com/package/react-error-overlay).
This allows a developer to open a stack trace in its own editor.

![codelinking](https://user-images.githubusercontent.com/1265681/44278860-a63e0a80-a24f-11e8-9c69-c5365c026c58.gif)

Closes #4813
2018-08-24 16:30:41 +02:00
Tim Neutkens
d3f8de3306 7.0.0-canary.1 2018-08-24 10:31:24 +02:00
HaNdTriX
bb13e941e5
Fix polyfills (#5013) 2018-08-24 01:57:04 +02:00
Tim Neutkens
918e0a6e32
Replace uuid with nanoid (#4987)
* Replace uuid with nanoid

Same functionality in a smaller package:

https://bundlephobia.com/result?p=nanoid@1.2.1
https://bundlephobia.com/result?p=uuid@3.3.2

* Add comment
2018-08-23 17:02:47 +02:00
HaNdTriX
24386b93dc Remove babel-plugin-transform-remove-strict-mode (#5003)
This plugin wasn’t in use anyway.

Related: https://github.com/zeit/next.js/pull/414

Maybe we can remove the [`"strict_mode"`](https://github.com/zeit/next.js/search?q=%27use+strict%27&type=Code) statements as well.
2018-08-22 08:32:57 +02:00
HaNdTriX
eb00bc23e5 Remove babel-plugin-istanbul (#5004)
This plugin is not in use.

https://github.com/zeit/next.js/search?q=istanbul&unscoped_q=istanbul
2018-08-22 08:31:49 +02:00
HaNdTriX
5ff7c0742c Lint examples (#4985)
* Lint examples/with-apollo-and-redux-saga

* Lint examples/with-apollo-auth

* Lint examples/with-apollo

* Lint exampels/with-google-analytics

* Lint examples/with-higher-order-component

* Lint examples/with-react-i18next

* Lint exampels/with-redux

* Lint exampels/with-relay-modern

* Lint examples/with-universal-configuration-runtime

* Add **/examples/**/lib/** to linter
2018-08-20 08:31:24 +02:00
Tim Neutkens
b9533c318d 7.0.0-canary.0 2018-08-15 16:45:42 -07:00
Giuseppe
9ae27b20b4 upgrade styled-jsx to v3 (#4936)
Upgrade styled-jsx to v3 (major)
2018-08-15 12:44:01 -07:00
Tim Neutkens
1fe1f7fc49
Implement autodllplugin (#4951)
* Implement autodllplugin

* Add flow-typed for autodll-webpack-plugin
2018-08-13 15:09:05 -07:00
Alexander Kachkaev
9319c158a5 Upgrade Babel to 7.0.0-rc.1 (major) (#4937)
Fixes #4691
Fixes #4614

This PR gives path to https://github.com/zeit/next-plugins/pull/242

I did not add or remove `^` near dependency versions in package.json files. However, I don't exclude that some changes can be made given that rc is more stable than beta.
2018-08-13 10:34:08 -07:00
Tim Neutkens
3eda0c09cd 6.1.1-canary.5 2018-08-10 09:38:05 -07:00
Tim Neutkens
2e62b87fff
Make wasm files load on ssr (#4942)
* Make wasm files load on ssr

* Upgrade React for tests
2018-08-10 09:37:27 -07:00
Tim Neutkens
80fdfec088
Fix decorator warnings (#4910) 2018-08-06 20:47:27 -07:00
Tim Neutkens
b20b80adf0
Run rename-unsafe-lifecycles as preparation for React 17 (#4907)
https://github.com/reactjs/react-codemod#rename-unsafe-lifecycles
2018-08-06 20:23:28 -07:00
Tim Neutkens
59c7d42d36 6.1.1-canary.4 2018-07-31 21:24:46 +02:00
Tim Neutkens
b65d2dff30 6.1.1-canary.3 2018-07-30 21:35:19 +02:00