Détail du package

@cyclonedx/cdxgen

CycloneDX255.4kApache-2.011.10.0

Creates CycloneDX Software Bill of Materials (SBOM) from source or container image

sbom, bom, inventory, spdx

readme

JSR NPM GitHub Releases NPM Downloads GitHub License GitHub Contributors SWH

CycloneDX Generator (cdxgen)

cdxgen is a CLI tool, library, REPL, and server to create a valid and compliant CycloneDX Bill of Materials (BOM) containing an aggregate of all project dependencies in JSON format. CycloneDX is a full-stack BOM specification that is easily created, human and machine-readable, and simple to parse. The tool supports CycloneDX specification versions from 1.4 - 1.6.

Supported BOM formats:

  • Software (SBOM) - For many languages and container images.
  • Cryptography (CBOM) - For Java and Python projects.
  • Operations (OBOM) - For Linux container images and VMs running Linux or Windows operating systems.
  • Software-as-a-Service (SaaSBOM) - For Java, Python, JavaScript, TypeScript, and PHP projects.
  • Attestations (CDXA) - Generate SBOM with templates for multiple standards. Sign the BOM document at a granular level to improve authenticity.
  • Vulnerability Disclosure Report (VDR) - Use cdxgen with OWASP depscan to automate the generation of VDR at scale.

Why cdxgen?

Most SBOM tools are like simple barcode scanners. For easy applications, they can parse a few package manifests and create a list of components only based on these files without any deep inspection. Further, a typical application might have several repos, components, and libraries with complex build requirements. Traditional techniques to generate an SBOM per language or package manifest either do not work in enterprise environments or don't provide the confidence required for both compliance and automated analysis. So we built cdxgen - the universal polyglot SBOM generator that is user-friendly, precise, and comprehensive!

Our philosophy:

  • Explainability: Don't list, but explain with evidence.
  • Precision: Try using multiple techniques to improve precision, even if it takes extra time.
  • Personas: Cater to the needs of a range of personas such as security researchers, compliance auditors, developers, and SOC.
  • Lifecycle: Support BOM generation for various product lifecycles.
  • Machine Learning: Optimize the generated data for Machine Learning (ML) purposes by considering the various model properties.

Documentation

Please visit our GPT app or the documentation site for detailed usage, tutorials, and support documentation.

Sections include:

Usage

Installing

npm install -g @cyclonedx/cdxgen

To run cdxgen without installing (hotloading), use the pnpm dlx command.

corepack pnpm dlx @cyclonedx/cdxgen --help

If you are a Homebrew user, you can also install cdxgen via:

$ brew install cdxgen

If you are a Winget user on windows, you can also install cdxgen via:

$ winget install cdxgen

Deno and bun runtime can be used with limited support.

deno install --allow-read --allow-env --allow-run --allow-sys=uid,systemMemoryInfo,gid,homedir --allow-write --allow-net -n cdxgen "npm:@cyclonedx/cdxgen/cdxgen"

You can also use the cdxgen container image with node, deno, or bun runtime versions.

The default version uses Node.js 23

docker run --rm -e CDXGEN_DEBUG_MODE=debug -v /tmp:/tmp -v $(pwd):/app:rw -t ghcr.io/cyclonedx/cdxgen:master -r /app -o /app/bom.json

To use the deno version, use ghcr.io/cyclonedx/cdxgen-deno as the image name.

docker run --rm -e CDXGEN_DEBUG_MODE=debug -v /tmp:/tmp -v $(pwd):/app:rw -t ghcr.io/cyclonedx/cdxgen-deno:master -r /app -o /app/bom.json

For the bun version, use ghcr.io/cyclonedx/cdxgen-bun as the image name.

docker run --rm -e CDXGEN_DEBUG_MODE=debug -v /tmp:/tmp -v $(pwd):/app:rw -t ghcr.io/cyclonedx/cdxgen-bun:master -r /app -o /app/bom.json

In deno applications, cdxgen could be directly imported without any conversion. Please see the section on integration as a library

import { createBom, submitBom } from "npm:@cyclonedx/cdxgen@^11.0.0";

Getting Help

cdxgen [command]

Commands:
  cdxgen completion  Generate bash/zsh completion

