Commit graph

3467 commits

Author SHA1 Message Date
JJ Kasper
b21ebaa8e1
Don't re-use the same page file for error-recovery tests (#7144)
* Don't re-use the same page file for error-recovery tests

* bump

* bump
2019-04-24 13:19:26 -05:00
Joe Haddad
0c3018c6ce
A webpack bug is preventing us from hashing chunks (#7142) 2019-04-25 01:50:29 +09:00
Joe Haddad
0138ef090a
Remove old debugging logs (#7139) 2019-04-25 01:01:56 +09:00
Joe Haddad
ba0a28ff3f
v8.1.1-canary.6 2019-04-24 11:20:24 -04:00
Joe Haddad
477bdb9299
TypeScript preset should always be enabled (#7137)
The preset handles file toggling itself, and actually changes behavior between `.ts` and `.tsx`.
2019-04-25 00:10:27 +09:00
Martin Šťovíček
05e525443b Always use AllModulesIdentifiedPlugin after HashedModuleIdsPlugin (#7138)
Remove selectivePageBuilding check during build.

Fixes #7109
2019-04-25 00:09:39 +09:00
Tim Neutkens
8f8e7cfb1c v8.1.1-canary.5 2019-04-24 16:51:16 +02: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
Sebastian Benz
7a16379435 Upgrade amp-optimizer to 0.5.3 (#7134) 2019-04-24 08:46:16 -05:00
Tim Neutkens
09717e0456 v8.1.1-canary.4 2019-04-24 11:35:30 +02:00
Joe Haddad
8cd21a6368 Server file inclusive Flying Shuttle (#7128)
* Add Flying Shuttle plugin to server compilation

* Ignore build artifacts in flying shuttle manifest

* Add comments explaining what's going on

* Emit Shuttle manifest after both compilations
2019-04-24 11:04:36 +02:00
Connor Davis
3fa04620e7 Remove Deploy To Now buttons (#7126)
* Remove Deploy To Now buttons

* Remove remaining buttons
2019-04-24 10:53:58 +02:00
JJ Kasper
a320dc10f6 Add AMP label to AMP only pages in build tree (#7123) 2019-04-24 10:48:43 +02:00
Luis Fernando Alvarez D
68e41ed38f
Updated broken test in Windows (#7124) 2019-04-23 17:05:42 -05:00
Luis Fernando Alvarez D
254b23eb07
Add declaration files to /dist (#7118) 2019-04-23 16:12:33 -05:00
Tim Neutkens
498ec618cb v8.1.1-canary.3 2019-04-23 11:54:52 +02:00
Tim Neutkens
c79558328e
Add Typescript compilation (#7110) 2019-04-23 11:54:08 +02:00
chuck
78783477e0 More Specific Info on Script Loading Error (#7108)
* add url info on script loading error message

* Update packages/next/client/page-loader.js

shorten error message for smaller bundle size

Co-Authored-By: chuck0523 <chuckinthestar@gmail.com>
2019-04-23 11:29:52 +02:00
Tim Neutkens
4d8a9fd8bb v8.1.1-canary.2 2019-04-23 09:40:24 +02:00
Joe Haddad
2b7ca40622 Revert "Detect built ins in externals (#7083)" (#7107)
This reverts commit f8978cc29c.
2019-04-23 09:09:48 +02:00
Luis Fernando Alvarez D
08a6066681 Replace the typescript compiler with @babel/preset-typescript (#7016)
* Added babel typescript for the core files

* Add __NEXT_VERSION

* Added noop.js to the babel taskfile

* Only include dynamic-import-node for the bin task

* Added babel-plugin-dynamic-import-node

* Use loose option to prevent Object.defineProperty

* Enable loose in preset and enable compact mode

* Disable compact and loose to compare

* Re-enable compact and loose
2019-04-23 09:05:49 +02:00
Luis Fernando Alvarez D
db5b3dc8e3
Update types for with-router (#7106)
* Updated declarations for with-router
2019-04-22 17:32:10 -05:00
Rhys Arkins
baabfbd777 fix: add repository to next-server package.json (#7105) 2019-04-22 21:33:28 +02:00
Tim Neutkens
c0a10b9960
Wait for entry to resolve in production build (#7104)
* Wait for entry to resolve in production build

* Return promise
2019-04-22 20:57:02 +02:00
Jeremy Bolding
d2b0db811c Rewrote .circleci/config.yml to 2.1 schema (#7103) 2019-04-22 20:21:42 +02:00
Luis Fernando Alvarez D
29f71bfcba Add more TypeScript types (#7054)
* Moved server/lib/utils.js to Typescript

* moved _app.js to Typescript

* Moved _error.js to Typescript

* Added argument for custom props in _app and _error

* Moved _document.js to Typescript

* updated one test

* Updated types and added a validation for _document props

* Improved types

* Fixed some types

* Updated AppType

* Fixed some tests

* Added missing import

* Removed a not very useful type

* Fix missing type

* Move @types/styled-jsx

* Fix typescript errors
2019-04-22 19:55:03 +02:00
Pierre de la Martinière
be4026f48f Make next export respect experimental.exportTrailingSlash (#6752)
* Add --no-subfolders argument to next export

* Use experimental.exportTrailingSlash instead of a cli flag

* Add experimental.exportTrailingSlash documentation

* Add tests for export with experimental.exportTrailingSlash

* Remove docs

* Remove comment
2019-04-23 01:55:03 +09:00
Joe Haddad
87f60f56dd
v8.1.1-canary.1 2019-04-22 12:26:26 -04:00
Joe Haddad
597138f359
Cache Babel and AutoDll plugin in dirDir/cache (#7102)
* Cache Babel and AutoDll plugin in `dirDir/cache`

* Extract code
2019-04-23 01:16:42 +09:00
JJ Kasper
bc1e088b73 Make styles compatible in AMP mode (#7060)
* Make styles compatible in AMP mode

* bump

* Update to parse styles from fragment for
backwards compat in AMP mode

* Add test for AMP styles fragment support
2019-04-23 00:32:46 +09:00
JJ Kasper
80210bc31a Update removing AMP pages to not require during build (#7081)
* Update to use babel plugin with webpack plugin to
remove AMP client bundles since they are not used

* Remove acorn dependency since it isn't used
2019-04-22 06:25:17 +09:00
Tim Neutkens
bcf6918bc3 v8.1.1-canary.0 2019-04-21 23:22:30 +02:00
Joe Haddad
f5be84e4ff Upgrade Terser (#6981)
The new version of Terser seems to be significantly slower than the previous.  I wanted to see what our stats PR says.
2019-04-22 06:03:57 +09:00
JJ Kasper
a27c235260 Update to share HMR and ondemand SSE connection (#7084)
We also close the connection when the window is in the background and re-connect when it is brought to the foreground. This prevents us from using up too many connections.
2019-04-22 05:51:09 +09:00
Luis Fernando Alvarez D
08937807f6 Remove dynamic-import-node from the preset (#7096)
Related to [this spectrum post](https://spectrum.chat/next-js/general/next-8-minor-update-breaks-dynamic-import-in-jest-tests~1e7b58e7-e301-4ef9-9de4-eef6ed3639d4).

I'm not removing the `babel-plugin-dynamic-import-node` package as it's going to be used by #7016
2019-04-22 05:25:48 +09:00
Fredrik Höglund
54e45eb74d Export 404 even if undefined in exportPathMap (#6912)
This PR adds the `_error`-page as an `404.html`-export, even when it is not explicitly defined in a custom `exportPathMap`.

It also fixes two false negative tests related to this. Previously the tests were matching the fallback 404-page from the test-server, rather than the `404.html`-page from next, which was actually not being generated. The test server is also not set up to serve `/404.html` as `/404` which the tests now reflect.

**Caveat**

In its current state, this PR removes `/404.html` from the `defaultPathMap` passed to the custom `exportPathMap`-functions, since it instead adds it after that function is run. While it is possible that someone is relying on this to exist, it is to my knowledge undocumented and also unlikely to be used for anything but merging it into the custom pathMap.

Since this would now merge `undefined` which would result in it being added later on anyway, I deemed it safe, but would be happy to undo that part of the PR if necessary as it was only cleanup.

**Examples**

As a way to demonstrate what this PR does, this is how examples changed:

* `basic-export` - Behaviour is unchanged, still has a `404.html`
* `with-static-export` - Now has a `404.html`
2019-04-22 05:24:28 +09:00
JJ Kasper
d9a6f1ca77 Move react-ssr-prepass import inside of (#7095)
ampBindInitData check
2019-04-22 03:47:02 +09:00
Connor Davis
f8978cc29c Detect built ins in externals (#7083) 2019-04-20 10:44:39 +09:00
JJ Kasper
7f4147d424 Run optimizer after validating in dirty AMP mode (#7063) 2019-04-20 10:33:20 +09:00
Nathan Sculli
e3ddca4784 Update the recommendation section in examples/with-reasonml (#7089) 2019-04-19 15:28:28 -05:00
Nathan Sculli
44f7d1fbc4 Upgrade with-reasonml example to Reason React 0.7 and JSX 3 (#7078)
- Use the new [@react.component] decorator for all of the react
  components and bindings.
- Use the new react hook integrations for the counter component.
- Add a `npm run dev:reason` and `npm run dev:next` commands to make
  running the build processes in separate terminals easier.  I didn't
  update the README because I'm unsure if this is something that would
  be desired.
- upgrade to reason react 0.7.0
- upgrade to react and react-dom 16.8.6
- upgrade to bs-platform 5.0.3
- upgrade to @babel/core 7.4.3
2019-04-20 02:57:08 +09:00
Yuki Takemoto
8e5ef48822 Fix broken link (#7087) 2019-04-19 12:12:31 -05:00
Joe Haddad
35236690c0
Disable Terser loader when debugging (#7079) 2019-04-19 13:26:30 +09:00
Jonathan Pollak
90e455791e Update fela example (#7051)
* feat(fela-example): replace old API with new ones
2019-04-18 10:05:09 -05:00
Koen Punt
362d2b0603 with-apollo example: explicitly pass fetch to HttpLink (#7072)
instead of letter apollo rely on a global variable, we pass it explicitly to the HttpLink constructor.
2019-04-18 09:46:42 -05:00
JJ Kasper
b00501e632 Add test for /dashboard/index (#7065)
This adds a test to the custom-server suite to make sure we don't regress on this
2019-04-18 12:15:56 +09:00
Andy O'Brien
a7e89eea4d update dependency to fix with-next-page-transitions example (#7049) 2019-04-17 11:18:32 -05:00
Joe Haddad
5499652820 Update AMP example to AMP-first wording 2019-04-17 10:41:20 +09:00
Joe Haddad
3b6aeaae82
Update AMP example (#7056) 2019-04-17 10:34:33 +09:00
JJ Kasper
dbb849e90c
Remove un-needed config from example (#7055) 2019-04-17 10:23:32 +09:00