@emeryld/manager 0.7.8 → 0.7.10
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.
- package/dist/packages/manifest-utils.js +10 -12
- package/dist/workspace.js +3 -2
- package/package.json +1 -1
|
@@ -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
|
|
4
|
+
const PACKAGE_COLOR_INDEX_TABLE = [
|
|
5
5
|
'blue',
|
|
6
|
-
'brightBlue',
|
|
7
|
-
'cyan',
|
|
8
|
-
'brightCyan',
|
|
9
6
|
'green',
|
|
10
|
-
'
|
|
7
|
+
'yellow',
|
|
11
8
|
'magenta',
|
|
12
|
-
'brightMagenta',
|
|
13
9
|
'red',
|
|
14
|
-
'
|
|
15
|
-
'
|
|
16
|
-
'
|
|
17
|
-
'
|
|
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
|
-
|
|
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/dist/workspace.js
CHANGED
|
@@ -218,9 +218,10 @@ const TEST_SCENARIO = {
|
|
|
218
218
|
allArgs: ['test'],
|
|
219
219
|
allMessage: 'Running tests for all packages…',
|
|
220
220
|
singleArgs: (pkg) => [
|
|
221
|
+
'run',
|
|
222
|
+
'--filter',
|
|
223
|
+
pkg.dirName,
|
|
221
224
|
'test',
|
|
222
|
-
'--',
|
|
223
|
-
pkg.relativeDir === '.' ? '.' : pkg.relativeDir,
|
|
224
225
|
],
|
|
225
226
|
singleMessage: 'Running tests…',
|
|
226
227
|
};
|