Skip to content

Commit

Permalink
feat: update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
adbayb committed Jun 23, 2024
1 parent 0d66524 commit 31329c1
Show file tree
Hide file tree
Showing 12 changed files with 1,310 additions and 1,211 deletions.
5 changes: 5 additions & 0 deletions .changeset/unlucky-clouds-attend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"termost": minor
---

Update dependencies.
2 changes: 1 addition & 1 deletion examples/default/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"termost": "workspace:^"
},
"devDependencies": {
"@types/node": "20.12.12",
"@types/node": "20.14.8",
"esbuild-register": "3.5.0"
}
}
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"release:version": "stack release --tag",
"release:publish": "stack release --publish"
},
"packageManager": "pnpm@9.1.3",
"packageManager": "pnpm@9.4.0",
"engines": {
"node": ">=18.0.0",
"pnpm": ">=8.0.0",
Expand All @@ -32,9 +32,9 @@
]
},
"devDependencies": {
"@adbayb/eslint-config": "1.9.0",
"@adbayb/prettier-config": "1.3.0",
"@adbayb/stack": "1.13.0",
"@adbayb/eslint-config": "1.12.0",
"@adbayb/prettier-config": "1.5.0",
"@adbayb/stack": "1.16.1",
"@adbayb/ts-config": "1.0.0"
}
}
2,428 changes: 1,264 additions & 1,164 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions termost/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@
},
"dependencies": {
"enquirer": "^2.4.1",
"listr2": "^8.0.1",
"picocolors": "^1.0.0"
"listr2": "^8.2.3",
"picocolors": "^1.0.1"
},
"devDependencies": {
"@types/node": "20.12.12",
"@types/node": "20.14.8",
"quickbundle": "1.2.0",
"typescript": "5.3.3",
"vitest": "1.1.0"
"typescript": "5.5.2",
"vitest": "1.6.0"
}
}
18 changes: 0 additions & 18 deletions termost/src/__snapshots__/index.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -46,24 +46,6 @@ OPTIONS:
 --global  Shared flag between commands"
`;
exports[`termost > should display \`help\` given no command provided 1`] = `
"
USAGE:
@examples/command <command> [...options]

DESCRIPTION:
Example to showcase the \`command\` API

COMMANDS:
 build  Transpile and bundle in production mode
 watch  Rebuild your assets on any code change

OPTIONS:
 -h, --help  Display the help center
 -v, --version  Print the version
 --global  Shared flag between commands"
`;
exports[`termost > should handle \`command\` api 1`] = `
"
USAGE:
Expand Down
2 changes: 1 addition & 1 deletion termost/src/api/command/controller/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export type CommandController<
addOptionDescription: (key: string, description: string) => void;
addValue: <Key extends keyof Values>(key: Key, value: Values[Key]) => void;
/**
* Enables a command by iterating over instructions and executing them
* Enables a command by iterating over instructions and executing them.
*/
enable: () => Promise<void>;
getContext: (rootCommandName: CommandName) => Context<Values>;
Expand Down
2 changes: 1 addition & 1 deletion termost/src/api/task/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const createTask: CreateInstruction<
showErrorMessage: true,
timer: PRESET_TIMER,
},
})
})
: null;

return async function execute(context, argv) {
Expand Down
22 changes: 15 additions & 7 deletions termost/src/helpers/stdout/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import pico from "picocolors";

/**
* A helper to format an arbitrary text as a message input
* @param message The text to display
* @param options The configuration object to control the formatting properties
* @returns The formatted text
* A helper to format an arbitrary text as a message input.
* @param message - The text to display.
* @param options - The configuration object to control the formatting properties.
* @param options.color - The color to apply.
* @param options.modifiers - The modifiers to apply (can be italic, bold, ...).
* @returns The formatted text.
* @example
* const formattedMessage = format("my message");
*/
export const format = (
message: string,
Expand Down Expand Up @@ -43,9 +47,13 @@ const compose = <T>(...fns: ((a: T) => T)[]) =>
);

/**
* An opinionated helper to display arbitrary text on the console
* @param message The text to display. Use an array if you need to display a message in several lines
* @param options The configuration object to define the display type and/or override the default label
* An opinionated helper to display arbitrary text on the console.
* @param content - The text to display. Use an array if you need to display a message in several lines.
* @param options - The configuration object to define the display type and/or override the default label.
* @param options.label - The label to display.
* @param options.type - The message type.
* @example
* message("message to log");
*/
export const message = (
content: string[] | string,
Expand Down
8 changes: 6 additions & 2 deletions termost/src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,12 @@ describe("termost", () => {
/**
* A test utility to strip contextual information (including absolute paths) output by `pnpm --filter run` command.
* It allows to run tests whatever the testing environment (CI, local, ...).
* @param command The command to run
* @returns The generic command output
* @param command - The command to run.
* @returns The generic command output.
* @example
* const shortFlagOutput = await safeExec(
* "pnpm --filter @examples/default start -h",
* );
*/
const safeExec = async (command: string) => {
const output = await exec(command);
Expand Down
12 changes: 6 additions & 6 deletions termost/src/termost.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ import type {
} from "./types";

/**
* The termost fluent interface API
* The termost fluent interface API.
*/
export type Termost<Values extends ObjectLikeConstraint = EmptyObject> = {
/**
* Allows to attach a new sub-command to the program
* @param name - The CLI command name
* @param description - The CLI command description
* @returns The Command API
* Allows to attach a new sub-command to the program.
* @param name - The CLI command name.
* @param description - The CLI command description.
* @returns The Command API.
*/
command: <CommandValues extends ObjectLikeConstraint = EmptyObject>(
params: CommandParameters,
Expand All @@ -52,7 +52,7 @@ export function termost<Values extends ObjectLikeConstraint = EmptyObject>(
name: undefined,
description: metadata,
version: undefined,
};
};

if (
name === undefined ||
Expand Down
4 changes: 2 additions & 2 deletions termost/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export type ObjectLikeConstraint = Record<string, any>;
export type EmptyObject = {};

/**
* Raw CLI arguments parsed from user inputs
* Raw CLI arguments parsed from user inputs.
*/
export type ArgumentValues = {
command: CommandName;
Expand Down Expand Up @@ -44,7 +44,7 @@ export type InstructionKey<Key> = {
};

/**
* Follows the command design pattern
* Follows the command design pattern.
*/
export type CreateInstruction<
Parameters extends InstructionParameters<ObjectLikeConstraint>,
Expand Down

0 comments on commit 31329c1

Please sign in to comment.