Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update all dependencies 🌴 #420

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
{
"extends": "airbnb",
"rules": {
"react/jsx-no-bind": 0,
"react/prefer-stateless-function": 0,
# We use _ to define private variables and methods in clases
"no-underscore-dangle": 0,
# This seems to be buggy we don't want eslint to check this
"import/no-extraneous-dependencies": 0,
# This is a depricated rule. So we turned off it.
"react/require-extension": 0,
# We can write JSX in anyfile we want.
"react/jsx-filename-extension": 0,
# We don't like this rule.
"arrow-body-style": 0,
# We don't like this rule. We write arrow functions only when we needed.
"prefer-arrow-callback": 0,
# We don't need to write function names always.
"func-names": 0
},
"parserOptions": {
"ecmaVersion": 6,
"ecmaFeatures": {
"experimentalObjectRestSpread": true
}
}
},
}
2 changes: 2 additions & 0 deletions dist/client/manager/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,7 @@ var _provider2 = _interopRequireDefault(_provider);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

/* global document */

var rootEl = document.getElementById('root');
(0, _storybookUi2.default)(rootEl, new _provider2.default());
2 changes: 2 additions & 0 deletions dist/client/manager/provider.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ var _preview2 = _interopRequireDefault(_preview);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

/* global location */

var ReactProvider = function (_Provider) {
(0, _inherits3.default)(ReactProvider, _Provider);

Expand Down
30 changes: 15 additions & 15 deletions dist/client/preview/client_api.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ var _toConsumableArray2 = require("babel-runtime/helpers/toConsumableArray");

var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);

var _keys = require("babel-runtime/core-js/object/keys");

var _keys2 = _interopRequireDefault(_keys);

var _extends2 = require("babel-runtime/helpers/extends");

var _extends3 = _interopRequireDefault(_extends2);
Expand Down Expand Up @@ -68,21 +72,17 @@ var ClientApi = function () {
};

// apply addons
for (var name in this._addons) {
if (this._addons.hasOwnProperty(name)) {
(function () {
var addon = _this._addons[name];
api[name] = function () {
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}

addon.apply(api, args);
return api;
};
})();
}
}
(0, _keys2.default)(this._addons).forEach(function (name) {
var addon = _this._addons[name];
api[name] = function () {
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}

addon.apply(api, args);
return api;
};
});

