stackatdocs

.stackat.yml / option

librarian

On this page

Stackpaw Librarian's own settings, in the same .stackat.yml. By default it reads every package.json in the repository, devDependencies included, and raises every upgrade. With librarian you narrow that.

What it does

KeyMeaning
librarian.pathsOnly the package.json files in these files or folders.
librarian.excludeNever these, even inside paths.
librarian.dev_dependenciesfalse leaves devDependencies out.
librarian.security_onlytrue keeps only the issues that fix a known vulnerability.
librarian.ignorePackages Librarian never raises, or some of their versions.
YAML
librarian:
  paths: [apps/web, packages]
  exclude: [examples, "**/e2e"]
  dev_dependencies: false
  security_only: false
  ignore:
    - moment                                # every version
    - {package: react, versions: ["19"]}    # stay on 18 for now

paths and exclude match as in scan: a pattern without a slash at any depth, one with a slash from the top folder, a leading slash at the top only, a folder covers everything below it, * and ? stay in one folder and ** crosses folders.

The dashboard's Settings shows what each repository's file asks for, and can create the file on GitHub with a starter (Settings, .stackat.yml).

To put one upgrade off without a commit, for a while or for good, use Snooze on the dashboard's Packages tab (see the dashboard).

versions takes 19 or 19.x (a whole major), 19.2 or 19.2.* (a minor) or 19.2.0 (one release). When the newest releases are ignored, the issue aims at the newest one that is not. When every newer release is ignored, there is no issue.

The section is Librarian's only. Stackpaw's scan keys in the same file are about infrastructure files and do not change what Librarian reads, and Stackpaw does not read librarian.

When a package leaves

When the settings leave a package out (its package.json is outside paths, it is a devDependency with them off, it is ignored, or it fixes nothing with security_only), its open issue is closed as not planned, with a comment that says which setting did it. When the settings let it back in, it gets a new issue at the next scan.

Type and values

KeyTypeAllowedDefault
librarian.pathsList of files, folders or globs (a single string works too)Up to 50 entries, each up to 200 characters, inside the repositoryThe whole repository
librarian.excludeAs pathsAs pathsNothing excluded
librarian.dev_dependenciestrue or falsetrue
librarian.security_onlytrue or falsefalse
librarian.ignoreList of package names, or {package, versions}Up to 200 entriesNothing ignored

The repository's own file is read, from its top folder. The organisation's stackat-config file does not apply to Librarian yet.

Problems you may see

.stackat.yml: librarian must be a mapping (paths, exclude, dev_dependencies, security_only, ignore)
.stackat.yml: librarian.colour is not a setting (paths, exclude, dev_dependencies, security_only, ignore)
.stackat.yml: librarian.exclude: '../shared' is not a file, folder or glob in the repository
.stackat.yml: librarian.dev_dependencies must be true or false
.stackat.yml: librarian.ignore: 'Not valid!' is not an npm package name
.stackat.yml: librarian.ignore: react: versions must be like 19, 19.x, 19.2.* or 19.2.0

A setting with a problem is left out and its default used. The rest of the section still applies.