mvp-ai's picture
download
raw
902 Bytes
// Copyright (c) 2026 the Zuke contributors
// SPDX-License-Identifier: MIT
/**
* The dependency-group flags several npm commands share.
*
* Internal to the package: not exported from `mod.ts`. `install`, `audit`,
* `ls`, and `sbom` all take `--omit`/`--include`, but the commands that do not
* — `run`, `publish`, `view` — would be offered flags npm rejects if these
* lived on a shared base, so the rendering is shared as a function instead.
*
* @module
*/
import type { NpmIncludeType, NpmOmitType } from "./settings.ts";
/** Render `--omit=<group>` and `--include=<group>`, in npm's own order. */
export function dependencyGroupArgs(
omit: readonly NpmOmitType[],
include: readonly NpmIncludeType[],
): string[] {
const argv: string[] = [];
for (const type of omit) argv.push(`--omit=${type}`);
for (const type of include) argv.push(`--include=${type}`);
return argv;
}

Xet Storage Details

Size:
902 Bytes
·
Xet hash:
f944c7dd5ad5c5935da25fd14223f55977a5c6947277176e1fbb1cc9befa621a

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.