Commit graph

3248 commits

Author SHA1 Message Date
Yeoh Joer
9c2f690c0a Fix typo by replacing compatability with compatibility (#6831) 2019-03-29 09:53:00 +01:00
Luis Fernando Alvarez D
a750d1cc42
NODE_ENV is set to undefined before running a test command (#6823) 2019-03-28 17:05:18 -05:00
Danil Shashkov
2f325e0f69 Add example with astroturf (Zero runtime CSS-in-JS) (#6821)
* Add example with astroturf (Zero runtime CSS-in-JS)
2019-03-28 15:41:05 -05:00
Luis Fernando Alvarez D
51b15417f8 The custom build test now runs in production mode (#6818)
I also removed the copy it had of `runNextCommand`
2019-03-28 20:13:27 +01:00
Corbin Crutchley
0f2bd19216 with apollo and redux example: Update deps and fix build (#6733)
* with apollo and redux example: Update deps and fix build

* Fix linting errors
2019-03-27 16:02:05 -05:00
Corbin Crutchley
1d66da15a1 with apollo and redux saga example: Update deps (#6734)
* with apollo and redux saga example: Update deps

* Fix linting problems
2019-03-27 16:00:57 -05:00
Corbin Crutchley
e03266008c form handler example: Update deps and fix build from dep update (#6732)
* form handler example: Update deps and fix build from dep update

* Ran lint error fixers

* Fixes errors that occur when commit occurs

* Commit linter fixes
2019-03-27 16:12:45 -04:00
Joe Haddad
4fd794e8ae
v8.0.4-canary.26 2019-03-27 15:22:03 -04:00
Joe Haddad
b871e43601
Add a leading slash to passed pages (#6808) 2019-03-27 15:21:30 -04:00
Alexander Nanberg
20768ff372 Upgrade unfetch to v4.1.0 (#6807)
`unfetch` ^4.0.0 is already used by `isomorphic-unfetch` so this simplifies the dependency tree a tiny bit.

Release notes
https://github.com/developit/unfetch/releases/tag/4.0.0
https://github.com/developit/unfetch/releases/tag/4.1.0
2019-03-27 19:56:46 +01:00
Jason Miller
1b4b9a34ad Add a viewport meta tag by default (#6754)
* Add default viewport meta tag (fixes #6698)

* Do not inject default viewport when rendering an AMP document

* Remove redundant viewport on error page

* Plumb withSideEffect() to pass through props, then use that for isAmp.

* Add tests for viewport meta tag.

* Fix linting

* Update dedupes test
2019-03-27 11:46:44 -05:00
Joe Haddad
2efad5a2d8
v8.0.4-canary.25 2019-03-27 12:02:26 -04:00
Joe Haddad
b835e2589d
Specified page builds (#6796)
* [wip] individual page builds

* Make flag experimental and remove from main bin

* Do not split chunks when using shared runtime
2019-03-27 11:51:05 -04:00
Václav Nosek
02966afd5a [with-sentry] example: Make 'utils/sentry.js' more flexible (#6769)
* Make `ctx` optional in `captureException` function

* Make 'release' optional when calling sentry util

* Fix code style
2019-03-27 13:23:34 +01:00
Chris Cowan
1888467696 Improve with-google-analytics example (#6787)
The with-google-analytics example had the "routeChangeComplete" event listener set up in components/Page.js, but that the event listener would only be set up if the user visited a page using that component. From the example, it's not clear if google analytics can be used without making every page use a component like components/Page.js. Someone following the example may make pages that don't use components/Page.js and fail to have page views reported, or feel compelled to force a shared component into their design unnecessarily, or might even make a mistake by making multiple different components like Page.js which each add a new "routeChangeComplete" event listener, causing page views to be over-reported when the user navigates between pages using the different components.

This PR moves the "routeChangeComplete" event listener into _app.js, where it's guaranteed to be executed for every page and is more obviously decoupled from page-layout-related components.

This PR also fixes a React warning about the lack of an onChange handler on an input tag, and removes the unnecessary implementation of `getInitialProps` in _document.js (the default implementation is inherited if not present, there's nothing this example needs to do with `getInitialProps` specifically, and the body of the method seems to have been based on an old version of next's internal implementation).

This PR also fixes the url being passed to google tag manager incorrectly. It looks like page_path should be used instead of page_location because the `url` value only has the path, not the full url with the domain name, etc. (https://developers.google.com/analytics/devguides/collection/gtagjs/pages)
2019-03-27 13:21:41 +01:00
Luis Fernando Alvarez D
da9472246c Remove prop-types import in the build (#6798)
Tests don't catch this change because `isProduction &&` is always false so I tested it with a local build
2019-03-27 12:26:01 +01:00
Tomáš Hapl
99362592b9 example with orbit-components (#6793) 2019-03-27 01:49:12 +01:00
Corbin Crutchley
9504a389c0 Update dependencies of various examples (#6731)
Minor changes to examples. Updating major semver updates with only `package.json` changes. 
I've done my best to make sure that these packages.json files all have `latest` for the `nextjs` package, `cross-env` for those with `server.js` files, etc.
I also added a `package.json` to `with-dynamic-app-layout` (it was missing one previously)

Made sure to test all of these packages post-upgrade to ensure maintained functionality
2019-03-27 01:42:49 +01:00
JJ Kasper
244b0e700e
Add AMP validation on export (#6794)
* Add err.sh link and pool validation results
to wait to show error until export is finished

* Fix wording in amp-export-validation err.sh

* Update validation error message

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

* Update ways to fix text

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

* Update why the error occurred wording

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

* Update wording some more

Co-Authored-By: ijjk <22380829+ijjk@users.noreply.github.com>
2019-03-26 16:21:27 -05:00
JJ Kasper
96c628409a
v8.0.4-canary.24 2019-03-26 11:31:48 -05:00
Joe Haddad
0249b331c2
Use a shared module cache (#6791)
* [WIP] Use a shared module cache

* ID modules in development

* Revert "ID modules in development"

This reverts commit 0613d92fa2c8c7fa11a5ff5b7770d784af1cec63.

* Remove context replacement

* Only enable shared runtime in prod

* Sort settings

* Add shared runtime experimental setting

* only enable shared runtime in serverless
2019-03-26 12:30:31 -04:00
Luis Fernando Alvarez D
dbd41725ce Removed the X-Powered-By header (#6789)
Related to #6776
2019-03-26 12:32:01 +01:00
Michele Salvini
affe356a90 Pass mapDispatchToProps as an object (#6786)
wrapping `startClock` in `bindActionsCreator` there's no need to pass `dispatch` in:
```
this.props.startClock(dispatch)
```
Furthermore `bindActionsCreator` is not needed because following already bind actions:
```
const mapDispatchToProps = {
  startClock
};
```
2019-03-26 12:28:18 +01:00
Joe Haddad
1604862895
v8.0.4-canary.23 2019-03-25 12:18:42 -04:00
Joe Haddad
8c175e5daa Replace buildId well known string during output (#6782)
* Replace buildId well known string during output

* Fix linting
2019-03-25 17:06:00 +01:00
Joe Haddad
480fb5652a
Add @lfades to CODEOWNERS 2019-03-25 10:59:27 -04:00
Tim Neutkens
7788849ad5 v8.0.4-canary.22 2019-03-25 15:09:01 +01:00
Tim Neutkens
907dd27a88
Make main.js override work correctly (#6781) 2019-03-25 15:08:02 +01:00
Tim Neutkens
24d8ec560f v8.0.4-canary.21 2019-03-25 13:01:14 +01:00
Kristian Heruc
82314137d0 Add X-Powered-By info to the docs (#6775) 2019-03-25 11:53:46 +01:00
Tim Neutkens
cf73809cb9
Revert "Add static-no-js site example (#6770)" (#6774)
This reverts commit 879da36888.
2019-03-25 09:08:41 +01:00
Giuseppe
879da36888 Add static-no-js site example (#6770) 2019-03-25 09:04:47 +01:00
Connor Davis
a79c004de0 Remove magic-string (#6772)
* Remove magic-string

* Add back input

* change if statement back

* Fix typo

* remomve useless import
2019-03-24 23:50:58 -04:00
Tim Neutkens
3e7b932b2b
ncc resolve and arg (#6771)
More modules to follow.
2019-03-24 23:38:03 +01:00
Tim Neutkens
fa5125488b v8.0.4-canary.20 2019-03-24 14:34:44 +01:00
Tim Neutkens
f639becf88
Don't use array for main chunk (#6767)
* Simplify getDisplayName

* Don’t use array for single file

* Add aliases, drop htmlescape as it’s not longer in the codebase

* Add correct path

* Use the correct router

* Remove dynamic for now

* Mark as external as the modules are directly called

* Add comment explaining what this does
2019-03-24 14:33:10 +01:00
Tim Neutkens
a8d08d3920
ncc nanoid (#6768) 2019-03-24 14:21:30 +01:00
Tim Neutkens
355078c350
Separate toRoute function (#6766)
Because Typescript output is turned to commonjs for these modules currently it’s better to do this. Also convert withRouter to typescript, making it smaller.
2019-03-23 23:00:46 +01:00
Tim Neutkens
eb28d4cdcf
Remove hoist-non-react-statics from with-router (#6765)
* Remove hoist-non-react-statics from with-router

* Drop hoist-non-react-statics from package.json
2019-03-23 21:31:44 +01:00
Tim Neutkens
cf7f707ff9
Remove PropTypes from _error and next/dynamic (#6763)
* Remove proptypes

* Remove loadable capture in favor of React.createContext

* Add loadable context file

* Make sure we use the context value instead
2019-03-23 21:00:31 +01:00
JJ Kasper
e95030b582
Update to have default value for renderToHTML (#6755)
* Update to have default value for renderToHTML
options in dev mode

* Update test
2019-03-23 11:20:54 -05:00
Tim Neutkens
6716bcbf87
Remove error-debug.js checks as the chunk is removed (#6761)
This code is obsolete as the chunk was removed.
2019-03-23 16:55:44 +01:00
Tim Neutkens
d24af62140
Make pages-manifest-plugin compatible with webpack 5 (#6760)
Apparently `entries` is removed in webpack 5, using `chunks` instead which holds the same result.
2019-03-23 15:33:13 +01:00
Tim Neutkens
08b7a24925
Update local testing doc to show our own workflow (#6753)
As per https://twitter.com/pierrevanmart/status/1109030783405248513
2019-03-22 16:27:29 +01:00
Joe Haddad
efdbd87625
v8.0.4-canary.19 2019-03-21 22:47:57 -04:00
JJ Kasper
397674c40e Fix export not checking amp right for /index.amp (#6748)
* Fix export not checking amp right for /index.amp

* Add test checking hybrid amp index behavior
2019-03-21 21:40:42 -04:00
Joe Haddad
34be001749
v8.0.4-canary.18 2019-03-20 16:06:57 -04:00
JJ Kasper
5a48272af0 Fix amphtml href with nested amp page (#6741)
* Add more export tests for AMP

* Make sure ampPath is correct when nested

* Remove console.log
2019-03-20 15:22:08 -04:00
JJ Kasper
19f39511f4
v8.0.4-canary.17 2019-03-20 13:24:02 -05:00
JJ Kasper
20e4a5049e
Add more export tests for AMP (#6740)
* Add more export tests for AMP

* Remove console.log

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

* remove extra line

Co-Authored-By: ijjk <22380829+ijjk@users.noreply.github.com>
2019-03-20 13:17:04 -05:00