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

67 commits

Author SHA1 Message Date
Tim Neutkens bd2dee21d4 v7.0.2-canary.49 2018-12-17 19:30:35 +01:00
Tim Neutkens 6e2cbfaff3 v7.0.2-canary.48 2018-12-17 16:13:05 +01:00
Kyle Holmberg 72e7929242 Change page export validity check on client and server in development (#5857)
Resolves #4055 

Credit: https://github.com/zeit/next.js/pull/5095

I didn't use the ignore webpack plugin from the original PR and tested bundle size with https://github.com/zeit/next.js/pull/5339 - seems to be safe on that front.

Was able to get tests to pass locally, unsure of what goes wrong in CI 🤷‍♂️ 

**Questions**
1) The initial PR didn't include changes to `next-server/lib/router` in `getRouteInfo()`. Should the same changes be made within?

2) Should we add a test for rendering a component created via `forwardRef()`?

`component-with-forwardedRef`:
```javascript
export default React.forwardRef((props, ref) => <span {...props} forwardedRef={ref}>This is a component with a forwarded ref</span>);
```

some test:
```javascript
test('renders from forwardRef', async () => {
  const $ = await get$('/component-with-forwardedRef')
  const span = $('span')
  expect(span.text()).toMatch(/This is a component with a forwarded ref/)
})
```
2018-12-17 16:09:23 +01:00
Tim Neutkens 346915eb9d v7.0.2-canary.47 2018-12-16 16:37:17 +01:00
Tim Neutkens be24aaa0d2 v7.0.2-canary.46 2018-12-16 14:30:50 +01:00
Tim Neutkens e96d694445 v7.0.2-canary.45 2018-12-16 02:01:21 +01:00
Tim Neutkens f4a2cbb403 v7.0.2-canary.44 2018-12-15 23:45:34 +01:00
Tim Neutkens 00a14d696d v7.0.2-canary.43 2018-12-13 19:47:10 +01:00
Tim Neutkens 5e3bf6e537
Convert render.js to typescript (#5869)
* Convert render.js to typescript

* Compile tsx files too

* Remove internal renderErrorToHTML function

* Interopt component result

* requirePage doesn’t need async

* Move out enhancing logic into it’s own function

* Remove buildManifest from renderPage

* Move render into it’s own function

* Change let to const

* Move renderDocument into it’s own function
2018-12-13 01:00:46 +01:00
Tim Neutkens 2dec1fcd63 v7.0.2-canary.42 2018-12-11 21:59:30 +01:00
Tim Neutkens 8873242b0b
Move getPageFiles and convert to ts (#5841)
* Move getPageFiles and convert to ts

# Conflicts:
#	packages/next-server/server/render.js

* Fix unit tests
2018-12-07 13:35:01 +01:00
Tim Neutkens 3c62b07593
Move serve-static to typescript (#5833) 2018-12-06 16:54:33 +01:00
Tim Neutkens 902c5244f3 v7.0.2-canary.41 2018-12-05 22:41:26 +01:00
Tim Neutkens 7098501547 v7.0.2-canary.40 2018-12-05 15:05:59 +01:00
Tim Neutkens a62a6276c7 v7.0.2-canary.39 2018-12-05 14:45:14 +01:00
Tim Neutkens 84223d39e7 v7.0.2-canary.38 2018-12-04 20:10:53 +01:00
Tim Neutkens dada692bd6 v7.0.2-canary.37 2018-12-04 15:28:36 +01:00
Tim Neutkens dd3b5bf81d v7.0.2-canary.36 2018-12-04 11:04:21 +01:00
Tim Neutkens 082db2877d v7.0.2-canary.35 2018-12-03 19:50:59 +01:00
Tim Neutkens a66e1c0d7c v7.0.2-canary.34 2018-11-30 19:51:54 +01:00
Tim Neutkens f1fe237ba8 v7.0.2-canary.33 2018-11-29 19:33:20 +01:00
Tim Neutkens 1c64e59564 v7.0.2-canary.32 2018-11-29 12:36:48 +01:00
Tim Neutkens c1037949fd v7.0.2-canary.31 2018-11-28 17:55:37 +01:00
Tim Neutkens af893bf740 v7.0.2-canary.30 2018-11-28 15:12:43 +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
Tim Neutkens c801a96631 v7.0.2-canary.29 2018-11-27 22:21:00 +01:00
Tim Neutkens 818cf8e77a v7.0.2-canary.28 2018-11-27 12:39:07 +01:00
Tim Neutkens 9f03fad5e9 v7.0.2-canary.27 2018-11-25 00:57:02 +01:00
Tim Neutkens 9b2782a6d0
Add engines to next and next-server (#5724) 2018-11-21 21:56:24 +01:00
Tim Neutkens 76202f2fb2 v7.0.2-canary.26 2018-11-20 12:17:23 +01:00
Tim Neutkens cfd46acde5 v7.0.2-canary.25 2018-11-18 13:53:45 +01:00
Tim Neutkens e930d1e821 v7.0.2-canary.24 2018-11-13 22:58:21 +01:00
Tim Neutkens 79470c76b8 Add license to next-server
Fixes #5671
2018-11-13 22:57:31 +01:00
Tim Neutkens a7c440d88e v7.0.2-canary.23 2018-11-13 21:58:33 +01:00
Tim Neutkens 2776caacde v7.0.2-canary.22 2018-11-09 14:10:24 +01:00
Tim Neutkens 5ffbb34841 v7.0.2-canary.21 2018-11-07 18:46:35 +01:00
Tim Neutkens b46d7e8f6f v7.0.2-canary.20 2018-11-07 15:39:23 +01:00
Tim Neutkens a82a2d8d1b v7.0.2-canary.19 2018-11-07 14:42:00 +01:00
Tim Neutkens 88f2c1716a
Clean up dependencies between next and next-server (#5615) 2018-11-07 14:41:00 +01:00
Tim Neutkens 43dc610196 v7.0.2-canary.18 2018-11-05 17:53:12 +01:00
Tim Neutkens 3c1c972b33 v7.0.2-canary.17 2018-11-05 01:49:35 +01:00
Tim Neutkens ed56d69155 v7.0.2-canary.16 2018-11-05 00:03:16 +01:00
Tim Neutkens 7876406723 v7.0.2-canary.15 2018-11-04 23:44:14 +01:00
Tim Neutkens 0136db7a00 v7.0.2-canary.14 2018-11-04 23:05:54 +01:00
Tim Neutkens a97c15d399 v7.0.2-canary.13 2018-11-04 22:17:07 +01:00
Tim Neutkens cb6fc6b8a8 v7.0.2-canary.12 2018-11-04 03:33:08 +01:00
Tim Neutkens ef2995d1fa v7.0.2-canary.11 2018-11-04 01:23:14 +01:00
Tim Neutkens 54b9df535d
Handle decoding errors correctly (#5589)
Fixes #4887
Fixes #3612

Also removes http-errors dependency from next-server, leaving a smaller install size
2018-11-04 01:22:33 +01:00
Tim Neutkens 15854f515b
Transpile styled-jsx into server bundle (#5588)
Drops an additional 6MB from the next-server node_modules size as there's no lodash
2018-11-04 01:11:40 +01:00
Tim Neutkens 745b2da006 v7.0.2-canary.10 2018-11-03 19:52:45 +01:00