Skip to content

Conversation

@kanadgupta
Copy link
Contributor

@kanadgupta kanadgupta commented Oct 24, 2022

🚥 Fix RM-5580

🧰 Changes

This removes our :single commands and extends the functionality of the changelogs, custompages, and docs commands to intelligently determine whether the input is a directory vs. a single file.

The following commands have been removed in favor of their standard counterparts:

  • changelogs:single
  • custompages:single
  • docs:single

🧬 QA & Testing

I've left the test suites separated out so single file tests vs. directory tests are in separate files. Do they pass?

@kanadgupta kanadgupta added enhancement New feature or request refactor Issues about tackling technical debt command:pages Issues pertaining to page upload commands (e.g., `docs`, `reference`, `changelog`, `custompages`) labels Oct 24, 2022
@kanadgupta kanadgupta added this to the v8 milestone Oct 27, 2022
@kanadgupta kanadgupta marked this pull request as ready for review October 27, 2022 18:31
@kanadgupta
Copy link
Contributor Author

@garrett-wade FYI!

return expect(changelogs.run({ key })).rejects.toThrow(
'No folder provided. Usage `rdme changelogs <folder> [options]`.'
it('should error if no path provided', () => {
return expect(changelogs.run({ key })).rejects.toStrictEqual(
Copy link
Member

Choose a reason for hiding this comment

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

Why not do .toThrow here anymore?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

.toThrow is technically a partial match on err.message, .toStrictEqual(<full error object>) is a stricter check

this.getVersionArg(),
{
name: 'folder',
name: 'filePath',
Copy link
Member

Choose a reason for hiding this comment

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

Does this accept a path to a file or a path to a folder?

Copy link
Contributor Author

@kanadgupta kanadgupta Oct 27, 2022

Choose a reason for hiding this comment

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

Both! This variable isn't user-facing since it's the default arg (i.e. it won't show up in the help commands or anything), but I wasn't sure what to call it.

@kanadgupta kanadgupta merged commit 7552501 into main Oct 27, 2022
@kanadgupta kanadgupta deleted the kanad/rm-5580-consolidate-docs-and-docssingle branch October 27, 2022 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

command:pages Issues pertaining to page upload commands (e.g., `docs`, `reference`, `changelog`, `custompages`) enhancement New feature or request refactor Issues about tackling technical debt

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants