Skip to content

Commit

Permalink
build(deps-dev): update other @storybook packages to 5.3.9
Browse files Browse the repository at this point in the history
This follows on PR #2227.

Satisfy new peer dependencies following the bumps: `@storybook/core`,
`regenerator-runtime`.

Follow storybook's instructions to add `@storybook/preset-create-react-app` as
a dependency and also add the needed `.storybook/main.js` in
`packages/cockpit/ui/`.

Storybook is sensitive to presets being in the immediate project's
`node_modules` so add a `"nohoist"` in the root `package.json` for
`"embark-ui/@storybook/**"`.

After making the changes above, problems related to babel were observed when
running `yarn start`. It has been known for some time that having the root
babel config's dependencies spec'd in
`packages/utils/collective/package.json` (which is the package that actually
drives the babel cli) could lead to problems related to deduping, but such
problems hadn't been experienced until now. Move the dependencies relevant to
the root `babel.config.js` into the root `package.json` and update the
explanatory comment in the config.
  • Loading branch information
michaelsbradleyjr committed Jan 30, 2020
1 parent a5c7527 commit c4ad3d6
Show file tree
Hide file tree
Showing 7 changed files with 1,085 additions and 618 deletions.
8 changes: 5 additions & 3 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
/* global module require */

/*
* dependencies of this config should be specified in
* `utils/collective/package.json` relative to this config file, with reliance
* on yarn-workspace hoisting for those packages to be resolvable from the
* dependencies of this config should be specified in `./package.json` relative
* to this config file (which should be in the root of the monorepo);
* yarn-workspace hoisting re: dev/Deps specified in
* `packages/utils/collective/package.json` is not reliable re: dependencies of
* this root-level config being resolvable (with correct versions) from the
* monorepo root
*/

Expand Down
16 changes: 16 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
{
"devDependencies": {
"@babel/cli": "7.7.4",
"@babel/core": "7.7.4",
"@babel/plugin-proposal-class-properties": "7.7.4",
"@babel/plugin-proposal-decorators": "7.7.4",
"@babel/plugin-proposal-export-default-from": "7.7.4",
"@babel/plugin-proposal-export-namespace-from": "7.7.4",
"@babel/plugin-proposal-nullish-coalescing-operator": "7.7.4",
"@babel/plugin-proposal-optional-chaining": "7.7.4",
"@babel/plugin-syntax-dynamic-import": "7.7.4",
"@babel/plugin-transform-runtime": "7.7.4",
"@babel/preset-env": "7.7.4",
"@babel/preset-typescript": "7.7.4",
"babel-eslint": "10.0.3",
"babel-plugin-dynamic-import-node": "2.3.0",
"babel-plugin-macros": "2.7.1",
"bignumber.js": "5.0.0",
"chalk": "2.4.2",
"coveralls": "3.0.9",
Expand All @@ -9,6 +23,7 @@
"form-data": "2.5.1",
"fs-extra": "8.1.0",
"lerna": "3.19.0",
"lodash.clonedeep": "4.5.0",
"minimist": "1.2.0",
"npm-run-all": "4.1.5",
"nyc": "13.1.0",
Expand Down Expand Up @@ -86,6 +101,7 @@
"embark-dapp-template-demo/bootstrap",
"embark-dapp-test-app/embark-dapp-test-service",
"embark-dapp-test-app/zeppelin-solidity",
"embark-ui/@storybook/**",
"embark-ui/bignumber.js",
"embark-ui/react-scripts",
"embark-ui/react-scripts/**",
Expand Down
3 changes: 3 additions & 0 deletions packages/cockpit/ui/.storybook/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
addons: ['@storybook/preset-create-react-app'],
};
15 changes: 9 additions & 6 deletions packages/cockpit/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,15 @@
"@emotion/core": "10.0.22",
"@emotion/styled": "10.0.23",
"@monaco-editor/react": "3.0.1",
"@storybook/addon-actions": "5.2.7",
"@storybook/addon-info": "5.2.7",
"@storybook/addon-knobs": "5.2.7",
"@storybook/addon-actions": "5.3.9",
"@storybook/addon-info": "5.3.9",
"@storybook/addon-knobs": "5.3.9",
"@storybook/addon-links": "5.3.9",
"@storybook/addon-options": "5.2.7",
"@storybook/addons": "5.2.7",
"@storybook/react": "5.2.7",
"@storybook/addon-options": "5.3.9",
"@storybook/addons": "5.3.9",
"@storybook/core": "5.3.9",
"@storybook/preset-create-react-app": "1.5.2",
"@storybook/react": "5.3.9",
"ansi-to-html": "0.6.11",
"array-move": "2.0.0",
"autoscroll-react": "3.2.0",
Expand Down Expand Up @@ -96,6 +98,7 @@
"reactstrap": "6.5.0",
"redux": "4.0.4",
"redux-saga": "1.1.3",
"regenerator-runtime": "0.13.3",
"rimraf": "3.0.0",
"simple-line-icons": "2.4.1",
"typescript": "3.7.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/utils/collective/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ function labeler(label) {
function build(babelEnv, outDir, cliArgs, pkgJsonDict) {
const rootPath = monorepoRootPath();
const babelCmd = process.platform === 'win32' ? 'babel.cmd': 'babel';
const babelBinPath = join(__dirname, 'node_modules', '.bin', babelCmd);
const babelBinPath = join(rootPath, 'node_modules', '.bin', babelCmd);
const babelConfigPath = join(rootPath, 'babel.config.js');

const sources = Object.values(pkgJsonDict).map(
Expand Down
15 changes: 0 additions & 15 deletions packages/utils/collective/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,26 +41,11 @@
"watch:typecheck": "npm run typecheck -- --preserveWatchOutput --watch"
},
"devDependencies": {
"@babel/cli": "7.7.4",
"@babel/core": "7.7.4",
"@babel/plugin-proposal-class-properties": "7.7.4",
"@babel/plugin-proposal-decorators": "7.7.4",
"@babel/plugin-proposal-export-default-from": "7.7.4",
"@babel/plugin-proposal-export-namespace-from": "7.7.4",
"@babel/plugin-proposal-nullish-coalescing-operator": "7.7.4",
"@babel/plugin-proposal-optional-chaining": "7.7.4",
"@babel/plugin-syntax-dynamic-import": "7.7.4",
"@babel/plugin-transform-runtime": "7.7.4",
"@babel/preset-env": "7.7.4",
"@babel/preset-typescript": "7.7.4",
"@lerna/filter-packages": "3.16.0",
"babel-plugin-dynamic-import-node": "2.3.0",
"babel-plugin-macros": "2.7.1",
"embark-inside-monorepo": "^5.1.0",
"find-up": "4.1.0",
"fs-extra": "8.1.0",
"glob": "7.1.4",
"lodash.clonedeep": "4.5.0",
"lodash.isequal": "4.5.0",
"lodash.isplainobject": "4.0.6",
"lodash.mergewith": "4.6.2",
Expand Down
Loading

0 comments on commit c4ad3d6

Please sign in to comment.