-
Notifications
You must be signed in to change notification settings - Fork 69
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
feat(laverna): create laverna #836
Conversation
Current dependencies on/for this PR: This stack of pull requests is managed by Graphite. |
89887b2
to
6fb048c
Compare
12033ce
to
27b6a8b
Compare
This comment was marked as resolved.
This comment was marked as resolved.
2107946
to
e9b7ce9
Compare
Note that this requires a minimum version of Node.js v18.13.0. The entire test suite cannot be run in an older version of Node.js. It's probably too painful to exempt testing just this package from the GHA matrix, so I've done this via a dynamic Ava config. The reasoning is twofold:
|
Oh, and the reason I'm doing this in the first place is that it's absolutely a thing that other projects will find useful (including my own). So... yes, selfish reasons. |
REVIEWER(S) This is mostly just a refactored |
1c89786
to
7fe8e03
Compare
7fe8e03
to
f0b7965
Compare
f0b7965
to
a87c1e3
Compare
a87c1e3
to
55412ce
Compare
@legobeat ping |
5dc115e
to
d6eb067
Compare
@legobeat I think I've got everything here... |
c76e1ea
to
7372d9f
Compare
While we still want to avoid breaking older Node.js support for our users, none of us are using it. With the script testing cleanup moved to the other PR, I think this is ready to merge. |
@@ -96,6 +96,7 @@ | |||
"prettier": { | |||
"jsdocCommentLineStrategy": "keep", | |||
"jsdocPreferCodeFences": true, | |||
"jsdocTagsOrder": "{\"template\": 24.5}", |
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 don't understand this and therefore fear it. I'm a simple man. Please help me understand why we want this here.
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.
heh, well, I would have explained myself, but it's package.json
, so.
summary: string | ||
detail: string | ||
} | ||
}} */ |
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.
prettier went bonkers?
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.
hmm, changes to this file should not be in this PR. I'll pull that out
packages/laverna/test/fixture/new-version/packages/lavamoat/package.json
Show resolved
Hide resolved
This is marked as the change request blocking the merge and also as resolved. Should we consider it done? |
This copies `scripts/publish.js` into its own package named `@lavamoat/laverna`.
This adds support for `--new-pkg` and `--dry-run`, though it remains undocumented. If someone uses both `--new-pkg` and `--newPkg` and/or `--dry-run` and `--dryRun`, Laverna will exit with an error.
This is a workaround for hosseinmd/prettier-plugin-jsdoc#226
- `--dry-run` and `--dryRun` are both supported w/o conflict - `--newPkg` and `--new-pkg` are both supported w/o conflict
Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
7372d9f
to
70cead7
Compare
Co-authored-by: Zbyszek Tenerowicz <naugtur@gmail.com>
1d6a23c
to
581ce92
Compare
Laverna
If you're familiar with lerna, Laverna does this:
lerna publish from-package
.If you're unfamiliar with it: Laverna publishes all workspaces that haven't yet been published.
Features
Laverna is a thin wrapper around
npm publish
which:npm publish
for all workspaces that haven't yet been publishednpm publish
, including the output ofnpm pack
, to enable reviewNon-Features
Perhaps more importantly, Laverna:
package.json
git
(no tags, no commits, no pushes)Supported Environments
npm
v8.19.3+Install
It's recommended to install as a dev dependency:
Usage Summary
Examples
Using Release Please or Similar
For a typical release workflow, you might:
npm exec laverna
(ornpm exec laverna -- --dry-run
first)Publishing a New Package
If you're publishing a package in a new workspace, you might:
foo
) in itspackage.json
.npm exec laverna -- --newPkg=foo
(ornpm exec laverna -- --newPkg=foo --dry-run
first)Automating Publishes
You'll need to figure out how to add
--newPkg
to your CI/CD pipeline. Otherwise, use the--yes
flag when invokinglaverna
.API
Laverna provides a programmable JavaScript API (for what it's worth).
Refer to the TypeScript definitions for details.
Notes
LavaMoat needed something that did this, but didn't need Lerna for anything else. So, here we are.
License
Copyright © 2023 Consensys, Inc. Licensed MIT