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

fix(deps): update dependency consola to v3 #244

Merged
merged 4 commits into from
May 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .changeset/bob-the-bundler-229-dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@

dependencies updates:

- Updated dependency
[`typescript@^4.7.4 || ^5.0.0` ↗︎](https://www.npmjs.com/package/typescript/v/4.7.4) (from
`^4.7.4`, in `peerDependencies`)
- Updated dependency [`typescript@^5.0.0` ↗︎](https://www.npmjs.com/package/typescript/v/4.7.4)
(from `^4.7.4`, in `peerDependencies`)
8 changes: 8 additions & 0 deletions .changeset/bob-the-bundler-244-dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'bob-the-bundler': patch
---

dependencies updates:

- Updated dependency [`consola@^3.0.0` ↗︎](https://www.npmjs.com/package/consola/v/3.0.0) (from
`^2.15.3`, in `dependencies`)
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"typescript": "^5.0.0"
},
"dependencies": {
"consola": "^2.15.3",
"consola": "^3.0.0",
"execa": "6.1.0",
"fs-extra": "^11.1.0",
"globby": "^13.1.3",
Expand Down
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/command.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Consola } from 'consola';
import { CommandModule } from 'yargs';
import { type ConsolaInstance } from 'consola';
import { type CommandModule } from 'yargs';

export { CommandModule as Command };

export interface CommandAPI {
reporter: Consola;
reporter: ConsolaInstance;
}

export type CommandFactory<T = {}, U = {}> = (api: CommandAPI) => CommandModule<T, U>;
Expand Down
4 changes: 2 additions & 2 deletions src/commands/build.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import assert from 'assert';
import { dirname, join, resolve } from 'path';
import { Consola } from 'consola';
import { type ConsolaInstance } from 'consola';
import { execa, ExecaReturnValue } from 'execa';
import fse from 'fs-extra';
import { globby } from 'globby';
Expand Down Expand Up @@ -211,7 +211,7 @@ async function build({
bin?: Record<string, string>;
};
fullName: string;
reporter: Consola;
reporter: ConsolaInstance;
getBuildPath: (target: 'esm' | 'cjs') => string;
distPath: string;
}) {
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env node
import consola from 'consola';
import { createConsola } from 'consola';
import yargs, { Argv } from 'yargs';
import { hideBin } from 'yargs/helpers';
import { CommandFactory } from './command.js';
Expand All @@ -12,7 +12,7 @@ async function main() {

const commands: CommandFactory<any, any>[] = [buildCommand, bootstrapCommand, checkCommand];

const reporter = consola.create({});
const reporter = createConsola({});

commands
.reduce((cli, cmd) => cli.command(cmd({ reporter })), root)
Expand Down