Skip to content

Commit

Permalink
Merge branch 'master' into optimize-storyshots-peers
Browse files Browse the repository at this point in the history
  • Loading branch information
Hypnosphi authored Dec 4, 2017
2 parents c2538e2 + 0b256f5 commit 5fe1769
Show file tree
Hide file tree
Showing 82 changed files with 2,183 additions and 504 deletions.
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
### Issue details

_Please provide issue details here - What did you expect to happen? What happened instead?_

### Steps to reproduce

_Please provide necessary steps for reproduction of this issue. Describe the exact steps a maintainer has to take to make the problem occur. If the problem is non-trivial to reproduce, please link a repository or provide some code snippets._

_(A screencast can be useful for visual bugs, but it is not a substitute for a textual description.)_

### Please specify which version of Storybook and optionally any affected addons that you're running

- @storybook/react x.x.x
- @storybook/addon-something x.x.x

### Affected platforms

- _If UI related, please indicate browser, OS, and version_
- _If dependency related, please include relevant version numbers_
- _If developer tooling related, please include the platform information_

### Screenshots / Screencast / Code Snippets (Optional)

```js
// code here
```
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ package-lock.json
.nvmrc
storybook-static
integration/__image_snapshots__/__diff_output__
.jest-test-results.json

115 changes: 115 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,118 @@
# 3.2.17

2017-December-03

#### Features

