Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Follow-ups to the switch to Lerna #372

Merged
merged 8 commits into from
Oct 25, 2017
Merged

Follow-ups to the switch to Lerna #372

merged 8 commits into from
Oct 25, 2017

Conversation

edmorley
Copy link
Member

@edmorley edmorley commented Oct 24, 2017

  • Removes the now unused publish script and its dependencies.
  • Removes the lerna bootstrap from the Travis run, since it's equivalent to the yarn install already run prior.
  • Removes yarn.lock from the package's .npmignore, since there is now only the repo root instance of the file.
  • Updates the development docs to reflect the new workflow.
  • Sets node and yarn version ranges in package.json to help avoid issues caused by using a version not recommended by the docs.
  • Adds yarn release and release:preview aliases using lerna, for easier publishing.
  • Removes version and unnecessary devDependencies from root package.json.

@edmorley edmorley self-assigned this Oct 24, 2017
@edmorley
Copy link
Member Author

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 :-)

@edmorley edmorley requested a review from eliperelman October 24, 2017 17:22
Copy link
Member

@eliperelman eliperelman left a 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",
Copy link
Member

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?

Copy link
Member Author

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 :-)

@edmorley
Copy link
Member Author

edmorley commented Oct 25, 2017

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.

@edmorley edmorley requested a review from eliperelman October 25, 2017 11:39
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",
Copy link
Member

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.

@edmorley edmorley merged commit 84088b1 into neutrinojs:master Oct 25, 2017
@edmorley edmorley deleted the lerna-followups branch October 25, 2017 13:59
zeropaper pushed a commit to zeropaper/neutrino-dev that referenced this pull request Oct 29, 2017
* 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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants