Skip to content

Commit df7ce81

Browse files
authored
Merge pull request #1101 from storybooks/greenkeeper/lerna-2.0.0-rc.5
Update lerna to the latest version 🚀
2 parents fa3d19d + a593145 commit df7ce81

File tree

11 files changed

+31
-25
lines changed

11 files changed

+31
-25
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ before_install: ./scripts/travis/before_install.sh
1111
after_success: ./scripts/travis/after_success.sh
1212
script:
1313
- npm run bootstrap
14-
- (cd examples/test-cra && npm install)
14+
- lerna exec --scope test-cra -- npm i
1515
- npm run lint
1616
- npm run test -- --coverage
1717
- npm run coverage

addons/comments/src/stories/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React from 'react';
2-
import { storiesOf, action } from '@storybook/react';
2+
import { storiesOf } from '@storybook/react';
3+
import { action } from '@storybook/addon-actions';
34
import Button from '../index';
45
import CommentForm from '../manager/components/CommentForm';
56
import CommentList from '../manager/components/CommentList';

addons/info/example/story.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import Button from './Button';
33

4-
import { storiesOf, action } from '@storybook/react';
4+
import { storiesOf } from '@storybook/react';
55
import { action } from '@storybook/addon-actions';
66
import backgrounds from 'react-storybook-addon-backgrounds';
77

addons/storyshots/stories/directly_required/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React from 'react';
2-
import { storiesOf, action } from '@storybook/react';
2+
import { storiesOf } from '@storybook/react';
3+
import { action } from '@storybook/addon-actions';
34
import Button from './Button';
45

56
storiesOf('Another Button', module)

jest.config.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,14 @@ module.exports = {
55
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '<rootDir>/__mocks__/fileMock.js',
66
'\\.(css|scss)$': '<rootDir>/__mocks__/styleMock.js',
77
},
8-
projects: ['<rootDir>/packages/*', '<rootDir>/examples/*'],
8+
roots: ['<rootDir>/addons', '<rootDir>/app', '<rootDir>/lib', '<rootDir>/examples'],
99
collectCoverage: false,
10-
collectCoverageFrom: ['packages/**/*.{js,jsx}', '!**/generators/**'],
10+
collectCoverageFrom: [
11+
'app/**/*.{js,jsx}',
12+
'lib/**/*.{js,jsx}',
13+
'addons/**/*.{js,jsx}',
14+
'!**/generators/**',
15+
],
1116
coverageDirectory: 'coverage',
1217
testEnvironment: 'jsdom',
1318
setupTestFrameworkScriptFile: './node_modules/jest-enzyme/lib/index.js',

lerna.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
11
{
2-
"lerna": "2.0.0-rc.3",
2+
"lerna": "2.0.0-rc.5",
33
"version": "3.0.0-alpha.4",
44
"commands": {
55
"bootstrap": {
66
"ignore": [
77
"test-cra"
88
]
99
},
10-
"exec": {
11-
"ignore": [
12-
"test-cra"
13-
]
14-
},
1510
"publish": {
1611
"ignore": [
1712
"cra-storybook",

lib/cli/generators/REACT/template/stories/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import React from 'react';
2-
import { storiesOf, action, linkTo } from '@storybook/react';
2+
import { storiesOf } from '@storybook/react';
3+
import { action } from '@storybook/addon-actions';
4+
import { linkTo } from '@storybook/addon-links';
35
import Button from './Button';
46
import Welcome from './Welcome';
57

lib/cli/lib/has_yarn.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const spawnSync = require('spawn-sync');
1+
const spawnSync = require('cross-spawn').sync;
22

33
module.exports = function hasYarn() {
44
const result = spawnSync('yarn', ['--version'], { silent: true });

lib/cli/lib/helpers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const path = require('path');
22
const fs = require('fs');
33
const chalk = require('chalk');
44
const logger = console;
5-
const spawnSync = require('spawn-sync');
5+
const spawnSync = require('cross-spawn').sync;
66

77
exports.getPackageJson = function getPackageJson() {
88
const packageJsonPath = path.resolve('package.json');

lib/cli/package.json

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@storybook/cli",
33
"version": "3.0.0-alpha.4",
4-
"description": "Easiest way to add Storybook support to your project.",
4+
"description": "Storybook's CLI - easiest method of adding storybook to your projects",
55
"bin": {
66
"getstorybook": "./bin/generate.js"
77
},
@@ -11,7 +11,8 @@
1111
},
1212
"keywords": [
1313
"storybook",
14-
"generator"
14+
"generator",
15+
"cli"
1516
],
1617
"author": "",
1718
"license": "MIT",
@@ -22,10 +23,14 @@
2223
"dependencies": {
2324
"chalk": "^1.1.3",
2425
"commander": "^2.9.0",
26+
"cross-spawn": "^5.0.1",
2527
"json5": "^0.5.1",
2628
"merge-dirs": "^0.2.1",
2729
"shelljs": "^0.7.7",
28-
"spawn-sync": "^1.0.15",
29-
"update-notifier": "^2.1.0"
30+
"update-notifier": "^2.1.0",
31+
"opencollective": "^1.0.3"
32+
},
33+
"scripts": {
34+
"postinstall": "opencollective postinstall"
3035
}
3136
}

0 commit comments

Comments
 (0)