Use React 16 and simplify test setup

This commit is contained in:
Juho Teperi 2018-04-03 10:33:01 +03:00
parent 26de1c487b
commit e095696bcc
77 changed files with 463 additions and 11040 deletions

3
.gitignore vendored
View File

@ -13,5 +13,4 @@ reagent.iml
.lein-failures
node_modules
test-environments/*/junit
junit

405
package-lock.json generated
View File

@ -2,11 +2,36 @@
"requires": true,
"lockfileVersion": 1,
"dependencies": {
"@cljs-oss/module-deps": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/@cljs-oss/module-deps/-/module-deps-1.1.1.tgz",
"integrity": "sha1-YmZ/KCFk8/EParnxJLpBb9EkOfo=",
"requires": {
"JSONStream": "1.3.2",
"babel-traverse": "6.26.0",
"babylon": "6.18.0",
"browser-resolve": "1.11.2",
"cached-path-relative": "1.0.1",
"concat-stream": "1.5.2",
"defined": "1.0.0",
"detective": "4.7.1",
"duplexer2": "0.1.4",
"enhanced-resolve": "3.4.1",
"inherits": "2.0.3",
"konan": "1.1.0",
"parents": "1.0.1",
"readable-stream": "2.3.5",
"resolve": "1.6.0",
"stream-combiner2": "1.1.1",
"subarg": "1.0.0",
"through2": "2.0.3",
"xtend": "4.0.1"
}
},
"JSONStream": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.2.tgz",
"integrity": "sha1-wQI3G27Dp887hHygDCC7D85Mbeo=",
"dev": true,
"requires": {
"jsonparse": "1.3.1",
"through": "2.3.8"
@ -136,15 +161,12 @@
"ansi-regex": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
"dev": true
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8="
},
"ansi-styles": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
"integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
"dev": true,
"optional": true
"integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4="
},
"anymatch": {
"version": "1.3.2",
@ -213,6 +235,11 @@
"integrity": "sha512-wGUIVQXuehL5TCqQun8OW81jGzAWycqzFF8lFp+GOM5BXLYj3bKNsYC4daB7n6XjCqxQA/qgTJ+8ANR3acjrog==",
"dev": true
},
"asap": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz",
"integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY="
},
"asn1": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz",
@ -315,6 +342,65 @@
"follow-redirects": "1.0.0"
}
},
"babel-code-frame": {
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz",
"integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=",
"requires": {
"chalk": "1.1.3",
"esutils": "2.0.2",
"js-tokens": "3.0.2"
}
},
"babel-messages": {
"version": "6.23.0",
"resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz",
"integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=",
"requires": {
"babel-runtime": "6.26.0"
}
},
"babel-runtime": {
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz",
"integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=",
"requires": {
"core-js": "2.5.3",
"regenerator-runtime": "0.11.1"
}
},
"babel-traverse": {
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz",
"integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=",
"requires": {
"babel-code-frame": "6.26.0",
"babel-messages": "6.23.0",
"babel-runtime": "6.26.0",
"babel-types": "6.26.0",
"babylon": "6.18.0",
"debug": "2.6.9",
"globals": "9.18.0",
"invariant": "2.2.4",
"lodash": "4.17.5"
}
},
"babel-types": {
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz",
"integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=",
"requires": {
"babel-runtime": "6.26.0",
"esutils": "2.0.2",
"lodash": "4.17.5",
"to-fast-properties": "1.0.3"
}
},
"babylon": {
"version": "6.18.0",
"resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz",
"integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ=="
},
"backo2": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz",
@ -512,7 +598,6 @@
"version": "1.11.2",
"resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.2.tgz",
"integrity": "sha1-j/CbCixCFxihBRwmCzLkj0QpOM4=",
"dev": true,
"requires": {
"resolve": "1.1.7"
},
@ -520,8 +605,7 @@
"resolve": {
"version": "1.1.7",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz",
"integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=",
"dev": true
"integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs="
}
}
},
@ -715,8 +799,7 @@
"cached-path-relative": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/cached-path-relative/-/cached-path-relative-1.0.1.tgz",
"integrity": "sha1-0JxLUoAKpMB44t2BqGmqyQ0uVOc=",
"dev": true
"integrity": "sha1-0JxLUoAKpMB44t2BqGmqyQ0uVOc="
},
"callsite": {
"version": "1.0.0",
@ -751,8 +834,6 @@
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "2.2.1",
"escape-string-regexp": "1.0.5",
@ -880,7 +961,6 @@
"version": "1.5.2",
"resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.2.tgz",
"integrity": "sha1-cIl4Yk2FavQaWnQd790mHadSwmY=",
"dev": true,
"requires": {
"inherits": "2.0.3",
"readable-stream": "2.0.6",
@ -890,14 +970,12 @@
"process-nextick-args": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz",
"integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=",
"dev": true
"integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M="
},
"readable-stream": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz",
"integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=",
"dev": true,
"requires": {
"core-util-is": "1.0.2",
"inherits": "2.0.3",
@ -910,8 +988,7 @@
"string_decoder": {
"version": "0.10.31",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
"integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=",
"dev": true
"integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
}
}
},
@ -963,14 +1040,12 @@
"core-js": {
"version": "2.5.3",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.3.tgz",
"integrity": "sha1-isw4NFgk8W2DZbfJtCWRaOjtYD4=",
"dev": true
"integrity": "sha1-isw4NFgk8W2DZbfJtCWRaOjtYD4="
},
"core-util-is": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
"dev": true
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
},
"create-ecdh": {
"version": "4.0.0",
@ -1008,6 +1083,16 @@
"sha.js": "2.4.11"
}
},
"create-react-class": {
"version": "15.6.2",
"resolved": "https://registry.npmjs.org/create-react-class/-/create-react-class-15.6.2.tgz",
"integrity": "sha1-zx7RXxKq1/FO9fLf4F5sQvke8Co=",
"requires": {
"fbjs": "0.8.16",
"loose-envify": "1.3.1",
"object-assign": "4.1.1"
}
},
"cryptiles": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-3.1.2.tgz",
@ -1097,7 +1182,6 @@
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
"dev": true,
"requires": {
"ms": "2.0.0"
}
@ -1118,8 +1202,7 @@
"defined": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz",
"integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=",
"dev": true
"integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM="
},
"degenerator": {
"version": "1.0.4",
@ -1171,7 +1254,6 @@
"version": "4.7.1",
"resolved": "https://registry.npmjs.org/detective/-/detective-4.7.1.tgz",
"integrity": "sha512-H6PmeeUcZloWtdt4DAkFyzFL94arpHr3NOwwmVILFiy+9Qd4JTxxXrzfyGk/lmct2qVGBwTSwSXagqu2BxmWig==",
"dev": true,
"requires": {
"acorn": "5.5.3",
"defined": "1.0.0"
@ -1180,8 +1262,7 @@
"acorn": {
"version": "5.5.3",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-5.5.3.tgz",
"integrity": "sha512-jd5MkIUlbbmb07nXH0DT3y7rDVtkzDi4XZOUVWAer8ajmF/DTSSbl5oNFyDOl/OXA33Bl79+ypHhl2pN20VeOQ==",
"dev": true
"integrity": "sha512-jd5MkIUlbbmb07nXH0DT3y7rDVtkzDi4XZOUVWAer8ajmF/DTSSbl5oNFyDOl/OXA33Bl79+ypHhl2pN20VeOQ=="
}
}
},
@ -1237,7 +1318,6 @@
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz",
"integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=",
"dev": true,
"requires": {
"readable-stream": "2.3.5"
}
@ -1279,6 +1359,14 @@
"integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=",
"dev": true
},
"encoding": {
"version": "0.1.12",
"resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz",
"integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=",
"requires": {
"iconv-lite": "0.4.19"
}
},
"engine.io": {
"version": "3.1.5",
"resolved": "https://registry.npmjs.org/engine.io/-/engine.io-3.1.5.tgz",
@ -1348,12 +1436,31 @@
"has-binary2": "1.0.2"
}
},
"enhanced-resolve": {
"version": "3.4.1",
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-3.4.1.tgz",
"integrity": "sha1-BCHjOf1xQZs9oT0Smzl5BAIwR24=",
"requires": {
"graceful-fs": "4.1.11",
"memory-fs": "0.4.1",
"object-assign": "4.1.1",
"tapable": "0.2.8"
}
},
"ent": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/ent/-/ent-2.2.0.tgz",
"integrity": "sha1-6WQhkyWiHQX0RGai9obtbOX13R0=",
"dev": true
},
"errno": {
"version": "0.1.7",
"resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz",
"integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==",
"requires": {
"prr": "1.0.1"
}
},
"error-ex": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz",
@ -1372,9 +1479,7 @@
"escape-string-regexp": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
"dev": true,
"optional": true
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ="
},
"escodegen": {
"version": "1.9.1",
@ -1406,9 +1511,7 @@
"esutils": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz",
"integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=",
"dev": true,
"optional": true
"integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs="
},
"eventemitter3": {
"version": "1.2.0",
@ -1536,6 +1639,27 @@
"dev": true,
"optional": true
},
"fbjs": {
"version": "0.8.16",
"resolved": "https://registry.npmjs.org/fbjs/-/fbjs-0.8.16.tgz",
"integrity": "sha1-XmdDL1UNxBtXK/VYR7ispk5TN9s=",
"requires": {
"core-js": "1.2.7",
"isomorphic-fetch": "2.2.1",
"loose-envify": "1.3.1",
"object-assign": "4.1.1",
"promise": "7.3.1",
"setimmediate": "1.0.5",
"ua-parser-js": "0.7.17"
},
"dependencies": {
"core-js": {
"version": "1.2.7",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz",
"integrity": "sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY="
}
}
},
"file-uri-to-path": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
@ -2685,11 +2809,15 @@
"is-glob": "2.0.1"
}
},
"globals": {
"version": "9.18.0",
"resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz",
"integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ=="
},
"graceful-fs": {
"version": "4.1.11",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz",
"integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=",
"dev": true
"integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg="
},
"gzip-size": {
"version": "4.1.0",
@ -2743,8 +2871,6 @@
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
"integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=",
"dev": true,
"optional": true,
"requires": {
"ansi-regex": "2.1.1"
}
@ -2933,8 +3059,7 @@
"iconv-lite": {
"version": "0.4.19",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz",
"integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==",
"dev": true
"integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ=="
},
"ieee754": {
"version": "1.1.11",
@ -2977,8 +3102,7 @@
"inherits": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
"dev": true
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
},
"inline-source-map": {
"version": "0.6.2",
@ -3045,6 +3169,14 @@
}
}
},
"invariant": {
"version": "2.2.4",
"resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz",
"integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==",
"requires": {
"loose-envify": "1.3.1"
}
},
"ip": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/ip/-/ip-1.0.1.tgz",
@ -3179,9 +3311,7 @@
"is-stream": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz",
"integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=",
"dev": true,
"optional": true
"integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ="
},
"is-typedarray": {
"version": "1.0.0",
@ -3199,8 +3329,7 @@
"isarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
"dev": true
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
},
"isbinaryfile": {
"version": "3.0.2",
@ -3223,6 +3352,15 @@
"isarray": "1.0.0"
}
},
"isomorphic-fetch": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz",
"integrity": "sha1-YRrhrPFPXoH3KVB0coGf6XM1WKk=",
"requires": {
"node-fetch": "1.7.3",
"whatwg-fetch": "2.0.4"
}
},
"isstream": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
@ -3230,6 +3368,11 @@
"dev": true,
"optional": true
},
"js-tokens": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz",
"integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls="
},
"jsbn": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
@ -3275,8 +3418,7 @@
"jsonparse": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz",
"integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=",
"dev": true
"integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA="
},
"jsonpointer": {
"version": "4.0.1",
@ -3337,7 +3479,7 @@
"karma-chrome-launcher": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/karma-chrome-launcher/-/karma-chrome-launcher-2.2.0.tgz",
"integrity": "sha1-zxudBxNswY/iOTJ9JGVMPbw2is8=",
"integrity": "sha512-uf/ZVpAabDBPvdPdveyk1EPgbnloPvFFGgmRhYLTDH7gEB4nZdSBk8yTU47w1g/drLSx5uMOkjKk7IWKfWg/+w==",
"dev": true,
"requires": {
"fs-access": "1.0.1",
@ -3369,6 +3511,15 @@
"is-buffer": "1.1.6"
}
},
"konan": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/konan/-/konan-1.1.0.tgz",
"integrity": "sha1-M3dDxLl7S9Hvi2KiSzFeuLxLIJQ=",
"requires": {
"babel-traverse": "6.26.0",
"babylon": "6.18.0"
}
},
"labeled-stream-splicer": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/labeled-stream-splicer/-/labeled-stream-splicer-2.0.1.tgz",
@ -3463,8 +3614,7 @@
"lodash": {
"version": "4.17.5",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz",
"integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==",
"dev": true
"integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw=="
},
"lodash.memoize": {
"version": "3.0.4",
@ -3681,6 +3831,14 @@
}
}
},
"loose-envify": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz",
"integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=",
"requires": {
"js-tokens": "3.0.2"
}
},
"loud-rejection": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz",
@ -3792,6 +3950,15 @@
"integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=",
"dev": true
},
"memory-fs": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz",
"integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=",
"requires": {
"errno": "0.1.7",
"readable-stream": "2.3.5"
}
},
"meow": {
"version": "3.7.0",
"resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz",
@ -3886,8 +4053,7 @@
"minimist": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
"dev": true
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ="
},
"mkdirp": {
"version": "0.5.1",
@ -3932,8 +4098,7 @@
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
"dev": true
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
},
"nan": {
"version": "2.9.2",
@ -3955,6 +4120,15 @@
"dev": true,
"optional": true
},
"node-fetch": {
"version": "1.7.3",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz",
"integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==",
"requires": {
"encoding": "0.1.12",
"is-stream": "1.1.0"
}
},
"nodemailer": {
"version": "2.7.2",
"resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-2.7.2.tgz",
@ -4090,8 +4264,7 @@
"object-assign": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
"dev": true
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
},
"object-component": {
"version": "0.0.3",
@ -4229,7 +4402,6 @@
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/parents/-/parents-1.0.1.tgz",
"integrity": "sha1-/t1NK/GTp3dF/nHjcdc8MwfZx1E=",
"dev": true,
"requires": {
"path-platform": "0.11.15"
}
@ -4316,14 +4488,12 @@
"path-parse": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz",
"integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=",
"dev": true
"integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME="
},
"path-platform": {
"version": "0.11.15",
"resolved": "https://registry.npmjs.org/path-platform/-/path-platform-0.11.15.tgz",
"integrity": "sha1-6GQhf3TDaFDwhSt43Hv31KVyG/I=",
"dev": true
"integrity": "sha1-6GQhf3TDaFDwhSt43Hv31KVyG/I="
},
"path-proxy": {
"version": "1.0.0",
@ -4431,8 +4601,25 @@
"process-nextick-args": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz",
"integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==",
"dev": true
"integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw=="
},
"promise": {
"version": "7.3.1",
"resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz",
"integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==",
"requires": {
"asap": "2.0.6"
}
},
"prop-types": {
"version": "15.6.0",
"resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.6.0.tgz",
"integrity": "sha1-zq8IMCL8RrSjX2nhPvda7Q1jmFY=",
"requires": {
"fbjs": "0.8.16",
"loose-envify": "1.3.1",
"object-assign": "4.1.1"
}
},
"proxy-agent": {
"version": "2.0.0",
@ -4451,6 +4638,11 @@
"socks-proxy-agent": "2.1.1"
}
},
"prr": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz",
"integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY="
},
"pseudomap": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
@ -4585,6 +4777,28 @@
"unpipe": "1.0.0"
}
},
"react": {
"version": "16.3.0",
"resolved": "https://registry.npmjs.org/react/-/react-16.3.0.tgz",
"integrity": "sha512-Qh35tNbwY8SLFELkN3PCLO16EARV+lgcmNkQnoZXfzAF1ASRpeucZYUwBlBzsRAzTb7KyfBaLQ4/K/DLC6MYeA==",
"requires": {
"fbjs": "0.8.16",
"loose-envify": "1.3.1",
"object-assign": "4.1.1",
"prop-types": "15.6.0"
}
},
"react-dom": {
"version": "16.3.0",
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.3.0.tgz",
"integrity": "sha512-xT/FxawAurL6AV8YtAP7LkdDJFFX2vvv17AqFLQRF81ZtWLXkV/0dcAaiFIy0lmoQEFT931TU9aaH+5dBUxTcw==",
"requires": {
"fbjs": "0.8.16",
"loose-envify": "1.3.1",
"object-assign": "4.1.1",
"prop-types": "15.6.0"
}
},
"read-only-stream": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/read-only-stream/-/read-only-stream-2.0.0.tgz",
@ -4619,7 +4833,6 @@
"version": "2.3.5",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.5.tgz",
"integrity": "sha512-tK0yDhrkygt/knjowCUiWP9YdV7c5R+8cR0r/kt9ZhBU906Fs6RpQJCEilamRJj1Nx2rWI6LkW9gKqjTkshhEw==",
"dev": true,
"requires": {
"core-util-is": "1.0.2",
"inherits": "2.0.3",
@ -4678,6 +4891,11 @@
"dev": true,
"optional": true
},
"regenerator-runtime": {
"version": "0.11.1",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz",
"integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg=="
},
"regex-cache": {
"version": "0.4.4",
"resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz",
@ -4768,7 +4986,6 @@
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.6.0.tgz",
"integrity": "sha512-mw7JQNu5ExIkcw4LPih0owX/TZXjD/ZUF/ZQ/pDnkw3ZKhDcZZw5klmBlj6gVMwjQ3Pz5Jgu7F3d0jcDVuEWdw==",
"dev": true,
"requires": {
"path-parse": "1.0.5"
}
@ -4795,8 +5012,7 @@
"safe-buffer": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz",
"integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==",
"dev": true
"integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg=="
},
"semver": {
"version": "4.3.6",
@ -4810,6 +5026,11 @@
"integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=",
"dev": true
},
"setimmediate": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz",
"integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU="
},
"setprototypeof": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz",
@ -5063,7 +5284,6 @@
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.1.1.tgz",
"integrity": "sha1-+02KFCDqNidk4hrUeAOXvry0HL4=",
"dev": true,
"requires": {
"duplexer2": "0.1.4",
"readable-stream": "2.3.5"
@ -5119,7 +5339,6 @@
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz",
"integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==",
"dev": true,
"requires": {
"safe-buffer": "5.1.1"
}
@ -5135,8 +5354,6 @@
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
"dev": true,
"optional": true,
"requires": {
"ansi-regex": "2.1.1"
}
@ -5163,7 +5380,6 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz",
"integrity": "sha1-9izxdYHplrSPyWVpn1TAauJouNI=",
"dev": true,
"requires": {
"minimist": "1.2.0"
}
@ -5171,9 +5387,7 @@
"supports-color": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
"integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
"dev": true,
"optional": true
"integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc="
},
"syntax-error": {
"version": "1.4.0",
@ -5184,17 +5398,20 @@
"acorn-node": "1.3.0"
}
},
"tapable": {
"version": "0.2.8",
"resolved": "https://registry.npmjs.org/tapable/-/tapable-0.2.8.tgz",
"integrity": "sha1-mTcqXJmb8t8WCvwNdL7U9HlIzSI="
},
"through": {
"version": "2.3.8",
"resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
"integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=",
"dev": true
"integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU="
},
"through2": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz",
"integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=",
"dev": true,
"requires": {
"readable-stream": "2.3.5",
"xtend": "4.0.1"
@ -5244,6 +5461,11 @@
"integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=",
"dev": true
},
"to-fast-properties": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz",
"integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc="
},
"tough-cookie": {
"version": "2.3.4",
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz",
@ -5312,8 +5534,12 @@
"typedarray": {
"version": "0.0.6",
"resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
"integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=",
"dev": true
"integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c="
},
"ua-parser-js": {
"version": "0.7.17",
"resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.17.tgz",
"integrity": "sha512-uRdSdu1oA1rncCQL7sCj8vSyZkgtL7faaw9Tc9rZ3mGgraQ7+Pdx7w5mnOSF3gw9ZNG6oc+KXfkon3bKuROm0g=="
},
"ultron": {
"version": "1.1.1",
@ -5399,8 +5625,7 @@
"util-deprecate": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
"dev": true
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
},
"utils-merge": {
"version": "1.0.1",
@ -5459,6 +5684,11 @@
"integrity": "sha1-wGavtYK7HLQSjWDqkjkulNXp2+w=",
"dev": true
},
"whatwg-fetch": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz",
"integrity": "sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng=="
},
"when": {
"version": "3.7.8",
"resolved": "https://registry.npmjs.org/when/-/when-3.7.8.tgz",
@ -5521,8 +5751,7 @@
"xtend": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz",
"integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=",
"dev": true
"integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68="
},
"yallist": {
"version": "2.1.2",

View File

@ -1,5 +1,12 @@
{
"private": true,
"dependencies": {
"@cljs-oss/module-deps": "1.1.1",
"create-react-class": "15.6.2",
"prop-types": "15.6.0",
"react": "16.3.0",
"react-dom": "16.3.0"
},
"devDependencies": {
"gzip-size-cli": "^2.1.0",
"karma": "2.0.0",

View File

@ -1,23 +1,3 @@
#!/bin/bash
npm install
echo
# Symlinked node_modules, package.json and package-lock.json
# are used to share node_modules between environments that
# use the same packages.
for env in test-environments/*; do
name=$(basename "$env")
(
cd "$env"
if [[ ! -L node_modules ]]; then
echo "Install $name packages"
npm install
else
echo "$name uses $(readlink node_modules)"
fi
)
echo
done

View File

@ -8,9 +8,9 @@
;; If :npm-deps enabled, these are used only for externs.
;; Without direct react dependency, other packages,
;; like react-leaflet might have closer dependency to a other version.
[cljsjs/react "15.6.2-4"]
[cljsjs/react-dom "15.6.2-4"]
[cljsjs/react-dom-server "15.6.2-4"]
[cljsjs/react "16.3.0-0"]
[cljsjs/react-dom "16.3.0-0"]
[cljsjs/react-dom-server "16.3.0-0"]
[cljsjs/create-react-class "15.6.2-0"]]
:plugins [[lein-cljsbuild "1.1.7"]
@ -24,11 +24,7 @@
:exclude clojure.string
:source-paths ["src"]}
:profiles {:react-16 {:dependencies [[cljsjs/react "16.3.0-0"]
[cljsjs/react-dom "16.3.0-0"]
[cljsjs/react-dom-server "16.3.0-0"]]}
:dev {:dependencies [[figwheel "0.5.15"]
:profiles {:dev {:dependencies [[figwheel "0.5.15"]
[doo "0.1.10"]
[cljsjs/prop-types "15.6.0-0"]]
:source-paths ["demo" "examples/todomvc/src" "examples/simple/src" "examples/geometry/src"]
@ -53,7 +49,20 @@
:output-dir "target/cljsbuild/client/public/js/out"
:output-to "target/cljsbuild/client/public/js/main.js"
:asset-path "js/out"
:npm-deps false}}
:client-npm
{:source-paths ["src" "demo" "test"]
:figwheel true
:compiler {:parallel-build true
:source-map true
:optimizations :none
:main "reagentdemo.dev"
:output-dir "target/cljsbuild/client-npm/public/js/out"
:output-to "target/cljsbuild/client-npm/public/js/main.js"
:asset-path "js/out"
;; add process.env.node_env preload
; :npm-deps true
:process-shim true}}
:test
@ -65,8 +74,22 @@
:asset-path "js/out"
:output-dir "target/cljsbuild/test/out"
:output-to "target/cljsbuild/test/main.js"
:npm-deps false
:aot-cache true}}
:test-npm
{:source-paths ["src" "test"]
:compiler {:parallel-build true
:source-map true
:optimizations :none
:main "reagenttest.runtests"
:asset-path "js/out"
:output-dir "target/cljsbuild/test-npm/out"
:output-to "target/cljsbuild/test-npm/main.js"
; :npm-deps true
;; add process.env.node_env preload
:process-shim true}}
:process-shim true
:aot-cache true}}
:prerender
{:source-paths ["src" "demo"]
@ -84,7 +107,18 @@
:source-map true
:optimizations :none
:output-dir "target/cljsbuild/node-test/out"
:output-to "target/cljsbuild/node-test/main.js"}}
:output-to "target/cljsbuild/node-test/main.js"
:npm-deps false}}
:node-test-npm
{:source-paths ["src" "test"]
:compiler {:main "reagenttest.runtests"
:target :nodejs
:parallel-build true
:source-map true
:optimizations :none
:output-dir "target/cljsbuild/node-test-npm/out"
:output-to "target/cljsbuild/node-test-npm/main.js"}}
:prod
{:source-paths ["src" "demo"]
@ -106,4 +140,19 @@
;; :pseudo-names true
:output-to "target/cljsbuild/prod-test/main.js"
:output-dir "target/cljsbuild/prod-test/out"
:closure-warnings {:global-this :off}}}}})
:closure-warnings {:global-this :off}
:npm-deps false
:aot-cache true}}
:prod-test-npm
{:source-paths ["src" "demo"]
:compiler {:main "reagenttest.runtests"
:optimizations :advanced
:elide-asserts true
:pretty-print false
;; :pseudo-names true
:output-to "target/cljsbuild/prod-test-npm/main.js"
:output-dir "target/cljsbuild/prod-test-npm/out"
:closure-warnings {:global-this :off}
:aot-cache true}}
}})

View File

@ -14,14 +14,11 @@ SUMMARY="$blue##\n## SUMMARY\n##$reset\n\n"
for env in test-environments/*; do
name=$(basename "$env")
(
cd "$env"
echo -e "$blue##"
echo -e "## TESTING $name"
echo -e "##$reset"
echo
./test.sh
)
$env/test.sh
if [[ $? != "0" ]]; then
echo
echo -e "${red}FAIL $name$reset"
@ -36,17 +33,4 @@ done
echo -e "$SUMMARY"
echo
for env in test-environments/*-prod; do
name=$(basename "$env")
path="test-environments/$name/target/cljsbuild/prod-test/main.js"
if [[ -f "$path" ]]; then
echo "$name $(./node_modules/.bin/gzip-size "$path")"
fi
done
echo
echo "NOTE: These sizes include Reagent test suite which also uses React-dom/server, so this doesn't demonstrate real use case."
exit $EXIT

View File

@ -2,4 +2,4 @@
set -ex
lein do clean, doo chrome-headless prod-test once
test -f target/cljsbuild/prod-test/main.js
../../node_modules/.bin/gzip-size target/cljsbuild/prod-test/main.js
node_modules/.bin/gzip-size target/cljsbuild/prod-test/main.js

View File

@ -1 +0,0 @@
../../demo

View File

@ -1 +0,0 @@
../../examples

File diff suppressed because it is too large Load Diff

View File

@ -1,15 +0,0 @@
{
"private": true,
"dependencies": {
"@cljs-oss/module-deps": "1.1.1",
"create-react-class": "15.6.2",
"react": "16.3.0",
"react-dom": "16.3.0"
},
"devDependencies": {
"karma": "2.0.0",
"karma-chrome-launcher": "2.2.0",
"karma-cljs-test": "0.1.0",
"karma-junit-reporter": "1.2.0"
}
}

View File

@ -1 +0,0 @@
../../project.clj

View File

@ -1 +0,0 @@
../../site

View File

@ -1 +0,0 @@
../../src

View File

@ -1 +0,0 @@
../../test

View File

@ -1,4 +0,0 @@
#!/bin/bash
set -ex
lein do clean, doo chrome-headless test once
test -f target/cljsbuild/test/out/node_modules/react/index.js

View File

@ -1 +0,0 @@
../../demo

View File

@ -1 +0,0 @@
../../examples

File diff suppressed because it is too large Load Diff

View File

@ -1,16 +0,0 @@
{
"private": true,
"dependencies": {
"@cljs-oss/module-deps": "1.1.1",
"create-react-class": "15.6.2",
"prop-types": "15.6.0",
"react": "15.6.2",
"react-dom": "15.6.2"
},
"devDependencies": {
"karma": "2.0.0",
"karma-chrome-launcher": "2.2.0",
"karma-cljs-test": "0.1.0",
"karma-junit-reporter": "1.2.0"
}
}

View File

@ -1 +0,0 @@
../../project.clj

View File

@ -1 +0,0 @@
../../site

View File

@ -1 +0,0 @@
../../src

View File

@ -1 +0,0 @@
../../test

View File

@ -1,4 +0,0 @@
#!/bin/bash
set -ex
lein do clean, doo chrome-headless test once
test -f target/cljsbuild/test/out/node_modules/react/react.js

View File

@ -0,0 +1,4 @@
#!/bin/bash
set -ex
lein do clean, doo chrome-headless test-npm once
test -f target/cljsbuild/test-npm/out/node_modules/react/index.js

View File

@ -1 +0,0 @@
../../demo

View File

@ -1 +0,0 @@
../../examples

View File

@ -1 +0,0 @@
../browser-umd/node_modules

View File

@ -1 +0,0 @@
../browser-umd/package-lock.json

View File

@ -1 +0,0 @@
../browser-umd/package.json

View File

@ -1 +0,0 @@
../../project.clj

View File

@ -1 +0,0 @@
../../site

View File

@ -1 +0,0 @@
../../src

View File

@ -1 +0,0 @@
../../test

View File

@ -1 +0,0 @@
../../demo

View File

@ -1 +0,0 @@
../../examples

View File

@ -1,3 +0,0 @@
#!/bin/bash
set -ex
lein with-profile react-16 figwheel

View File

@ -1 +0,0 @@
../browser-umd/node_modules

View File

@ -1 +0,0 @@
../browser-umd/package-lock.json

View File

@ -1 +0,0 @@
../browser-umd/package.json

View File

@ -1 +0,0 @@
../../project.clj

View File

@ -1 +0,0 @@
../../site

View File

@ -1 +0,0 @@
../../src

View File

@ -1 +0,0 @@
../../test

View File

@ -1,4 +0,0 @@
#!/bin/bash
set -ex
lein with-profile dev,react-16 do clean, doo chrome-headless test once
test -f target/cljsbuild/test/out/cljsjs/react/development/react.inc.js

View File

@ -1 +0,0 @@
../../demo

View File

@ -1 +0,0 @@
../../examples

View File

@ -1 +0,0 @@
../../node_modules

View File

@ -1 +0,0 @@
../../package-lock.json

View File

@ -1 +0,0 @@
../../package.json

View File

@ -1 +0,0 @@
../../project.clj

View File

@ -1 +0,0 @@
../../site

View File

@ -1 +0,0 @@
../../src

View File

@ -1 +0,0 @@
../../test

View File

@ -1 +0,0 @@
../../demo

View File

@ -1 +0,0 @@
../../examples

View File

@ -1 +0,0 @@
../../package-lock.json

View File

@ -1 +0,0 @@
../../package.json

View File

@ -1 +0,0 @@
../../project.clj

View File

@ -1 +0,0 @@
../../site

View File

@ -1 +0,0 @@
../../src

View File

@ -1 +0,0 @@
../../test

View File

@ -0,0 +1,5 @@
#!/bin/bash
set -ex
lein do clean, doo node node-test-npm once
test ! -f target/cljsbuild/node-test-npm/out/node_modules/react/index.js
grep "reagent.impl.template.node\$module\$react = require('react')" target/cljsbuild/node-test-npm/out/reagent/impl/template.js

View File

@ -1 +0,0 @@
../../demo

View File

@ -1 +0,0 @@
../../examples

View File

@ -1 +0,0 @@
../browser-node/node_modules

View File

@ -1 +0,0 @@
../browser-node/package-lock.json

View File

@ -1 +0,0 @@
../browser-node/package.json

View File

@ -1 +0,0 @@
../../project.clj

View File

@ -1 +0,0 @@
../../site

View File

@ -1 +0,0 @@
../../src

View File

@ -1 +0,0 @@
../../test

View File

@ -1,5 +0,0 @@
#!/bin/bash
set -ex
lein do clean, doo node node-test once
test ! -f target/cljsbuild/node-test/out/node_modules/react/index.js
grep "reagent.impl.template.node\$module\$react = require('react')" target/cljsbuild/node-test/out/reagent/impl/template.js

View File

@ -904,15 +904,25 @@
(debug/error (apply str f)))
(defn wrap-capture-window-error [f]
(fn []
(let [org js/console.onerror]
(set! js/window.onerror (fn [e]
(log-error e)
true))
(try
(f)
(finally
(set! js/window.onerror org))))))
(if (exists? js/window)
(fn []
(let [org js/console.onerror]
(set! js/window.onerror (fn [e]
(log-error e)
true))
(try
(f)
(finally
(set! js/window.onerror org)))))
(fn []
(let [process (js/require "process")
l (fn [e]
(log-error e))]
(.on process "uncaughtException" l)
(try
(f)
(finally
(.removeListener process "uncaughtException" l)))))))
(defn wrap-capture-console-error [f]
(fn []
@ -993,27 +1003,26 @@
(-> e :warn first))))))))
(deftest test-error-boundary
(when (>= (js/parseInt react/version) 16)
(let [error (r/atom nil)
error-boundary (fn error-boundary [comp]
(r/create-class
{:component-did-catch (fn [this e info]
(reset! error e))
:reagent-render (fn [comp]
(if @error
[:div "Something went wrong."]
comp))}))
comp1 (fn comp1 []
($ nil :foo)
[:div "foo"])]
(debug/track-warnings
(wrap-capture-window-error
(wrap-capture-console-error
#(with-mounted-component [error-boundary [comp1]]
(fn [c div]
(r/flush)
(is (= "Cannot read property 'foo' of null" (.-message @error)))
(is (found-in #"Something went wrong\." div))))))))))
(let [error (r/atom nil)
error-boundary (fn error-boundary [comp]
(r/create-class
{:component-did-catch (fn [this e info]
(reset! error e))
:reagent-render (fn [comp]
(if @error
[:div "Something went wrong."]
comp))}))
comp1 (fn comp1 []
($ nil :foo)
[:div "foo"])]
(debug/track-warnings
(wrap-capture-window-error
(wrap-capture-console-error
#(with-mounted-component [error-boundary [comp1]]
(fn [c div]
(r/flush)
(is (= "Cannot read property 'foo' of null" (.-message @error)))
(is (found-in #"Something went wrong\." div)))))))))
(deftest test-dom-node
(let [node (atom nil)
@ -1128,34 +1137,33 @@
(deftest test-fragments
(when (>= (js/parseInt react/version) 16)
(testing "Fragment as array"
(let [comp (fn []
#js [(r/as-element [:div "hello"])
(r/as-element [:div "world"])])]
(is (= "<div>hello</div><div>world</div>"
(as-string [comp])))))
(testing "Fragment as array"
(let [comp (fn []
#js [(r/as-element [:div "hello"])
(r/as-element [:div "world"])])]
(is (= "<div>hello</div><div>world</div>"
(as-string [comp])))))
(testing "Fragment element, :<>"
(let [comp (fn []
[:<>
[:div "hello"]
[:div "world"]
[:div "foo"] ])]
(is (= "<div>hello</div><div>world</div><div>foo</div>"
(as-string [comp])))))
(testing "Fragment element, :<>"
(let [comp (fn []
[:<>
[:div "hello"]
[:div "world"]
[:div "foo"] ])]
(is (= "<div>hello</div><div>world</div><div>foo</div>"
(as-string [comp])))))
(testing "Fragment key"
;; This would cause React warning if both fragements didn't have key set
(let [comp (fn []
[:div
(list
[:<>
{:key 1}
[:div "hello"]
[:div "world"]]
^{:key 2}
[:<>
[:div "foo"]])])]
(is (= "<div><div>hello</div><div>world</div><div>foo</div></div>"
(as-string [comp])))))))
(testing "Fragment key"
;; This would cause React warning if both fragements didn't have key set
(let [comp (fn []
[:div
(list
[:<>
{:key 1}
[:div "hello"]
[:div "world"]]
^{:key 2}
[:<>
[:div "foo"]])])]
(is (= "<div><div>hello</div><div>world</div><div>foo</div></div>"
(as-string [comp]))))))