@williamthorsen/nmr 0.16.0 → 0.17.0

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.
Files changed (41) hide show
  1. package/AGENTS.md +1 -1
  2. package/README.md +41 -44
  3. package/dist/esm/.cache +1 -1
  4. package/dist/esm/cli-build.js +5 -5
  5. package/dist/esm/cli-ensure-prepublish-hooks.js +33 -34
  6. package/dist/esm/cli-report-overrides.js +7 -6
  7. package/dist/esm/cli-sync-agent-files.js +20 -22
  8. package/dist/esm/cli-sync-pnpm-version.js +7 -6
  9. package/dist/esm/cli.js +13 -13
  10. package/dist/esm/commands/build.d.ts +2 -8
  11. package/dist/esm/commands/build.js +270 -118
  12. package/dist/esm/commands/ensure-prepublish-hooks.js +66 -69
  13. package/dist/esm/commands/report-overrides.js +10 -13
  14. package/dist/esm/commands/sync-agent-files.js +46 -52
  15. package/dist/esm/commands/sync-pnpm-version.js +35 -42
  16. package/dist/esm/config.js +59 -57
  17. package/dist/esm/context.d.ts +1 -1
  18. package/dist/esm/context.js +70 -72
  19. package/dist/esm/default-scripts.js +63 -68
  20. package/dist/esm/help.d.ts +1 -1
  21. package/dist/esm/help.js +65 -67
  22. package/dist/esm/helpers/code-quality-pnpm-action.js +20 -24
  23. package/dist/esm/helpers/hook-name.js +2 -5
  24. package/dist/esm/helpers/package-json.js +46 -41
  25. package/dist/esm/helpers/type-guards.js +2 -5
  26. package/dist/esm/index.d.ts +3 -3
  27. package/dist/esm/index.js +1 -4
  28. package/dist/esm/resolve-scripts.d.ts +2 -2
  29. package/dist/esm/resolve-scripts.js +7 -11
  30. package/dist/esm/resolver.d.ts +2 -2
  31. package/dist/esm/resolver.js +84 -86
  32. package/dist/esm/runCli.js +136 -144
  33. package/dist/esm/runner.js +35 -34
  34. package/dist/esm/scripts.d.ts +2 -2
  35. package/dist/esm/scripts.js +1 -5
  36. package/dist/esm/tests/consistency.d.ts +1 -1
  37. package/dist/esm/tests/consistency.js +45 -54
  38. package/dist/esm/tests/helpers/get-runtime-version-from-asdf.js +11 -14
  39. package/dist/esm/tests/helpers/get-string-from-yaml-file.js +10 -13
  40. package/dist/esm/tests/helpers/get-value-at-path.js +30 -30
  41. package/package.json +5 -3
@@ -1,2 +1,2 @@
1
- import type { NmrConfig } from './config.ts';
1
+ import type { NmrConfig } from './config.js';
2
2
  export declare function generateHelp(config: NmrConfig, packageDir: string | undefined, useRoot: boolean): string;
package/dist/esm/help.js CHANGED
@@ -1,78 +1,76 @@
1
1
  import { isHookName } from "./helpers/hook-name.js";
