Skip to content

Commit 5206993

Browse files
committed
Upgrade dependencies and node
1 parent e359a05 commit 5206993

File tree

25 files changed

+5229
-2480
lines changed

25 files changed

+5229
-2480
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: 2
22

33
defaults: &defaults
44
docker:
5-
- image: circleci/node:7
5+
- image: circleci/node:10
66
working_directory: ~/repo
77

88
restore-npm-cache: &restore-npm-cache

.eslintrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
"settings": {
2424
"flowtype": {
2525
"onlyFilesWithFlowAnnotation": true
26+
},
27+
"react": {
28+
"version": "15.0"
2629
}
2730
},
2831
"extends": ["eslint:recommended", "plugin:flowtype/recommended"],

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.10.0
1+
10.14.2

docs/guides/architecture.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,13 @@ function PlanetsList({ planets = [] }) {
100100
return <p>No Planets</p>
101101
}
102102

103-
return <ul>{planets.map(p => <li key={p.id}>{p.name}</li>)}</ul>
103+
return (
104+
<ul>
105+
{planets.map(p => (
106+
<li key={p.id}>{p.name}</li>
107+
))}
108+
</ul>
109+
)
104110
}
105111
```
106112

docs/guides/quickstart.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,13 @@ And in our PlanetList:
257257
import React from 'react'
258258

259259
export default function PlanetList({ planets = [] }) {
260-
return <ul>{planets.map(p => <li key={p}>{p}</li>)}</ul>
260+
return (
261+
<ul>
262+
{planets.map(p => (
263+
<li key={p}>{p}</li>
264+
))}
265+
</ul>
266+
)
261267
}
262268
```
263269

