-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
## 🧰 Changes cherry-picking over a few random refactors from #1159 that are mostly unrelated to the PR itself: - [x] removes unused fixtures - [x] smol copy tweaks for changelog command ("syncing" is reserved for bidi, this is "uploading" - [x] jsdoc tweaks, including deprecating APIv1-related cruft - [x] various type enhancements - [x] renaming a few things - [x] adding `oclif`'s `this` context (so we can simplify functions and add better debug logs) ## 🧬 QA & Testing do tests still pass?
- Loading branch information
There are no files selected for viewing
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import type { Command as OclifCommand } from '@oclif/core'; | ||
import type { CommandClass } from '../../src/index.js'; | ||
|
||
import path from 'node:path'; | ||
|
||
|
@@ -36,7 +36,7 @@ export function setupOclifConfig() { | |
* | ||
* @example runCommand(LoginCommand)(['--email', '[email protected]', '--password', 'password']) | ||
*/ | ||
export function runCommand<T extends typeof OclifCommand>(Command: T) { | ||
export function runCommand(Command: CommandClass) { | ||
return async function runCommandAgainstArgs(args?: string[]) { | ||
const oclifConfig = await setupOclifConfig(); | ||
// @ts-expect-error this is the pattern recommended by the @oclif/test docs. | ||
|
@@ -52,7 +52,7 @@ export function runCommand<T extends typeof OclifCommand>(Command: T) { | |
* | ||
* @example runCommandAndReturnResult(LoginCommand)(['--email', '[email protected]', '--password', 'password']) | ||
*/ | ||
export function runCommandAndReturnResult<T extends typeof OclifCommand>(Command: T) { | ||
export function runCommandAndReturnResult(Command: CommandClass) { | ||
return async function runCommandAgainstArgs(args?: string[]) { | ||
const { error, result } = await runCommand(Command)(args); | ||
if (error) { | ||
|