2
- import {
3
- buildRootRegistry,
4
- buildWorkspaceRegistry,
5
- describeScript,
6
- isSelfReferential,
7
- readPackageJsonScripts
8
- } from "./resolver.js";
9
- function generateHelp(config, packageDir, useRoot) {
10
- const lines = [
11
- "Usage: nmr [flags] <command> [args...]",
12
- "",
13
- "Flags:",
14
- " -F, --filter <pattern> Run command in matching packages",
15
- " -R, --recursive Run command in all packages",
16
- " -w, --workspace-root Run root command regardless of cwd",
17
- " -q, --quiet Suppress output on success; show full output on failure",
18
- " -?, --help Show this help",
19
- "",
20
- "Workspace commands:"
21
- ];
22
- const overrides = packageDir === void 0 ? {} : collectOverrides(packageDir);
23
- let hadOverride = false;
24
- const workspaceRegistry = filterHooks(buildWorkspaceRegistry(config, false));
25
- const workspaceMarked = !useRoot ? applyOverrides(workspaceRegistry, overrides) : /* @__PURE__ */ new Set();
26
- if (workspaceMarked.size > 0) hadOverride = true;
27
- formatRegistry(workspaceRegistry, workspaceMarked, lines);
28
- lines.push("", "Root commands:");
29
- const rootRegistry = filterHooks(buildRootRegistry(config));
30
- const rootMarked = useRoot ? applyOverrides(rootRegistry, overrides) : /* @__PURE__ */ new Set();
31
- if (rootMarked.size > 0) hadOverride = true;
32
- formatRegistry(rootRegistry, rootMarked, lines);
33
- if (hadOverride) {
34
- lines.push("", "* Overridden by package.json");
35
- }
36
- return lines.join("\n");
2
+ import { buildRootRegistry, buildWorkspaceRegistry, describeScript, isSelfReferential, readPackageJsonScripts, } from "./resolver.js";
3
+ export function generateHelp(config, packageDir, useRoot) {
4
+ const lines = [
5
+ 'Usage: nmr [flags] <command> [args...]',
6
+ '',
7
+ 'Flags:',
8
+ ' -F, --filter <pattern> Run command in matching packages',
9
+ ' -R, --recursive Run command in all packages',
10
+ ' -w, --workspace-root Run root command regardless of cwd',
11
+ ' -q, --quiet Suppress output on success; show full output on failure',
12
+ ' -?, --help Show this help',
13
+ '',
14
+ 'Workspace commands:',
15
+ ];
16
+ const overrides = packageDir === undefined ? {} : collectOverrides(packageDir);
17
+ let hadOverride = false;
18
+ const workspaceRegistry = filterHooks(buildWorkspaceRegistry(config, false));
19
+ const workspaceMarked = !useRoot ? applyOverrides(workspaceRegistry, overrides) : new Set();
20
+ if (workspaceMarked.size > 0)
21
+ hadOverride = true;
22
+ formatRegistry(workspaceRegistry, workspaceMarked, lines);
23
+ lines.push('', 'Root commands:');
24
+ const rootRegistry = filterHooks(buildRootRegistry(config));
25
+ const rootMarked = useRoot ? applyOverrides(rootRegistry, overrides) : new Set();
26
+ if (rootMarked.size > 0)
27
+ hadOverride = true;
28
+ formatRegistry(rootRegistry, rootMarked, lines);
29
+ if (hadOverride) {
30
+ lines.push('', '* Overridden by package.json');
31
+ }
32
+ return lines.join('\n');
37
33
  }
38
34
  function collectOverrides(packageDir) {
39
- const scripts = readPackageJsonScripts(packageDir);
40
- if (!scripts) return {};
41
- const filtered = {};
42
- for (const [name, value] of Object.entries(scripts)) {
43
- if (isHookName(name)) continue;
44
- if (isSelfReferential(value, name)) continue;
45
- filtered[name] = value;
46
- }
47
- return filtered;
35
+ const scripts = readPackageJsonScripts(packageDir);
36
+ if (!scripts)
37
+ return {};
38
+ const filtered = {};
39
+ for (const [name, value] of Object.entries(scripts)) {
40
+ if (isHookName(name))
41
+ continue;
42
+ if (isSelfReferential(value, name))
43
+ continue;
44
+ filtered[name] = value;
45
+ }
46
+ return filtered;
48
47
  }
49
48
  function applyOverrides(registry, overrides) {
50
- const marked = /* @__PURE__ */ new Set();
51
- for (const [name, value] of Object.entries(overrides)) {
52
- if (name in registry) {
53
- registry[name] = value;
54
- marked.add(name);
49
+ const marked = new Set();
50
+ for (const [name, value] of Object.entries(overrides)) {
51
+ if (name in registry) {
52
+ registry[name] = value;
53
+ marked.add(name);
54
+ }
55
55
  }
56
- }
57
- return marked;
56
+ return marked;
58
57
  }
59
58
  function filterHooks(registry) {
60
- const filtered = {};
61
- for (const [key, value] of Object.entries(registry)) {
62
- if (!isHookName(key)) filtered[key] = value;
63
- }
64
- return filtered;
59
+ const filtered = {};
60
+ for (const [key, value] of Object.entries(registry)) {
61
+ if (!isHookName(key))
62
+ filtered[key] = value;
63
+ }
64
+ return filtered;
65
65
  }
66
66
  function formatRegistry(registry, marked, lines) {
67
- const keys = Object.keys(registry);
68
- if (keys.length === 0) return;
69
- const maxKeyLen = Math.max(...keys.map((k) => k.length));
70
- const pad = Math.max(maxKeyLen + 1 + 2, 20);
71
- for (const [key, value] of Object.entries(registry)) {
72
- const marker = marked.has(key) ? "*" : " ";
73
- lines.push(` ${(key + marker).padEnd(pad)} ${describeScript(value)}`);
74
- }
67
+ const keys = Object.keys(registry);
68
+ if (keys.length === 0)
69
+ return;
70
+ const maxKeyLen = Math.max(...keys.map((k) => k.length));
71
+ const pad = Math.max(maxKeyLen + 1 + 2, 20);
72
+ for (const [key, value] of Object.entries(registry)) {
73
+ const marker = marked.has(key) ? '*' : ' ';
74
+ lines.push(` ${(key + marker).padEnd(pad)} ${describeScript(value)}`);
75
+ }
75
76
  }
76
- export {
77
- generateHelp
78
- };
@@ -1,26 +1,22 @@
1
- import { isScalar, visit } from "yaml";
2
- import { z } from "zod";
3
- const CodeQualityPnpmWorkflowSchema = z.looseObject({
4
- jobs: z.looseObject({
5
- "code-quality": z.looseObject({
6
- with: z.looseObject({
7
- "pnpm-version": z.string()
8
- })
9
- })
10
- })
1
+ import { isScalar, visit } from 'yaml';
2
+ import { z } from 'zod';
3
+ export const CodeQualityPnpmWorkflowSchema = z.looseObject({
4
+ jobs: z.looseObject({
5
+ 'code-quality': z.looseObject({
6
+ with: z.looseObject({
7
+ 'pnpm-version': z.string(),
8
+ }),
9
+ }),
10
+ }),
11
11
  });
12
- function getPnpmVersionNodes(doc) {
13
- const nodes = [];
14
- visit(doc, {
15
- Pair(_, pair) {
16
- if (isScalar(pair.key) && pair.key.value === "pnpm-version" && isScalar(pair.value)) {
17
- nodes.push(pair.value);
18
- }
19
- }
20
- });
21
- return nodes;
12
+ export function getPnpmVersionNodes(doc) {
13
+ const nodes = [];
14
+ visit(doc, {
15
+ Pair(_, pair) {
16
+ if (isScalar(pair.key) && pair.key.value === 'pnpm-version' && isScalar(pair.value)) {
17
+ nodes.push(pair.value);
18
+ }
19
+ },
20
+ });
21
+ return nodes;
22
22
  }
23
- export {
24
- CodeQualityPnpmWorkflowSchema,
25
- getPnpmVersionNodes
26
- };
@@ -1,6 +1,3 @@
1
- function isHookName(key) {
2
- return key.length > 4 && key.endsWith(":pre") || key.length > 5 && key.endsWith(":post");
1
+ export function isHookName(key) {
2
+ return (key.length > 4 && key.endsWith(':pre')) || (key.length > 5 && key.endsWith(':post'));
3
3
  }
4
- export {
5
- isHookName
6
- };
@@ -1,46 +1,51 @@
1
- import { readFileSync } from "node:fs";
2
- import path from "node:path";
1
+ import { readFileSync } from 'node:fs';
2
+ import path from 'node:path';
3
3
  import { isObject } from "./type-guards.js";
4
- function readPackageJson(dir) {
5
- const content = readFileSync(path.join(dir, "package.json"), "utf8");
6
- const parsed = JSON.parse(content);
7
- if (!isObject(parsed)) {
8
- throw new TypeError(`Invalid package.json in ${dir}: expected an object`);
9
- }
10
- const pkg = {};
11
- if (typeof parsed.name === "string") pkg.name = parsed.name;
12
- if (parsed.private === true) pkg.private = true;
13
- if (typeof parsed.version === "string") pkg.version = parsed.version;
14
- if (typeof parsed.packageManager === "string") pkg.packageManager = parsed.packageManager;
15
- if (isObject(parsed.scripts)) {
16
- const scripts = {};
17
- for (const [key, val] of Object.entries(parsed.scripts)) {
18
- if (typeof val === "string") scripts[key] = val;
4
+ export function readPackageJson(dir) {
5
+ const content = readFileSync(path.join(dir, 'package.json'), 'utf8');
6
+ const parsed = JSON.parse(content);
7
+ if (!isObject(parsed)) {
8
+ throw new TypeError(`Invalid package.json in ${dir}: expected an object`);
19
9
  }
20
- pkg.scripts = scripts;
21
- }
22
- if (isObject(parsed.pnpm)) {
23
- const pnpm = parsed.pnpm;
24
- if (isObject(pnpm.overrides)) {
25
- const overrides = {};
26
- for (const [key, val] of Object.entries(pnpm.overrides)) {
27
- if (typeof val === "string") overrides[key] = val;
28
- }
29
- pkg.pnpm = { overrides };
10
+ const pkg = {};
11
+ if (typeof parsed.name === 'string')
12
+ pkg.name = parsed.name;
13
+ if (parsed.private === true)
14
+ pkg.private = true;
15
+ if (typeof parsed.version === 'string')
16
+ pkg.version = parsed.version;
17
+ if (typeof parsed.packageManager === 'string')
18
+ pkg.packageManager = parsed.packageManager;
19
+ if (isObject(parsed.scripts)) {
20
+ const scripts = {};
21
+ for (const [key, val] of Object.entries(parsed.scripts)) {
22
+ if (typeof val === 'string')
23
+ scripts[key] = val;
24
+ }
25
+ pkg.scripts = scripts;
30
26
  }
31
- }
32
- return pkg;
27
+ if (isObject(parsed.pnpm)) {
28
+ const pnpm = parsed.pnpm;
29
+ if (isObject(pnpm.overrides)) {
30
+ const overrides = {};
31
+ for (const [key, val] of Object.entries(pnpm.overrides)) {
32
+ if (typeof val === 'string')
33
+ overrides[key] = val;
34
+ }
35
+ pkg.pnpm = { overrides };
36
+ }
37
+ }
38
+ return pkg;
33
39
  }
34
- function getPnpmOverrides(pkg) {
35
- if (!isObject(pkg.pnpm)) return void 0;
36
- const overrides = pkg.pnpm.overrides;
37
- if (!isObject(overrides)) return void 0;
38
- for (const value of Object.values(overrides)) {
39
- if (typeof value !== "string") return void 0;
40
- }
41
- return overrides;
40
+ export function getPnpmOverrides(pkg) {
41
+ if (!isObject(pkg.pnpm))
42
+ return undefined;
43
+ const overrides = pkg.pnpm.overrides;
44
+ if (!isObject(overrides))
45
+ return undefined;
46
+ for (const value of Object.values(overrides)) {
47
+ if (typeof value !== 'string')
48
+ return undefined;
49
+ }
50
+ return overrides;
42
51
  }
43
- export {
44
- getPnpmOverrides,
45
- readPackageJson
46
- };
@@ -1,6 +1,3 @@
1
- function isObject(value) {
2
- return typeof value === "object" && value !== null && !Array.isArray(value);
1
+ export function isObject(value) {
2
+ return typeof value === 'object' && value !== null && !Array.isArray(value);
3
3
  }
4
- export {
5
- isObject
6
- };
@@ -1,3 +1,3 @@
1
- export type { NmrConfig } from './config.ts';
2
- export { defineConfig } from './config.ts';
3
- export type { ResolvedContext } from './context.ts';
1
+ export type { NmrConfig } from './config.js';
2
+ export { defineConfig } from './config.js';
3
+ export type { ResolvedContext } from './context.js';
package/dist/esm/index.js CHANGED
@@ -1,4 +1 @@
1
- import { defineConfig } from "./config.js";
2
- export {
3
- defineConfig
4
- };
1
+ export { defineConfig } from "./config.js";
@@ -1,4 +1,4 @@
1
- import type { ScriptRegistry } from './default-scripts.ts';
2
- export type { ScriptRegistry, ScriptValue } from './default-scripts.ts';
1
+ import type { ScriptRegistry } from './default-scripts.js';
2
+ export type { ScriptRegistry, ScriptValue } from './default-scripts.js';
3
3
  export declare function getDefaultWorkspaceScripts(useIntTests: boolean): ScriptRegistry;
4
4
  export declare function getDefaultRootScripts(): ScriptRegistry;
@@ -1,14 +1,10 @@
1
1
  import { commonWorkspaceScripts, integrationTestScripts, rootScripts, standardTestScripts } from "./default-scripts.js";
2
- function getDefaultWorkspaceScripts(useIntTests) {
3
- return {
4
- ...commonWorkspaceScripts,
5
- ...useIntTests ? integrationTestScripts : standardTestScripts
6
- };
2
+ export function getDefaultWorkspaceScripts(useIntTests) {
3
+ return {
4
+ ...commonWorkspaceScripts,
5
+ ...(useIntTests ? integrationTestScripts : standardTestScripts),
6
+ };
7
7
  }
8
- function getDefaultRootScripts() {
9
- return { ...rootScripts };
8
+ export function getDefaultRootScripts() {
9
+ return { ...rootScripts };
10
10
  }
11
- export {
12
- getDefaultRootScripts,
13
- getDefaultWorkspaceScripts
14
- };
@@ -1,5 +1,5 @@
1
- import type { NmrConfig } from './config.ts';
2
- import type { ScriptRegistry, ScriptValue } from './resolve-scripts.ts';
1
+ import type { NmrConfig } from './config.js';
2
+ import type { ScriptRegistry, ScriptValue } from './resolve-scripts.js';
3
3
  export declare function applyDevBin(command: string, devBin: Record<string, string> | undefined, monorepoRoot: string): string;
4
4
  export interface ResolvedScript {
5
5
  command: string;
@@ -1,102 +1,100 @@
1
- import { existsSync, readFileSync } from "node:fs";
2
- import path from "node:path";
1
+ import { existsSync, readFileSync } from 'node:fs';
2
+ import path from 'node:path';
3
3
  import { isObject } from "./helpers/type-guards.js";
4
4
  import { getDefaultRootScripts, getDefaultWorkspaceScripts } from "./resolve-scripts.js";
5
- function applyDevBin(command, devBin, monorepoRoot) {
6
- if (!devBin) {
7
- return command;
8
- }
9
- const spaceIndex = command.indexOf(" ");
10
- const firstToken = spaceIndex === -1 ? command : command.slice(0, spaceIndex);
11
- const rest = spaceIndex === -1 ? "" : command.slice(spaceIndex);
12
- const replacement = devBin[firstToken];
13
- if (replacement === void 0) {
14
- return command;
15
- }
16
- const resolvedReplacement = resolveReplacementPaths(replacement, monorepoRoot);
17
- return resolvedReplacement + rest;
5
+ export function applyDevBin(command, devBin, monorepoRoot) {
6
+ if (!devBin) {
7
+ return command;
8
+ }
9
+ const spaceIndex = command.indexOf(' ');
10
+ const firstToken = spaceIndex === -1 ? command : command.slice(0, spaceIndex);
11
+ const rest = spaceIndex === -1 ? '' : command.slice(spaceIndex);
12
+ const replacement = devBin[firstToken];
13
+ if (replacement === undefined) {
14
+ return command;
15
+ }
16
+ const resolvedReplacement = resolveReplacementPaths(replacement, monorepoRoot);
17
+ return resolvedReplacement + rest;
18
18
  }
19
19
  function resolveReplacementPaths(replacement, monorepoRoot) {
20
- const tokens = replacement.split(" ");
21
- return tokens.map((token, index) => {
22
- if (index === 0) return token;
23
- if (token.startsWith("-")) return token;
24
- if (!token.includes("/")) return token;
25
- return path.resolve(monorepoRoot, token);
26
- }).join(" ");
20
+ const tokens = replacement.split(' ');
21
+ return tokens
22
+ .map((token, index) => {
23
+ if (index === 0)
24
+ return token;
25
+ if (token.startsWith('-'))
26
+ return token;
27
+ if (!token.includes('/'))
28
+ return token;
29
+ return path.resolve(monorepoRoot, token);
30
+ })
31
+ .join(' ');
27
32
  }
28
- function expandScript(script, workspaceRoot) {
29
- if (typeof script === "string") {
30
- return script;
31
- }
32
- const flag = workspaceRoot ? "-w " : "";
33
- return script.map((s) => `nmr ${flag}${s}`).join(" && ");
33
+ export function expandScript(script, workspaceRoot) {
34
+ if (typeof script === 'string') {
35
+ return script;
36
+ }
37
+ const flag = workspaceRoot ? '-w ' : '';
38
+ return script.map((s) => `nmr ${flag}${s}`).join(' && ');
34
39
  }
35
- function describeScript(script) {
36
- return typeof script === "string" ? script : `[${script.join(", ")}]`;
40
+ export function describeScript(script) {
41
+ return typeof script === 'string' ? script : `[${script.join(', ')}]`;
37
42
  }
38
- function readPackageJsonScripts(packageDir) {
39
- try {
40
- const raw = readFileSync(path.join(packageDir, "package.json"), "utf8");
41
- const parsed = JSON.parse(raw);
42
- if (!isObject(parsed)) return void 0;
43
- const scripts = parsed.scripts;
44
- if (!isObject(scripts)) return void 0;
45
- const result = {};
46
- for (const [key, val] of Object.entries(scripts)) {
47
- if (typeof val === "string") result[key] = val;
43
+ export function readPackageJsonScripts(packageDir) {
44
+ try {
45
+ const raw = readFileSync(path.join(packageDir, 'package.json'), 'utf8');
46
+ const parsed = JSON.parse(raw);
47
+ if (!isObject(parsed))
48
+ return undefined;
49
+ const scripts = parsed.scripts;
50
+ if (!isObject(scripts))
51
+ return undefined;
52
+ const result = {};
53
+ for (const [key, val] of Object.entries(scripts)) {
54
+ if (typeof val === 'string')
55
+ result[key] = val;
56
+ }
57
+ return result;
48
58
  }
49
- return result;
50
- } catch (error) {
51
- if (error instanceof Error && "code" in error && error.code === "ENOENT") {
52
- return void 0;
59
+ catch (error) {
60
+ if (error instanceof Error && 'code' in error && error.code === 'ENOENT') {
61
+ return undefined;
62
+ }
63
+ throw error;
53
64
  }
54
- throw error;
55
- }
56
65
  }
57
- function hasIntegrationTestConfig(packageDir) {
58
- return existsSync(path.join(packageDir, "vitest.integration.config.ts"));
66
+ export function hasIntegrationTestConfig(packageDir) {
67
+ return existsSync(path.join(packageDir, 'vitest.integration.config.ts'));
59
68
  }
60
- function buildWorkspaceRegistry(config, useIntTests) {
61
- return {
62
- ...getDefaultWorkspaceScripts(useIntTests),
63
- ...config.workspaceScripts
64
- };
69
+ export function buildWorkspaceRegistry(config, useIntTests) {
70
+ return {
71
+ ...getDefaultWorkspaceScripts(useIntTests),
72
+ ...config.workspaceScripts,
73
+ };
65
74
  }
66
- function buildRootRegistry(config) {
67
- return {
68
- ...getDefaultRootScripts(),
69
- ...config.rootScripts
70
- };
75
+ export function buildRootRegistry(config) {
76
+ return {
77
+ ...getDefaultRootScripts(),
78
+ ...config.rootScripts,
79
+ };
71
80
  }
72
- function isSelfReferential(script, commandName) {
73
- const prefix = `nmr ${commandName}`;
74
- return script === prefix || script.startsWith(`${prefix} `);
81
+ export function isSelfReferential(script, commandName) {
82
+ const prefix = `nmr ${commandName}`;
83
+ return script === prefix || script.startsWith(`${prefix} `);
75
84
  }
76
- function resolveScript(commandName, registry, packageDir, workspaceRoot) {
77
- if (packageDir) {
78
- const pkgScripts = readPackageJsonScripts(packageDir);
79
- if (pkgScripts && commandName in pkgScripts) {
80
- const override = pkgScripts[commandName];
81
- if (override !== void 0 && !isSelfReferential(override, commandName)) {
82
- return { command: override, source: "package" };
83
- }
85
+ export function resolveScript(commandName, registry, packageDir, workspaceRoot) {
86
+ if (packageDir) {
87
+ const pkgScripts = readPackageJsonScripts(packageDir);
88
+ if (pkgScripts && commandName in pkgScripts) {
89
+ const override = pkgScripts[commandName];
90
+ if (override !== undefined && !isSelfReferential(override, commandName)) {
91
+ return { command: override, source: 'package' };
92
+ }
93
+ }
94
+ }
95
+ const registryEntry = registry[commandName];
96
+ if (registryEntry === undefined) {
97
+ return undefined;
84
98
  }
85
- }
86
- const registryEntry = registry[commandName];
87
- if (registryEntry === void 0) {
88
- return void 0;
89
- }
90
- return { command: expandScript(registryEntry, workspaceRoot), source: "default" };
99
+ return { command: expandScript(registryEntry, workspaceRoot), source: 'default' };
91
100
  }
92
- export {
93
- applyDevBin,
94
- buildRootRegistry,
95
- buildWorkspaceRegistry,
96
- describeScript,
97
- expandScript,
98
- hasIntegrationTestConfig,
99
- isSelfReferential,
100
- readPackageJsonScripts,
101
- resolveScript
102
- };