Happy Halloween y'all! 🎃
We're shipping version 🎱 of rdme
with lots of new features to improve the experience of syncing your docs to ReadMe and setting up your GitHub Actions workflow. Get the details on everything below!
What's Changed
Breaking Changes
- This release completely overhauls the prompts system. Prompts will now automatically error out if prompts are attempted from within a CI environment.
- refactor: migrate from
enquirer
toprompts
by @kanadgupta in #570 - chore(prompt): various enhancements and refactors by @kanadgupta in #576
- refactor: migrate from
- If the
--version
option (used in theopenapi
command and thedocs
family of commands) is omitted in a CI environment, no version information will be sent in the request to the ReadMe API. This will typically result in the API defaulting to the default (i.e., stable) version.- feat(openapi): version handling improvements by @kanadgupta in #559
- The
validate
command has been renamed toopenapi:validate
. Thevalidate
command is now deprecated.- feat: migrate
validate
toopenapi:validate
by @kanadgupta in #598
- feat: migrate
- The
versions
command now returns raw JSON as the output and no longer returns a table format.- feat(breaking/version): raw versions only, usage cleanup by @kanadgupta in #603
- The
versions:update
command now accepts theversion
parameter as the default option (rather than via a--version
flag) so the usage is consistent withversions:create
andversions:delete
- feat(breaking/version): raw versions only, usage cleanup by @kanadgupta in #603
- The
changelogs:single
,custompages:single
, anddocs:single
commands have been removed in favor of their non-single counterparts (i.e., thechangelogs
,custompages
, anddocs
commands), which have been simplified to support both single files and directories containing the files you wish to sync.-
For example, if this was your command in v7:
rdme changelogs:single file.md
it will look like this in v8:
rdme changelogs file.md
-
feat(docs): consolidate
single
commands by @kanadgupta in #642
-
- The
docs:edit
command has been deprecated and will be removed in an upcoming major release.- feat(breaking/docs): deprecate
docs:edit
by @kanadgupta in #646
- feat(breaking/docs): deprecate
- Simplified various non-
versions
prompts (e.g.,openapi
,categories
) that previously asked if you wanted to create a new version or use an existing one.- Note: This change was marked as breaking but will not break any commands in CI. The only difference is that affected commands will have a slightly simplified prompt question flow.
- feat(breaking): drop version creation question from prompt flows by @kanadgupta in #635
Other Highlights
- There is now a new onboarding experience to help you get set up with GitHub Actions. Head over to our blog to get the details!
- feat(GHA): workflow file creation onboarding by @kanadgupta in #577
rdme
now includes a newopenapi:reduce
command which allows you to reduce a large API definition down to a specific set of tags or paths. This can be useful if you're debugging a problematic schema somewhere, or if you have a file that is too big to maintain.- The
login
command no longer requires the--2fa
flag for users with two-factor authentication enabled. The CLI will instead will prompt users for their 2FA code if their account necessitates it.- feat(breaking/login): remove
2fa
flag in favor of better prompts by @kanadgupta in #619
- feat(breaking/login): remove
- If a command requires authentication and the user forgets to pass in an API key via the
--key
option, the CLI will now prompt the user to log in.- feat: prompt for login any time a user omits API key by @kanadgupta in #636
- The
openapi
family of commands will now automatically detect your OpenAPI / Swagger definition. See Omitting the File Path in the command reference.- feat(openapi): auto-detect API definitions by @kanadgupta in #567
- The
openapi:validate
command will now return every error it finds with your API definition, not just the first one it finds. - There is now a
docs:prune
command which will remove any docs from ReadMe that are not in your local directory (thanks @shaiarmis!)- feat(docs): adds ability to delete docs from ReadMe if they're no longer in local folder by @shaiarmis in #581
- refactor(docs): move
--cleanup
option intodocs:prune
command by @kanadgupta in #644 - feat(docs:prune): --confirm flag to bypass prompt by @shaiarmis in #648
- There is now a
guides
alias for thedocs
family of commands.- feat(docs): add
guides
alias by @kanadgupta in #647
- feat(docs): add
- Our docs have been completely overhauled! New design, new guidance, and even more examples than before.
- docs: v8 docs by @kanadgupta in #637
Other (Non-Breaking) Highlights
- feat(logger): add GHA-aware notices/warnings by @kanadgupta in #557
- feat(openapi): add
--create
flag by @kanadgupta in #575 - feat(openapi): add
update
option to automatically update an only available spec file without any prompts by @shaiarmis in #579 - feat(docs): Add id to success message response for
docs
anddocs:single
by @garrett-wade in #583 - feat(openapi): add
--dryRun
option by @darrenyong in #612 - feat(openapi): raw command output option by @kanadgupta in #613
- feat(baseCommand): inform user which project they're making changes to by @darrenyong in #643
Other Updates
This release includes various package updates to address security vulnerabilities, in addition to other behind-the-scenes updates.
- chore(deps-dev): bump jest from 28.1.2 to 28.1.3 by @dependabot in #552
- chore(deps-dev): bump nock from 13.2.8 to 13.2.9 by @dependabot in #554
- chore(deps-dev): bump @readme/oas-examples from 5.4.0 to 5.5.0 by @dependabot in #555
- refactor(openapi): DRY and logic reorg by @kanadgupta in #556
- feat: typescript rewrite by @erunion in #560
- feat: add prettier formatting check for markdown by @kanadgupta in #561
- refactor: consolidate auth checks by @kanadgupta in #562
- feat: minor refactor of how we debug and log out data in commands by @erunion in #563
- feat: upgrading oas-normalize to pull in its new TS typings by @erunion in #564
- ci: optimize test runs and add docs syncing dry run by @kanadgupta in #565
- fix: quieter log outputs when installing GHA by @kanadgupta in #566
- chore(deps-dev): bring in types for
@npmcli/ci-detect
by @kanadgupta in #569 - chore(deps): bump @actions/core from 1.9.0 to 1.9.1 by @dependabot in #571
- feat: experiment with a decorator to hide commands from the help screen by @erunion in #574
- fix: typo in a debug log by @erunion in #580
- test(
openapi
): fix a few incorrect mocks by @kanadgupta in #584 - fix(openapi): stricter tests,
create
flag edge case by @kanadgupta in #585 - chore(deps-dev): bump jest-extended from 3.0.2 to 3.1.0 by @dependabot in #593
- chore(deps): bumping out of date deps by @erunion in #596
- feat:
npm init
alias by @kanadgupta in #597 - fix(docs): don't use beta tag by @kanadgupta in #599
- refactor(prompts): consolidate file path checks by @kanadgupta in #600
- chore(deps/security): update-notifier, alex by @kanadgupta in #604
- chore(deps-dev): bump @readme/oas-examples from 5.5.0 to 5.6.0 by @dependabot in #605
- chore(testbed): jest 29, flakiness fixes by @kanadgupta in #610
- test: minor test flakiness by @kanadgupta in #611
- refactor(docs): internal command signatures by @kanadgupta in #615
- fix(docs): use correct
_id
param by @kanadgupta in #616 - docs: create MAINTAINERS.md by @kanadgupta in #618
- fix(bin): another
create
attempt by @kanadgupta in #620 - chore(deps-dev): bump @readme/oas-examples from 5.6.0 to 5.7.0 by @dependabot in #621
- chore(deps-dev): bump eslint from 8.23.1 to 8.24.0 by @dependabot in #622
- chore(deps): bump @actions/core from 1.9.1 to 1.10.0 by @dependabot in #623
- chore(deps-dev): bump type-fest from 2.19.0 to 3.0.0 by @dependabot in #624
- chore(deps-dev): bump typescript from 4.8.3 to 4.8.4 by @dependabot in #625
- chore(deps): bump simple-git from 3.14.0 to 3.14.1 by @dependabot in #626
- chore(deps-dev): bump @types/validator from 13.7.6 to 13.7.7 by @dependabot in #627
- chore(deps-dev): bump @types/jest from 29.1.1 to 29.1.2 by @dependabot in #628
- chore(deps-dev): bump @readme/eslint-config from 10.1.0 to 10.1.1 by @dependabot in #629
- chore(deps-dev): bump type-fest from 3.0.0 to 3.1.0 by @dependabot in #630
- chore(deps-dev): bump eslint from 8.24.0 to 8.25.0 by @dependabot in #631
- chore(deps): bump semver from 7.3.7 to 7.3.8 by @dependabot in #632
- chore(deps-dev): bump @types/prompts from 2.0.14 to 2.4.1 by @dependabot in #633
- chore(deps): bump @npmcli/ci-detect from 2.0.0 to 3.0.0 by @dependabot in #634
- ci: run tests against node 19 by @erunion in #641
New Contributors
- @shaiarmis made their first contribution in #579
- @darrenyong made their first contribution in #612
Full Changelog: 7.5.0...8.0.0