-
Notifications
You must be signed in to change notification settings - Fork 45
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
JS refactoring #2408
JS refactoring #2408
Conversation
let versionSpinner; | ||
|
||
const { getConfig } = require('@bolt/build-utils/config-store'); | ||
const { fileExists } = require('@bolt/build-utils/general'); | ||
const lernaConfig = require('./../../../../lerna.json'); | ||
const lernaConfig = require(path.join(process.cwd(), '../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.
@danielamorse I should I mentioned this but the path.join
fails depending on what command is run. the ../
works on yarn start
but fails on yarn build
(I think) due the directory changing to be the parent folder of the Bolt repository. We might want to turn this back the ugly relative link.
Edit: the command that fails is the yarn test: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.
Makes sense. I reverted my change.
Jira
n/a
Summary
Refactors some JS in #2406.
Details
semver-compare
dependency. Thesemver
package we already use has a function for comparing.lerna.json
usingprocess.cwd()
rather than relative path from package.