Skip to content

Commit 706dd32

Browse files
Update core
1 parent 6e5b599 commit 706dd32

File tree

5 files changed

+38
-16
lines changed

5 files changed

+38
-16
lines changed

packages/minimal-shared/CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# minimal-shared
22

3+
## 1.0.8
4+
5+
_Apr 8, 2025_
6+
7+
- Update `utils/active-link`.
8+
- Update `utils/url`.
9+
10+
---
11+
312
## 1.0.7
413

514
_Feb 24, 2025_

packages/minimal-shared/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "minimal-shared",
33
"author": "Minimals",
4-
"version": "1.0.7",
4+
"version": "1.0.8",
55
"description": "Shared hooks and utils used by Minimal UI and Zone UI.",
66
"keywords": [
77
"typescript",
@@ -73,7 +73,6 @@
7373
"@testing-library/react": "^16.2.0",
7474
"@types/node": "^22.13.5",
7575
"@types/react": "19.0.10",
76-
"chalk": "^5.4.1",
7776
"internal-eslint-config": "workspace:*",
7877
"internal-ts-config": "workspace:*",
7978
"jsdom": "^26.0.0",
Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,31 @@
1-
import chalk from 'chalk';
1+
export const COLORS = {
2+
magenta: '\x1b[35m',
3+
cyan: '\x1b[36m',
4+
yellow: '\x1b[33m',
5+
green: '\x1b[32m',
6+
red: '\x1b[31m',
7+
blue: '\x1b[34m',
8+
gray: '\x1b[90m',
9+
reset: '\x1b[0m',
10+
} as const;
211

3-
// ----------------------------------------------------------------------
12+
type ColorName = Exclude<keyof typeof COLORS, 'reset'>;
13+
14+
const colorize = (color: ColorName, message: string): string => {
15+
return `${COLORS[color]}${message}${COLORS.reset}`;
16+
};
17+
18+
export const colorLogger: Record<ColorName, (message: string) => string> = {
19+
magenta: (msg) => colorize('magenta', msg),
20+
cyan: (msg) => colorize('cyan', msg),
21+
yellow: (msg) => colorize('yellow', msg),
22+
green: (msg) => colorize('green', msg),
23+
red: (msg) => colorize('red', msg),
24+
blue: (msg) => colorize('blue', msg),
25+
gray: (msg) => colorize('gray', msg),
26+
};
427

528
export const highlightText = {
6-
val: (text: string) => `${chalk.yellowBright(text)}`,
7-
fn: (text: string) => `${chalk.magenta(text)}`,
29+
val: (msg: string) => colorize('yellow', msg),
30+
fn: (msg: string) => colorize('magenta', msg),
831
};

pnpm-lock.yaml

Lines changed: 0 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

turbo.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "https://turbo.build/schema.json",
3-
"ui": "tui",
3+
"ui": "stream",
44
"tasks": {
55
"build": {
66
"dependsOn": ["^build"],

0 commit comments

Comments
 (0)