Represents an npm maintainer, providing access to their public profile and published packages via the npm registry API.

// Get public profile
const profile = await npm.maintainer('pilmee').info();
console.log(profile.name, profile.email);

// Get packages maintained by this user
const result = await npm.maintainer('pilmee').packages();
result.objects.forEach(o => console.log(o.package.name, o.package.version));

// Paginate
const page2 = await npm.maintainer('pilmee').packages({ size: 25, from: 25 });

Methods

Methods

  • Fetches the public profile of this npm user.

    Internally searches for packages by the maintainer and extracts the publisher profile from the first result — no authentication required.

    GET /-/v1/search?text=maintainer:{username}&size=1

    Parameters

    • Optionalsignal: AbortSignal

      Optional AbortSignal to cancel the request

    Returns Promise<NpmUser>

    The user profile with name and optional email

    If the user has no published packages (404-equivalent: no results)

    const profile = await npm.maintainer('pilmee').info();
    console.log(profile.name); // 'pilmee'
    console.log(profile.email); // 'pilmee@gmail.com'
  • Searches for all packages maintained by this user.

    GET /-/v1/search?text=maintainer:{username}

    Parameters

    • params: MaintainerPackagesParams = {}

      Optional pagination and scoring weights

    • Optionalsignal: AbortSignal

      Optional AbortSignal to cancel the request

    Returns Promise<NpmSearchResult>

    Search results with packages, scores, and total count

    const result = await npm.maintainer('pilmee').packages();
    console.log(`${result.total} packages`);
    result.objects.forEach(o => {
    console.log(o.package.name, o.package.version);
    });