diff --git a/docs/components/Homepage/index.js b/docs/components/Homepage/index.js index 1e99bf4ef9cc..0c7041892772 100644 --- a/docs/components/Homepage/index.js +++ b/docs/components/Homepage/index.js @@ -43,13 +43,13 @@ import Footer from '../Footer'; const Homepage = ({ users }) =>
- {/*
*/} + {/*
*/} - {/* */} + {/* */} - {/* */} + {/* */}
; diff --git a/examples/test-cra/src/stories/ComponentWithRef.js b/examples/test-cra/src/stories/ComponentWithRef.js index e9f0679af15f..a8bf2c6d869a 100644 --- a/examples/test-cra/src/stories/ComponentWithRef.js +++ b/examples/test-cra/src/stories/ComponentWithRef.js @@ -7,7 +7,13 @@ class ComponentWithRef extends Component { } scrollWidth = 0; render() { - return
(this.ref = r)} />; + return ( +
{ + this.ref = r; + }} + /> + ); } } diff --git a/lib/addons/src/index.js b/lib/addons/src/index.js index e6baf89fdc07..ee3ae408b66e 100644 --- a/lib/addons/src/index.js +++ b/lib/addons/src/index.js @@ -1,16 +1,11 @@ -function channelError() { - throw new Error( - 'Accessing nonexistent addons channel, see https://storybook.js.org/basics/faq/#why-is-there-no-addons-channel' - ); -} - export class AddonStore { constructor() { this.loaders = {}; this.panels = {}; // this.channel should get overwritten by setChannel if package versions are - // correct and AddonStore is a proper singleton. If not, throw an error. - this.channel = { on: channelError, emit: channelError }; + // correct and AddonStore is a proper singleton. If not, this will be null + // (currently required by @storybook/react-native getStorybookUI) + this.channel = null; this.preview = null; this.database = null; } diff --git a/scripts/hoist-internals.js b/scripts/hoist-internals.js old mode 100644 new mode 100755 index d178df18df9b..f0756b580bde --- a/scripts/hoist-internals.js +++ b/scripts/hoist-internals.js @@ -20,10 +20,7 @@ const passingLog = fn => i => { fn(i); return i; }; -const getPackageNameOfFolder = sourcePath => - fse - .readJson(path.join(sourcePath, 'package.json')) - .then(json => json.name.replace('@storybook/', '')); +const getPackageOfFolder = sourcePath => fse.readJsonSync(path.join(sourcePath, 'package.json')); const task = getLernaPackages() .then( @@ -60,14 +57,17 @@ const task = getLernaPackages() log.silly(prefix, 'found package path', item); }) ) - .map(sourcePath => - getPackageNameOfFolder(sourcePath) - .then( - passingLog(packageName => { - log.silly(prefix, 'found package name', packageName); - }) - ) - .then(packageName => path.join(targetPath, packageName)) + .map(sourcePath => ({ + sourcePath, + packageJson: getPackageOfFolder(sourcePath), + })) + .filter(({ packageJson }) => !packageJson.private) + .map(({ sourcePath, packageJson }) => + Promise.resolve(packageJson.name.replace('@storybook/', '')) + .then(packageName => { + log.silly(prefix, 'found package name', packageName); + return path.join(targetPath, packageName); + }) .then(localTargetPath => symlink(sourcePath, localTargetPath) .then(