|
1 | 1 | #!/usr/bin/env node |
2 | 2 | // @ts-check |
3 | | -import chalk from "chalk"; |
4 | 3 | import * as nodefs from "node:fs"; |
5 | 4 | import { createRequire } from "node:module"; |
6 | 5 | import * as path from "node:path"; |
7 | 6 | import { fileURLToPath } from "node:url"; |
8 | 7 | import semverCoerce from "semver/functions/coerce.js"; |
9 | 8 | import semverSatisfies from "semver/functions/satisfies.js"; |
| 9 | +import * as colors from "yoctocolors"; |
10 | 10 | import { cliPlatformIOSVersion } from "./configure-projects.js"; |
11 | 11 | import { |
12 | 12 | getPackageVersion, |
@@ -62,7 +62,7 @@ function readManifest() { |
62 | 62 | * @param {string} message |
63 | 63 | */ |
64 | 64 | export function error(message) { |
65 | | - console.error(chalk.red(`[!] ${message}`)); |
| 65 | + console.error(colors.red(`[!] ${message}`)); |
66 | 66 | } |
67 | 67 |
|
68 | 68 | /** |
@@ -134,7 +134,7 @@ export function sortByKeys(obj) { |
134 | 134 | * @param {string=} tag |
135 | 135 | */ |
136 | 136 | export function warn(message, tag = "[!]") { |
137 | | - console.warn(chalk.yellow(`${tag} ${message}`)); |
| 137 | + console.warn(colors.yellow(`${tag} ${message}`)); |
138 | 138 | } |
139 | 139 |
|
140 | 140 | /** |
@@ -661,7 +661,7 @@ export function configure(params, fs = nodefs) { |
661 | 661 | if (!force && isDestructive(packagePath, config)) { |
662 | 662 | error("Destructive file operations are required."); |
663 | 663 | console.log( |
664 | | - `Re-run with ${chalk.bold("--force")} if you're fine with this.` |
| 664 | + `Re-run with ${colors.bold("--force")} if you're fine with this.` |
665 | 665 | ); |
666 | 666 | return 1; |
667 | 667 | } |
|
0 commit comments