Skip to content

Commit d6860bb

Browse files
committed
Merge pull request #212 from slowpath/babel6
Running react-redux with Babel 6
2 parents efcd8b8 + f5973cf commit d6860bb

File tree

3 files changed

+16
-9
lines changed

3 files changed

+16
-9
lines changed

.babelrc

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
{
2-
"stage": 0,
3-
"loose": "all"
2+
"presets": ["es2015", "stage-0", "react"],
3+
"plugins": [
4+
"transform-decorators-legacy"
5+
]
46
}

package.json

+9-5
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"clean": "rimraf lib dist coverage",
1313
"lint": "eslint src test",
1414
"prepublish": "npm run clean && npm run build",
15-
"test": "mocha --compilers js:babel/register --recursive --require ./test/setup.js",
15+
"test": "mocha --compilers js:babel-core/register --recursive --require ./test/setup.js",
1616
"test:watch": "npm test -- --watch",
1717
"test:cov": "babel-node ./node_modules/isparta/bin/isparta cover ./node_modules/mocha/bin/_mocha -- --recursive"
1818
},
@@ -38,10 +38,14 @@
3838
},
3939
"homepage": "https://github.com/gaearon/react-redux",
4040
"devDependencies": {
41-
"babel": "^5.8.21",
42-
"babel-core": "^5.8.22",
43-
"babel-eslint": "^3.1.15",
44-
"babel-loader": "^5.3.2",
41+
"babel-cli": "^6.3.15",
42+
"babel-core": "^6.1.20",
43+
"babel-eslint": "^5.0.0-beta4",
44+
"babel-loader": "^6.2.0",
45+
"babel-plugin-transform-decorators-legacy": "^1.2.0",
46+
"babel-preset-es2015": "^6.3.13",
47+
"babel-preset-react": "^6.3.13",
48+
"babel-preset-stage-0": "^6.3.13",
4549
"eslint": "^1.7.1",
4650
"eslint-config-rackt": "1.1.0",
4751
"eslint-plugin-react": "^3.6.3",

test/components/connect.spec.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -985,13 +985,14 @@ describe('React', () => {
985985

986986
function imitateHotReloading(TargetClass, SourceClass) {
987987
// Crude imitation of hot reloading that does the job
988-
Object.keys(SourceClass.prototype).filter(key =>
988+
Object.getOwnPropertyNames(SourceClass.prototype).filter(key =>
989989
typeof SourceClass.prototype[key] === 'function'
990990
).forEach(key => {
991-
if (key !== 'render') {
991+
if (key !== 'render' && key !== 'constructor') {
992992
TargetClass.prototype[key] = SourceClass.prototype[key]
993993
}
994994
})
995+
995996
container.forceUpdate()
996997
}
997998

0 commit comments

Comments
 (0)