Skip to content

Commit

Permalink
Merge pull request #4 from storybooks/master
Browse files Browse the repository at this point in the history
merge 4.0.0-rc.1 into local
  • Loading branch information
Stephanemw authored Oct 18, 2018
2 parents 0533d5a + a9e8e42 commit 72116e5
Show file tree
Hide file tree
Showing 130 changed files with 1,099 additions and 891 deletions.
20 changes: 20 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,26 @@
"@babel/preset-env",
"babel-preset-vue"
]
},
{
"test": [
"./lib/core/src/server",
"./lib/node-logger",
"./lib/codemod",
"./addons/storyshots",
"./addons/storysource/src/loader",
"./app/**/src/server/**"
],
"presets": [
[
"@babel/preset-env",
{
"targets": {
"node": "8.11"
}
}
]
]
}
]
}
31 changes: 16 additions & 15 deletions ADDONS_SUPPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,21 @@

| | [React](app/react)|[React Native](app/react-native)|[Vue](app/vue)|[Angular](app/angular)| [Polymer](app/polymer)| [Mithril](app/mithril)| [HTML](app/html)| [Marko](app/marko)| [Svelte](app/svelte)| [Riot](app/riot)| [Ember](app/ember)|
| ----------- |:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|
|[a11y](addons/a11y) |+| |+|+|+|+|+|+| | |+|
|[actions](addons/actions) |+|+|+|+|+|+|+|+|+|+|+|
|[backgrounds](addons/backgrounds)|+|*|+|+|+|+|+|+|+|+|+|
|[centered](addons/centered) |+| |+|+| |+|+| |+| |+|
|[events](addons/events) |+| |+|+|+|+|+|+| | |+|
|[graphql](addons/graphql) |+| | | | | | | | | | |
|[info](addons/info) |+| | | | | | | | | | |
|[jest](addons/jest) |+| | |+| | |+| | | | |
|[knobs](addons/knobs) |+|+*|+|+|+|+|+|+|+|+|+|
|[links](addons/links) |+|+|+|+|+|+|+| |+|+|+|
|[notes](addons/notes) |+|+*|+|+|+|+|+| |+|+|+|
|[options](addons/options) |+|+|+|+|+|+|+| |+|+|+|
|[storyshots](addons/storyshots) |+|+|+|+| | |+| |+|+| |
|[storysource](addons/storysource)|+| |+|+|+|+|+|+|+|+|+|
|[viewport](addons/viewport) |+| |+|+|+|+|+|+|+|+|+|
|[a11y](addons/a11y) |+| |+|+|+|+|+|+| | |+|
|[actions](addons/actions) |+|+|+|+|+|+|+|+|+|+|+|
|[backgrounds](addons/backgrounds) |+|*|+|+|+|+|+|+|+|+|+|
|[centered](addons/centered) |+| |+|+| |+|+| |+| |+|
|[events](addons/events) |+| |+|+|+|+|+|+| | |+|
|[graphql](addons/graphql) |+| | | | | | | | | | |
|[google-analytics](addons/google-analytics) |+|+|+|+|+|+|+|+|+|+|+|
|[info](addons/info) |+| | | | | | | | | | |
|[jest](addons/jest) |+| | |+| | |+| | | | |
|[knobs](addons/knobs) |+|+*|+|+|+|+|+|+|+|+|+|
|[links](addons/links) |+|+|+|+|+|+|+| |+|+|+|
|[notes](addons/notes) |+|+*|+|+|+|+|+| |+|+|+|
|[options](addons/options) |+|+|+|+|+|+|+| |+|+|+|
|[storyshots](addons/storyshots) |+|+|+|+| | |+| |+|+| |
|[storysource](addons/storysource) |+| |+|+|+|+|+|+|+|+|+|
|[viewport](addons/viewport) |+| |+|+|+|+|+|+|+|+|+|

`*` - React Native on device addon (addons/onDevice-\<name>)
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
# 4.0.0-rc.1

2018-October-18

#### Bug Fixes

- Angular: expose webpackFinal extension [#4431](https://github.com/storybooks/storybook/pull/4431)
- Addon-Knobs: fix ints as values [#4465](https://github.com/storybooks/storybook/pull/4465)

#### Maintenance

- Add Angular 6 fixture to the sb-cli tests [#4464](https://github.com/storybooks/storybook/pull/4464)

#### Dependency Upgrades

- Require React 16.3 as a peer dependency [#4458](https://github.com/storybooks/storybook/pull/4458)
- Bump @ember/test-helpers from 0.7.26 to 0.7.27 [#4455](https://github.com/storybooks/storybook/pull/4455)
- Bump eslint-plugin-jest from 21.25.0 to 21.25.1 [#4456](https://github.com/storybooks/storybook/pull/4456)
- Bump autoprefixer from 9.2.0 to 9.2.1 [#4457](https://github.com/storybooks/storybook/pull/4457)
- Bump @types/node from 10.11.7 to 10.12.0 [#4434](https://github.com/storybooks/storybook/pull/4434)
- Bump ember-cli-inject-live-reload from 2.0.0 to 2.0.1 [#4435](https://github.com/storybooks/storybook/pull/4435)
- Bump gatsby-plugin-sharp from 1.6.48 to 2.0.7 in /docs [#4438](https://github.com/storybooks/storybook/pull/4438)
- Bump marked from 0.4.0 to 0.5.1 in /docs [#4437](https://github.com/storybooks/storybook/pull/4437)
- Bump highlight.js from 9.12.0 to 9.13.0 in /docs [#4440](https://github.com/storybooks/storybook/pull/4440)

# 4.0.0-rc.0

2018-October-15
Expand Down
29 changes: 28 additions & 1 deletion MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Table of contents

- [From version 3.4.x to 4.0.x](#from-version-34x-to-40x)
- [React 16.3](#react-163)
- [Keyboard shortcuts moved](#keyboard-shortcuts-moved)
- [Removed addWithInfo](#removed-add-with-info)
- [Removed RN packager](#removed-rn-packager)
Expand Down Expand Up @@ -31,6 +32,32 @@

With 4.0 as our first major release in over a year, we've collected a lot of cleanup tasks. Most of the deprecations have been marked for months, so we hope that there will be no significant impact on your project.

### React 16.3+

Storybook uses [Emotion](https://emotion.sh/) for styling which currently requires React 16.3 and above.

If you're using Storybook for anything other than React, you probably don't need to worry about this.

However, if you're developing React components, this means you need to upgrade to 16.3 or higher to use Storybook 4.0.

> **NOTE:** This is a temporary requirement, and we plan to restore 15.x compatibility in a near-term 4.x release.
Also, here's the error you'll get if you're running an older version of React:

```
core.browser.esm.js:15 Uncaught TypeError: Object(...) is not a function
at Module../node_modules/@emotion/core/dist/core.browser.esm.js (core.browser.esm.js:15)
at __webpack_require__ (bootstrap:724)
at fn (bootstrap:101)
at Module../node_modules/@emotion/styled-base/dist/styled-base.browser.esm.js (styled-base.browser.esm.js:1)
at __webpack_require__ (bootstrap:724)
at fn (bootstrap:101)
at Module../node_modules/@emotion/styled/dist/styled.esm.js (styled.esm.js:1)
at __webpack_require__ (bootstrap:724)
at fn (bootstrap:101)
at Object../node_modules/@storybook/components/dist/navigation/MenuLink.js (MenuLink.js:12)
```

### Generic addons

4.x introduces generic addon decorators that are not tied to specific view layers [#3555](https://github.com/storybooks/storybook/pull/3555). So for example:
Expand Down Expand Up @@ -146,7 +173,7 @@ If you're using `start-storybook` on CI, you may need to opt out of this using t
We've deprecated the `getstorybook` CLI in 4.0. The new way to install storybook is `sb init`. We recommend using `npx` for convenience and to make sure you're always using the latest version of the CLI:

```
npx -p @storybook/cli@alpha sb init
npx -p @storybook/cli@rc sb init
```

## From version 3.3.x to 3.4.x
Expand Down
41 changes: 21 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ First install storybook:

```sh
cd my-react-app
npx -p @storybook/cli@alpha sb init
npx -p @storybook/cli@rc sb init
```

If you'd rather set up your project manually, take a look at our [Slow Start Guide](https://storybook.js.org/basics/slow-start-guide/).
Expand All @@ -66,7 +66,7 @@ Once it's installed, you can `npm run storybook` and it will run the development

```sh
cd my-storybook-v2-app
npx -p @storybook/cli@alpha sb init
npx -p @storybook/cli@rc sb init
```

It runs a codemod to update all package names. Read all migration details in our [Migration Guide](MIGRATION.md)
Expand All @@ -91,7 +91,7 @@ For additional help, join us [in our Slack](https://now-examples-slackin-rrirkqo
| [HTML](app/html) <sup>alpha</sup> | - | [v4.0.0-alpha](https://storybooks-html.netlify.com/) | [![HTML](https://img.shields.io/npm/dt/@storybook/html.svg)](app/html) |
| [Svelte](app/svelte) <sup>alpha</sup> | - | [v4.0.0-alpha](https://storybooks-svelte.netlify.com/) | [![Svelte](https://img.shields.io/npm/dt/@storybook/svelte.svg)](app/svelte) |
| [Riot](app/riot) <sup>alpha</sup> | - | [v4.0.0-alpha](https://storybooks-riot.netlify.com/) | [![Riot](https://img.shields.io/npm/dt/@storybook/riot.svg)](app/riot) |
| [Ember](app/ember) | - | [v4.0.0-alpha](https://storybooks-ember.netlify.com/) | [![Ember](https://img.shields.io/npm/dt/@storybook/ember.svg)](app/ember) |
| [Ember](app/ember) <sup>alpha</sup> | - | [v4.0.0-alpha](https://storybooks-ember.netlify.com/) | [![Ember](https://img.shields.io/npm/dt/@storybook/ember.svg)](app/ember) |

### Sub Projects

Expand All @@ -100,23 +100,24 @@ For additional help, join us [in our Slack](https://now-examples-slackin-rrirkqo

### Addons

| Addons | |
| ---------------------------------- | -------------------------------------------------------------------------- |
| [a11y](addons/a11y/) | Test components for user accessibility in Storybook |
| [actions](addons/actions/) | Log actions as users interact with components in the Storybook UI |
| [backgrounds](addons/backgrounds/) | Let users choose backgrounds in the Storybook UI |
| [centered](addons/centered/) | Center the alignment of your components within the Storybook UI |
| [events](addons/events/) | Interactively fire events to components that respond to EventEmitter |
| [graphql](addons/graphql/) | Query a GraphQL server within Storybook stories |
| [info](addons/info/) | Annotate stories with extra component usage information |
| [jest](addons/jest/) | View the results of components' unit tests in Storybook |
| [knobs](addons/knobs/) | Interactively edit component prop data in the Storybook UI |
| [links](addons/links/) | Create links between stories |
| [notes](addons/notes/) | Annotate Storybook stories with notes |
| [options](addons/options/) | Customize the Storybook UI in code |
| [storyshots](addons/storyshots/) | Easy snapshot testing for components in Storybook |
| [storysource](addons/storysource/) | View the code of your stories within the Storybook UI |
| [viewport](addons/viewport/) | Change display sizes and layouts for responsive components using Storybook |
| Addons | |
| ------------------------------------------- | -------------------------------------------------------------------------- |
| [a11y](addons/a11y/) | Test components for user accessibility in Storybook |
| [actions](addons/actions/) | Log actions as users interact with components in the Storybook UI |
| [backgrounds](addons/backgrounds/) | Let users choose backgrounds in the Storybook UI |
| [centered](addons/centered/) | Center the alignment of your components within the Storybook UI |
| [events](addons/events/) | Interactively fire events to components that respond to EventEmitter |
| [graphql](addons/graphql/) | Query a GraphQL server within Storybook stories |
| [google-analytics](addons/google-analytics) | Reports google analytics on stories |
| [info](addons/info/) | Annotate stories with extra component usage information |
| [jest](addons/jest/) | View the results of components' unit tests in Storybook |
| [knobs](addons/knobs/) | Interactively edit component prop data in the Storybook UI |
| [links](addons/links/) | Create links between stories |
| [notes](addons/notes/) | Annotate Storybook stories with notes |
| [options](addons/options/) | Customize the Storybook UI in code |
| [storyshots](addons/storyshots/) | Easy snapshot testing for components in Storybook |
| [storysource](addons/storysource/) | View the code of your stories within the Storybook UI |
| [viewport](addons/viewport/) | Change display sizes and layouts for responsive components using Storybook |

See [Addon / Framework Support Table](ADDONS_SUPPORT.md)

Expand Down
10 changes: 5 additions & 5 deletions addons/a11y/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-a11y",
"version": "4.0.0-rc.0",
"version": "4.0.0-rc.1",
"description": "a11y addon for storybook",
"keywords": [
"a11y",
Expand Down Expand Up @@ -29,10 +29,10 @@
},
"dependencies": {
"@emotion/styled": "^0.10.6",
"@storybook/addons": "4.0.0-rc.0",
"@storybook/client-logger": "4.0.0-rc.0",
"@storybook/components": "4.0.0-rc.0",
"@storybook/core-events": "4.0.0-rc.0",
"@storybook/addons": "4.0.0-rc.1",
"@storybook/client-logger": "4.0.0-rc.1",
"@storybook/components": "4.0.0-rc.1",
"@storybook/core-events": "4.0.0-rc.1",
"axe-core": "^3.1.2",
"global": "^4.3.2",
"prop-types": "^15.6.2"
Expand Down
8 changes: 4 additions & 4 deletions addons/actions/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-actions",
"version": "4.0.0-rc.0",
"version": "4.0.0-rc.1",
"description": "Action Logger addon for storybook",
"keywords": [
"storybook"
Expand All @@ -26,9 +26,9 @@
"@emotion/core": "^0.13.1",
"@emotion/provider": "^0.11.2",
"@emotion/styled": "^0.10.6",
"@storybook/addons": "4.0.0-rc.0",
"@storybook/components": "4.0.0-rc.0",
"@storybook/core-events": "4.0.0-rc.0",
"@storybook/addons": "4.0.0-rc.1",
"@storybook/components": "4.0.0-rc.1",
"@storybook/core-events": "4.0.0-rc.1",
"deep-equal": "^1.0.1",
"global": "^4.3.2",
"lodash": "^4.17.11",
Expand Down
6 changes: 3 additions & 3 deletions addons/backgrounds/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-backgrounds",
"version": "4.0.0-rc.0",
"version": "4.0.0-rc.1",
"description": "A storybook addon to show different backgrounds for your preview",
"keywords": [
"addon",
Expand Down Expand Up @@ -28,8 +28,8 @@
},
"dependencies": {
"@emotion/styled": "^0.10.6",
"@storybook/addons": "4.0.0-rc.0",
"@storybook/core-events": "4.0.0-rc.0",
"@storybook/addons": "4.0.0-rc.1",
"@storybook/core-events": "4.0.0-rc.1",
"global": "^4.3.2",
"prop-types": "^15.6.2",
"util-deprecate": "^1.0.2"
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": "4.0.0-rc.0",
"version": "4.0.0-rc.1",
"description": "Storybook decorator to center components",
"keywords": [
"addon",
Expand Down
6 changes: 3 additions & 3 deletions addons/events/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-events",
"version": "4.0.0-rc.0",
"version": "4.0.0-rc.1",
"description": "Add events to your Storybook stories.",
"keywords": [
"addon",
Expand All @@ -27,8 +27,8 @@
},
"dependencies": {
"@emotion/styled": "^0.10.6",
"@storybook/addons": "4.0.0-rc.0",
"@storybook/core-events": "4.0.0-rc.0",
"@storybook/addons": "4.0.0-rc.1",
"@storybook/core-events": "4.0.0-rc.1",
"format-json": "^1.0.3",
"prop-types": "^15.6.2",
"react-lifecycles-compat": "^3.0.4",
Expand Down
4 changes: 2 additions & 2 deletions addons/google-analytics/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-google-analytics",
"version": "4.0.0-rc.0",
"version": "4.0.0-rc.1",
"description": "Storybook addon for google analytics",
"keywords": [
"addon",
Expand All @@ -24,7 +24,7 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@storybook/addons": "4.0.0-rc.0",
"@storybook/addons": "4.0.0-rc.1",
"global": "^4.3.2",
"react-ga": "^2.5.3"
}
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": "4.0.0-rc.0",
"version": "4.0.0-rc.1",
"description": "Storybook addon to display the GraphiQL IDE",
"keywords": [
"addon",
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": "4.0.0-rc.0",
"version": "4.0.0-rc.1",
"description": "A Storybook addon to show additional information for your stories.",
"keywords": [
"addon",
Expand All @@ -25,9 +25,9 @@
},
"dependencies": {
"@emotion/styled": "^0.10.6",
"@storybook/addons": "4.0.0-rc.0",
"@storybook/client-logger": "4.0.0-rc.0",
"@storybook/components": "4.0.0-rc.0",
"@storybook/addons": "4.0.0-rc.1",
"@storybook/client-logger": "4.0.0-rc.1",
"@storybook/components": "4.0.0-rc.1",
"core-js": "2.5.7",
"global": "^4.3.2",
"marksy": "^6.1.0",
Expand Down
6 changes: 3 additions & 3 deletions addons/jest/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-jest",
"version": "4.0.0-rc.0",
"version": "4.0.0-rc.1",
"description": "React storybook addon that show component jest report",
"keywords": [
"addon",
Expand Down Expand Up @@ -31,8 +31,8 @@
},
"dependencies": {
"@emotion/styled": "^0.10.6",
"@storybook/addons": "4.0.0-rc.0",
"@storybook/components": "4.0.0-rc.0",
"@storybook/addons": "4.0.0-rc.1",
"@storybook/components": "4.0.0-rc.1",
"global": "^4.3.2",
"prop-types": "^15.6.2",
"upath": "^1.1.0",
Expand Down
8 changes: 4 additions & 4 deletions addons/knobs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/addon-knobs",
"version": "4.0.0-rc.0",
"version": "4.0.0-rc.1",
"description": "Storybook Addon Prop Editor Component",
"keywords": [
"addon",
Expand All @@ -25,9 +25,9 @@
},
"dependencies": {
"@emotion/styled": "^0.10.6",
"@storybook/addons": "4.0.0-rc.0",
"@storybook/components": "4.0.0-rc.0",
"@storybook/core-events": "4.0.0-rc.0",
"@storybook/addons": "4.0.0-rc.1",
"@storybook/components": "4.0.0-rc.1",
"@storybook/core-events": "4.0.0-rc.1",
"copy-to-clipboard": "^3.0.8",
"escape-html": "^1.0.3",
"fast-deep-equal": "^2.0.1",
Expand Down
2 changes: 1 addition & 1 deletion addons/knobs/src/components/types/Select.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ SelectType.defaultProps = {
SelectType.propTypes = {
knob: PropTypes.shape({
name: PropTypes.string,
value: PropTypes.string,
value: PropTypes.any,
options: PropTypes.oneOfType([PropTypes.array, PropTypes.object]),
}),
onChange: PropTypes.func,
Expand Down
Loading

0 comments on commit 72116e5

Please sign in to comment.