- Add dotenv support for storybook in vue and react [#2345](https://github.com/storybooks/storybook/pull/2345)
- Add addon jest [#2295](https://github.com/storybooks/storybook/pull/2295)
- Addon-knobs: add number config options [#2371](https://github.com/storybooks/storybook/pull/2371)
- Addon-info: Expose style for customization [#2370](https://github.com/storybooks/storybook/pull/2370)

#### Bug Fixes

- Fix addon-actions in legacy Android browser [#2365](https://github.com/storybooks/storybook/pull/2365)
- Remove superfluous vertical scrollbar in fullscreen [#2394](https://github.com/storybooks/storybook/pull/2394)
- Made jest test file extension name optional [#2373](https://github.com/storybooks/storybook/pull/2373)
- Render navigation and addons panels even when they are hidden [#2336](https://github.com/storybooks/storybook/pull/2336)
- Fix wrong "withTests" examples + add documentation [#2398](https://github.com/storybooks/storybook/pull/2398)

#### Maintenance

- Issue #2196 - Set console.warn and console.error to throw in tests [#2297](https://github.com/storybooks/storybook/pull/2297)
- Optimize CI workflow [#2331](https://github.com/storybooks/storybook/pull/2331)
- Ignore shelljs in bithound [#2322](https://github.com/storybooks/storybook/pull/2322)
- Fix netlify vue instance [#2386](https://github.com/storybooks/storybook/pull/2386)
- Keep examples' deps up to date [#2353](https://github.com/storybooks/storybook/pull/2353)
- Separate netlify instances [#2340](https://github.com/storybooks/storybook/pull/2340)
- Issue 2196 fix unittest warnings [#2343](https://github.com/storybooks/storybook/pull/2343)

#### Documentation

- Document return type of `date` knob (see #1489) [#2332](https://github.com/storybooks/storybook/pull/2332)

#### Dependency Upgrades

<details>
<summary>
72 PRs
</summary>

- Update gatsby in /docs from 1.9.127 to 1.9.128 [#2420](https://github.com/storybooks/storybook/pull/2420)
- Update marked in /docs from 0.3.6 to 0.3.7 [#2416](https://github.com/storybooks/storybook/pull/2416)
- Upgraded `gatsby` in `docs` from "1.9.126" to "1.9.127" [#2406](https://github.com/storybooks/storybook/pull/2406)
- Upgraded `gatsby-transformer-remark` in `docs` from "1.7.22" to "1.7.23" [#2406](https://github.com/storybooks/storybook/pull/2406)
- Upgraded `gatsby` in `docs` from "1.9.125" to "1.9.126" [#2399](https://github.com/storybooks/storybook/pull/2399)
- Upgraded `gatsby-link` in `docs` from "1.6.29" to "1.6.30" [#2399](https://github.com/storybooks/storybook/pull/2399)
- Upgraded `gatsby` in `docs` from "1.9.119" to "1.9.125" [#2392](https://github.com/storybooks/storybook/pull/2392)
- Upgraded `gatsby-link` in `docs` from "1.6.28" to "1.6.29" [#2392](https://github.com/storybooks/storybook/pull/2392)
- Upgraded `gatsby-plugin-sharp` in `docs` from "1.6.21" to "1.6.22" [#2392](https://github.com/storybooks/storybook/pull/2392)
- Upgraded `gatsby-remark-autolink-headers` in `docs` from "1.4.8" to "1.4.9" [#2392](https://github.com/storybooks/storybook/pull/2392)
- Upgraded `gatsby-remark-copy-linked-files` in `docs` from "1.5.21" to "1.5.22" [#2392](https://github.com/storybooks/storybook/pull/2392)
- Upgraded `gatsby-remark-images` in `docs` from "1.5.32" to "1.5.33" [#2392](https://github.com/storybooks/storybook/pull/2392)
- Upgraded `gatsby-remark-smartypants` in `docs` from "1.4.8" to "1.4.9" [#2392](https://github.com/storybooks/storybook/pull/2392)
- Upgraded `gatsby-source-filesystem` in `docs` from "1.5.8" to "1.5.9" [#2392](https://github.com/storybooks/storybook/pull/2392)
- Upgraded `gatsby-transformer-remark` in `docs` from "1.7.21" to "1.7.22" [#2392](https://github.com/storybooks/storybook/pull/2392)
- Upgraded `webpack-dev-middleware` in `app/react-native` from "1.12.1" to "1.12.2" [#2385](https://github.com/storybooks/storybook/pull/2385)
- Upgraded `webpack-hot-middleware` in `app/react-native` from "2.20.0" to "2.21.0" [#2385](https://github.com/storybooks/storybook/pull/2385)
- Upgraded `webpack-dev-middleware` in `app/react` from "1.12.1" to "1.12.2" [#2385](https://github.com/storybooks/storybook/pull/2385)
- Upgraded `webpack-hot-middleware` in `app/react` from "2.20.0" to "2.21.0" [#2385](https://github.com/storybooks/storybook/pull/2385)
- Upgraded `webpack-dev-middleware` in `app/vue` from "1.12.1" to "1.12.2" [#2385](https://github.com/storybooks/storybook/pull/2385)
- Upgraded `webpack-hot-middleware` in `app/vue` from "2.20.0" to "2.21.0" [#2385](https://github.com/storybooks/storybook/pull/2385)
- Upgraded `danger` in `/` from "2.0.1" to "2.0.3" [#2380](https://github.com/storybooks/storybook/pull/2380)
- Upgraded `eslint` in `/` from "4.11.0" to "4.12.0" [#2380](https://github.com/storybooks/storybook/pull/2380)
- Upgraded `eslint-config-prettier` in `/` from "2.8.0" to "2.9.0" [#2380](https://github.com/storybooks/storybook/pull/2380)
- Upgraded `react-modal` in `lib/ui` from "3.1.3" to "3.1.4" [#2364](https://github.com/storybooks/storybook/pull/2364)
- Upgraded `postcss-loader` in `app/react-native` from "2.0.8" to "2.0.9" [#2364](https://github.com/storybooks/storybook/pull/2364)
- Upgraded `react-native` in `app/react-native` from "0.50.3" to "0.50.4" [#2364](https://github.com/storybooks/storybook/pull/2364)
- Upgraded `common-tags` in `app/react` from "1.4.0" to "1.5.1" [#2364](https://github.com/storybooks/storybook/pull/2364)
- Upgraded `postcss-loader` in `app/react` from "2.0.8" to "2.0.9" [#2364](https://github.com/storybooks/storybook/pull/2364)
- Upgraded `common-tags` in `app/vue` from "1.4.0" to "1.5.1" [#2364](https://github.com/storybooks/storybook/pull/2364)
- Upgraded `postcss-loader` in `app/vue` from "2.0.8" to "2.0.9" [#2364](https://github.com/storybooks/storybook/pull/2364)
- Upgraded `commander` in `/` from "2.11.0" to "2.12.1" [#2359](https://github.com/storybooks/storybook/pull/2359)
- Upgraded `commander` in `lib/cli` from "2.11.0" to "2.12.1" [#2359](https://github.com/storybooks/storybook/pull/2359)
- Upgraded `react-modal` in `lib/ui` from "3.1.2" to "3.1.3" [#2359](https://github.com/storybooks/storybook/pull/2359)
- Upgraded `commander` in `app/react-native` from "2.11.0" to "2.12.1" [#2359](https://github.com/storybooks/storybook/pull/2359)
- Upgraded `webpack-dev-middleware` in `app/react-native` from "1.12.0" to "1.12.1" [#2359](https://github.com/storybooks/storybook/pull/2359)
- Upgraded `commander` in `app/react` from "2.11.0" to "2.12.1" [#2359](https://github.com/storybooks/storybook/pull/2359)
- Upgraded `webpack-dev-middleware` in `app/react` from "1.12.0" to "1.12.1" [#2359](https://github.com/storybooks/storybook/pull/2359)
- Upgraded `commander` in `app/vue` from "2.11.0" to "2.12.1" [#2359](https://github.com/storybooks/storybook/pull/2359)
- Upgraded `webpack-dev-middleware` in `app/vue` from "1.12.0" to "1.12.1" [#2359](https://github.com/storybooks/storybook/pull/2359)
- Update gatsby in docs from 1.9.118 to 1.9.119 [#2354](https://github.com/storybooks/storybook/pull/2354)
- Upgraded `vue` in `addons/knobs` from "2.5.6" to "2.5.8" [#2344](https://github.com/storybooks/storybook/pull/2344)
- Upgraded `ws` in `app/react-native` from "3.3.1" to "3.3.2" [#2344](https://github.com/storybooks/storybook/pull/2344)
- Upgraded `vue` in `app/vue` from "2.5.6" to "2.5.8" [#2344](https://github.com/storybooks/storybook/pull/2344)
- Upgraded `vue-template-compiler` in `app/vue` from "2.5.6" to "2.5.8" [#2344](https://github.com/storybooks/storybook/pull/2344)
- Upgraded `vue` in `examples/vue-kitchen-sink` from "2.5.6" to "2.5.8" [#2344](https://github.com/storybooks/storybook/pull/2344)
- Upgraded `vue-template-compiler` in `examples/vue-kitchen-sink` from "2.5.6" to "2.5.8" [#2344](https://github.com/storybooks/storybook/pull/2344)
- Upgraded `eslint-config-prettier` in `/` from "2.7.0" to "2.8.0" [#2342](https://github.com/storybooks/storybook/pull/2342)
- Upgraded `eslint-plugin-react` in `/` from "7.4.0" to "7.5.0" [#2342](https://github.com/storybooks/storybook/pull/2342)
- Upgraded `vue` in `addons/knobs` from "2.5.5" to "2.5.6" [#2342](https://github.com/storybooks/storybook/pull/2342)
- Upgraded `vue` in `app/vue` from "2.5.5" to "2.5.6" [#2342](https://github.com/storybooks/storybook/pull/2342)
- Upgraded `vue-template-compiler` in `app/vue` from "2.5.5" to "2.5.6" [#2342](https://github.com/storybooks/storybook/pull/2342)
- Upgraded `vue` in `examples/vue-kitchen-sink` from "2.5.5" to "2.5.6" [#2342](https://github.com/storybooks/storybook/pull/2342)
- Upgraded `vue-template-compiler` in `examples/vue-kitchen-sink` from "2.5.5" to "2.5.6" [#2342](https://github.com/storybooks/storybook/pull/2342)
- Update gatsby in docs from 1.9.117 to 1.9.118 [#2341](https://github.com/storybooks/storybook/pull/2341)
- Upgraded `gatsby` in `docs` from "1.9.114" to "1.9.117" [#2338](https://github.com/storybooks/storybook/pull/2338)
- Upgraded `gh-pages` in `docs` from "1.0.0" to "1.1.0" [#2338](https://github.com/storybooks/storybook/pull/2338)
- Update gh-pages in / from 1.0.0 to 1.1.0 [#2339](https://github.com/storybooks/storybook/pull/2339)
- Upgraded `@types/react` in `addons/knobs` from "16.0.23" to "16.0.25" [#2334](https://github.com/storybooks/storybook/pull/2334)
- Upgraded `vue` in `addons/knobs` from "2.5.3" to "2.5.5" [#2334](https://github.com/storybooks/storybook/pull/2334)
- Upgraded `vue-hot-reload-api` in `app/vue` from "2.2.3" to "2.2.4" [#2334](https://github.com/storybooks/storybook/pull/2334)
- Upgraded `vue` in `app/vue` from "2.5.3" to "2.5.5" [#2334](https://github.com/storybooks/storybook/pull/2334)
- Upgraded `vue-template-compiler` in `app/vue` from "2.5.3" to "2.5.5" [#2334](https://github.com/storybooks/storybook/pull/2334)
- Upgraded `vue` in `examples/vue-kitchen-sink` from "2.5.3" to "2.5.5" [#2334](https://github.com/storybooks/storybook/pull/2334)
- Upgraded `vue-hot-reload-api` in `examples/vue-kitchen-sink` from "2.2.3" to "2.2.4" [#2334](https://github.com/storybooks/storybook/pull/2334)
- Upgraded `vue-template-compiler` in `examples/vue-kitchen-sink` from "2.5.3" to "2.5.5" [#2334](https://github.com/storybooks/storybook/pull/2334)
- Update gatsby in docs from 1.9.112 to 1.9.114 [#2333](https://github.com/storybooks/storybook/pull/2333)
- Upgraded `@storybook/addon-actions` in `docs` from "3.2.15" to "3.2.16" [#2327](https://github.com/storybooks/storybook/pull/2327)
- Upgraded `@storybook/addon-links` in `docs` from "3.2.15" to "3.2.16" [#2327](https://github.com/storybooks/storybook/pull/2327)
- Upgraded `@storybook/addons` in `docs` from "3.2.15" to "3.2.16" [#2327](https://github.com/storybooks/storybook/pull/2327)
- Upgraded `@storybook/react` in `docs` from "3.2.15" to "3.2.16" [#2327](https://github.com/storybooks/storybook/pull/2327)
- Update @types/node in addons/knobs from 8.0.52 to 8.0.53 [#2326](https://github.com/storybooks/storybook/pull/2326)

</details>

# 3.2.16

2017-November-15
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.2.16",
"version": "3.2.17",
"description": "a11y addon for storybook",
"keywords": [
"a11y",
Expand All @@ -24,8 +24,8 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "^3.2.16",
"@storybook/components": "^3.2.16",
"@storybook/addons": "^3.2.17",
"@storybook/components": "^3.2.17",
"axe-core": "^2.0.7",
"prop-types": "^15.6.0"
},
Expand Down
1 change: 0 additions & 1 deletion addons/actions/.storybook/addons.js

This file was deleted.

2 changes: 0 additions & 2 deletions addons/actions/.storybook/config.js

This file was deleted.

27 changes: 0 additions & 27 deletions addons/actions/.storybook/stories.js

This file was deleted.

4 changes: 2 additions & 2 deletions addons/actions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![Build Status on CircleCI](https://circleci.com/gh/storybooks/storybook.svg?style=shield)](https://circleci.com/gh/storybooks/storybook)
[![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)
[![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/)
[![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 Expand Up @@ -57,7 +57,7 @@ If you wish to process action data before sending them over to the logger, you c
`decorateAction` takes an array of decorator functions. Each decorator function is passed an array of arguments, and should return a new arguments array to use. `decorateAction` returns a function that can be used like `action` but will log the modified arguments instead of the original arguments.

```js
import { action, decorateAction } from '@storybook/addon-actions'
import { decorateAction } from '@storybook/addon-actions';

import Button from './button';

Expand Down
8 changes: 3 additions & 5 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.2.16",
"version": "3.2.17",
"description": "Action Logger addon for storybook",
"keywords": [
"storybook"
Expand All @@ -16,12 +16,10 @@
"url": "https://github.com/storybooks/storybook.git"
},
"scripts": {
"deploy-storybook": "storybook-to-ghpages",
"prepare": "node ../../scripts/prepare.js",
"storybook": "start-storybook -p 9001"
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "^3.2.16",
"@storybook/addons": "^3.2.17",
"deep-equal": "^1.0.1",
"json-stringify-safe": "^5.0.1",
"prop-types": "^15.6.0",
Expand Down
14 changes: 9 additions & 5 deletions addons/actions/src/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ function _format(arg) {
}

export function action(name) {
// eslint-disable-next-line no-unused-vars, func-names
const handler = function(..._args) {
const args = Array.from(_args).map(_format);
// eslint-disable-next-line no-shadow
const handler = function action(..._args) {
const args = _args.map(_format);
const channel = addons.getChannel();
const id = uuid();
channel.emit(EVENT_ID, {
Expand All @@ -24,8 +24,12 @@ export function action(name) {
});
};

const fnName = name && typeof name === 'string' ? name.replace(/\W+/g, '_') : 'action';
Object.defineProperty(handler, 'name', { value: fnName });
// This condition is true in modern browsers that implement Function#name properly
const canConfigureName = Object.getOwnPropertyDescriptor(handler, 'name').configurable;

if (canConfigureName && name && typeof name === 'string') {
Object.defineProperty(handler, 'name', { value: name });
}
return handler;
}

Expand Down
2 changes: 1 addition & 1 deletion addons/background/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-backgrounds",
"version": "3.2.16",
"version": "3.2.17",
"description": "A storybook addon to show different backgrounds for your preview",
"keywords": [
"addon",
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.2.16",
"version": "3.2.17",
"description": "Storybook decorator to center components",
"license": "MIT",
"author": "Muhammed Thanish <[email protected]>",
Expand Down
8 changes: 4 additions & 4 deletions addons/comments/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-comments",
"version": "3.2.16",
"version": "3.2.17",
"description": "Comments addon for Storybook",
"keywords": [
"storybook"
Expand All @@ -23,7 +23,7 @@
"storybook-remote": "start-storybook -p 3006"
},
"dependencies": {
"@storybook/addons": "^3.2.16",
"@storybook/addons": "^3.2.17",
"babel-runtime": "^6.26.0",
"deep-equal": "^1.0.1",
"events": "^1.1.1",
Expand All @@ -38,8 +38,8 @@
"devDependencies": {
"@kadira/storybook-database-cloud": "*",
"@kadira/storybook-deployer": "*",
"@storybook/addon-actions": "^3.2.16",
"@storybook/react": "^3.2.16"
"@storybook/addon-actions": "^3.2.17",
"@storybook/react": "^3.2.17"
},
"peerDependencies": {
"react": "*"
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.2.16",
"version": "3.2.17",
"description": "Add events to your Storybook stories.",
"keywords": [
"addon",
Expand All @@ -20,7 +20,7 @@
"storybook": "start-storybook -p 6006"
},
"dependencies": {
"@storybook/addons": "^3.2.16",
"@storybook/addons": "^3.2.17",
"babel-runtime": "^6.26.0",
"format-json": "^1.0.3",
"prop-types": "^15.6.0",
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.2.16",
"version": "3.2.17",
"description": "Storybook addon to display the GraphiQL IDE",
"keywords": [
"storybook"
Expand Down
6 changes: 3 additions & 3 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.2.16",
"version": "3.2.17",
"description": "A Storybook addon to show additional information for your stories.",
"license": "MIT",
"main": "dist/index.js",
Expand All @@ -14,8 +14,8 @@
"storybook": "start-storybook -p 9010"
},
"dependencies": {
"@storybook/addons": "^3.2.16",
"@storybook/components": "^3.2.16",
"@storybook/addons": "^3.2.17",
"@storybook/components": "^3.2.17",
"babel-runtime": "^6.26.0",
"global": "^4.3.2",
"marksy": "^2.0.0",
Expand Down
Loading

0 comments on commit 5fe1769

Please sign in to comment.