@@ -462,7 +468,11 @@ import { addPlanet } from '../actions/planets'
462468
export default function PlanetList({ planets = [] }) {
463469
return (
464470
<div>
465-
<ul>{planets.map(p => <li key={p}>{p}</li>)}</ul>
471+
<ul>
472+
{planets.map(p => (
473+
<li key={p}>{p}</li>
474+
))}
475+
</ul>
466476

467477
<ActionButton action={addPlanet} value="Alpha Centauri">
468478
Add Planet

examples/painter/app/views/canvas.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ export default function Canvas({ pixels, height, width, send }) {
1414
strokeWidth={0.25 / scaleX}
1515
strokeOpacity="0.2"
1616
>
17-
{pixels.map((row, y) => <Row key={y} cells={row} y={y} />)}
17+
{pixels.map((row, y) => (
18+
<Row key={y} cells={row} y={y} />
19+
))}
1820
</g>
1921
</svg>
2022
)

package.json

Lines changed: 28 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,14 @@
3232
],
3333
"license": "MIT",
3434
"dependencies": {
35-
"form-serialize": "^0.7.2"
35+
"form-serialize": "^0.7.2",
36+
"rollup-plugin-unassert": "^0.2.0"
3637
},
3738
"devDependencies": {
38-
"axios": "^0.16.2",
39+
"axios": "^0.18.0",
3940
"babel-core": "^6.26.0",
40-
"babel-eslint": "^7.2.3",
41-
"babel-loader": "^7.1.2",
41+
"babel-eslint": "^10.0.1",
42+
"babel-loader": "^8.0.4",
4243
"babel-plugin-transform-runtime": "^6.23.0",
4344
"babel-polyfill": "^6.26.0",
4445
"babel-preset-es2015": "^6.24.1",
@@ -48,40 +49,40 @@
4849
"babel-register": "^6.26.0",
4950
"body-parser": "^1.17.2",
5051
"browser-sync": "^2.18.13",
51-
"codecov": "^2.3.0",
52-
"console.table": "^0.9.1",
52+
"codecov": "^3.1.0",
53+
"console.table": "^0.10.0",
5354
"elizabot": "^0.0.2",
54-
"enzyme": "^2.9.1",
55-
"eslint": "^4.5.0",
56-
"eslint-plugin-flowtype": "^2.35.0",
55+
"enzyme": "^3.8.0",
56+
"enzyme-adapter-react-15": "^1.2.0",
57+
"eslint": "^5.10.0",
58+
"eslint-plugin-flowtype": "^3.2.0",
5759
"eslint-plugin-flowtype-errors": "^3.3.1",
5860
"eslint-plugin-react": "^7.3.0",
59-
"flow-bin": "^0.53.1",
61+
"flow-bin": "^0.89.0",
6062
"friendly-errors-webpack-plugin": "^1.6.1",
61-
"html-webpack-plugin": "^2.30.1",
62-
"jest": "^20.0.3",
63+
"html-webpack-plugin": "^3.2.0",
64+
"jest": "^23.6.0",
6365
"jsdoc": "^3.5.4",
64-
"jsdoc-babel": "^0.3.0",
66+
"jsdoc-babel": "^0.5.0",
6567
"microcosm-debugger": "^3.0.0",
6668
"minimist": "^1.2.0",
6769
"prettier": "^1.13.6",
68-
"react": "^15.6.1",
69-
"react-dom": "^15.6.1",
70-
"react-hot-loader": "next",
70+
"react": "^15.0.0",
71+
"react-dom": "^15.0.0",
72+
"react-hot-loader": "^4.5.3",
7173
"react-router-dom": "^4.2.2",
72-
"react-test-renderer": "^15.6.1",
73-
"rollup": "^0.49.2",
74-
"rollup-plugin-buble": "^0.15.0",
75-
"rollup-plugin-filesize": "^1.4.2",
74+
"react-test-renderer": "^15.0.0",
75+
"rollup": "^0.67.4",
76+
"rollup-plugin-buble": "^0.19.6",
77+
"rollup-plugin-filesize": "^5.0.1",
7678
"rollup-plugin-flow": "^1.1.1",
77-
"rollup-plugin-json": "^2.3.0",
78-
"rollup-plugin-node-resolve": "^3.0.0",
79-
"rollup-plugin-strip": "^1.1.1",
80-
"rollup-plugin-uglify": "^2.0.1",
79+
"rollup-plugin-json": "^3.1.0",
80+
"rollup-plugin-node-resolve": "^4.0.0",
81+
"rollup-plugin-uglify": "^6.0.0",
8182
"uid": "^0.0.2",
82-
"webpack": "^3.5.5",
83-
"webpack-dev-server": "^2.6.1",
84-
"zen-observable": "^0.5.2"
83+
"webpack": "^4.27.1",
84+
"webpack-dev-server": "^3.1.10",
85+
"zen-observable": "~0.5.2"
8586
},
8687
"prettier": {
8788
"semi": false,

scripts/bundle

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
const rollup = require('rollup')
66
const buble = require('rollup-plugin-buble')
77
const flow = require('rollup-plugin-flow')
8-
const strip = require('rollup-plugin-strip')
98
const uglify = require('rollup-plugin-uglify')
109
const node = require('rollup-plugin-node-resolve')
10+
const unassert = require('rollup-plugin-unassert')
1111
const json = require('rollup-plugin-json')
1212
const filesize = require('rollup-plugin-filesize')
1313
const { Dictionary } = require('uglify-js')
@@ -46,13 +46,7 @@ const configs = {
4646
}
4747

4848
if (!options.strict) {
49-
plugins.push(
50-
strip({
51-
debugger: true,
52-
functions: ['console.assert'],
53-
sourceMap: true
54-
})
55-
)
49+
plugins.push( plugins.push(unassert()))
5650
}
5751

5852
if (options.minify) {

src/action.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import Emitter, { type Callback } from './emitter'
88
import tag from './tag'
99
import { uid } from './utils'
10+
import assert from 'assert'
1011

1112
type ActionUpdater = (payload?: mixed) => *
1213
type Revision = { status: string, payload: *, timestamp: number }
@@ -167,10 +168,7 @@ class Action extends Emitter {
167168
if (this.parent) {
168169
this.parent.parent = null
169170
} else {
170-
console.assert(
171-
false,
172-
'Unable to prune action. It is already disconnected.'
173-
)
171+
assert(false, 'Unable to prune action. It is already disconnected.')
174172
}
175173
}
176174

@@ -207,7 +205,7 @@ class Action extends Emitter {
207205
if (this.parent) {
208206
this.parent.abandon(this)
209207
} else {
210-
console.assert(false, 'Action has already been removed.')
208+
assert(false, 'Action has already been removed.')
211209
}
212210

213211
this.removeAllListeners()
@@ -237,7 +235,7 @@ class Action extends Emitter {
237235
*/
238236
_callOrSubscribeOnce(status: Status, callback: Callback, scope: ?Object) {
239237
if (callback) {
240-
console.assert(
238+
assert(
241239
typeof callback === 'function',
242240
`Expected a function when subscribing to ${status}` +
243241
`instead got ${typeof callback}`

src/addons/action-form.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
* @flow
33
*/
44

5+
import assert from 'assert'
56
import React from 'react'
67
import DOM from 'react-dom'
78
import { Action, merge } from '../microcosm'
@@ -82,7 +83,7 @@ class ActionForm extends React.PureComponent<Props> {
8283
submit(event: Event) {
8384
let form = this.form
8485

85-
console.assert(
86+
assert(
8687
form,
8788
'ActionForm has no form reference and can not submit. This can happen',
8889
'if submit() is called after the parent component has unmounted.'

0 commit comments

Comments
 (0)