api.add = function (storyName, getStory) {
// Wrap the getStory function with each decorator. The first
Expand Down
5 changes: 4 additions & 1 deletion dist/client/preview/error_display.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de

var mainStyle = {
position: 'fixed',
top: 0, bottom: 0, left: 0, right: 0,
top: 0,
bottom: 0,
left: 0,
right: 0,
padding: 20,
backgroundColor: 'rgb(187, 49, 49)',
color: '#FFF',
Expand Down
30 changes: 15 additions & 15 deletions dist/client/preview/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,20 @@ var _assign = require('babel-runtime/core-js/object/assign');

var _assign2 = _interopRequireDefault(_assign);

var _redux = require('redux');

var _storybookAddons = require('@kadira/storybook-addons');

var _storybookAddons2 = _interopRequireDefault(_storybookAddons);

var _storybookChannelPagebus = require('@kadira/storybook-channel-pagebus');

var _storybookChannelPagebus2 = _interopRequireDefault(_storybookChannelPagebus);

var _qs = require('qs');

var _qs2 = _interopRequireDefault(_qs);

var _story_store = require('./story_store');

var _story_store2 = _interopRequireDefault(_story_store);
Expand All @@ -25,34 +39,20 @@ var _render = require('./render');

var _render2 = _interopRequireDefault(_render);

var _qs = require('qs');

var _qs2 = _interopRequireDefault(_qs);

var _init = require('./init');

var _init2 = _interopRequireDefault(_init);

var _storybookChannelPagebus = require('@kadira/storybook-channel-pagebus');

var _storybookChannelPagebus2 = _interopRequireDefault(_storybookChannelPagebus);

var _actions = require('./actions');

var _storybookAddons = require('@kadira/storybook-addons');

var _storybookAddons2 = _interopRequireDefault(_storybookAddons);

var _redux = require('redux');

var _reducer = require('./reducer');

var _reducer2 = _interopRequireDefault(_reducer);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

// check whether we're running on node/browser
var isBrowser = typeof window !== 'undefined';
var isBrowser = typeof window !== 'undefined'; /* global window */

var storyStore = new _story_store2.default();
var reduxStore = (0, _redux.createStore)(_reducer2.default);
Expand Down
4 changes: 2 additions & 2 deletions dist/client/preview/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ exports.default = function (context) {
};
};

var _actions = require('./actions');

var _key_events = require('@kadira/storybook-ui/dist/libs/key_events');

var _key_events2 = _interopRequireDefault(_key_events);

var _actions = require('./actions');

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
8 changes: 5 additions & 3 deletions dist/client/preview/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ var _error_display2 = _interopRequireDefault(_error_display);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

// check whether we're running on node/browser
var isBrowser = typeof window !== 'undefined';
var isBrowser = typeof window !== 'undefined'; /* global document */

var rootEl = null;
var previousKind = '';
Expand Down Expand Up @@ -58,7 +58,8 @@ function renderMain(data, storyStore) {

var story = storyStore.getStory(selectedKind, selectedStory);
if (!story) {
return _reactDom2.default.render(noPreview, rootEl);
_reactDom2.default.render(noPreview, rootEl);
return null;
}

// Unmount the previous story only if selectedKind or selectedStory has changed.
Expand All @@ -81,7 +82,8 @@ function renderMain(data, storyStore) {
};

try {
return _reactDom2.default.render(story(context), rootEl);
_reactDom2.default.render(story(context), rootEl);
return null;
} catch (ex) {
return renderError(ex);
}
Expand Down
Empty file modified dist/server/build.js
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion dist/server/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ var _json2 = _interopRequireDefault(_json);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

// avoid ESLint errors
var logger = console;
var logger = console; /* eslint global-require: 0 */

function removeReactHmre(presets) {
var index = presets.indexOf('react-hmre');
Expand Down
3 changes: 3 additions & 0 deletions dist/server/config/error_enhancements.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
'use strict';

/* eslint global-require: 0 */
/* global navigator */

var isChrome = function isChrome() {
return navigator.userAgent.toLowerCase().indexOf('chrome') > -1;
};
Expand Down
6 changes: 5 additions & 1 deletion dist/server/config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ var _caseSensitivePathsWebpackPlugin2 = _interopRequireDefault(_caseSensitivePat

var _utils = require('./utils');

var _babel = require('./babel.js');

var _babel2 = _interopRequireDefault(_babel);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var config = {
Expand All @@ -36,7 +40,7 @@ var config = {
loaders: [{
test: /\.jsx?$/,
loader: require.resolve('babel-loader'),
query: require('./babel.js'),
query: _babel2.default,
include: _utils.includePaths,
exclude: _utils.excludePaths
}]
Expand Down
6 changes: 5 additions & 1 deletion dist/server/config/webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ var _webpack2 = _interopRequireDefault(_webpack);

var _utils = require('./utils');

var _babelProd = require('./babel.prod.js');

var _babelProd2 = _interopRequireDefault(_babelProd);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var entries = {
Expand Down Expand Up @@ -51,7 +55,7 @@ var config = {
loaders: [{
test: /\.jsx?$/,
loader: require.resolve('babel-loader'),
query: require('./babel.prod.js'),
query: _babelProd2.default,
include: _utils.includePaths,
exclude: _utils.excludePaths
}]
Expand Down
14 changes: 7 additions & 7 deletions dist/server/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#!/usr/bin/env node
'use strict';

var _middleware = require('@kadira/storybook-database-local/dist/server/middleware');

var _middleware2 = _interopRequireDefault(_middleware);

var _express = require('express');

var _express2 = _interopRequireDefault(_express);
Expand All @@ -17,11 +21,7 @@ var _fs = require('fs');

var _fs2 = _interopRequireDefault(_fs);

var _middleware = require('./middleware');

var _middleware2 = _interopRequireDefault(_middleware);

var _middleware3 = require('@kadira/storybook-database-local/dist/server/middleware');
var _middleware3 = require('./middleware');

var _middleware4 = _interopRequireDefault(_middleware3);

Expand Down Expand Up @@ -83,13 +83,13 @@ if (_commander2.default.staticDir) {
// Build the webpack configuration using the `baseConfig`
// custom `.babelrc` file and `webpack.config.js` files
var configDir = _commander2.default.configDir || './.storybook';
app.use((0, _middleware2.default)(configDir));
app.use((0, _middleware4.default)(configDir));

// The addon database service is disabled by default for now
// It should be enabled with the --enable-db for dev server
if (_commander2.default.enableDb) {
var dbPath = _commander2.default.dbPath || _path2.default.resolve(configDir, 'addon-db.json');
app.use('/db', (0, _middleware4.default)(dbPath));
app.use('/db', (0, _middleware2.default)(dbPath));
}

app.listen.apply(app, listenAddr.concat([function (error) {
Expand Down
4 changes: 3 additions & 1 deletion dist/server/track_usage.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ var _request2 = _interopRequireDefault(_request);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var logger = console; // ### WHAT?
var logger = console; /* eslint global-require: 0 */

// ### WHAT?
//
// We will track anonymous usage of how you use storybook.
// We don't want any personal information.
Expand Down
19 changes: 10 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,20 +47,20 @@
"case-sensitive-paths-webpack-plugin": "^1.1.2",
"commander": "^2.9.0",
"configstore": "^2.0.0",
"css-loader": "0.23.1",
"css-loader": "0.24.0",
"express": "^4.13.3",
"file-loader": "^0.9.0",
"json-loader": "^0.5.4",
"json-stringify-safe": "^5.0.1",
"json5": "^0.5.0",
"lodash.pick": "^4.2.0",
"postcss-loader": "0.9.1",
"postcss-loader": "0.11.1",
"qs": "^6.1.0",
"react-modal": "^1.2.0",
"redbox-react": "^1.2.2",
"redux": "^3.5.2",
"request": "^2.74.0",
"shelljs": "^0.6.0",
"shelljs": "^0.7.4",
"stack-source-map": "^1.0.5",
"style-loader": "0.13.1",
"url-loader": "^0.5.7",
Expand All @@ -80,14 +80,15 @@
"chai": "^3.5.0",
"deep-equal": "^1.0.1",
"enzyme": "^2.2.0",
"eslint": "^2.7.0",
"eslint-config-airbnb": "^6.2.0",
"eslint-plugin-babel": "^3.1.0",
"eslint-plugin-react": "^4.2.3",
"eslint": "^3.4.0",
"eslint-config-airbnb": "^10.0.1",
"eslint-plugin-import": "^1.13.0",
"eslint-plugin-jsx-a11y": "^2.1.0",
"eslint-plugin-react": "^6.1.2",
"expect": "^1.6.0",
"greenkeeper-postpublish": "^1.0.1",
"jsdom": "^8.4.0",
"mocha": "^2.4.5",
"jsdom": "^9.5.0",
"mocha": "^3.0.2",
"mock-fs": "^3.8.0",
"nodemon": "^1.9.1",
"react": "^15.0.0",
Expand Down
2 changes: 2 additions & 0 deletions src/client/manager/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* global document */

import renderStorybookUI from '@kadira/storybook-ui';
import Provider from './provider';

Expand Down
2 changes: 2 additions & 0 deletions src/client/manager/provider.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* global location */

import UUID from 'uuid';
import qs from 'qs';
import React from 'react';
Expand Down
3 changes: 2 additions & 1 deletion src/client/preview/__tests__/client_api.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { expect } from 'chai';
import ClientAPI from '../client_api';

const { describe, it } = global;
import { expect } from 'chai';

class StoryStore {
constructor() {
Expand Down
Loading