1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00
Commit graph

573 commits

Author SHA1 Message Date
Tim Neutkens f9b52cfcb6 Include next/dist/pages instead of exclude (patch) (#3704)
* Move security related test cases into a its own file.

* Removes the unused renderScript function

* Add a nerv example. (#3573)

* Add a nerv example.

* Fix for indentation/style

* Fix for name

* Release 5.0.0

* Add multi-zones docs. (#3688)

* Include next/dist/pages

* Fix linting
2018-02-06 17:39:41 +05:30
Tim Neutkens ed122934af Add tests for universal webpack (#3680)
* Add tests for universal webpack

* Move tests to next-plugins

* Remove obsolete files

* Remove removed page

* Remove tests

* Rename test suite
2018-02-05 21:48:31 +05:30
Tim Neutkens cdbbe928b2 Add update notifier (#3678)
* Add update notifier

* Make update notifier work with custom server
2018-02-05 18:09:32 +05:30
Tim Neutkens 0da17ca4fc Upgrade source-map-support 2018-02-04 06:45:16 +01:00
Tim Neutkens c01de960f4
Upgrade react-hot-loader (#3665) 2018-02-03 00:14:40 +01:00
Arunoda Susiripala 4c7f6cc76a Set assetPrefix dynamically (#3661)
* Introduce the setAssetPrefix API for dynamic assetPrefix.

* Remove unwanted node_modules dir in a test dir.

* Change test main description.
2018-02-02 15:43:36 +01:00
Arunoda Susiripala abe6e3ea47 Use a latest version of path-to-regexp for path-match (#3655)
* Use the latest path-to-regexp for path-match.

* Fix the error route resolving.

* Give proper credit to path-match

* Remove an unwanted route.

* Revert "Remove an unwanted route."

This reverts commit 523c1687da8ddd499819e70df81567ec208e5998.

* Add a comment why we need to keep _error.js route.
2018-02-01 19:54:09 +01:00
Tim Neutkens 4305d526c0
Upgrade styled-jsx (#3657) 2018-02-01 17:07:59 +01:00
Arunoda Susiripala 4b143fc232 Make sure dynamic imports works on Windows (#3641)
* Make sure dynamic imports works on Windows

* Fix an issue with the load test firmware.

* Fix symlink creation on Unix
2018-01-31 08:35:10 +01:00
Tim Neutkens e093441bad Universal Webpack (#3578)
* Speed up next build

* Document webpack config

* Speed up next build

* Remove comment

* Add comment

* Clean up rules

* Add comments

* Run in parallel

* Push plugins seperately

* Create a new chunk for react

* Don’t uglify react since it’s already uglified. Move react to commons in development

* Use the minified version directly

* Re-add globpattern

* Move loaders into a separate variable

* Add comment linking to Dan’s explanation

* Remove dot

* Add universal webpack

* Initial dev support

* Fix linting

* Add changes from Arunoda's work

* Made next dev works.
But super slow and no HMR support.

* Fix client side hot reload

* Server side hmr

* Only in dev

* Add on-demand-entries client + hot-middleware

* Add .babelrc support

* Speed up on demand entries by running in parallel

* Serve static generated files

* Add missing config in dev

* Add sass support

* Add support for .map

* Add cssloader config and fix .jsx support

* Rename

* use same defaults as css-loader. Fix linting

* Add NoEmitErrorsPlugin

* Add clientBootstrap

* Use webpackhotmiddleware on the multi compiler

* alpha.3

* Use babel 16.2.x

* Fix reloading after error

* Remove comment

* Release 5.0.0-univeral-alpha.1

* Remove check for React 16

* Release 5.0.0-universal-alpha.2

* React hot loader v4

* Use our static file rendering machanism to serve pages.
This should work well since the file path for a page is predictable.

* Release 5.0.0-universal-alpha.3

* Remove optional loaders

* Release 5.0.0-universal-alpha.4

* Remove clientBootstrap

* Remove renderScript

* Make sure pages bundles are served correctly

* Remove unused import

* Revert to using the same code as canary

* Fix hot loader

* Release 5.0.0-universal-alpha.5

* Check if externals dir exist before applying config

* Add typescript support

* Add support for transpiling certain packages in node_modules

Thanks to @giuseppeg’s work in https://github.com/zeit/next.js/pull/3319

* Add BABEL_DISABLE_CACHE support

* Make sourcemaps in production opt-in

* Revert "Add support for transpiling certain packages in node_modules"

This reverts commit d4b1d9babfb4b9ed4f4b12d56d52dee233e862da.

In favor of a better api around this.

* Support typescript through next.config.js

* Remove comments

* Bring back commons.js calculation

* Remove unused dependencies

* Move base.config.js to webpack.js

* Make sure to only invalidate webpackDevMiddleware one after other.

* Allow babel-loder caching by default.

* Add comment about preact support

* Bring back buildir replace

* Remove obsolete plugin

* Remove build replace, speed up build

* Resolve page entries like pages/day/index.js to pages/day.js

* Add componentDidCatch back

* Compile to bundles

* Use config.distDir everywhere

* Make sure the file is an array

* Remove console.log

* Apply optimization to uglifyjs

* Add comment pointing to source

* Create entries the same way in dev and production

* Remove unused and broken pagesGlobPattern

* day/index.js is automatically turned into day.js at build time

* Remove poweredByHeader option

* Load pages with the correct path.

* Release 5.0.0-universal-alpha.6

* Make sure react-dom/server can be overwritten by module-alias

* Only add react-hot-loader babel plugin in dev

* Release 5.0.0-universal-alpha.7

* Revert tests

* Release 5.0.0-universal-alpha.10

* Make sure next/head is working properly.

* Add wepack alias for 'next' back.

* Make sure overriding className in next/head works

* Alias react too

* Add missing r

* Fragment fallback has to wrap the children

* Use min.js

* Remove css.js

* Remove wallaby.js

* Release 5.0.0-universal-alpha.11

* Resolve relative to workdir instead of next

* Make sure we touch the right file

* Resolve next modules

* Remove dotjsx removal plugins since we use webpack on the server

* Revert "Resolve relative to workdir instead of next"

This reverts commit a13f3e4ab565df9e2c9a3dfc8eb4009c0c2e02ed.

* Externalize any locally loaded module lives outside of app dir.

* Remove server aliases

* Check node_modules reliably

* Add symlink to next for tests

* Make sure dynamic imports work locally.
This is why we need it: b545b519b2/lib/MainTemplate.js (L68)
We need to have the finally clause in the above in __webpack_require__.
webpack output option strictModuleExceptionHandling does that.

* dynmaic -> dynamic

* Remove webpack-node-externals

* Make sure dynamic imports support SSR.

* Remove css support in favor of next-css

* Make sure we load path from `/` since it’s included in the path matching

* Catch when ensurepage couldn’t be fulfilled for `.js.map`

* Register require cache flusher for both client and server

* Add comment explaining this is to facilitate hot reloading

* Only load module when needed

* Remove unused modules

* Release 5.0.0-universal-alpha.12

* Only log the `found babel` message once

* Make sure ondemand entries working correctly.
Now we are just using a single instance of OnDemandEntryHandler.

* Better sourcemaps

* Release 5.0.0-universal-alpha.13

* Lock uglify version to 1.1.6

* Release 5.0.0-universal-alpha.14

* Fix a typo.

* Introduce multi-zones support for mircofrontends

* Add section on css
2018-01-30 16:44:44 +01:00
Tim Neutkens e451218900 Release 4.4.0-canary.3 2018-01-13 08:35:15 +01:00
Tim Neutkens 95fe683c58 Release 4.4.0-canary.2 2018-01-13 06:41:35 +01:00
Tim Neutkens 21f875f3ae Add comma removed by merge 2018-01-13 06:40:37 +01:00
Tim Neutkens 6befb1f889 Release 4.4.0-canary.1 2018-01-13 06:35:28 +01:00
Tim Neutkens bba744d3fa Merge branch 'master' into fix/canary 2018-01-13 06:33:19 +01:00
Arunoda Susiripala 44de0f15c9 Release 4.2.3 2018-01-13 10:41:49 +05:30
Arunoda Susiripala b89b05bc76 Release 4.2.2 2018-01-13 10:38:32 +05:30
Wiktor Tkaczyński 9d059f6007 Add support for Fragments in Head (#3502)
* Add support for Fragments in Head.

* Add test cases

* Check if Component has custom key

* Upgrade to React 16.2.0
2017-12-28 07:12:27 +05:30
Tim Neutkens c23046dc79
Rewrite combine-asset-plugin using correct event (#3486)
* Speed up next build

* Remove comment

* Add comment

* Add comments
2017-12-22 10:25:35 +01:00
Tyll Weiß 702dd5d3f4 Resolve the next.config.js up the tree to avoid it not being loaded when a source dir was specified via the CLI - solves #3379 (#3380) 2017-12-13 18:49:26 -08:00
Harri Hälikkä 1135075513 Update glob-promise to latest 3.3.0 (#3447)
v3.2.0 pulls in 20+ MB worth of devDeps of which some are
deprecated, and these are shown as warnings to the users
of Next.js. Dropping these devDeps is the only change
between 3.2.0 and 3.3.0 (see
https://github.com/ahmadnassri/glob-promise/releases)

Related glob-promise issue:

- https://github.com/ahmadnassri/glob-promise/pull/52
2017-12-13 01:46:37 -08:00
Tim Neutkens 2cbc53f6a1 Release 4.3.0-canary.1 2017-12-08 15:17:23 -08:00
Tim Neutkens 52ccc14059 Merge branch 'canary'
# Conflicts:
#	examples/with-markdown/readme.md
#	lib/page-loader.js
#	package.json
#	server/build/plugins/pages-plugin.js
2017-12-08 15:11:37 -08:00
Tim Neutkens 67643e255a Release 4.2.1 2017-12-08 14:58:21 -08:00
Ramin B 5a5b3b6702 Downgrade strip-ansi to support IE11/Google Fetch (#3403)
A few discussions:
https://github.com/zeit/next.js/issues/2747
https://github.com/zeit/next.js/issues/3126
# Conflicts:
#	package.json
2017-12-08 14:40:17 -08:00
Ramin B 2a6557d6cd Downgrade strip-ansi to support IE11/Google Fetch (#3403)
A few discussions:
https://github.com/zeit/next.js/issues/2747
https://github.com/zeit/next.js/issues/3126
2017-12-08 14:38:28 -08:00
Arunoda Susiripala 03507501cd Release 4.2.0 2017-12-04 15:30:14 -08:00
Giuseppe 5daafa4f87 Upgrade styled-jsx to v2.2.1 (#3358)
* Pulled encoding to top of head (#3214)

* Remove next.d.ts to use @types/next (#3297)

* Add with-mobx-state-tree example (#3179)

* Adapt with-mobx example for with-mobx-state-tree

* Remove unnecessary lastUpdate parameter to show off snapshot

* update readme

* make other.js more closely mimic index.js

* Upgrade styled-jsx to v2.2.1

Includes some bug fixes.

* Fix linting
2017-12-04 08:15:30 -08:00
Arunoda Susiripala f6bd1df6aa
Fix canary tests on CIs (travis, appveyor) (#3375)
* Dump address.

* Use zero as the port.

* Limit test cases.

* throw address.

* Fail a specific error.

* Set a port manually.

* Make sure jest is working properly.

* Set the jest timeout time to 5 min.

* Run the actual test

* Run all production tests on Travis.

* Set the Jest default timeout to 5 min for all integration tests.

* Remove production only testing.

* Remove unwanted console.log

* Remove the addition number from test case

* Set the static export test jest timeout to 5 min.

* Run tests again if they failed once.
2017-12-03 08:12:12 +05:30
Jess Telford 52bf00eda3 Update to uglifyjs-webpack-plugin@1.1.1 (#3329) 2017-11-23 22:25:09 +01:00
Tim Neutkens 03aae1f9fc Release 4.2.0-canary.1 2017-11-15 13:22:41 +01:00
Jess Telford 80a1603189 Use uglify-es for minification (#3150) 2017-11-13 12:19:51 +01:00
Tim Neutkens 18f8ab392a Merge branch 'master' into canary
# Conflicts:
#	examples/with-apollo/lib/initApollo.js
#	examples/with-apollo/package.json
#	examples/with-react-with-styles/package.json
#	examples/with-static-export/package.json
#	package.json
2017-11-05 11:01:59 +01:00
Bu Kinoshita 31ba48ada2 Upgrade styled-jsx to version 2.1.2 (#3231) 2017-11-04 15:04:26 +01:00
Kevin Decker 6e44cdef5f Expose mechanism to monitor render events (#2655)
* Allow custom clientBootstrap entrypoint

This allows for customization of the client global bootstrap.

* Expose render event emitter to client

* Include client entry point in npm package
2017-10-30 16:01:40 +01:00
Tim Neutkens c927c4f1ce Release 4.1.4 2017-10-29 01:00:16 +02:00
Tim Neutkens 436a2ac73b Release 4.1.4-canary.2 2017-10-29 00:58:17 +02:00
Tim Neutkens cd7bfe890d Release 4.1.4-canary.1 2017-10-29 00:58:17 +02:00
Tim Neutkens 2ec397b356 Release 4.1.4-canary.2 2017-10-23 22:15:26 +02:00
Tim Neutkens fe2924c5f4 Release 4.1.4-canary.1 2017-10-23 21:36:17 +02:00
Tim Neutkens 9805231cf9 Release 4.1.3 2017-10-22 11:16:35 +02:00
Tim Neutkens a2a83236f0 Release 4.1.2 2017-10-20 08:06:38 +02:00
Tim Neutkens 586b871a43 Release 4.1.1 2017-10-19 22:18:52 +02:00
Tim Neutkens 43b5626ec6 Use strict version of react-hot-loader (#3112) 2017-10-16 21:51:12 +02:00
Arunoda Susiripala ec3486a702 Release 4.1.0 2017-10-16 10:37:42 +05:30
Tim Neutkens 443b1d1260 Release 4.0.5 2017-10-15 23:20:17 +02:00
Tim Neutkens 7271970629 Upgrade styled-jsx (#3101) 2017-10-15 22:56:40 +02:00
Tim Neutkens e9d14613d4 Make styled-jsx configurable (#3050)
* Make styled-jsx configurable

* Add styled-jsx-plugin-postcss example

* Add styled-jsx 2.1.0 with plugins support

* Move examples around and add description

* Add link to new example
2017-10-15 19:54:57 +02:00
Tim Neutkens db151d250a Release 4.0.4 2017-10-15 01:03:24 +02:00
Tomas Roos 494f416a9f Update exposed package to avoid DoS (#3080)
Running nsp check

```
➜  web git:(master) nsp check
(+) 1 vulnerabilities found
┌───────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│               │ Regular Expression Denial of Service                                                                       │
├───────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Name          │ mime                                                                                                       │
├───────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ CVSS          │ 7.5 (High)                                                                                                 │
├───────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Installed     │ 1.3.4                                                                                                      │
├───────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Vulnerable    │ < 1.4.1 || > 2.0.0 < 2.0.3                                                                                 │
├───────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Patched       │ >= 1.4.1 < 2.0.0 || >= 2.0.3                                                                               │
├───────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Path          │ web@1.0.0 > next@4.0.1 > send@0.15.6 > mime@1.3.4                                                          │
├───────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ More Info     │ https://nodesecurity.io/advisories/535                                                                     │
└───────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

```

This is a dependency of send which already upgraded this in order to not be exposed to this known error.
https://github.com/pillarjs/send/blob/master/HISTORY.md
2017-10-14 23:52:15 +02:00