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 lerna to the latest version 🚀 #1101

Merged
merged 3 commits into from
May 23, 2017
Merged
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
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ before_install: ./scripts/travis/before_install.sh
after_success: ./scripts/travis/after_success.sh
script:
- npm run bootstrap
- (cd examples/test-cra && npm install)
- lerna exec --scope test-cra -- npm i
- npm run lint
- npm run test -- --coverage
- npm run coverage
Expand Down
3 changes: 2 additions & 1 deletion addons/comments/src/stories/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react';
import { storiesOf, action } from '@storybook/react';
import { storiesOf } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import Button from '../index';
import CommentForm from '../manager/components/CommentForm';
import CommentList from '../manager/components/CommentList';
Expand Down
2 changes: 1 addition & 1 deletion addons/info/example/story.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import Button from './Button';

import { storiesOf, action } from '@storybook/react';
import { storiesOf } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import backgrounds from 'react-storybook-addon-backgrounds';

Expand Down
3 changes: 2 additions & 1 deletion addons/storyshots/stories/directly_required/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react';
import { storiesOf, action } from '@storybook/react';
import { storiesOf } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import Button from './Button';

storiesOf('Another Button', module)
Expand Down
9 changes: 7 additions & 2 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,14 @@ module.exports = {
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '<rootDir>/__mocks__/fileMock.js',
'\\.(css|scss)$': '<rootDir>/__mocks__/styleMock.js',
},
projects: ['<rootDir>/packages/*', '<rootDir>/examples/*'],
roots: ['<rootDir>/addons', '<rootDir>/app', '<rootDir>/lib', '<rootDir>/examples'],
collectCoverage: false,
collectCoverageFrom: ['packages/**/*.{js,jsx}', '!**/generators/**'],
collectCoverageFrom: [
'app/**/*.{js,jsx}',
'lib/**/*.{js,jsx}',
'addons/**/*.{js,jsx}',
'!**/generators/**',
],
coverageDirectory: 'coverage',
testEnvironment: 'jsdom',
setupTestFrameworkScriptFile: './node_modules/jest-enzyme/lib/index.js',
Expand Down
7 changes: 1 addition & 6 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
{
"lerna": "2.0.0-rc.3",
"lerna": "2.0.0-rc.5",
"version": "3.0.0-alpha.4",
"commands": {
"bootstrap": {
"ignore": [
"test-cra"
]
},
"exec": {
"ignore": [
"test-cra"
]
},
"publish": {
"ignore": [
"cra-storybook",
Expand Down
4 changes: 3 additions & 1 deletion lib/cli/generators/REACT/template/stories/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import React from 'react';
import { storiesOf, action, linkTo } from '@storybook/react';
import { storiesOf } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import { linkTo } from '@storybook/addon-links';
import Button from './Button';
import Welcome from './Welcome';

Expand Down
2 changes: 1 addition & 1 deletion lib/cli/lib/has_yarn.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const spawnSync = require('spawn-sync');
const spawnSync = require('cross-spawn').sync;

module.exports = function hasYarn() {
const result = spawnSync('yarn', ['--version'], { silent: true });
Expand Down
2 changes: 1 addition & 1 deletion lib/cli/lib/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const path = require('path');
const fs = require('fs');
const chalk = require('chalk');
const logger = console;
const spawnSync = require('spawn-sync');
const spawnSync = require('cross-spawn').sync;

exports.getPackageJson = function getPackageJson() {
const packageJsonPath = path.resolve('package.json');
Expand Down
13 changes: 9 additions & 4 deletions lib/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@storybook/cli",
"version": "3.0.0-alpha.4",
"description": "Easiest way to add Storybook support to your project.",
"description": "Storybook's CLI - easiest method of adding storybook to your projects",
"bin": {
"getstorybook": "./bin/generate.js"
},
Expand All @@ -11,7 +11,8 @@
},
"keywords": [
"storybook",
"generator"
"generator",
"cli"
],
"author": "",
"license": "MIT",
Expand All @@ -22,10 +23,14 @@
"dependencies": {
"chalk": "^1.1.3",
"commander": "^2.9.0",
"cross-spawn": "^5.0.1",
"json5": "^0.5.1",
"merge-dirs": "^0.2.1",
"shelljs": "^0.7.7",
"spawn-sync": "^1.0.15",
"update-notifier": "^2.1.0"
"update-notifier": "^2.1.0",
"opencollective": "^1.0.3"
},
"scripts": {
"postinstall": "opencollective postinstall"
}
}
9 changes: 3 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"eslint-plugin-prettier": "^2.0.1",
"jest": "^20.0.3",
"jest-enzyme": "^3.1.1",
"lerna": "2.0.0-rc.4",
"lerna": "2.0.0-rc.5",
"prettier": "^1.3.0",
"react": "^15.5.4",
"react-test-renderer": "^15.5.4",
Expand All @@ -32,14 +32,11 @@
"scripts": {
"publish": "lerna publish",
"bootstrap": "lerna bootstrap",
"bootstrap:test-cra": "lerna exec --scope test-cra -- npm i",
"lint": "eslint .",
"test": "jest",
"test:watch": "npm test -- --watch",
"coverage": "codecov",
"postinstall": "opencollective postinstall"
},
"dependencies": {
"opencollective": "^1.0.3"
"coverage": "codecov"
},
"collective": {
"type": "opencollective",
Expand Down