# NPM<no value>

== Description

The npm crawler looks recursively for all npm dependencies updates from a specific root directory.
Then for each of them, it tries to update them.

== Manifest
=== Parameters

{{< autodiscoveryparameters "npm" >}}

==== Example

===== Basic Example

[source,yaml]
----
# updatecli.d/npm.yaml
autodiscovery:
  crawlers:
    npm:
      rootdir: "."
      versionfilter:
        kind: semver
        pattern: minor
----

===== Private Registry Example

The following example shows how to configure npm autodiscovery to work with a private npm registry:

[source,yaml]
----
# updatecli.d/npm-private.yaml
autodiscovery:
  crawlers:
    npm:
      rootdir: "."
      # URL of your private npm registry
      url: "https://npm.example.com"
      # Authentication token (use environment variables for security)
      registrytoken: "${NPM_TOKEN}"
      # Optional: path to custom .npmrc file
      npmrcpath: "/path/to/.npmrc"
      versionfilter:
        kind: semver
        pattern: ">=1.0.0"
----

NOTE: The `url`, `registrytoken`, and `npmrcpath` parameters are propagated to all generated npm resource specs, allowing consistent authentication across all discovered dependencies.
