diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2025-01-26 17:25:39 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2025-01-26 17:25:39 -0400 |
commit | d987efdf3f5e60ad81a5d243629208818cdf8211 (patch) | |
tree | d1df8979593d5465959d1d54b139da51a98604b0 | |
parent | 41b77f88f1dd8f15674b3c03a1932c26b2e8baac (diff) |
move aggregate, cli out of util
not sure how to nicely separate some #aggregate code from its dependency on colors, so it lives out of util for now not used anywhere on client but would be nice to support there eventually
-rw-r--r-- | package.json | 4 | ||||
-rw-r--r-- | src/aggregate.js (renamed from src/util/aggregate.js) | 4 | ||||
-rw-r--r-- | src/cli.js (renamed from src/util/cli.js) | 8 |
3 files changed, 5 insertions, 11 deletions
diff --git a/package.json b/package.json index 4c11308f..b5d8a298 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "dev": "eslint src && node src/upd8.js" }, "imports": { - "#aggregate": "./src/util/aggregate.js", + "#aggregate": "./src/aggregate.js", "#cacheable-object": "./src/data/cacheable-object.js", "#colors": "./src/util/colors.js", "#composite": "./src/data/composite.js", @@ -29,7 +29,7 @@ "#composite/things/track-section": "./src/data/composite/things/track-section/index.js", "#content-dependencies": "./src/content/dependencies/index.js", "#content-function": "./src/content-function.js", - "#cli": "./src/util/cli.js", + "#cli": "./src/cli.js", "#data-checks": "./src/data/checks.js", "#external-links": "./src/external-links.js", "#find": "./src/find.js", diff --git a/src/util/aggregate.js b/src/aggregate.js index c7648c4c..92c66b73 100644 --- a/src/util/aggregate.js +++ b/src/aggregate.js @@ -1,5 +1,5 @@ -import {colors} from './cli.js'; -import {empty, typeAppearance} from './sugar.js'; +import {colors} from '#cli'; +import {empty, typeAppearance} from '#sugar'; // Utility function for providing useful interfaces to the JS AggregateError // class. diff --git a/src/util/cli.js b/src/cli.js index a40a911f..bd4ec685 100644 --- a/src/util/cli.js +++ b/src/cli.js @@ -1,14 +1,8 @@ // Utility functions for CLI- and de8ugging-rel8ted stuff. -// -// A 8unch of these depend on process.stdout 8eing availa8le, so they won't -// work within the 8rowser. - -const {process} = globalThis; -import {sortByName} from './sort.js'; +import {sortByName} from '#sort'; export const ENABLE_COLOR = - process && ((process.env.CLICOLOR_FORCE && process.env.CLICOLOR_FORCE === '1') ?? (process.env.CLICOLOR && process.env.CLICOLOR === '1' && |