Skip to content

Commit c4ad3d6

Browse files
build(deps-dev): update other @storybook packages to 5.3.9
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.
1 parent a5c7527 commit c4ad3d6

File tree

7 files changed

+1085
-618
lines changed

7 files changed

+1085
-618
lines changed

babel.config.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
/* global module require */
22

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

package.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,20 @@
11
{
22
"devDependencies": {
3+
"@babel/cli": "7.7.4",
4+
"@babel/core": "7.7.4",
5+
"@babel/plugin-proposal-class-properties": "7.7.4",
6+
"@babel/plugin-proposal-decorators": "7.7.4",
7+
"@babel/plugin-proposal-export-default-from": "7.7.4",
8+
"@babel/plugin-proposal-export-namespace-from": "7.7.4",
9+
"@babel/plugin-proposal-nullish-coalescing-operator": "7.7.4",
10+
"@babel/plugin-proposal-optional-chaining": "7.7.4",
11+
"@babel/plugin-syntax-dynamic-import": "7.7.4",
12+
"@babel/plugin-transform-runtime": "7.7.4",
13+
"@babel/preset-env": "7.7.4",
14+
"@babel/preset-typescript": "7.7.4",
315
"babel-eslint": "10.0.3",
16+
"babel-plugin-dynamic-import-node": "2.3.0",
17+
"babel-plugin-macros": "2.7.1",
418
"bignumber.js": "5.0.0",
519
"chalk": "2.4.2",
620
"coveralls": "3.0.9",
@@ -9,6 +23,7 @@
923
"form-data": "2.5.1",
1024
"fs-extra": "8.1.0",
1125
"lerna": "3.19.0",
26+
"lodash.clonedeep": "4.5.0",
1227
"minimist": "1.2.0",
1328
"npm-run-all": "4.1.5",
1429
"nyc": "13.1.0",
@@ -86,6 +101,7 @@
86101
"embark-dapp-template-demo/bootstrap",
87102
"embark-dapp-test-app/embark-dapp-test-service",
88103
"embark-dapp-test-app/zeppelin-solidity",
104+
"embark-ui/@storybook/**",
89105
"embark-ui/bignumber.js",
90106
"embark-ui/react-scripts",
91107
"embark-ui/react-scripts/**",
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
addons: ['@storybook/preset-create-react-app'],
3+
};

packages/cockpit/ui/package.json

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,15 @@
4949
"@emotion/core": "10.0.22",
5050
"@emotion/styled": "10.0.23",
5151
"@monaco-editor/react": "3.0.1",
52-
"@storybook/addon-actions": "5.2.7",
53-
"@storybook/addon-info": "5.2.7",
54-
"@storybook/addon-knobs": "5.2.7",
52+
"@storybook/addon-actions": "5.3.9",
53+
"@storybook/addon-info": "5.3.9",
54+
"@storybook/addon-knobs": "5.3.9",
5555
"@storybook/addon-links": "5.3.9",
56-
"@storybook/addon-options": "5.2.7",
57-
"@storybook/addons": "5.2.7",
58-
"@storybook/react": "5.2.7",
56+
"@storybook/addon-options": "5.3.9",
57+
"@storybook/addons": "5.3.9",
58+
"@storybook/core": "5.3.9",
59+
"@storybook/preset-create-react-app": "1.5.2",
60+
"@storybook/react": "5.3.9",
5961
"ansi-to-html": "0.6.11",
6062
"array-move": "2.0.0",
6163
"autoscroll-react": "3.2.0",
@@ -96,6 +98,7 @@
9698
"reactstrap": "6.5.0",
9799
"redux": "4.0.4",
98100
"redux-saga": "1.1.3",
101+
"regenerator-runtime": "0.13.3",
99102
"rimraf": "3.0.0",
100103
"simple-line-icons": "2.4.1",
101104
"typescript": "3.7.2",

packages/utils/collective/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ function labeler(label) {
153153
function build(babelEnv, outDir, cliArgs, pkgJsonDict) {
154154
const rootPath = monorepoRootPath();
155155
const babelCmd = process.platform === 'win32' ? 'babel.cmd': 'babel';
156-
const babelBinPath = join(__dirname, 'node_modules', '.bin', babelCmd);
156+
const babelBinPath = join(rootPath, 'node_modules', '.bin', babelCmd);
157157
const babelConfigPath = join(rootPath, 'babel.config.js');
158158

159159
const sources = Object.values(pkgJsonDict).map(

packages/utils/collective/package.json

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -41,26 +41,11 @@
4141
"watch:typecheck": "npm run typecheck -- --preserveWatchOutput --watch"
4242
},
4343
"devDependencies": {
44-
"@babel/cli": "7.7.4",
45-
"@babel/core": "7.7.4",
46-
"@babel/plugin-proposal-class-properties": "7.7.4",
47-
"@babel/plugin-proposal-decorators": "7.7.4",
48-
"@babel/plugin-proposal-export-default-from": "7.7.4",
49-
"@babel/plugin-proposal-export-namespace-from": "7.7.4",
50-
"@babel/plugin-proposal-nullish-coalescing-operator": "7.7.4",
51-
"@babel/plugin-proposal-optional-chaining": "7.7.4",
52-
"@babel/plugin-syntax-dynamic-import": "7.7.4",
53-
"@babel/plugin-transform-runtime": "7.7.4",
54-
"@babel/preset-env": "7.7.4",
55-
"@babel/preset-typescript": "7.7.4",
5644
"@lerna/filter-packages": "3.16.0",
57-
"babel-plugin-dynamic-import-node": "2.3.0",
58-
"babel-plugin-macros": "2.7.1",
5945
"embark-inside-monorepo": "^5.1.0",
6046
"find-up": "4.1.0",
6147
"fs-extra": "8.1.0",
6248
"glob": "7.1.4",
63-
"lodash.clonedeep": "4.5.0",
6449
"lodash.isequal": "4.5.0",
6550
"lodash.isplainobject": "4.0.6",
6651
"lodash.mergewith": "4.6.2",

0 commit comments

Comments
 (0)