Skip to content
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(cli): add JSON Schema for lerna.json #305

Merged
merged 9 commits into from Aug 18, 2022
Merged

Conversation

ghiscoding
Copy link
Member

@ghiscoding ghiscoding commented Aug 8, 2022

Description

Adds a JSON Schema to lerna.json

Motivation and Context

As per Lerna PR 3229

This change improves the developer experience of Lerna. Now, when modifying lerna.json, users can see what properties are valid and a brief description of what they do (taken from the lerna command options documentation).

Note: All options for commands (as described in the command docs) are valid configuration options in lerna.json. They can be provided at three levels, in order of priority:

Command line inline option

  1. lerna.json, under a specific command
  2. Top level of lerna.json
  3. The JSON schema for lerna.json supports supplying options at both level 2 and 3 above.

How Has This Been Tested?

I tested the schema by changing lerna.json in this repo and observing (in my editor) the metadata from the schema. I did not manually test every configuration option for every command. I obtained the metadata from the configuration code for each of the Lerna commands (command.js), with some input from the docs.

Types of changes

  • Chore (change that has absolutely no effect on users)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@codecov
Copy link

codecov bot commented Aug 8, 2022

Codecov Report

Merging #305 (6b5cd53) into main (5927f80) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #305   +/-   ##
=======================================
  Coverage   96.15%   96.15%           
=======================================
  Files         145      145           
  Lines        4224     4224           
  Branches      883      883           
=======================================
  Hits         4061     4061           
  Misses        163      163           
Impacted Files Coverage Δ
packages/init/src/init-command.ts 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@ghiscoding ghiscoding changed the title feat(cli): add JSON schema for lerna.json feat(cli): add JSON Schema for lerna.json Aug 8, 2022
@ghiscoding ghiscoding merged commit 59f4847 into main Aug 18, 2022
@ghiscoding ghiscoding deleted the feat/json-schema branch August 18, 2022 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant