mirror of
https://github.com/storybookjs/storybook.git
synced 2025-03-19 05:02:40 +08:00
Merge pull request #3631 from storybooks/shilman/remove-3x-deprecations
Removed deprecated react-native built-in addons
This commit is contained in:
commit
6e3ee09dae
@ -5,6 +5,7 @@
|
||||
- [From version 3.4.x to 4.0.x](#from-version-34x-to-40x)
|
||||
- [Keyboard shortcuts moved](#keyboard-shortcuts-moved)
|
||||
- [Removed addWithInfo](#removed-add-with-info)
|
||||
- [Removed RN addons](#removed-rn-addons)
|
||||
- [From version 3.3.x to 3.4.x](#from-version-33x-to-34x)
|
||||
- [From version 3.2.x to 3.3.x](#from-version-32x-to-33x)
|
||||
- [Refactored Knobs](#refactored-knobs)
|
||||
@ -22,6 +23,8 @@
|
||||
|
||||
## From 3.4.x to 4.0
|
||||
|
||||
With 4.0 as our first major release in over a year, we've collected a lot of cleanup tasks. All deprecations have been marked for months, so we hope that there will be no significant impact on your project.
|
||||
|
||||
### Keyboard shortcuts moved
|
||||
|
||||
- Addon Panel to `Z`
|
||||
@ -33,6 +36,10 @@
|
||||
|
||||
`Addon-info`'s `addWithInfo` has been marked deprecated since 3.2. In 4.0 we've removed it completely. See the package [README](https://github.com/storybooks/storybook/blob/master/addons/info/README.md) for the proper usage.
|
||||
|
||||
### Removed RN addons
|
||||
|
||||
The `@storybook/react-native` had built-in addons (`addon-actions` and `addon-links`) that have been marked as deprecated since 3.x. They have been fully removed in 4.x. If your project still uses the built-ins, you'll need to add explicit dependencies on `@storybook/addon-actions` and/or `@storybook/addon-links` and import directly from those packages.
|
||||
|
||||
## From version 3.3.x to 3.4.x
|
||||
|
||||
There are no expected breaking changes in the 3.4.x release, but 3.4 contains a major refactor to make it easier to support new frameworks, and we will document any breaking changes here if they arise.
|
||||
|
4
app/react-native/addons.js
vendored
4
app/react-native/addons.js
vendored
@ -1,4 +0,0 @@
|
||||
// We are not using this file inside this project.
|
||||
// But, this will be useful when a user is configuring it's own addons.
|
||||
// Then he can import this file to add default set of addons.
|
||||
require('./dist/server/addons');
|
@ -25,8 +25,6 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@storybook/addon-actions": "4.0.0-alpha.7",
|
||||
"@storybook/addon-links": "4.0.0-alpha.7",
|
||||
"@storybook/addons": "4.0.0-alpha.7",
|
||||
"@storybook/channel-websocket": "4.0.0-alpha.7",
|
||||
"@storybook/core": "4.0.0-alpha.7",
|
||||
@ -61,7 +59,6 @@
|
||||
"react-native-iphone-x-helper": "^1.0.3",
|
||||
"shelljs": "^0.8.2",
|
||||
"url-parse": "^1.4.0",
|
||||
"util-deprecate": "^1.0.2",
|
||||
"uuid": "^3.2.1",
|
||||
"webpack": "^4.8.3",
|
||||
"webpack-dev-middleware": "^3.1.3",
|
||||
|
16
app/react-native/src/index.js
vendored
16
app/react-native/src/index.js
vendored
@ -1,9 +1,3 @@
|
||||
import deprecate from 'util-deprecate';
|
||||
|
||||
// NOTE export these to keep backwards compatibility
|
||||
import { action as deprecatedAction } from '@storybook/addon-actions';
|
||||
import { linkTo as deprecatedLinkTo } from '@storybook/addon-links';
|
||||
|
||||
import Preview from './preview';
|
||||
|
||||
const preview = new Preview();
|
||||
@ -16,13 +10,3 @@ export const clearDecorators = preview.clearDecorators.bind(preview);
|
||||
export const configure = preview.configure.bind(preview);
|
||||
export const getStorybook = preview.getStorybook.bind(preview);
|
||||
export const getStorybookUI = preview.getStorybookUI.bind(preview);
|
||||
|
||||
export const action = deprecate(
|
||||
deprecatedAction,
|
||||
'@storybook/react action is deprecated. See: https://github.com/storybooks/storybook/tree/master/addons/actions'
|
||||
);
|
||||
|
||||
export const linkTo = deprecate(
|
||||
deprecatedLinkTo,
|
||||
'@storybook/react linkTo is deprecated. See: https://github.com/storybooks/storybook/tree/master/addons/links'
|
||||
);
|
||||
|
6
app/react-native/src/server/addons.js
vendored
6
app/react-native/src/server/addons.js
vendored
@ -1,6 +0,0 @@
|
||||
import deprecate from 'util-deprecate';
|
||||
import '@storybook/addon-actions/register';
|
||||
import '@storybook/addon-links/register';
|
||||
|
||||
deprecate(() => {},
|
||||
'@storybook/react-native/addons is deprecated. See https://storybook.js.org/addons/using-addons/')();
|
Loading…
x
Reference in New Issue
Block a user