Skip to content

Commit

Permalink
Revert "Update dependencies to enable Greenkeeper 🌴 (#709)"
Browse files Browse the repository at this point in the history
This reverts commit cf6ed6f.
  • Loading branch information
flovilmart committed Oct 27, 2017
1 parent 382c696 commit 2d6beca
Show file tree
Hide file tree
Showing 14 changed files with 82 additions and 62 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
language: node_js
node_js:
- '6.10'
- '7.10'
- '4.4'
- '5.7'
- '6.1'
cache:
directories:
- node_modules
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# 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)

Expand Down
57 changes: 29 additions & 28 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,47 +41,44 @@
"csurf": "^1.9.0",
"express": "^4.13.4",
"json-file-plus": "^3.2.0",
"package-json": "^4.0.1",
"package-json": "^2.3.1",
"passport": "^0.3.2",
"passport-local": "^1.0.0"
},
"devDependencies": {
"babel-core": "~6.24.1",
"babel-core": "~5.8.12",
"babel-eslint": "^7.2.3",
"babel-loader": "~7.0.0",
"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",
"babel-loader": "~5.3.0",
"babel-plugin-remove-proptypes": "~1.0.0",
"babel-polyfill": "^6.7.2",
"babel-runtime": "~5.8.25",
"css-loader": "~0.18.0",
"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",
"http-server": "~0.10.0",
"immutable": "~3.8.1",
"eslint-plugin-react": "^6.4.1",
"file-loader": "^0.8.5",
"history": "^2.1.2",
"http-server": "~0.8.5",
"immutable": "~3.7.5",
"immutable-devtools": "~0.0.4",
"jest-cli": "^20.0.3",
"js-beautify": "~1.6.14",
"jest-cli": "^12.0.2",
"js-beautify": "~1.5.0",
"marked": "^0.3.5",
"node-sass": "^4.5.3",
"parse": "1.9.2",
"prismjs": "~1.6.0",
"node-sass": "^3.7.0",
"parse": "1.9.1",
"prismjs": "~1.2.0",
"react": "^15.0.1",
"react-addons-test-utils": "^15.0.1",
"react-dnd": "~2.4.0",
"react-dnd-html5-backend": "~2.4.1",
"react-dnd": "~2.1.4",
"react-dnd-html5-backend": "~2.0.0",
"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",
"sass-loader": "~3.1.2",
"style-loader": "~0.12.3",
"svg-prep": "~1.0.0",
"transform-jest-deps": "^2.1.0",
"webpack": "~2.5.1"
"webpack": "~1.12.0"
},
"scripts": {
"dev": "node ./Parse-Dashboard/index.js & webpack --config webpack/build.config.js --devtool eval-source-map --progress --watch",
Expand All @@ -103,10 +100,14 @@
},
"main": "Parse-Dashboard/app.js",
"jest": {
"roots": [
"testPathDirs": [
"src/lib"
],
"transform": {".*": "<rootDir>/testing/preprocessor.js"},
"scriptPreprocessor": "<rootDir>/testing/preprocessor.js",
"testDirectoryName": "tests",
"testFileExtensions": [
"test.js"
],
"unmockedModulePathPatterns": [
"react",
"react-dom",
Expand Down
2 changes: 1 addition & 1 deletion src/lib/tests/Button.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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').default;
const Button = require('../../components/Button/Button.react');

describe('Button', () => {
it('has a default state', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/tests/Tooltip.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
jest.dontMock('../../components/Tooltip/Tooltip.react');

describe('Tooltip', () => {
it('does nothing', () => {});
// test suite goes here
});
2 changes: 1 addition & 1 deletion src/lib/tests/passwordStrength.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* the root directory of this source tree.
*/
jest.dontMock('../passwordStrength');
const passwordStrength = require('../passwordStrength').default;
const passwordStrength = require('../passwordStrength');

describe('passwordStrength', () => {
it('returns 0 for passwords that are too short', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/tests/prettyNumber.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* the root directory of this source tree.
*/
jest.dontMock('../prettyNumber');
const prettyNumber = require('../prettyNumber').default;
const prettyNumber = require('../prettyNumber');

describe('prettyNumber', () => {
it('does not change small numbers', () => {
Expand Down
7 changes: 3 additions & 4 deletions testing/preprocessor.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,14 @@ module.exports = {

// Ignore all files within node_modules
// babel files can be .js, .es, .jsx or .es6
if (filename.indexOf('node_modules') < 0) {
if (filename.indexOf('node_modules') < 0 && babel.canCompile(filename)) {
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;
}

Expand Down
2 changes: 1 addition & 1 deletion webpack/PIG.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = './PIG/bundles';

module.exports = configuration;
27 changes: 12 additions & 15 deletions webpack/base.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,36 +23,33 @@ module.exports = {
publicPath: 'bundles/'
},
resolve: {
modules: [__dirname,path.join(__dirname, '../src'), path.join(__dirname, '../node_modules')]
root: [__dirname,path.join(__dirname, '../src'), path.join(__dirname, 'node_modules')]
},
resolveLoader: {
modules: [path.join(__dirname, '../node_modules')]
root: path.join(__dirname, '../node_modules')
},
module: {
rules: [
loaders: [
{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
query: {
plugins: ['transform-decorators-legacy'],
presets: ['react', 'es2015', 'stage-0']
}
},
loader: 'babel-loader',
query: {
optional: ['runtime', 'es7.decorators']
}
}, {
test: /\.scss$/,
use: [ "style-loader", "css-loader?modules&localIdentName=[local]__[hash:base64:5]!sass-loader?includePaths[]=" +
encodeURIComponent(path.resolve(__dirname, '../src')) ]
loader: "style-loader!css-loader?modules&localIdentName=[local]__[hash:base64:5]!sass-loader?includePaths[]=" +
encodeURIComponent(path.resolve(__dirname, '../src'))
}, {
test: /\.css$/,
use: [ 'style-loader', 'css-loader' ]
loader: 'style-loader!css-loader'
}, {
test: /\.png$/,
use: { loader: 'file-loader?name=img/[hash].[ext]' }
loader: 'file-loader?name=img/[hash].[ext]',
}, {
test: /\.jpg$/,
use: { loader: 'file-loader?name=img/[hash].[ext]' }
loader: 'file-loader?name=img/[hash].[ext]',
}
]
},
Expand Down
2 changes: 1 addition & 1 deletion webpack/build.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = './Parse-Dashboard/public/bundles';

module.exports = configuration;
16 changes: 14 additions & 2 deletions webpack/production.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,22 @@ configuration.entry = {
PIG: './parse-interface-guide/index.js',
quickstart: './quickstart/index.js',
};
configuration.output.path = __dirname + '/production/bundles';
configuration.output.path = './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({
Expand All @@ -29,7 +41,7 @@ configuration.plugins.push(
warnings: false
}
}),
new webpack.optimize.OccurrenceOrderPlugin(),
new webpack.optimize.OccurenceOrderPlugin(),
function() {
this.plugin('done', function(stats) {
if (stats.compilation.errors && stats.compilation.errors.length) {
Expand Down
16 changes: 14 additions & 2 deletions webpack/publish.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,22 @@ configuration.entry = {
dashboard: './dashboard/index.js',
login: './login/index.js'
};
configuration.output.path = __dirname + '/Parse-Dashboard/public/bundles';
configuration.output.path = './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({
Expand All @@ -27,7 +39,7 @@ configuration.plugins.push(
warnings: false
}
}),
new webpack.optimize.OccurrenceOrderPlugin(),
new webpack.optimize.OccurenceOrderPlugin(),
function() {
this.plugin('done', function(stats) {
if (stats.compilation.errors && stats.compilation.errors.length) {
Expand Down
2 changes: 1 addition & 1 deletion webpack/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ configuration.entry = {
PIG: './parse-interface-guide/index.js',
quickstart: './quickstart/index.js',
};
configuration.output.path = __dirname + '/bundles';
configuration.output.path = './bundles';

module.exports = configuration;

0 comments on commit 2d6beca

Please sign in to comment.