Options:
  -o, --output                    Output file. Default bom.json                                    [default: "bom.json"]
  -t, --type                      Project type. Please refer to https://cyclonedx.github.io/cdxgen/#/PROJECT_TYPES for s
                                  upported languages/platforms.                                                  [array]
      --exclude-type              Project types to exclude. Please refer to https://cyclonedx.github.io/cdxgen/#/PROJECT
                                  _TYPES for supported languages/platforms.
  -r, --recurse                   Recurse mode suitable for mono-repos. Defaults to true. Pass --no-recurse to disable.
                                                                                               [boolean] [default: true]
  -p, --print                     Print the SBOM as a table with tree.                                         [boolean]
  -c, --resolve-class             Resolve class names for packages. jars only for now.                         [boolean]
      --deep                      Perform deep searches for components. Useful while scanning C/C++ apps, live OS and oc
                                  i images.                                                                    [boolean]
      --server-url                Dependency track url. Eg: https://deptrack.cyclonedx.io
      --skip-dt-tls-check         Skip TLS certificate check when calling Dependency-Track.   [boolean] [default: false]
      --api-key                   Dependency track api key
      --project-group             Dependency track project group
      --project-name              Dependency track project name. Default use the directory name
      --project-version           Dependency track project version                                [string] [default: ""]
      --project-id                Dependency track project id. Either provide the id or the project name and version tog
                                  ether                                                                         [string]
      --parent-project-id         Dependency track parent project id                                            [string]
      --required-only             Include only the packages with required scope on the SBOM. Would set compositions.aggr
                                  egate to incomplete unless --no-auto-compositions is passed.                 [boolean]
      --fail-on-error             Fail if any dependency extractor fails.                                      [boolean]
      --no-babel                  Do not use babel to perform usage analysis for JavaScript/TypeScript projects.
                                                                                                               [boolean]
      --generate-key-and-sign     Generate an RSA public/private key pair and then sign the generated SBOM using JSON We
                                  b Signatures.                                                                [boolean]
      --server                    Run cdxgen as a server                                                       [boolean]
      --server-host               Listen address                                                  [default: "127.0.0.1"]
      --server-port               Listen port                                                          [default: "9090"]
      --install-deps              Install dependencies automatically for some projects. Defaults to true but disabled fo
                                  r containers and oci scans. Use --no-install-deps to disable this feature.
                                                                                               [boolean] [default: true]
      --validate                  Validate the generated SBOM using json schema. Defaults to true. Pass --no-validate to
                                   disable.                                                    [boolean] [default: true]
      --evidence                  Generate SBOM with evidence for supported languages.        [boolean] [default: false]
      --spec-version              CycloneDX Specification version to use. Defaults to 1.6
                                                                   [number] [choices: 1.4, 1.5, 1.6, 1.7] [default: 1.6]
      --filter                    Filter components containing this word in purl or component.properties.value. Multiple
                                   values allowed.                                                               [array]
      --only                      Include components only containing this word in purl. Useful to generate BOM with firs
                                  t party components alone. Multiple values allowed.                             [array]
      --author                    The person(s) who created the BOM. Set this value if you're intending the modify the B
                                  OM and claim authorship.                         [array] [default: "OWASP Foundation"]
      --profile                   BOM profile to use for generation. Default generic.
  [choices: "appsec", "research", "operational", "threat-modeling", "license-compliance", "generic", "machine-learning",
                                                       "ml", "deep-learning", "ml-deep", "ml-tiny"] [default: "generic"]
      --include-regex             glob pattern to include. This overrides the default pattern used during auto-detection
                                  .                                                                             [string]
      --exclude, --exclude-regex  Additional glob pattern(s) to ignore                                           [array]
      --export-proto              Serialize and export BOM as protobuf binary.                [boolean] [default: false]
      --proto-bin-file            Path for the serialized protobuf binary.                          [default: "bom.cdx"]
      --include-formulation       Generate formulation section with git metadata and build tools. Defaults to false.
                                                                                              [boolean] [default: false]
      --include-crypto            Include crypto libraries as components.                     [boolean] [default: false]
      --standard                  The list of standards which may consist of regulations, industry or organizational-spe
                                  cific standards, maturity models, best practices, or any other requirements which can
                                  be evaluated against or attested to.
  [array] [choices: "asvs-5.0", "asvs-4.0.3", "bsimm-v13", "masvs-2.0.0", "nist_ssdf-1.1", "pcissc-secure-slc-1.1", "scv
                                                                                         s-1.0.0", "ssaf-DRAFT-2023-11"]
      --json-pretty               Pretty-print the generated BOM json.                        [boolean] [default: false]
      --min-confidence            Minimum confidence needed for the identity of a component from 0 - 1, where 1 is 100%
                                  confidence.                                                      [number] [default: 0]
      --technique                 Analysis technique to use
  [array] [choices: "auto", "source-code-analysis", "binary-analysis", "manifest-analysis", "hash-comparison", "instrume
                                                                                                   ntation", "filename"]
      --auto-compositions         Automatically set compositions when the BOM was filtered. Defaults to true
                                                                                               [boolean] [default: true]
  -h, --help                      Show help                                                                    [boolean]
  -v, --version                   Show version number                                                          [boolean]

All boolean arguments accept --no prefix to toggle the behavior.

Example

Minimal example.

cdxgen -o bom.json

For a java project. cdxgen would automatically detect maven, gradle, or sbt and build bom accordingly

cdxgen -t java -o bom.json

To print the SBOM as a table pass -p argument.

cdxgen -t java -o bom.json -p

To recursively generate a single BOM for all languages pass -r argument.

cdxgen -r -o bom.json

The default specification used by cdxgen is 1.6. To generate BOM for a different specification version, such as 1.5 or 1.4, pass the version number using the --spec-version argument.

# 1.5 is supported by most tools
cdxgen -r -o bom.json --spec-version 1.5

To generate SBOM for C or Python, ensure Java >= 21 is installed.

# Install java >= 21
cdxgen -t c -o bom.json

NOTE: cdxgen is known to freeze with Java 8 or 11, so ensure >= 21 is installed and JAVA_HOME environment variable is configured correctly. If in doubt, use the cdxgen container image.

Universal SBOM

By passing the type argument -t universal, cdxgen could be forced to opportunistically collect as many components and services as possible by scanning all package, container, and Kubernetes manifests. The resulting SBOM could have over a thousand components, thus requiring additional triaging before use with traditional SCA tools.

SBOM server

Invoke cdxgen with --server argument to run it in server mode. By default, it listens to port 9090, which can be customized with the arguments --server-host and --server-port.

cdxgen --server

Or use the container image.

docker run --rm -v /tmp:/tmp -p 9090:9090 -v $(pwd):/app:rw -t ghcr.io/cyclonedx/cdxgen -r /app --server --server-host 0.0.0.0

Use curl or your favorite tool to pass arguments to the /sbom route.

Server arguments

Arguments can be passed either via the query string or as a JSON body. Please refer to Server Usage

Health endpoint

Use the /health endpoint to check if the SBOM server is up and running.

curl "http://127.0.0.1:9090/health"

Scanning a local path

curl "http://127.0.0.1:9090/sbom?path=/Volumes/Work/sandbox/vulnerable-aws-koa-app&multiProject=true&type=js"

Scanning a git repo

curl "http://127.0.0.1:9090/sbom?url=https://github.com/HooliCorp/vulnerable-aws-koa-app.git&multiProject=true&type=js"

If you need to pass credentials to authenticate.

curl "http://127.0.0.1:9090/sbom?url=https://<access_token>@github.com/some/repo.git&multiProject=true&type=js"
curl "http://127.0.0.1:9090/sbom?url=https://<username>:<password>@bitbucket.org/some/repo.git&multiProject=true&type=js"

You can POST the arguments.

curl -H "Content-Type: application/json" http://localhost:9090/sbom -XPOST -d $'{"url": "https://github.com/HooliCorp/vulnerable-aws-koa-app.git", "type": "nodejs", "multiProject": "true"}'

Docker compose

git clone https://github.com/cyclonedx/cdxgen.git
docker compose up

War file support

cdxgen can generate a BOM file from a given war file.

# cdxgen -t java app.war
cdxgen app.war

Resolving class names

Sometimes, it is necessary to resolve class names contained in jar files. By passing an optional argument --resolve-class, it is possible to get cdxgen to create a separate mapping file with the jar name (including the version) as the key and class names list as a value.

cdxgen -t java --resolve-class -o bom.json

This would create a bom.json.map file with the jar - class name mapping. Refer to these examples to learn about the structure.

Resolving licenses

cdxgen can automatically query public registries such as maven, npm, or nuget to resolve the package licenses. This is a time-consuming operation and is disabled by default. To enable, set the environment variable FETCH_LICENSE to true, as shown. Ensure that GITHUB_TOKEN is set or provided by built-in GITHUB_TOKEN in GitHub Actions, otherwise rate limiting might prevent license resolving.

export FETCH_LICENSE=true

Dependency Tree

cdxgen can retain the dependency tree under the dependencies attribute for a small number of supported package manifests. These are currently limited to:

  • package-lock.json
  • yarn.lock
  • pnpm-lock.yaml
  • Maven (pom.xml)
  • Gradle
  • Scala SBT
  • Python (requirements.txt, setup.py, pyproject.toml, poetry.lock)
  • .NET (packages.lock.json, project.assets.json, paket.lock, .nuspec/.nupkg)
  • Go (go.mod)
  • PHP (composer.lock)
  • Ruby (Gemfile.lock)
  • Rust (Cargo.lock)

Plugins

cdxgen could be extended with external binary plugins to support more SBOM use cases. These are now installed as an optional dependency.

sudo npm install -g @cyclonedx/cdxgen-plugins-bin

Docker / OCI container support

docker type is automatically detected based on the presence of values such as sha256 or docker.io prefix etc in the path.

cdxgen odoo@sha256:4e1e147f0e6714e8f8c5806d2b484075b4076ca50490577cdf9162566086d15e -o /tmp/bom.json

You can also pass -t docker with repository names. Only the latest tag would be pulled if none was specified.

cdxgen shiftleft/scan-slim -o /tmp/bom.json -t docker

You can also pass the .tar file of a container image.

docker pull shiftleft/scan-slim
docker save -o /tmp/slim.tar shiftleft/scan-slim
podman save -q --format oci-archive -o /tmp/slim.tar shiftleft/scan-slim
cdxgen /tmp/slim.tar -o /tmp/bom.json -t docker

Podman in rootless mode

Setup podman in either rootless or remote mode

Do not forget to start the podman socket required for API access on Linux.

systemctl --user enable --now podman.socket
systemctl --user start podman.socket
podman system service -t 0 &

Generate OBOM for a live system

You can use the obom command to generate an OBOM for a live system or a VM for compliance and vulnerability management purposes. Windows and Linux operating systems are supported in this mode.

# obom is an alias for cdxgen -t os
obom
# cdxgen -t os

This feature is powered by osquery, which is installed along with the binary plugins. cdxgen would opportunistically try to detect as many components, apps, and extensions as possible using the default queries. The process would take several minutes and result in an SBOM file with thousands of components of various types, such as operating-system, device-drivers, files, and data.

Generate Cryptography Bill of Materials (CBOM)

Use the cbom alias to generate a CBOM. This is currently supported only for Java projects.

cbom -t java
# cdxgen -t java --include-crypto -o bom.json .

Generating SaaSBOM and component evidences

See evinse mode in the advanced documentation.

BOM signing

cdxgen can sign the generated BOM json file to increase authenticity and non-repudiation capabilities. To enable this, set the following environment variables.

  • SBOM_SIGN_ALGORITHM: Algorithm. Example: RS512
  • SBOM_SIGN_PRIVATE_KEY: Location to the RSA private key
  • SBOM_SIGN_PUBLIC_KEY: Optional. Location to the RSA public key

To generate test public/private key pairs, you can run cdxgen by passing the argument --generate-key-and-sign. The generated json file would have an attribute called signature, which could be used for validation. jwt.io is a known site that could be used for such signature validation.

SBOM signing

Verifying the signature

Use the bundled cdx-verify command, which supports verifying a single signature added at the bom level.

npm install -g @cyclonedx/cdxgen
cdx-verify -i bom.json --public-key public.key

Custom verification tool (Node.js example)

There are many libraries available to validate JSON Web Tokens. Below is a javascript example.

# npm install jws
const jws = require("jws");
const fs = require("fs");
// Location of the SBOM json file
const bomJsonFile = "bom.json";
// Location of the public key
const publicKeyFile = "public.key";
const bomJson = JSON.parse(fs.readFileSync(bomJsonFile, "utf8"));
// Retrieve the signature
const bomSignature = bomJson.signature.value;
const validationResult = jws.verify(bomSignature, bomJson.signature.algorithm, fs.readFileSync(publicKeyFile, "utf8"));
if (validationResult) {
  console.log("Signature is valid!");
} else {
  console.log("SBOM signature is invalid :(");
}

Automatic usage detection

For node.js projects, lock files are parsed initially, so the SBOM would include all dependencies, including dev ones. An AST parser powered by babel-parser is then used to detect packages that are imported and used by non-test code. Such imported packages would automatically set their scope property to required in the resulting SBOM. You can turn off this analysis by passing the argument --no-babel. Scope property would then be set based on the dev attribute in the lock file.

This attribute can be later used for various purposes. For example, dep-scan uses this attribute to prioritize vulnerabilities. Unfortunately, tools such as dependency track, do not include this feature and might over-report the CVEs.

With the argument --required-only, you can limit the SBOM only to include packages with the scope "required", commonly called production or non-dev dependencies. Combine with --no-babel to limit this list to only non-dev dependencies based on the dev attribute being false in the lock files.

For go, go mod why command is used to identify required packages. For php, composer lock file is parsed to distinguish required (packages) from optional (packages-dev).

Automatic services detection

cdxgen can automatically detect names of services from YAML manifests such as docker-compose, Kubernetes, or Skaffold manifests. These would be populated under the services attribute in the generated SBOM. With evinse, additional services could be detected by parsing common annotations from the source code.

Conversion to SPDX format

Use the CycloneDX CLI tool for advanced use cases such as conversion, diff and merging.

Including .NET Global Assembly Cache dependencies in the results

For dotnet and dotnet-framework, SBOM could include components without a version number. Often, these components begin with the prefix System..

Global Assembly Cache (GAC) dependencies (System Runtime dependencies) must be made available in the build output of the project for version detection. A simple way to have the dotnet build copy the GAC dependencies into the build directory is to place the file Directory.Build.props into the root of the project and ensure the contents include the following:

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemDefinitionGroup>
  <Reference>
    <Private>True</Private>
  </Reference>
</ItemDefinitionGroup>
</Project>

Then, run cdxgen cli with the --deep argument.

License

Permission to modify and redistribute is granted under the terms of the Apache 2.0 license. See the LICENSE file for the full license.

Integration as library

cdxgen is ESM only and could be imported and used with both deno and Node.js >= 20

Minimal example:

import { createBom, submitBom } from "npm:@cyclonedx/cdxgen@^9.0.1";

See the Deno Readme for detailed instructions.

import { createBom, submitBom } from "@cyclonedx/cdxgen";
// bomNSData would contain bomJson
const bomNSData = await createBom(filePath, options);
// Submission to dependency track server
const dbody = await submitBom(args, bomNSData.bomJson);

Contributing

Please check out our contribute to CycloneDX/cdxgen documentation if you are interested in helping.

Before raising a PR, please run the following commands.

corepack enable pnpm
pnpm install:frozen
# Generate types using jsdoc syntax
pnpm run gen-types
# Run biomejs formatter and linter with auto fix
pnpm run lint
# Run jest tests
pnpm test

Testing main branch

Use pnpm add -g command to quickly test the main branch.

corepack pnpm bin -g
corepack pnpm setup
corepack pnpm add -g --allow-build @appthreat/sqlite3 https://github.com/CycloneDX/cdxgen
cdxgen --help

Sponsors

changelog

Changelog

9.1.4 (2025-09-03)

Bug Fixes

  • 208c06e #8448 peer edge crash due to no parent or detached node (#8448) (@milaninfy)
  • 3b54e9c #8534 installLinks works with transitive external file dependencies (#8534) (@owlstronaut)
  • ed71acb #8473 arborist: #8472 Keeps the registry protocol when modifying resolve URL (#8473) (@Jeepsboucher, Jean-Philippe Boucher)

    Chores

  • 619d43e #8540 fix pruner and reify tests for optional peer deps (#8540) (@liamcmitchell, Liam Mitchell)

9.1.3 (2025-07-24)

Bug Fixes

  • 6dbe21a #8436 local transitive dependencies with --install-links=true (@owlstronaut)
  • 8042af3 #8431 prune optional peer dependencies that are no longer explicitly depended on (#8431) (@G-Rath)
  • c457c75 #8430 remove duplicate loop (#8430) (@G-Rath)
  • f7b056f #8400 clean up audit-report code (#8400) (@wraithgar)
  • f163d01 #8372 use omit when checking ideal tree engine (#8372) (@owlstronaut)

    Chores

  • 3f60b5f #8383 @npmcli/template-oss@4.24.4 (#8383) (@wraithgar)
  • 01f8cc6 #8381 @npmcli/template-oss@4.24.3 (#8381) (@wraithgar)

9.1.2 (2025-06-11)

Bug Fixes

  • 887385d #8356 arborist: use hosted-git-info to correctly parse resolved git urls (#8356) (@milaninfy)

9.1.1 (2025-05-21)

Bug Fixes

  • 8f6eb6b #8312 arborist: fix file dep making wrong link (#8312) (@alexsch01)

9.1.0 (2025-05-15)

Features

  • 57aa89f #8265 use run by default and run-script as the alias (#8265) (@owlstronaut)

    Bug Fixes

  • d5bcf38 #8268 arborist: Add better error message when lockfile is malformed (#8268) (@owlstronaut)
  • 5e1fed9 #8290 arborist: improve README markdown (#8290) (@mbtools)
  • 0886e7a #8222 preserve registry path when replacing a host (@owlstronaut)
  • 815311b #8206 arborist: workspaces correctly path to file: packages from overrides (@owlstronaut)

9.0.2 (2025-04-08)

Bug Fixes

  • a96d8f6 #8184 arborist: omit failed optional dependencies from installed deps (#8184) (@owlstronaut, @zkat)
  • 04f53ce #8180 arborist: safely fallback on unresolved $ dependency references (#8180) (@owlstronaut)
  • 885accd #8185 arborist: only replace hostname for resolved URL (#8185) (@billy-briggs-dev)
  • 8b7bb12 #8168 arborist: Allow downgrades to hoisted version dedupe workspace i… (#8168) (@owlstronaut)
  • 1642556 #8160 arborist: workspaces respect overrides on subsequent installs (#8160) (@owlstronaut)

    Chores

  • 88a7b52 #8174 add load-virtual and reify tests for workspace override test coverage (#8174) (@owlstronaut, @TrevorBurnham)

9.0.1 (2025-03-05)

Bug Fixes

  • b9225e5 #8089 resolve override conflicts and apply correct versions (#8089) (@owlstronaut)
  • d586f3b #8117 remove duplicate var (#8117) (@TrevorBurnham)
  • 811ca29 #8115 stop working around bug fixed in npm-package-arg@12.0.2 (@TrevorBurnham)

9.0.0 (2024-12-16)

Features

  • a7bfc6d #7972 trigger release process (#7972) (@wraithgar)

    Chores

  • a07f4e0 #7976 @npmcli/template-oss@4.23.6 (@wraithgar)

9.0.0-pre.1 (2024-12-06)

⚠️ BREAKING CHANGES

  • Upon publishing, in order to apply a default "latest" dist tag, the command now retrieves all prior versions of the package. It will require that the version you're trying to publish is above the latest semver version in the registry, not including pre-release tags.
  • bun.lockb files are now included in the strict ignore list during packing

    Features

  • f3ac7b7 #7939 no implicit latest tag on publish when latest > version (#7939) (@reggi, @ljharb)

    Dependencies

  • c0bcc2a #7955 walk-up-path@4.0.0
  • 4bf1901 #7945 @npmcli/metavuln-calculator@9.0.0
  • ca84b22 #7945 pacote@21.0.0

9.0.0-pre.0 (2024-11-26)

⚠️ BREAKING CHANGES

  • --ignore-scripts now applies to all lifecycle scripts, include prepare
  • npm will no longer fall back to the old audit endpoint if the bulk advisory request fails.
  • @npmcli/arborist now supports node ^20.17.0 || >=22.9.0

    Features

  • 6995303 #7850 adds --ignore-scripts flag to pack (@reggi)

    Bug Fixes

  • 080a0f2 #7911 remove old audit fallback request (@wraithgar)
  • 3ffc08b #7831 for @npmcli/arborist sets node engine range to ^20.17.0 || >=22.9.0 (@reggi)

    Dependencies

  • 7dbef6f #7850 pacote@20.0.0
  • 75a3f12 #7859 remove unused deps (#7859)

    Chores

  • 6edfe2f #7937 @npmcli/template-oss@4.23.5 (@wraithgar)

8.0.0 (2024-10-03)

⚠️ BREAKING CHANGES

7.5.4 (2024-07-09)

Bug Fixes

  • 6f33d74 #7579 arborist: safeguard against null node.target in flag calculation (#7579) (@AmirSa12)
  • a8e666e #7602 arborist: condition to include name field in package-lock fixed (#7602) (@milaninfy)

7.5.3 (2024-05-29)

Bug Fixes

  • 2d1d8d0 #7559 adds node: specifier to all native node modules (#7559) (@reggi)

Chores

  • 4a36d78 #7568 fix linting in arborist debugger (@wraithgar)

7.5.2 (2024-05-15)

Bug Fixes

  • 12f103c #7533 add first param titles to logs where missing (#7533) (@lukekarrys)
  • e290352 #7499 revert DepsQueue to re-sort on pop() (#7499) (@lukekarrys)
  • 56a27fa #7494 avoid caching manifests as promises (@wraithgar)
  • 722c0fa #7463 limit packument cache size based on heap size (@wraithgar)
  • effe910 #7475 dont omit license from stored manifests (#7475) (@lukekarrys)

Dependencies

Chores

7.5.1 (2024-04-30)

Bug Fixes

  • a1b95eb #7453 linting: no-unused-vars (@wraithgar)
  • abcbc54 #7430 reify: cleanup of Symbols (#7430) (@wraithgar)
  • 57ebebf #7418 update repository.url in package.json (#7418) (@wraithgar)

Dependencies

7.5.0 (2024-04-25)

Features

  • 9123de4 #7373 do all ouput over proc-log events (@lukekarrys)
  • 9622597 #7339 refactor terminal display (#7339) (@lukekarrys)

Bug Fixes

  • 78447d7 #7399 prefer fs/promises over promisify (#7399) (@lukekarrys)
  • 6512112 #7378 use proc-log for all timers (@lukekarrys)

Dependencies

Chores

  • dd39de7 #7411 disable selflink test on apple silicon (#7411) (@lukekarrys)

7.4.2 (2024-04-10)

Bug Fixes

  • ef381b1 #7363 use @npmcli/redact for url cleaning (#7363) (@lukekarrys)

7.4.1 (2024-04-03)

Bug Fixes

  • 8cab136 #7324 ensure maxSockets is respected (#7324) (@lukekarrys)
  • 9bffa13 #7320 query: properly return :missing nodes (#7320) (@wraithgar)

Dependencies

Chores

  • 8cab136 #7324 add smoke-test for large prod installs (@lukekarrys)

7.4.0 (2024-02-28)

Features

  • 2366edc #7218 query: add :vuln pseudo selector (@wraithgar)

Bug Fixes

  • 6d1789c #7237 Arborist code cleanup (#7237) (@wraithgar)
  • ed17276 #7218 query-selector: don't look up private packages on :outdated (@wraithgar)

Dependencies

7.3.1 (2024-01-24)

Bug Fixes

  • d3f1845 #7124 clean up idealTree code (@wraithgar)
  • 8382fb3 #7126 fetch full packument so that libc can be assessed (@styfle, @ljharb)

Dependencies

7.3.0 (2024-01-10)

Features

  • 6673c77 #6914 add --libc option to override platform specific install (#6914) (@wraithgar, @Brooooooklyn)

7.2.2 (2023-12-06)

Bug Fixes

  • ae2d982 #7027 arborist: node.target can be null when it is a file dep or symlink (#7027) (@ljharb, @lukekarrys)
  • f875caa #6998 clean up shrinkwrap code (#6998) (@wraithgar)

Chores

  • f656b66 #7062 @npmcli/template-oss@4.21.3 (#7062) (@lukekarrys)
  • 9754b17 #7051 use global npm for workspace tests (@lukekarrys)
  • 3891757 #7051 @npmcli/template-oss@4.21.2 (@lukekarrys)

7.2.1 (2023-10-31)

Dependencies

7.2.0 (2023-10-02)

Features

  • 81a460f #6732 add package-lock-only mode to npm query (@wraithgar)
  • 0d29855 #6732 add no-package-lock mode to npm audit (@wraithgar)

Bug Fixes

  • 0860159 #6829 ensure workspace links query parents correctly (#6829) (@Carl-Foster)
  • bef7481 #6782 query with workspace descendents (#6782) (@bdehamer)

Dependencies

7.1.0 (2023-09-08)

Features

  • 1c93c44 #6755 Add --cpu and --os option to override platform specific install (#6755) (@yukukotani)

7.0.0 (2023-08-31)

Features

  • fb31c7e trigger release process (@lukekarrys)

7.0.0-pre.0 (2023-08-31)

⚠️ BREAKING CHANGES

  • support for node <=16.13 has been removed
  • support for node 14 has been removed

Bug Fixes

Dependencies

6.3.0 (2023-07-05)

Features

Bug Fixes

  • c61e037 #6626 use new load/create syntax for package-json (@wraithgar)

Dependencies

6.2.10 (2023-06-21)

Bug Fixes

  • f5b9713 #6549 make omit flags work properly with workspaces (#6549) (@Rayyan98, @lukekarrys)
  • 40d7e09 #6555 remove unnecessary package.json values (#6555) (@lukekarrys)

6.2.9 (2023-05-03)

Bug Fixes

Dependencies

6.2.8 (2023-04-19)

Bug Fixes

  • 82879f6 #6225 lazy loading of arborist and pacote (#6225) (@wraithgar)

Dependencies

6.2.7 (2023-04-05)

Dependencies

6.2.6 (2023-03-30)

Dependencies

6.2.5 (2023-03-08)

Bug Fixes

  • 8a78c6f #6222 only add directories we made to _sparseTreeRoots (#6222) (@nlf)

6.2.4 (2023-03-02)

Bug Fixes

  • 962a12e #6193 arborist: dependencies from registries with a peerDependency on a workspace (#6193) (@ixalon)

Dependencies

6.2.3 (2023-02-22)

Bug Fixes

  • 6ed3535 #6175 linked-strategy lifecycle missing bins (#6175) (@fritzy)

Documentation

6.2.2 (2023-02-07)

Bug Fixes

  • 12ec7ee remove unused package.json scripts (@lukekarrys)

Dependencies

6.2.1 (2023-02-01)

Bug Fixes

  • 72a7a59 #6095 only save package-lock when truly finished (@wraithgar)

Dependencies

6.2.0 (2023-01-25)

Features

  • 8d6d851 #6078 added --install-strategy=linked (#6078) (@fritzy)

6.1.6 (2023-01-12)

Bug Fixes

  • b584af0 #6022 remove unneeded param default (@wraithgar)
  • 2ba1171 streamline workspace loading code (@wraithgar)
  • 2383deb #6037 clean urls from arborist, owner, and ping commands (#6037) (@lukekarrys)
  • c52cf6b #5960 properly handle directory, file, git and alias specs in overrides (@nlf)

6.1.5 (2022-12-07)

Bug Fixes

  • 83fb125 #5923 audit package mismatch in special case (@fritzy)

Dependencies

6.1.4 (2022-11-30)

Bug Fixes

  • 80c6c4a #5907 do not reset hidden lockfile data before saving (#5907) (@nlf)

6.1.3 (2022-11-16)

Bug Fixes

  • 3f13818 #5859 refactor / inline single use code (#5859) (@wraithgar)

6.1.2 (2022-11-09)

Dependencies

6.1.1 (2022-11-02)

Bug Fixes

  • 1f5382d #5789 don't set stdioString for any spawn/run-script calls (@lukekarrys)
  • 0c5834e #5758 use hosted-git-info to parse registry urls (#5758) (@lukekarrys)

Dependencies

6.1.0 (2022-10-26)

Features

  • 3dd8d68 #5751 sort and quote yarn lock keys according to yarn rules (#5751) (@wraithgar, @shalvah)

Dependencies

6.0.0 (2022-10-19)

Features

  • 586e78d empty commit to trigger all workspace releases (@lukekarrys)

6.0.0-pre.5 (2022-10-19)

⚠️ BREAKING CHANGES

  • deprecate boolean install flags in favor of --install-strategy
    • deprecate --global-style, --global now sets --install-strategy=shallow
    • deprecate --legacy-bundling, now sets --install-strategy=nested
  • this package no longer attempts to change file ownership automatically

Features

  • de2d33f add --install-strategy=hoisted|nested|shallow, deprecate --global-style, --legacy-bundling (#5709) (@fritzy)
  • 475e9b6 #5703 do not alter file ownership (@nlf)

Bug Fixes

  • 1afe5ba account for new npm-package-arg behavior (@wraithgar)

Dependencies

6.0.0-pre.4 (2022-10-05)

Features

  • 9609e9e #5605 use v3 lockfiles by default (#5605) (@fritzy)

Dependencies

6.0.0-pre.3 (2022-09-30)

⚠️ BREAKING CHANGES

  • npm pack now follows a strict order of operations when applying ignore rules. If a files array is present in the package.json, then rules in .gitignore and .npmignore files from the root will be ignored.

Features

  • 3ae796d implement new npm-packlist behavior (@lukekarrys)

6.0.0-pre.2 (2022-09-23)

Features

  • ebf167b add :outdated pseudo selector (@nlf)

Documentation

  • 8402fd8 #5547 add :outdated pseudo selector to docs (@nlf)

Dependencies

6.0.0-pre.1 (2022-09-14)

Bug Fixes

  • f3b0c43 keep saveTypes separate for each add (@wraithgar)

6.0.0-pre.0 (2022-09-08)

⚠ BREAKING CHANGES

  • workspaces: all workspace packages are now compatible with the following semver range for node: ^14.17.0 || ^16.13.0 || >=18.0.0

Features

  • e95017a #5485 feat(workspaces): update supported node engines in package.json (@lukekarrys)
  • 09c46e8 #5324 feat(arborist): allow for selectors and function names with :semver pseudo selector (@nlf)

Bug Fixes

  • fe926ed #5484 fix: don't mark workspaces as invalid if installing links (@wraithgar)
  • 548e70e #5376 fix: link.target setter (@wraithgar)
  • 2db6c08 #5376 fix: loadActual cleanup (@wraithgar)

Documentation

  • 285b39f #5324 docs: add documentation for expanded :semver selector (@nlf)

5.6.1 (2022-08-31)

Bug Fixes

  • 1e84102 #5350 fix: create links relative to the target (@wraithgar)
  • ea5e3a3 #5350 fix: inline single-use functions (@wraithgar)
  • 645c680 #5329 fix: update index.js spelling error in comment (@KevinBrother)
  • bd2ae5d #5323 fix: linting (@wraithgar)

Dependencies

5.6.0 (2022-08-17)

Features

  • arborist: add :overridden pseudo selector (d221f72)
  • arborist: add overridden getter to Node class (e6d4304)
  • query: support :overridden pseudo selector (0d4ed0f)

5.5.0 (2022-08-10)

Features

  • arborist: add option to forcibly skip loading a virtual tree (96b6781)

Bug Fixes

  • query: tell arborist to load an actual tree, not a virtual one (9078e27)

Dependencies

5.4.0 (2022-08-03)

Features

  • add --replace-registry-host=<npmjs|always|never> (#4860) (703dbbf)
  • add --replace-registry-host=<npmjs|always|never>|<hostname> (703dbbf)
  • add npm query cmd (#5000) (3c024ac)

Bug Fixes

  • arborist: fix bare attribute queries (#5248) (8233fca)
  • arborist: pass the edge to fromPath in order to determine correct path (#5233) (050284d)
  • arborist: use the sourceReference root rather than the node root for overrides (#5227) (47cc95d), closes #4395

Dependencies

5.3.1 (2022-07-27)

Bug Fixes

5.3.0 (2022-07-11)

Features

  • arborist: add support for dependencies script (#5094) (e9b4214)

5.2.3 (2022-06-23)

Dependencies

5.2.2 (2022-06-22)

Bug Fixes

Dependencies

5.2.1 (2022-06-01)

Bug Fixes

  • arborist: use rawSpec for bundled and shrinkwrapped deps (#4963) (646b6b5)

5.2.0 (2022-05-10)

Features

  • add flag --omit-lockfile-registry-resolved (#4874) (bfb8bcc)

Bug Fixes

5.1.1 (2022-04-26)

Dependencies

5.1.0 (2022-04-19)

Features

  • arborist: add support for installLinks (0ebadf5)

Bug Fixes

  • arborist: when replacing a Link with a Node, make sure to remove the Link target from the root (3d96494)

5.0.6 (2022-04-13)

Bug Fixes

  • arborist: dont skip adding advisories to audit based on name/range (aa4a4da), closes #4681
  • arborist: when reloading an edge, also refresh overrides (4d676e3)

5.0.5 (2022-04-06)

Bug Fixes

Dependencies

5.0.4 (2022-03-31)

Bug Fixes

  • arborist: handle link nodes in old lockfiles correctly (6f9cb49)
  • arborist: identify and repair invalid nodes in the virtual tree (bd96ae4)
  • arborist: make sure resolveParent exists before checking props (18b8b94)
  • make sure we loadOverrides on the root node in loadVirtual() (99d8845)
  • only call npmlog progress methods if explicitly requested (#4644) (668ec7f), closes #3314

5.0.3 (2022-03-17)

Bug Fixes

  • arborist: _findMissingEdges missing dependency due to inconsistent path separators (#4261) (0e7511d)
  • arborist: save workspace version (#4578) (e9a2981)

Dependencies

5.0.2 (2022-03-10)

Bug Fixes

  • rebuild: don't run lifecycle scripts twice on linked deps (#4529) (fbdb431)

Documentation

5.0.1 (2022-03-08)

Bug Fixes

  • set proper workspace repo urls in package.json (#4476) (0cfc155)

2.0.0

  • BREAKING CHANGE: root node is now included in inventory
  • All parent/target/fsParent/etc. references set in root setter, rather than the hodgepodge of setters that existed before.
  • treeCheck function added, to enforce strict correctness guarantees when ARBORIST_DEBUG=1 in the environment (on by default in Arborist tests).

1.0.0

  • Release for npm v7 beta
  • Fully functional

0.0.0