-
Notifications
You must be signed in to change notification settings - Fork 6
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
🔧 lerna #82
🔧 lerna #82
Conversation
I prefer the rewrite way. |
package.json
Outdated
] | ||
} | ||
"private": true, | ||
"workspaces": [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We both need it in package.json AND in lerna.json ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't for the same thing. workspaces is a config for yarn not lerna.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I can see that, but I think this is sad that lerna doesn't look for workspaces
field when it set to "useWorkspaces": true
for instance.
Is there a way to set lerna config into the package.json
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They don't mention it in documentation
@@ -48,7 +48,7 @@ | |||
"webpack-dev-server": "~1.12.1" | |||
}, | |||
"dependencies": { | |||
"hoc-react-loader": "file:../", | |||
"hoc-react-loader": "~6.1.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here, will lerna
detect that hoc-react-loader is in a relative package and do the link on its own ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And what if I upgrade the hoc-react-loader
package to 7.0.0 without publishing it ?
What will do lerna ? Still doing a link, or download hoc-react-loader
from NPM registry ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is an option to force local linking regardless of package version. I guess without this option it will download it from NPM registry.
"test": "jest --collectCoverageFrom=src/**/*.js --collectCoverageFrom=src/**/*.jsx", | ||
"coveralls": "jest --coverage && cat ./coverage/lcov.info | coveralls", | ||
"ci": "npm-run-all --parallel lint coveralls" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
empty line :p
"import/prefer-default-export": 0, | ||
"import/no-unresolved": 0, | ||
"react/forbid-prop-types": 0, | ||
"import/no-extraneous-dependencies": ["error", {"devDependencies": ["**/*.spec.js"]}] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice I didn't know about the exclusion :)
@frinyvonnick I change the base of the PR (see #83) and the title (so this PR can be squashed when it's ready to be) |
As you see on the circle-ci, now on all my project I add a So we should let the |
Sure i didn't finished the lerna part. I didn't handle publish either. |
@@ -11,6 +12,7 @@ | |||
"start": "react-scripts start", | |||
"build": "react-scripts build", | |||
"test": "react-scripts test --env=jsdom", | |||
"eject": "react-scripts eject" | |||
"eject": "react-scripts eject", | |||
"ci": "npm-run-all --parallel test" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wait for this PR to be merged to add linting to ci
script.
package.json
Outdated
"./misc/testSetup.js" | ||
] | ||
} | ||
"private": true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you use tab
in this one ?
Maybe you should run a yarn add some-dep && yarn remove some-dep
to reindent it better. :p
package.json
Outdated
"packages/*" | ||
], | ||
"scripts": { | ||
"start": "lerna run start --stream --ignore hoc-react-loader", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why don't you use scope
instead of ignore
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- For me
exemple
folder should be simple (and empty), we will init react (or other) in an other PR. You just have to init a package.json with scripts that do echos (to validate lerna) - README.md should stay in the root directory
- LICENSE should stay in the root directory
- root package.json should have a name ? (dunno)
- root package.json should have a description ? (dunno)
- root package.json should have contributors (dunno ?)
- etc
@fabienjuif no the root package.json is private. It handle only technical issues. Maybe we should inspire ourselves from |
Done, i mentioned the remaining work in meta issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice work 👌
Fix #81
Lerna have an dependencies hoisting feature that prevent downloading multiple times a package by moving node_modules at root top level of your monorepo. The problem is react-highlight doesn't support react 16 so it use an older version of react that get into conflict with hoc-react-loader react version so tests fail. There is a pull request waiting to be merged that brings support for react 16 in react-highlight.
@fabienjuif we have two possibilities: