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(breaking/version): raw versions only, usage cleanup #603

Merged
merged 5 commits into from
Sep 12, 2022

Conversation

kanadgupta
Copy link
Member

@kanadgupta kanadgupta commented Sep 12, 2022

🚥 Fix #602

🧰 Changes

  • BREAKING Makes JSON the default output of the versions command and removes all logic/deps pertaining to table generation
  • BREAKING The versions:update command now accepts the version parameter as the default option (rather than via a --version flag) so the usage is consistent with versions:create and versions:delete
  • Cleans up usage docs for all versions commands
  • Some minor test bed cleanup so we're always clearing out the configstore for tests that interact with it
  • Exports the Version type (i.e. the version object that is POST-ed and received from our API) and uses it throughout the codebase where applicable.

🧬 QA & Testing

Do the docs changes look good? And do tests pass?

@kanadgupta kanadgupta added enhancement New feature or request refactor Issues about tackling technical debt documentation Improvements or additions to documentation command:versions Issues pertaining to the `versions` commands labels Sep 12, 2022
@kanadgupta kanadgupta marked this pull request as ready for review September 12, 2022 16:12
@kanadgupta kanadgupta requested a review from erunion September 12, 2022 16:12
@kanadgupta kanadgupta added this to the v8 milestone Sep 12, 2022
@@ -6,6 +6,10 @@ import configStore from '../../src/lib/configstore';
const cmd = new Command();

describe('rdme logout', () => {
afterEach(() => {
configStore.clear();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh is us not clearing this out why sometimes the login test flakes out?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so 😬 the test bed seems a little flakier now that I added so many tests messing with configstore so I'm hoping this addresses that

@@ -152,17 +152,19 @@ export default class Command {
{
name: 'main',
type: String,
description: 'Should this version be the primary (default) version for your project?',
description:
"Should this version be the primary (default) version for your project? (Must be 'true' or 'false')",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding so much boilerplate into the help screens for "must be true or false" seems like a lot.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah I don't love this but not sure if it's clear otherwise since the user is just supposed to pass in a string. ideally this should be a boolean but I've given these commands more love than they already deserve lol

Copy link
Member

@erunion erunion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

really not sure why i ever added that table view in but glad to see it hit da bricks

@kanadgupta kanadgupta merged commit b729091 into main Sep 12, 2022
@kanadgupta kanadgupta deleted the docs/versions-usage branch September 12, 2022 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
command:versions Issues pertaining to the `versions` commands documentation Improvements or additions to documentation enhancement New feature or request refactor Issues about tackling technical debt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inconsistent usage docs for versions:create
2 participants