@emeryld/manager 0.7.8 → 0.7.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,22 +1,19 @@
1
1
  import { readdir, readFile } from 'node:fs/promises';
2
2
  import path from 'node:path';
3
3
  import { pathToFileURL } from 'node:url';
4
- const DEFAULT_COLOR_PALETTE = [
4
+ const PACKAGE_COLOR_INDEX_TABLE = [
5
5
  'blue',
6
- 'brightBlue',
7
- 'cyan',
8
- 'brightCyan',
9
6
  'green',
10
- 'brightGreen',
7
+ 'yellow',
11
8
  'magenta',
12
- 'brightMagenta',
13
9
  'red',
14
- 'brightRed',
15
- 'yellow',
16
- 'brightYellow',
17
- 'white',
18
- 'brightWhite',
10
+ 'cyan',
11
+ 'brightBlue',
12
+ 'brightGreen',
13
+ 'brightMagenta',
19
14
  ];
15
+ // indexes 0-8 map to the same nine package colors
16
+ const DEFAULT_COLOR_PALETTE = PACKAGE_COLOR_INDEX_TABLE;
20
17
  const IGNORED_DIRS = new Set([
21
18
  'node_modules',
22
19
  '.git',
@@ -138,7 +135,8 @@ export function colorFromSeed(seed) {
138
135
  for (let i = 0; i < normalized.length; i++) {
139
136
  hash = (hash * 31 + normalized.charCodeAt(i)) >>> 0;
140
137
  }
141
- return DEFAULT_COLOR_PALETTE[hash % DEFAULT_COLOR_PALETTE.length];
138
+ const index = hash % PACKAGE_COLOR_INDEX_TABLE.length;
139
+ return PACKAGE_COLOR_INDEX_TABLE[index];
142
140
  }
143
141
  function isManifestMissing(error) {
144
142
  if (typeof error !== 'object' || error === null)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emeryld/manager",
3
- "version": "0.7.8",
3
+ "version": "0.7.9",
4
4
  "description": "Interactive manager for pnpm monorepos (update/test/build/publish).",
5
5
  "license": "MIT",
6
6
  "type": "module",