From 7fa8c08758678e540fe222825abfe6721ca216fa Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Mon, 22 May 2017 17:37:06 +0000 Subject: [PATCH 01/11] chore(package): update dependencies --- package.json | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/package.json b/package.json index 939716d082..1c2fd78379 100644 --- a/package.json +++ b/package.json @@ -41,44 +41,44 @@ "csurf": "^1.9.0", "express": "^4.13.4", "json-file-plus": "^3.2.0", - "package-json": "^2.3.1", + "package-json": "^4.0.1", "passport": "^0.3.2", "passport-local": "^1.0.0" }, "devDependencies": { - "babel-core": "~5.8.12", + "babel-core": "~6.24.1", "babel-eslint": "^7.2.3", - "babel-loader": "~5.3.0", + "babel-loader": "~7.0.0", "babel-plugin-remove-proptypes": "~1.0.0", "babel-polyfill": "^6.7.2", - "babel-runtime": "~5.8.25", - "css-loader": "~0.18.0", + "babel-runtime": "~6.23.0", + "css-loader": "~0.28.2", "eslint": "^3.8.1", "eslint-plugin-jest": "^20.0.3", - "eslint-plugin-react": "^6.4.1", - "file-loader": "^0.8.5", - "history": "^2.1.2", - "http-server": "~0.8.5", - "immutable": "~3.7.5", + "eslint-plugin-react": "^7.0.1", + "file-loader": "^0.11.1", + "history": "^4.6.1", + "http-server": "~0.10.0", + "immutable": "~3.8.1", "immutable-devtools": "~0.0.4", - "jest-cli": "^12.0.2", - "js-beautify": "~1.5.0", + "jest-cli": "^20.0.3", + "js-beautify": "~1.6.14", "marked": "^0.3.5", - "node-sass": "^3.7.0", - "parse": "1.9.1", - "prismjs": "~1.2.0", + "node-sass": "^4.5.3", + "parse": "1.9.2", + "prismjs": "~1.6.0", "react": "^15.0.1", "react-addons-test-utils": "^15.0.1", - "react-dnd": "~2.1.4", - "react-dnd-html5-backend": "~2.0.0", + "react-dnd": "~2.4.0", + "react-dnd-html5-backend": "~2.4.1", "react-dom": "^15.0.1", - "react-router": "^2.6.0", + "react-router": "^4.1.1", "request-promise": "^4.1.1", - "sass-loader": "~3.1.2", - "style-loader": "~0.12.3", + "sass-loader": "~6.0.5", + "style-loader": "~0.18.0", "svg-prep": "~1.0.0", "transform-jest-deps": "^2.1.0", - "webpack": "~1.12.0" + "webpack": "~2.5.1" }, "scripts": { "dev": "node ./Parse-Dashboard/index.js & webpack --config webpack/build.config.js --devtool eval-source-map --progress --watch", From bc558c7b22e4fe69f258451320c6beaf0841efce Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Mon, 22 May 2017 17:37:08 +0000 Subject: [PATCH 02/11] docs(readme): add Greenkeeper badge --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index b4d9a2de1b..2d843a1a9b 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Parse Dashboard +[![Greenkeeper badge](https://badges.greenkeeper.io/parse-community/parse-dashboard.svg)](https://greenkeeper.io/) + [![Build Status](https://img.shields.io/travis/parse-community/parse-dashboard/master.svg?style=flat)](https://travis-ci.org/parse-community/parse-dashboard) [![npm version](https://img.shields.io/npm/v/parse-dashboard.svg?style=flat)](https://www.npmjs.com/package/parse-dashboard) From c4a737fe14fb6ee81ed7708b8444051a4371c7e3 Mon Sep 17 00:00:00 2001 From: Florent Vilmart Date: Mon, 22 May 2017 19:30:52 -0400 Subject: [PATCH 03/11] Adjustments for modernization --- package.json | 14 ++++++------- src/lib/tests/Button.test.js | 2 +- src/lib/tests/Tooltip.test.js | 2 +- src/lib/tests/passwordStrength.test.js | 2 +- src/lib/tests/prettyNumber.test.js | 2 +- testing/preprocessor.js | 7 ++++--- webpack/PIG.config.js | 2 +- webpack/base.config.js | 27 ++++++++++++++------------ webpack/build.config.js | 2 +- webpack/production.config.js | 16 ++------------- webpack/publish.config.js | 16 ++------------- webpack/webpack.config.js | 2 +- 12 files changed, 37 insertions(+), 57 deletions(-) diff --git a/package.json b/package.json index 1c2fd78379..a726682659 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,11 @@ "babel-eslint": "^7.2.3", "babel-loader": "~7.0.0", "babel-plugin-remove-proptypes": "~1.0.0", - "babel-polyfill": "^6.7.2", + "babel-plugin-transform-decorators-legacy": "^1.3.4", + "babel-polyfill": "^6.23.0", + "babel-preset-es2015": "^6.24.1", + "babel-preset-react": "^6.24.1", + "babel-preset-stage-0": "^6.24.1", "babel-runtime": "~6.23.0", "css-loader": "~0.28.2", "eslint": "^3.8.1", @@ -100,14 +104,10 @@ }, "main": "Parse-Dashboard/app.js", "jest": { - "testPathDirs": [ + "roots": [ "src/lib" ], - "scriptPreprocessor": "/testing/preprocessor.js", - "testDirectoryName": "tests", - "testFileExtensions": [ - "test.js" - ], + "transform": {".*": "/testing/preprocessor.js"}, "unmockedModulePathPatterns": [ "react", "react-dom", diff --git a/src/lib/tests/Button.test.js b/src/lib/tests/Button.test.js index 1e2556bc63..d43efff10b 100644 --- a/src/lib/tests/Button.test.js +++ b/src/lib/tests/Button.test.js @@ -10,7 +10,7 @@ jest.dontMock('../../components/Button/Button.react'); import React from 'react'; import TestUtils from 'react-addons-test-utils'; -const Button = require('../../components/Button/Button.react'); +const Button = require('../../components/Button/Button.react').default; describe('Button', () => { it('has a default state', () => { diff --git a/src/lib/tests/Tooltip.test.js b/src/lib/tests/Tooltip.test.js index 14e5aa5398..ab91c3fa24 100644 --- a/src/lib/tests/Tooltip.test.js +++ b/src/lib/tests/Tooltip.test.js @@ -8,5 +8,5 @@ jest.dontMock('../../components/Tooltip/Tooltip.react'); describe('Tooltip', () => { - // test suite goes here + it('does nothing', () => {}); }); diff --git a/src/lib/tests/passwordStrength.test.js b/src/lib/tests/passwordStrength.test.js index cecb3ad0a4..fc7ef3fe8e 100644 --- a/src/lib/tests/passwordStrength.test.js +++ b/src/lib/tests/passwordStrength.test.js @@ -6,7 +6,7 @@ * the root directory of this source tree. */ jest.dontMock('../passwordStrength'); -const passwordStrength = require('../passwordStrength'); +const passwordStrength = require('../passwordStrength').default; describe('passwordStrength', () => { it('returns 0 for passwords that are too short', () => { diff --git a/src/lib/tests/prettyNumber.test.js b/src/lib/tests/prettyNumber.test.js index f816b12dd0..1950a90c3c 100644 --- a/src/lib/tests/prettyNumber.test.js +++ b/src/lib/tests/prettyNumber.test.js @@ -6,7 +6,7 @@ * the root directory of this source tree. */ jest.dontMock('../prettyNumber'); -const prettyNumber = require('../prettyNumber'); +const prettyNumber = require('../prettyNumber').default; describe('prettyNumber', () => { it('does not change small numbers', () => { diff --git a/testing/preprocessor.js b/testing/preprocessor.js index c37eddd11c..5e4d146303 100644 --- a/testing/preprocessor.js +++ b/testing/preprocessor.js @@ -22,14 +22,15 @@ module.exports = { // Ignore all files within node_modules // babel files can be .js, .es, .jsx or .es6 - if (filename.indexOf('node_modules') < 0 && babel.canCompile(filename)) { + if (filename.indexOf('node_modules') < 0) { return babel.transform(src, { filename: filename, - stage: 0, retainLines: true, + plugins: ['transform-decorators-legacy'], + presets: ['react', 'es2015', 'stage-0'] // Remove propTypes for tests so we don't have to keep unmocking lib/PropTypes // Also it's more representative of the production environment - plugins: [ 'babel-plugin-remove-proptypes' ] + //plugins: [ 'babel-plugin-remove-proptypes' ] }).code; } diff --git a/webpack/PIG.config.js b/webpack/PIG.config.js index 50ee21173e..56e6fd1dff 100644 --- a/webpack/PIG.config.js +++ b/webpack/PIG.config.js @@ -8,6 +8,6 @@ var configuration = require('./base.config.js'); configuration.entry = {PIG: './parse-interface-guide/index.js'}; -configuration.output.path = './PIG/bundles'; +configuration.output.path = __dirname + '/PIG/bundles'; module.exports = configuration; diff --git a/webpack/base.config.js b/webpack/base.config.js index a36ee769f0..abc5caf967 100644 --- a/webpack/base.config.js +++ b/webpack/base.config.js @@ -23,33 +23,36 @@ module.exports = { publicPath: 'bundles/' }, resolve: { - root: [__dirname,path.join(__dirname, '../src'), path.join(__dirname, 'node_modules')] + modules: [__dirname,path.join(__dirname, '../src'), path.join(__dirname, '../node_modules')] }, resolveLoader: { - root: path.join(__dirname, '../node_modules') + modules: [path.join(__dirname, '../node_modules')] }, module: { - loaders: [ + rules: [ { test: /\.js$/, exclude: /node_modules/, - loader: 'babel-loader', - query: { - optional: ['runtime', 'es7.decorators'] - } + use: { + loader: 'babel-loader', + query: { + plugins: ['transform-decorators-legacy'], + presets: ['react', 'es2015', 'stage-0'] + } + }, }, { test: /\.scss$/, - loader: "style-loader!css-loader?modules&localIdentName=[local]__[hash:base64:5]!sass-loader?includePaths[]=" + - encodeURIComponent(path.resolve(__dirname, '../src')) + use: [ "style-loader", "css-loader?modules&localIdentName=[local]__[hash:base64:5]!sass-loader?includePaths[]=" + + encodeURIComponent(path.resolve(__dirname, '../src')) ] }, { test: /\.css$/, - loader: 'style-loader!css-loader' + use: [ 'style-loader', 'css-loader' ] }, { test: /\.png$/, - loader: 'file-loader?name=img/[hash].[ext]', + use: { loader: 'file-loader?name=img/[hash].[ext]' } }, { test: /\.jpg$/, - loader: 'file-loader?name=img/[hash].[ext]', + use: { loader: 'file-loader?name=img/[hash].[ext]' } } ] }, diff --git a/webpack/build.config.js b/webpack/build.config.js index 8c849a06a7..f79923ceab 100644 --- a/webpack/build.config.js +++ b/webpack/build.config.js @@ -11,6 +11,6 @@ configuration.entry = { dashboard: './dashboard/index.js', login: './login/index.js' }; -configuration.output.path = './Parse-Dashboard/public/bundles'; +configuration.output.path = __dirname + '/Parse-Dashboard/public/bundles'; module.exports = configuration; diff --git a/webpack/production.config.js b/webpack/production.config.js index a84fdbd080..5b41b45f88 100644 --- a/webpack/production.config.js +++ b/webpack/production.config.js @@ -13,22 +13,10 @@ configuration.entry = { PIG: './parse-interface-guide/index.js', quickstart: './quickstart/index.js', }; -configuration.output.path = './production/bundles'; +configuration.output.path = __dirname + '/production/bundles'; var webpack = require('webpack'); -// Add propType removal to Babel -var loaders = configuration.module.loaders; -for (var i = 0; i < loaders.length; i++) { - if (loaders[i].loader === 'babel-loader') { - if (!loaders[i].query.plugins) { - loaders[i].query.plugins = []; - } - loaders[i].query.plugins.push('babel-plugin-remove-proptypes'); - break; - } -} - // Enable minification configuration.plugins.push( new webpack.DefinePlugin({ @@ -41,7 +29,7 @@ configuration.plugins.push( warnings: false } }), - new webpack.optimize.OccurenceOrderPlugin(), + new webpack.optimize.OccurrenceOrderPlugin(), function() { this.plugin('done', function(stats) { if (stats.compilation.errors && stats.compilation.errors.length) { diff --git a/webpack/publish.config.js b/webpack/publish.config.js index db53ef7a52..df74f1c200 100644 --- a/webpack/publish.config.js +++ b/webpack/publish.config.js @@ -11,22 +11,10 @@ configuration.entry = { dashboard: './dashboard/index.js', login: './login/index.js' }; -configuration.output.path = './Parse-Dashboard/public/bundles'; +configuration.output.path = __dirname + '/Parse-Dashboard/public/bundles'; var webpack = require('webpack'); -// Add propType removal to Babel -var loaders = configuration.module.loaders; -for (var i = 0; i < loaders.length; i++) { - if (loaders[i].loader === 'babel-loader') { - if (!loaders[i].query.plugins) { - loaders[i].query.plugins = []; - } - loaders[i].query.plugins.push('babel-plugin-remove-proptypes'); - break; - } -} - // Enable minification configuration.plugins.push( new webpack.DefinePlugin({ @@ -39,7 +27,7 @@ configuration.plugins.push( warnings: false } }), - new webpack.optimize.OccurenceOrderPlugin(), + new webpack.optimize.OccurrenceOrderPlugin(), function() { this.plugin('done', function(stats) { if (stats.compilation.errors && stats.compilation.errors.length) { diff --git a/webpack/webpack.config.js b/webpack/webpack.config.js index 04d4081fab..8f4be9d903 100644 --- a/webpack/webpack.config.js +++ b/webpack/webpack.config.js @@ -14,6 +14,6 @@ configuration.entry = { PIG: './parse-interface-guide/index.js', quickstart: './quickstart/index.js', }; -configuration.output.path = './bundles'; +configuration.output.path = __dirname + '/bundles'; module.exports = configuration; From 94f5b77b10c50f13e8984b36941e0cc3ee653151 Mon Sep 17 00:00:00 2001 From: Florent Vilmart Date: Mon, 22 May 2017 20:17:53 -0400 Subject: [PATCH 04/11] remove unused deps, bumps travis min versions --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index a726682659..b412593cf5 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,6 @@ "babel-core": "~6.24.1", "babel-eslint": "^7.2.3", "babel-loader": "~7.0.0", - "babel-plugin-remove-proptypes": "~1.0.0", "babel-plugin-transform-decorators-legacy": "^1.3.4", "babel-polyfill": "^6.23.0", "babel-preset-es2015": "^6.24.1", From 9860e2cc8e2d68e9a5c20731239a3b5a2aa99dab Mon Sep 17 00:00:00 2001 From: Florent Vilmart Date: Sat, 28 Oct 2017 14:42:03 -0400 Subject: [PATCH 05/11] Adds script that tests publishing --- .travis.yml | 6 +++--- scripts/before_script.sh | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) create mode 100755 scripts/before_script.sh diff --git a/.travis.yml b/.travis.yml index ed5283e877..ce7640999c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,8 @@ language: node_js node_js: -- '4.4' -- '5.7' -- '6.1' +- '6.11' +- '8.8' +before_script: ./scripts/before_script.sh cache: directories: - node_modules diff --git a/scripts/before_script.sh b/scripts/before_script.sh new file mode 100755 index 0000000000..ae18a78985 --- /dev/null +++ b/scripts/before_script.sh @@ -0,0 +1,5 @@ +#!/bin/sh +test -f Parse-Dashboard/public/bundles/dashboard.bundle.js || exit 1 +test -f Parse-Dashboard/public/bundles/login.bundle.js || exit 1 +test -f Parse-Dashboard/public/bundles/sprites.svg || exit 1 +test -d Parse-Dashboard/public/bundles/img || exit 1 From 929d149b89cdb99ad818d8e09aaf031b0a1271b9 Mon Sep 17 00:00:00 2001 From: Florent Vilmart Date: Sat, 28 Oct 2017 13:59:32 -0400 Subject: [PATCH 06/11] Updates webpack build scripts --- package.json | 14 +++++++++----- webpack/PIG.config.js | 2 +- webpack/base.config.js | 4 ++-- webpack/build.config.js | 2 +- webpack/production.config.js | 2 +- webpack/publish.config.js | 2 +- webpack/webpack.config.js | 2 +- 7 files changed, 16 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index b412593cf5..44f21dad70 100644 --- a/package.json +++ b/package.json @@ -50,17 +50,19 @@ "babel-eslint": "^7.2.3", "babel-loader": "~7.0.0", "babel-plugin-transform-decorators-legacy": "^1.3.4", + "babel-plugin-transform-object-rest-spread": "^6.26.0", + "babel-plugin-transform-regenerator": "^6.26.0", + "babel-plugin-transform-runtime": "^6.23.0", "babel-polyfill": "^6.23.0", - "babel-preset-es2015": "^6.24.1", + "babel-preset-env": "^1.6.1", "babel-preset-react": "^6.24.1", - "babel-preset-stage-0": "^6.24.1", "babel-runtime": "~6.23.0", "css-loader": "~0.28.2", "eslint": "^3.8.1", "eslint-plugin-jest": "^20.0.3", "eslint-plugin-react": "^7.0.1", "file-loader": "^0.11.1", - "history": "^4.6.1", + "history": "^2.1.2", "http-server": "~0.10.0", "immutable": "~3.8.1", "immutable-devtools": "~0.0.4", @@ -75,7 +77,7 @@ "react-dnd": "~2.4.0", "react-dnd-html5-backend": "~2.4.1", "react-dom": "^15.0.1", - "react-router": "^4.1.1", + "react-router": "^2.6.0", "request-promise": "^4.1.1", "sass-loader": "~6.0.5", "style-loader": "~0.18.0", @@ -106,7 +108,9 @@ "roots": [ "src/lib" ], - "transform": {".*": "/testing/preprocessor.js"}, + "transform": { + ".*": "/testing/preprocessor.js" + }, "unmockedModulePathPatterns": [ "react", "react-dom", diff --git a/webpack/PIG.config.js b/webpack/PIG.config.js index 56e6fd1dff..422a7bc24b 100644 --- a/webpack/PIG.config.js +++ b/webpack/PIG.config.js @@ -8,6 +8,6 @@ var configuration = require('./base.config.js'); configuration.entry = {PIG: './parse-interface-guide/index.js'}; -configuration.output.path = __dirname + '/PIG/bundles'; +configuration.output.path = require('path').resolve('./PIG/bundles'); module.exports = configuration; diff --git a/webpack/base.config.js b/webpack/base.config.js index abc5caf967..4987a7b9f0 100644 --- a/webpack/base.config.js +++ b/webpack/base.config.js @@ -36,8 +36,8 @@ module.exports = { use: { loader: 'babel-loader', query: { - plugins: ['transform-decorators-legacy'], - presets: ['react', 'es2015', 'stage-0'] + plugins: ['transform-decorators-legacy', 'transform-object-rest-spread', 'transform-regenerator', 'transform-runtime'], + presets: ['react', 'env'] } }, }, { diff --git a/webpack/build.config.js b/webpack/build.config.js index f79923ceab..ad45faeb51 100644 --- a/webpack/build.config.js +++ b/webpack/build.config.js @@ -11,6 +11,6 @@ configuration.entry = { dashboard: './dashboard/index.js', login: './login/index.js' }; -configuration.output.path = __dirname + '/Parse-Dashboard/public/bundles'; +configuration.output.path = require('path').resolve('./Parse-Dashboard/public/bundles'); module.exports = configuration; diff --git a/webpack/production.config.js b/webpack/production.config.js index 5b41b45f88..355eeeb812 100644 --- a/webpack/production.config.js +++ b/webpack/production.config.js @@ -13,7 +13,7 @@ configuration.entry = { PIG: './parse-interface-guide/index.js', quickstart: './quickstart/index.js', }; -configuration.output.path = __dirname + '/production/bundles'; +configuration.output.path = require('path').resolve('./production/bundles'); var webpack = require('webpack'); diff --git a/webpack/publish.config.js b/webpack/publish.config.js index df74f1c200..e5402fa2e6 100644 --- a/webpack/publish.config.js +++ b/webpack/publish.config.js @@ -11,7 +11,7 @@ configuration.entry = { dashboard: './dashboard/index.js', login: './login/index.js' }; -configuration.output.path = __dirname + '/Parse-Dashboard/public/bundles'; +configuration.output.path = require('path').resolve('./Parse-Dashboard/public/bundles'); var webpack = require('webpack'); diff --git a/webpack/webpack.config.js b/webpack/webpack.config.js index 8f4be9d903..cd597b8338 100644 --- a/webpack/webpack.config.js +++ b/webpack/webpack.config.js @@ -14,6 +14,6 @@ configuration.entry = { PIG: './parse-interface-guide/index.js', quickstart: './quickstart/index.js', }; -configuration.output.path = __dirname + '/bundles'; +configuration.output.path = require('path').resolve('./bundles'); module.exports = configuration; From 40a6b726e799663c3b1a4b50a07ba47ee3a8eb86 Mon Sep 17 00:00:00 2001 From: Florent Vilmart Date: Sat, 28 Oct 2017 15:31:20 -0400 Subject: [PATCH 07/11] Better beforeScript --- scripts/before_script.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/scripts/before_script.sh b/scripts/before_script.sh index ae18a78985..a13c05f554 100755 --- a/scripts/before_script.sh +++ b/scripts/before_script.sh @@ -1,5 +1,8 @@ #!/bin/sh -test -f Parse-Dashboard/public/bundles/dashboard.bundle.js || exit 1 -test -f Parse-Dashboard/public/bundles/login.bundle.js || exit 1 -test -f Parse-Dashboard/public/bundles/sprites.svg || exit 1 -test -d Parse-Dashboard/public/bundles/img || exit 1 +set -e +set -x + +test -f Parse-Dashboard/public/bundles/dashboard.bundle.js +test -f Parse-Dashboard/public/bundles/login.bundle.js +test -f Parse-Dashboard/public/bundles/sprites.svgs +test -d Parse-Dashboard/public/bundles/img From 1921a7ffa6403b584ed5b82110c27265dc476493 Mon Sep 17 00:00:00 2001 From: Florent Vilmart Date: Sat, 28 Oct 2017 15:40:27 -0400 Subject: [PATCH 08/11] fixup! Better beforeScript --- scripts/before_script.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/before_script.sh b/scripts/before_script.sh index a13c05f554..06bda6d29f 100755 --- a/scripts/before_script.sh +++ b/scripts/before_script.sh @@ -4,5 +4,5 @@ set -x test -f Parse-Dashboard/public/bundles/dashboard.bundle.js test -f Parse-Dashboard/public/bundles/login.bundle.js -test -f Parse-Dashboard/public/bundles/sprites.svgs +test -f Parse-Dashboard/public/bundles/sprites.svg test -d Parse-Dashboard/public/bundles/img From 50b2efb9c0c20443cd2ec042a943a39969dd0d8a Mon Sep 17 00:00:00 2001 From: Florent Vilmart Date: Sat, 28 Oct 2017 15:41:09 -0400 Subject: [PATCH 09/11] Adds progress to webpack publish so travis dont hang --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 44f21dad70..2f2a7eeda0 100644 --- a/package.json +++ b/package.json @@ -94,7 +94,7 @@ "lint": "eslint . --ignore-path .gitignore --cache", "pretest": "npm run lint", "generate": "node scripts/generate.js", - "prepublish": "webpack --config webpack/publish.config.js", + "prepublish": "webpack --config webpack/publish.config.js --progress", "start": "node ./Parse-Dashboard/index.js" }, "bin": { From 5a68e93e20609076eac03d6269390eada3e05679 Mon Sep 17 00:00:00 2001 From: Florent Vilmart Date: Sat, 28 Oct 2017 15:47:33 -0400 Subject: [PATCH 10/11] Proper plugins for tests preprocessor --- testing/preprocessor.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testing/preprocessor.js b/testing/preprocessor.js index 5e4d146303..49b6cf4cb4 100644 --- a/testing/preprocessor.js +++ b/testing/preprocessor.js @@ -26,8 +26,8 @@ module.exports = { return babel.transform(src, { filename: filename, retainLines: true, - plugins: ['transform-decorators-legacy'], - presets: ['react', 'es2015', 'stage-0'] + plugins: ['transform-decorators-legacy', 'transform-object-rest-spread', 'transform-regenerator', 'transform-runtime'], + presets: ['react', 'env'] // Remove propTypes for tests so we don't have to keep unmocking lib/PropTypes // Also it's more representative of the production environment //plugins: [ 'babel-plugin-remove-proptypes' ] From 0f1af0735b7781d37a17e3dbb62ea74276d4d12a Mon Sep 17 00:00:00 2001 From: Florent Vilmart Date: Sat, 28 Oct 2017 15:57:09 -0400 Subject: [PATCH 11/11] Set proper proptype for the test --- src/components/PlatformCard/PlatformCard.react.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/PlatformCard/PlatformCard.react.js b/src/components/PlatformCard/PlatformCard.react.js index a96eb90a80..afee1d67d4 100644 --- a/src/components/PlatformCard/PlatformCard.react.js +++ b/src/components/PlatformCard/PlatformCard.react.js @@ -32,7 +32,7 @@ export default PlatformCard; PlatformCard.propTypes = { platform: PropTypes.oneOf([ - 'ios', 'android', 'xamarin', 'unity', 'php', 'windows', 'dotnet', 'arduino', 'rpi', 'rtos' + 'apple', 'android', 'xamarin', 'unity', 'php', 'windows', 'dotnet', 'arduino', 'rpi', 'rtos' ]).isRequired.describe( 'The platform name. This will determine the icon.' ),