Skip to content

Commit

Permalink
disable colors by default for better runtime compat
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanatkn committed Nov 10, 2024
1 parent 183831b commit 1972e95
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/tidy-numbers-kick.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@ryanatkn/belt': minor
---

disable colors by default for better runtime compat
8 changes: 4 additions & 4 deletions src/lib/print.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import {styleText} from 'node:util';
import type {styleText} from 'node:util';

import type {Timings} from '$lib/timings.js';
import type {Logger} from '$lib/log.js';

export let st: typeof styleText = styleText;
export let st: typeof styleText = (_, v) => v;

/**
* Enables colorized output for printing functions globally.
*/
export const enable_colors = (): void => {
st = styleText;
export const enable_colors = (s: typeof styleText): void => {
st = s;
};

/**
Expand Down

0 comments on commit 1972e95

Please sign in to comment.