Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/theming broken #5722

Merged
merged 5 commits into from
Feb 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions addons/a11y/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import EVENTS, { PARAM_KEY } from './constants';

const channel = addons.getChannel();
let progress = Promise.resolve();
let setup;
let setup = {};

const getElement = () => {
const storyRoot = document.getElementById('story-root');
Expand Down Expand Up @@ -48,7 +48,7 @@ export const withA11Y = makeDecorator({
allowDeprecatedUsage: false,

wrapper: (getStory, context, opt) => {
setup = opt.parameters || opt.options;
setup = opt.parameters || opt.options || {};

return getStory(context);
},
Expand Down
1 change: 0 additions & 1 deletion addons/cssresources/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"prepare": "node ../../scripts/prepare.js"
},
"dependencies": {
"@emotion/styled": "10.0.6",
"@storybook/addons": "5.0.0-beta.3",
"@storybook/channels": "5.0.0-beta.3",
"@storybook/components": "5.0.0-beta.3",
Expand Down
17 changes: 0 additions & 17 deletions lib/core/src/server/manager/manager-webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,6 @@ const coreDirName = path.dirname(require.resolve('@storybook/core/package.json')
const context = path.join(coreDirName, '../../node_modules');
const cacheDir = findCacheDir({ name: 'storybook' });

const storybookPackages = [
'@storybook/router',
'@storybook/theming',
'@storybook/channels',
'@storybook/client-api',
'@storybook/core',
'@storybook/ui',
];

export default ({ configDir, configType, entries, dll, outputDir, cache, babelOptions }) => {
const { raw, stringified } = loadEnv();
const isProd = configType === 'PRODUCTION';
Expand Down Expand Up @@ -74,14 +65,6 @@ export default ({ configDir, configType, entries, dll, outputDir, cache, babelOp
extensions: ['.mjs', '.js', '.jsx', '.json'],
modules: ['node_modules'].concat(raw.NODE_PATH || []),
alias: {
'core-js': path.dirname(require.resolve('core-js/package.json')),
...storybookPackages.reduce(
(acc, i) =>
Object.assign(acc, {
[i]: path.dirname(require.resolve(`${i}/package.json`)),
}),
{}
),
...uiPaths,
},
},
Expand Down
2 changes: 1 addition & 1 deletion lib/theming/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
"dependencies": {
"@emotion/core": "^10.0.7",
"@emotion/styled": "^10.0.5",
"@emotion/styled": "^10.0.7",
"@storybook/client-logger": "5.0.0-beta.3",
"common-tags": "^1.8.0",
"deep-object-diff": "^1.1.0",
Expand Down
12 changes: 12 additions & 0 deletions lib/ui/paths.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@ const { dirname } = require('path');
// These paths need to be aliased in the manager webpack config to ensure that all
// code running inside the manager uses the *same* version of react[-dom] that we use.
module.exports = {
'@emotion/core': dirname(require.resolve('@emotion/core/package.json')),
'@emotion/styled': dirname(require.resolve('@emotion/styled/package.json')),
'@storybook/addons': dirname(require.resolve('@storybook/addons/package.json')),
'@storybook/channels': dirname(require.resolve('@storybook/channels/package.json')),
'@storybook/components': dirname(require.resolve('@storybook/components/package.json')),
'@storybook/core-events': dirname(require.resolve('@storybook/core-events/package.json')),
'@storybook/router': dirname(require.resolve('@storybook/router/package.json')),
'@storybook/theming': dirname(require.resolve('@storybook/theming/package.json')),
'@storybook/ui': dirname(require.resolve('@storybook/ui/package.json')),
'core-js': dirname(require.resolve('core-js/package.json')),
'emotion-theming': dirname(require.resolve('emotion-theming/package.json')),
'prop-types': dirname(require.resolve('prop-types/package.json')),
react: dirname(require.resolve('react/package.json')),
'react-dom': dirname(require.resolve('react-dom/package.json')),
};
3 changes: 3 additions & 0 deletions lib/ui/scripts/createDlls.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,16 @@ const run = () =>
config({
entry: {
storybook_ui: [
'@emotion/core',
'@emotion/styled',
'@storybook/addons',
'@storybook/core-events',
'@storybook/theming',
'@storybook/components',
'airbnb-js-shims',
'core-js/es6/symbol',
'core-js/fn/array/iterator',
'emotion-theming',
'prop-types',
'react-dom',
'react',
Expand Down
24 changes: 13 additions & 11 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1031,7 +1031,7 @@
version "0.6.6"
resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.6.6.tgz#004b98298d04c7ca3b4f50ca2035d4f60d2eed1b"

"@emotion/serialize@^0.11.3", "@emotion/serialize@^0.11.4":
"@emotion/serialize@^0.11.4":
version "0.11.4"
resolved "https://registry.yarnpkg.com/@emotion/serialize/-/serialize-0.11.4.tgz#691e615184a23cd3b9ae9b1eaa79eb8798e52379"
dependencies:
Expand All @@ -1054,21 +1054,23 @@
version "0.9.2"
resolved "https://registry.yarnpkg.com/@emotion/sheet/-/sheet-0.9.2.tgz#74e5c6b5e489a1ba30ab246ab5eedd96916487c4"

"@emotion/styled-base@^10.0.5":
version "10.0.5"
resolved "https://registry.yarnpkg.com/@emotion/styled-base/-/styled-base-10.0.5.tgz#3bc29e7efc4c04190de4f84fda9dc7e6dc18a885"
"@emotion/styled-base@^10.0.7":
version "10.0.7"
resolved "https://registry.yarnpkg.com/@emotion/styled-base/-/styled-base-10.0.7.tgz#87cee1043ffdf17690bdd96d7269a21f705bf224"
integrity sha512-wdYHs5bNXBtC9yuQzKP8Ue8K4VWcQ/dQApP4br/8JLuOw5Zxa6Vxtc1JpxnBhi1OSWKjqHGpd7XFETOr6gCHJg==
dependencies:
"@emotion/is-prop-valid" "0.7.3"
"@emotion/serialize" "^0.11.3"
"@emotion/serialize" "^0.11.4"
"@emotion/utils" "0.11.1"
object-assign "^4.1.1"

"@emotion/[email protected]", "@emotion/styled@^10.0.5":
version "10.0.6"
resolved "https://registry.yarnpkg.com/@emotion/styled/-/styled-10.0.6.tgz#e6591cf7b0fd56e82a0ae7e421568229e7c6d5f9"
"@emotion/styled@^10.0.7":
version "10.0.7"
resolved "https://registry.yarnpkg.com/@emotion/styled/-/styled-10.0.7.tgz#e36c84bf14435127481a1ea0b038d64a15c13995"
integrity sha512-H/7wi2bFYl6GdxBPYef0FNYay1ay5iKFGYxmkuH8WJZnDc/bf1Bx+lH9IQ+QujAMgmAtUHwJsgO2vwj0LEIYcg==
dependencies:
"@emotion/styled-base" "^10.0.5"
babel-plugin-emotion "^10.0.6"
"@emotion/styled-base" "^10.0.7"
babel-plugin-emotion "^10.0.7"

"@emotion/[email protected]":
version "0.8.3"
Expand Down Expand Up @@ -3477,7 +3479,7 @@ babel-plugin-ember-modules-api-polyfill@^2.6.0:
dependencies:
ember-rfc176-data "^0.3.6"

babel-plugin-emotion@^10.0.6, babel-plugin-emotion@^10.0.7:
babel-plugin-emotion@^10.0.7:
version "10.0.7"
resolved "https://registry.yarnpkg.com/babel-plugin-emotion/-/babel-plugin-emotion-10.0.7.tgz#3634ada6dee762140f27db07387feaec8d2cb619"
dependencies:
Expand Down