-
Notifications
You must be signed in to change notification settings - Fork 214
Conversation
I've also cleared the Travis caches for this repo, to reduce the bloat from old package versions, so once re-populated after the next master push, between that and the switch to lerna, the travis run setup phase should be pretty fast :-) |
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.
😍
package.json
Outdated
@@ -7,6 +7,10 @@ | |||
"homepage": "https://neutrino.js.org", | |||
"bugs": "https://github.com/mozilla-neutrino/neutrino-dev/issues", | |||
"repository": "mozilla-neutrino/neutrino-dev", | |||
"engines": { | |||
"node": ">=6.1.0", |
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.
Should this be >=6.10.0
?
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.
Ah yes it should, good spot :-)
I've updated the PR to address that review comment, but have also added a few other things (see the OP for what's new), which made it a bit longer - so I've now split up into separate commits for easier review. |
Due to yarn workspaces, the main yarn install command (already run prior to bootstrap on Travis) itself handles the linking/bootstrapping of dependencies. As such, `lerna bootstrap` is now just an alias for `yarn install`, and therefore redundant.
Since with yarn workspaces, the per-package yarn.lock file no longer exists, with all dependencies instead pinned from the root yarn.lock.
To make it more obvious to users/contributors when using versions that have not been tested (or in the case of yarn, that don't support the workspaces feature).
Since we're no longer using oao. The reference to creating package links has been removed since yarn workspaces intentionally constrains development versions to the individual workspace, rather than allowing them to affect other projects installed elsewhere.
The `--force-publish=*` option is specified to ensure that all packages are released, rather than just those that were modified, to preserve the Neutrino tradition of keeping all versions in sync. The new `release:preview` command is unfortunately not a true dry run, in that it leaves changes in the working directory that have to be reverted, but at least allows for confirming the necessary versions have been adjusted. With the `.scripts/publish` script removed, the `graph-data-structure` and `semver` devDependencies are now unused.
Since the global version is now tracked via lerna.json, and lerna doesn't know to update the root package.json, so it will only end up getting out of sync.
Now that we're using yarn workspaces, linting of the repo is possible without having to duplicate the `neutrino-preset-airbnb-base` and `neutrino-middleware-eslint` sub-dependencies into the repo root `package.json`, since they are all available in the root `node_modules`.
"test": "nyc --reporter lcov ava packages/*/test" | ||
}, | ||
"devDependencies": { | ||
"ava": "^0.22.0", | ||
"babel-eslint": "^8.0.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.
Removing all these deps is nicer now that hoisting is in place.
* Remove redundant `lerna bootstrap` call on Travis Due to yarn workspaces, the main yarn install command (already run prior to bootstrap on Travis) itself handles the linking/bootstrapping of dependencies. As such, `lerna bootstrap` is now just an alias for `yarn install`, and therefore redundant. * Remove yarn.lock from the package's .npmignore files Since with yarn workspaces, the per-package yarn.lock file no longer exists, with all dependencies instead pinned from the root yarn.lock. * Set node and yarn engine versions in package.json To make it more obvious to users/contributors when using versions that have not been tested (or in the case of yarn, that don't support the workspaces feature). * Update development docs with lerna/workspaces changes Since we're no longer using oao. The reference to creating package links has been removed since yarn workspaces intentionally constrains development versions to the individual workspace, rather than allowing them to affect other projects installed elsewhere. * Replace custom publish script with lerna publish The `--force-publish=*` option is specified to ensure that all packages are released, rather than just those that were modified, to preserve the Neutrino tradition of keeping all versions in sync. The new `release:preview` command is unfortunately not a true dry run, in that it leaves changes in the working directory that have to be reverted, but at least allows for confirming the necessary versions have been adjusted. With the `.scripts/publish` script removed, the `graph-data-structure` and `semver` devDependencies are now unused. * Remove version from root package.json Since the global version is now tracked via lerna.json, and lerna doesn't know to update the root package.json, so it will only end up getting out of sync. * Remove unnecessary devDependencies from root package.json Now that we're using yarn workspaces, linting of the repo is possible without having to duplicate the `neutrino-preset-airbnb-base` and `neutrino-middleware-eslint` sub-dependencies into the repo root `package.json`, since they are all available in the root `node_modules`. * Regenerate yarn.lock
lerna bootstrap
from the Travis run, since it's equivalent to theyarn install
already run prior.yarn.lock
from the package's.npmignore
, since there is now only the repo root instance of the file.package.json
to help avoid issues caused by using a version not recommended by the docs.yarn release
andrelease:preview
aliases using lerna, for easier publishing.devDependencies
from rootpackage.json
.