feat(publish): Remove --require-scripts#1862
Conversation
ed657de to
a0a7a47
Compare
a0a7a47 to
d126fe6
Compare
8fe04cc to
8d04aa8
Compare
|
I believe yargs will throw an error when it fails to recognize |
8d04aa8 to
f4cc223
Compare
f4cc223 to
f56890b
Compare
|
Perhaps we should also add a quick page into the docs explaining how to migrate, then we could link to it from the error message.
… On 11. Jan 2019, at 18:50, Daniel Stockman ***@***.***> wrote:
@evocateur commented on this pull request.
In commands/publish/index.js:
> @@ -62,7 +63,10 @@ class PublishCommand extends Command {
}
if (this.options.requireScripts) {
- this.logger.info("require-scripts", "enabled");
+ throw new ValidationError(
+ "removed",
+ "--require-scripts has been removed.\nExecute these scripts from the appropriate package lifecycle."
Hopefully this is clear enough?
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub, or mute the thread.
|
f56890b to
cf38970
Compare
|
Note that Babel currently uses |
cf38970 to
683f322
Compare
08355a9 to
6afb358
Compare
BREAKING CHANGE: Automatic `require()` of `{pkg}/scripts/prepublish.js` and `{pkg}/scripts/postpublish.js` no longer occurs during `lerna publish` operations.
A descriptive error is now thrown and the process exits non-zero when `--require-scripts` is encountered.
Regular npm lifecycles (`prepare`, `prepack`, `postpack`, `prepublishOnly`, `publish`, and `postpublish`) are still called for each targeted package.
6afb358 to
e0483a3
Compare
|
I use this feature extensively in the release for Antora (see https://gitlab.com/antora/antora/-/blob/master/releasing.adoc#readme-dance). I use to update various files in the repository (to propagate the version number and update dates) as well as to feed a consolidated README file to the npm registry. Lerna would be substantially less powerful without this feature, which works very well. |
|
@mojavelinux I don't see how a proper "scripts": {
"prepack": "node ../../scripts/prepublish.js",
"postpack": "node ../../scripts/postpublish.js"
}(or, better yet, a root |
|
I don't remember the exact details, but I'm quite sure I tried that and the timing simply wasn't right (it either missed the package or the tag). I need to be able to swap the AsciiDoc README with a Markdown README in both the tag and published package. Right now, the process works and I'd really rather not waste tons more hours trying to make it work a different way. |
|
I'm going to close this one because of its age, we may look to incorporate it into the recoverable publish work we are doing for v7 |
Description
In order to simplify publish logic, remove "sidecar" lifecycle support.
Holding as "WIP" until other breaking changes can be batched together.
Motivation and Context
Refs #1767
How Has This Been Tested?
Tests pass (there were none for the feature itself)
Types of changes
Checklist: