Skip to content

Commit

Permalink
Merge branch 'master' into (#1736)-Ability-to-force-redender-a-story
Browse files Browse the repository at this point in the history
  • Loading branch information
ndelangen authored Dec 27, 2017
2 parents d4609e4 + 79c07c7 commit ce935e6
Show file tree
Hide file tree
Showing 223 changed files with 7,810 additions and 1,559 deletions.
11 changes: 11 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ jobs:
command: |
cd examples/vue-kitchen-sink
yarn build-storybook
- run:
name: "Build angular-cli"
command: |
cd examples/angular-cli
yarn build-storybook
- run:
name: "Run react kitchen-sink"
Expand All @@ -81,6 +86,12 @@ jobs:
cd examples/vue-kitchen-sink
yarn storybook
background: true
- run:
name: "Run angular-cli"
command: |
cd examples/angular-cli
yarn storybook
background: true
- run:
name: Workaround for https://github.com/GoogleChrome/puppeteer/issues/290
command: sh ./scripts/workaround-puppeteer-issue-290.sh
Expand Down
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ root = true
[*]
end_of_line = lf

[*.{js,json}]
[*.{js,json,ts}]
indent_style = space
indent_size = 2
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ module.exports = {
'**/example/**',
'*.js',
'**/*.test.js',
'**/*.stories.js',
'**/scripts/*.js',
'**/stories/**/*.js',
'**/__tests__/**/*.js',
Expand Down
453 changes: 451 additions & 2 deletions CHANGELOG.md

Large diffs are not rendered by default.

31 changes: 31 additions & 0 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## Table of contents

- [From version 3.2.x to 3.3.x](#from-version-32x-to-33x)
- [Refactored Knobs](#refactored-knobs)
- [Storyshots Jest configuration](#storyshots-jest-configuration)
- [From version 3.1.x to 3.2.x](#from-version-31x-to-32x)
- [Moved TypeScript addons definitions](#moved-typescript-addons-definitions)
- [Updated Addons API](#updated-addons-api)
Expand All @@ -13,6 +16,34 @@
- [Packages renaming](#packages-renaming)
- [Deprecated embedded addons](#deprecated-embedded-addons)

## From version 3.2.x to 3.3.x

There should be no breaking changes in this release, but read on if you're using `addon-knobs`: we advise an update to your code for efficiency's sake.

### Refactored Knobs

Knobs users: there was a bug in 3.2.x where using the knobs addon imported all framework runtimes (e.g. React and Vue). To fix the problem, we [refactored knobs](https://github.com/storybooks/storybook/pull/1832). Switching to the new style is easy:

In the case of React or React-Native, import knobs like this:

```js
import { withKnobs, text, boolean, number } from '@storybook/addon-knobs/react';
```

In the case of Vue: `import { ... } from '@storybook/addon-knobs/vue';`

In the case of Angular: `import { ... } from '@storybook/addon-knobs/angular';`

### Storyshots Jest configuration

Storyshots users will need to add a line to their `jest.config.js`:

```js
transformIgnorePatterns: ['/node_modules/(?!lodash-es/.*)'],
```

We are working to resolve the issue that requires this: https://github.com/storybooks/storybook/issues/2570

## From version 3.1.x to 3.2.x

**NOTE:** technically this is a breaking change, but only if you use TypeScript. Sorry people!
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![CodeFactor](https://www.codefactor.io/repository/github/storybooks/storybook/badge)](https://www.codefactor.io/repository/github/storybooks/storybook)
[![Known Vulnerabilities](https://snyk.io/test/github/storybooks/storybook/8f36abfd6697e58cd76df3526b52e4b9dc894847/badge.svg)](https://snyk.io/test/github/storybooks/storybook/8f36abfd6697e58cd76df3526b52e4b9dc894847)
[![BCH compliance](https://bettercodehub.com/edge/badge/storybooks/storybook)](https://bettercodehub.com/results/storybooks/storybook) [![codecov](https://codecov.io/gh/storybooks/storybook/branch/master/graph/badge.svg)](https://codecov.io/gh/storybooks/storybook)
[![Storybook Slack](https://now-examples-slackin-nqnzoygycp.now.sh/badge.svg)](https://now-examples-slackin-nqnzoygycp.now.sh/)
[![Storybook Slack](https://now-examples-slackin-rrirkqohko.now.sh/badge.svg)](https://now-examples-slackin-rrirkqohko.now.sh/)
[![Backers on Open Collective](https://opencollective.com/storybook/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/storybook/sponsors/badge.svg)](#sponsors)

* * *
Expand Down
3 changes: 2 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ addressed before a release can go out by adding them to the milestone. For examp
Adding bugs to the milestone helps people looking for good ways to contribute,
or to understand what is blocking the release so they can actually do something
about it. Discussion about which bugs are critical happens in the `#maintenance`
channel [in our Slack](https://storybooks-slackin.herokuapp.com/).
channel [in our Slack](https://now-examples-slackin-rrirkqohko.now.sh/) [![Storybook Slack](https://now-examples-slackin-rrirkqohko.now.sh/badge.svg)].(https://now-examples-slackin-rrirkqohko.now.sh/)


If you're experiencing a bug, the best way to make sure that it gets attention
is to upvote it by adding a "thumbs-up" reaction in Github. This way important
Expand Down
6 changes: 3 additions & 3 deletions addons/a11y/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-a11y",
"version": "3.3.0-alpha.4",
"version": "3.3.1",
"description": "a11y addon for storybook",
"keywords": [
"a11y",
Expand All @@ -24,12 +24,12 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/components": "^3.3.0-alpha.4",
"@storybook/components": "^3.3.1",
"axe-core": "^2.6.0",
"prop-types": "^15.6.0"
},
"peerDependencies": {
"@storybook/addons": "^3.3.0-alpha.4",
"@storybook/addons": "^3.3.0",
"react": "*",
"react-dom": "*"
}
Expand Down
2 changes: 1 addition & 1 deletion addons/actions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![CodeFactor](https://www.codefactor.io/repository/github/storybooks/storybook/badge)](https://www.codefactor.io/repository/github/storybooks/storybook)
[![Known Vulnerabilities](https://snyk.io/test/github/storybooks/storybook/8f36abfd6697e58cd76df3526b52e4b9dc894847/badge.svg)](https://snyk.io/test/github/storybooks/storybook/8f36abfd6697e58cd76df3526b52e4b9dc894847)
[![BCH compliance](https://bettercodehub.com/edge/badge/storybooks/storybook)](https://bettercodehub.com/results/storybooks/storybook) [![codecov](https://codecov.io/gh/storybooks/storybook/branch/master/graph/badge.svg)](https://codecov.io/gh/storybooks/storybook)
[![Storybook Slack](https://now-examples-slackin-nqnzoygycp.now.sh/badge.svg)](https://now-examples-slackin-nqnzoygycp.now.sh/)
[![Storybook Slack](https://now-examples-slackin-rrirkqohko.now.sh/badge.svg)](https://now-examples-slackin-rrirkqohko.now.sh/)
[![Backers on Open Collective](https://opencollective.com/storybook/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/storybook/sponsors/badge.svg)](#sponsors)

* * *
Expand Down
4 changes: 2 additions & 2 deletions addons/actions/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-actions",
"version": "3.3.0-alpha.4",
"version": "3.3.1",
"description": "Action Logger addon for storybook",
"keywords": [
"storybook"
Expand All @@ -27,7 +27,7 @@
"uuid": "^3.1.0"
},
"peerDependencies": {
"@storybook/addons": "^3.3.0-alpha.4",
"@storybook/addons": "^3.3.0",
"react": "*",
"react-dom": "*"
}
Expand Down
1 change: 0 additions & 1 deletion addons/actions/src/lib/__mocks__/example.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ const output = {
e: '2017-12-02T11:13:22.492Z',
f: {
'$___storybook.objectName': 'File',
isClosed: false,
lastModified: 1512213202492,
name: 'filename.txt',
size: 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ describe('getPropertiesList', () => {
it('for File object', () => {
const file = new File([''], 'filename.txt', { type: 'text/plain', lastModified: new Date() });

expect(getPropertiesList(file)).toEqual(['name', 'lastModified', 'size', 'type', 'isClosed']);
expect(getPropertiesList(file)).toEqual(['name', 'lastModified', 'size', 'type']);
});
});
4 changes: 2 additions & 2 deletions addons/background/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-backgrounds",
"version": "3.3.0-alpha.4",
"version": "3.3.1",
"description": "A storybook addon to show different backgrounds for your preview",
"keywords": [
"addon",
Expand All @@ -26,7 +26,7 @@
"prop-types": "^15.6.0"
},
"peerDependencies": {
"@storybook/addons": "^3.3.0-alpha.4",
"@storybook/addons": "^3.3.0",
"react": "*"
}
}
2 changes: 1 addition & 1 deletion addons/centered/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![CodeFactor](https://www.codefactor.io/repository/github/storybooks/storybook/badge)](https://www.codefactor.io/repository/github/storybooks/storybook)
[![Known Vulnerabilities](https://snyk.io/test/github/storybooks/storybook/8f36abfd6697e58cd76df3526b52e4b9dc894847/badge.svg)](https://snyk.io/test/github/storybooks/storybook/8f36abfd6697e58cd76df3526b52e4b9dc894847)
[![BCH compliance](https://bettercodehub.com/edge/badge/storybooks/storybook)](https://bettercodehub.com/results/storybooks/storybook) [![codecov](https://codecov.io/gh/storybooks/storybook/branch/master/graph/badge.svg)](https://codecov.io/gh/storybooks/storybook)
[![Storybook Slack](https://now-examples-slackin-nqnzoygycp.now.sh/badge.svg)](https://now-examples-slackin-nqnzoygycp.now.sh/)
[![Storybook Slack](https://now-examples-slackin-rrirkqohko.now.sh/badge.svg)](https://now-examples-slackin-rrirkqohko.now.sh/)
[![Backers on Open Collective](https://opencollective.com/storybook/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/storybook/sponsors/badge.svg)](#sponsors)

* * *
Expand Down
2 changes: 1 addition & 1 deletion addons/centered/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-centered",
"version": "3.3.0-alpha.4",
"version": "3.3.1",
"description": "Storybook decorator to center components",
"license": "MIT",
"author": "Muhammed Thanish <mnmtanish@gmail.com>",
Expand Down
2 changes: 1 addition & 1 deletion addons/events/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![CodeFactor](https://www.codefactor.io/repository/github/storybooks/storybook/badge)](https://www.codefactor.io/repository/github/storybooks/storybook)
[![Known Vulnerabilities](https://snyk.io/test/github/storybooks/storybook/8f36abfd6697e58cd76df3526b52e4b9dc894847/badge.svg)](https://snyk.io/test/github/storybooks/storybook/8f36abfd6697e58cd76df3526b52e4b9dc894847)
[![BCH compliance](https://bettercodehub.com/edge/badge/storybooks/storybook)](https://bettercodehub.com/results/storybooks/storybook) [![codecov](https://codecov.io/gh/storybooks/storybook/branch/master/graph/badge.svg)](https://codecov.io/gh/storybooks/storybook)
[![Storybook Slack](https://now-examples-slackin-nqnzoygycp.now.sh/badge.svg)](https://now-examples-slackin-nqnzoygycp.now.sh/)
[![Storybook Slack](https://now-examples-slackin-rrirkqohko.now.sh/badge.svg)](https://now-examples-slackin-rrirkqohko.now.sh/)
[![Backers on Open Collective](https://opencollective.com/storybook/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/storybook/sponsors/badge.svg)](#sponsors)

* * *
Expand Down
4 changes: 2 additions & 2 deletions addons/events/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-events",
"version": "3.3.0-alpha.4",
"version": "3.3.1",
"description": "Add events to your Storybook stories.",
"keywords": [
"addon",
Expand All @@ -27,7 +27,7 @@
"uuid": "^3.1.0"
},
"peerDependencies": {
"@storybook/addons": "^3.3.0-alpha.4",
"@storybook/addons": "^3.3.0",
"react": "*"
}
}
2 changes: 1 addition & 1 deletion addons/graphql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![CodeFactor](https://www.codefactor.io/repository/github/storybooks/storybook/badge)](https://www.codefactor.io/repository/github/storybooks/storybook)
[![Known Vulnerabilities](https://snyk.io/test/github/storybooks/storybook/8f36abfd6697e58cd76df3526b52e4b9dc894847/badge.svg)](https://snyk.io/test/github/storybooks/storybook/8f36abfd6697e58cd76df3526b52e4b9dc894847)
[![BCH compliance](https://bettercodehub.com/edge/badge/storybooks/storybook)](https://bettercodehub.com/results/storybooks/storybook) [![codecov](https://codecov.io/gh/storybooks/storybook/branch/master/graph/badge.svg)](https://codecov.io/gh/storybooks/storybook)
[![Storybook Slack](https://now-examples-slackin-nqnzoygycp.now.sh/badge.svg)](https://now-examples-slackin-nqnzoygycp.now.sh/)
[![Storybook Slack](https://now-examples-slackin-rrirkqohko.now.sh/badge.svg)](https://now-examples-slackin-rrirkqohko.now.sh/)
[![Backers on Open Collective](https://opencollective.com/storybook/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/storybook/sponsors/badge.svg)](#sponsors)

* * *
Expand Down
2 changes: 1 addition & 1 deletion addons/graphql/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-graphql",
"version": "3.3.0-alpha.4",
"version": "3.3.1",
"description": "Storybook addon to display the GraphiQL IDE",
"keywords": [
"storybook"
Expand Down
2 changes: 1 addition & 1 deletion addons/info/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![CodeFactor](https://www.codefactor.io/repository/github/storybooks/storybook/badge)](https://www.codefactor.io/repository/github/storybooks/storybook)
[![Known Vulnerabilities](https://snyk.io/test/github/storybooks/storybook/8f36abfd6697e58cd76df3526b52e4b9dc894847/badge.svg)](https://snyk.io/test/github/storybooks/storybook/8f36abfd6697e58cd76df3526b52e4b9dc894847)
[![BCH compliance](https://bettercodehub.com/edge/badge/storybooks/storybook)](https://bettercodehub.com/results/storybooks/storybook) [![codecov](https://codecov.io/gh/storybooks/storybook/branch/master/graph/badge.svg)](https://codecov.io/gh/storybooks/storybook)
[![Storybook Slack](https://now-examples-slackin-nqnzoygycp.now.sh/badge.svg)](https://now-examples-slackin-nqnzoygycp.now.sh/)
[![Storybook Slack](https://now-examples-slackin-rrirkqohko.now.sh/badge.svg)](https://now-examples-slackin-rrirkqohko.now.sh/)
[![Backers on Open Collective](https://opencollective.com/storybook/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/storybook/sponsors/badge.svg)](#sponsors)

* * *
Expand Down
8 changes: 4 additions & 4 deletions addons/info/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-info",
"version": "3.3.0-alpha.4",
"version": "3.3.1",
"description": "A Storybook addon to show additional information for your stories.",
"license": "MIT",
"main": "dist/index.js",
Expand All @@ -14,12 +14,12 @@
"storybook": "start-storybook -p 9010"
},
"dependencies": {
"@storybook/client-logger": "^3.3.0-alpha.4",
"@storybook/components": "^3.3.0-alpha.4",
"@storybook/client-logger": "^3.3.1",
"@storybook/components": "^3.3.1",
"babel-runtime": "^6.26.0",
"global": "^4.3.2",
"nested-object-assign": "^1.0.1",
"marksy": "^6.0.1",
"nested-object-assign": "^1.0.1",
"prop-types": "^15.6.0",
"react-addons-create-fragment": "^15.5.3",
"util-deprecate": "^1.0.2"
Expand Down
Loading

0 comments on commit ce935e6

Please sign in to comment.