Skip to content

Commit 35141d9

Browse files
authored
Dependencies updats (#797)
* chore(package): update dependencies * docs(readme): add Greenkeeper badge * Adjustments for modernization * remove unused deps, bumps travis min versions * Adds script that tests publishing * Updates webpack build scripts * Better beforeScript * fixup! Better beforeScript * Adds progress to webpack publish so travis dont hang * Proper plugins for tests preprocessor * Set proper proptype for the test
1 parent 49bf7e3 commit 35141d9

16 files changed

+75
-82
lines changed

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
language: node_js
22
node_js:
3-
- '4.4'
4-
- '5.7'
5-
- '6.1'
3+
- '6.11'
4+
- '8.8'
5+
before_script: ./scripts/before_script.sh
66
cache:
77
directories:
88
- node_modules

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Parse Dashboard
22

3+
[![Greenkeeper badge](https://badges.greenkeeper.io/parse-community/parse-dashboard.svg)](https://greenkeeper.io/)
4+
35
[![Build Status](https://img.shields.io/travis/parse-community/parse-dashboard/master.svg?style=flat)](https://travis-ci.org/parse-community/parse-dashboard)
46
[![npm version](https://img.shields.io/npm/v/parse-dashboard.svg?style=flat)](https://www.npmjs.com/package/parse-dashboard)
57

package.json

Lines changed: 31 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -41,44 +41,49 @@
4141
"csurf": "^1.9.0",
4242
"express": "^4.13.4",
4343
"json-file-plus": "^3.2.0",
44-
"package-json": "^2.3.1",
44+
"package-json": "^4.0.1",
4545
"passport": "^0.3.2",
4646
"passport-local": "^1.0.0"
4747
},
4848
"devDependencies": {
49-
"babel-core": "~5.8.12",
49+
"babel-core": "~6.24.1",
5050
"babel-eslint": "^7.2.3",
51-
"babel-loader": "~5.3.0",
52-
"babel-plugin-remove-proptypes": "~1.0.0",
53-
"babel-polyfill": "^6.7.2",
54-
"babel-runtime": "~5.8.25",
55-
"css-loader": "~0.18.0",
51+
"babel-loader": "~7.0.0",
52+
"babel-plugin-transform-decorators-legacy": "^1.3.4",
53+
"babel-plugin-transform-object-rest-spread": "^6.26.0",
54+
"babel-plugin-transform-regenerator": "^6.26.0",
55+
"babel-plugin-transform-runtime": "^6.23.0",
56+
"babel-polyfill": "^6.23.0",
57+
"babel-preset-env": "^1.6.1",
58+
"babel-preset-react": "^6.24.1",
59+
"babel-runtime": "~6.23.0",
60+
"css-loader": "~0.28.2",
5661
"eslint": "^3.8.1",
5762
"eslint-plugin-jest": "^20.0.3",
58-
"eslint-plugin-react": "^6.4.1",
59-
"file-loader": "^0.8.5",
63+
"eslint-plugin-react": "^7.0.1",
64+
"file-loader": "^0.11.1",
6065
"history": "^2.1.2",
61-
"http-server": "~0.8.5",
62-
"immutable": "~3.7.5",
66+
"http-server": "~0.10.0",
67+
"immutable": "~3.8.1",
6368
"immutable-devtools": "~0.0.4",
64-
"jest-cli": "^12.0.2",
65-
"js-beautify": "~1.5.0",
69+
"jest-cli": "^20.0.3",
70+
"js-beautify": "~1.6.14",
6671
"marked": "^0.3.5",
67-
"node-sass": "^3.7.0",
68-
"parse": "1.9.1",
69-
"prismjs": "~1.2.0",
72+
"node-sass": "^4.5.3",
73+
"parse": "1.9.2",
74+
"prismjs": "~1.6.0",
7075
"react": "^15.0.1",
7176
"react-addons-test-utils": "^15.0.1",
72-
"react-dnd": "~2.1.4",
73-
"react-dnd-html5-backend": "~2.0.0",
77+
"react-dnd": "~2.4.0",
78+
"react-dnd-html5-backend": "~2.4.1",
7479
"react-dom": "^15.0.1",
7580
"react-router": "^2.6.0",
7681
"request-promise": "^4.1.1",
77-
"sass-loader": "~3.1.2",
78-
"style-loader": "~0.12.3",
82+
"sass-loader": "~6.0.5",
83+
"style-loader": "~0.18.0",
7984
"svg-prep": "~1.0.0",
8085
"transform-jest-deps": "^2.1.0",
81-
"webpack": "~1.12.0"
86+
"webpack": "~2.5.1"
8287
},
8388
"scripts": {
8489
"dev": "node ./Parse-Dashboard/index.js & webpack --config webpack/build.config.js --devtool eval-source-map --progress --watch",
@@ -89,7 +94,7 @@
8994
"lint": "eslint . --ignore-path .gitignore --cache",
9095
"pretest": "npm run lint",
9196
"generate": "node scripts/generate.js",
92-
"prepublish": "webpack --config webpack/publish.config.js",
97+
"prepublish": "webpack --config webpack/publish.config.js --progress",
9398
"start": "node ./Parse-Dashboard/index.js"
9499
},
95100
"bin": {
@@ -100,14 +105,12 @@
100105
},
101106
"main": "Parse-Dashboard/app.js",
102107
"jest": {
103-
"testPathDirs": [
108+
"roots": [
104109
"src/lib"
105110
],
106-
"scriptPreprocessor": "<rootDir>/testing/preprocessor.js",
107-
"testDirectoryName": "tests",
108-
"testFileExtensions": [
109-
"test.js"
110-
],
111+
"transform": {
112+
".*": "<rootDir>/testing/preprocessor.js"
113+
},
111114
"unmockedModulePathPatterns": [
112115
"react",
113116
"react-dom",

scripts/before_script.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/sh
2+
set -e
3+
set -x
4+
5+
test -f Parse-Dashboard/public/bundles/dashboard.bundle.js
6+
test -f Parse-Dashboard/public/bundles/login.bundle.js
7+
test -f Parse-Dashboard/public/bundles/sprites.svg
8+
test -d Parse-Dashboard/public/bundles/img

src/components/PlatformCard/PlatformCard.react.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export default PlatformCard;
3232

3333
PlatformCard.propTypes = {
3434
platform: PropTypes.oneOf([
35-
'ios', 'android', 'xamarin', 'unity', 'php', 'windows', 'dotnet', 'arduino', 'rpi', 'rtos'
35+
'apple', 'android', 'xamarin', 'unity', 'php', 'windows', 'dotnet', 'arduino', 'rpi', 'rtos'
3636
]).isRequired.describe(
3737
'The platform name. This will determine the icon.'
3838
),

src/lib/tests/Button.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jest.dontMock('../../components/Button/Button.react');
1010
import React from 'react';
1111
import TestUtils from 'react-addons-test-utils';
1212

13-
const Button = require('../../components/Button/Button.react');
13+
const Button = require('../../components/Button/Button.react').default;
1414

1515
describe('Button', () => {
1616
it('has a default state', () => {

src/lib/tests/Tooltip.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88
jest.dontMock('../../components/Tooltip/Tooltip.react');
99

1010
describe('Tooltip', () => {
11-
// test suite goes here
11+
it('does nothing', () => {});
1212
});

src/lib/tests/passwordStrength.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* the root directory of this source tree.
77
*/
88
jest.dontMock('../passwordStrength');
9-
const passwordStrength = require('../passwordStrength');
9+
const passwordStrength = require('../passwordStrength').default;
1010

1111
describe('passwordStrength', () => {
1212
it('returns 0 for passwords that are too short', () => {

src/lib/tests/prettyNumber.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* the root directory of this source tree.
77
*/
88
jest.dontMock('../prettyNumber');
9-
const prettyNumber = require('../prettyNumber');
9+
const prettyNumber = require('../prettyNumber').default;
1010

1111
describe('prettyNumber', () => {
1212
it('does not change small numbers', () => {

testing/preprocessor.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,15 @@ module.exports = {
2222

2323
// Ignore all files within node_modules
2424
// babel files can be .js, .es, .jsx or .es6
25-
if (filename.indexOf('node_modules') < 0 && babel.canCompile(filename)) {
25+
if (filename.indexOf('node_modules') < 0) {
2626
return babel.transform(src, {
2727
filename: filename,
28-
stage: 0,
2928
retainLines: true,
29+
plugins: ['transform-decorators-legacy', 'transform-object-rest-spread', 'transform-regenerator', 'transform-runtime'],
30+
presets: ['react', 'env']
3031
// Remove propTypes for tests so we don't have to keep unmocking lib/PropTypes
3132
// Also it's more representative of the production environment
32-
plugins: [ 'babel-plugin-remove-proptypes' ]
33+
//plugins: [ 'babel-plugin-remove-proptypes' ]
3334
}).code;
3435
}
3536

0 commit comments

Comments
 (0)