fynjs API
    Preparing search index...

    Module @fynpo/base

    NPM version Build Status

    @fynpo/base

    The package-graph and config layer under fynpo and fyn.

    It answers the questions a monorepo tool keeps asking: which directories in this repo are packages, how do they depend on each other, what order can they be built in, and what does the repo's fynpo config say. Nothing here drives a command - it's the shared model that fynpo's commands and fyn's local-package resolution are both built on.

    npm install @fynpo/base
    
    import { FynpoDepGraph, FynpoConfigManager, readFynpoPackages } from "@fynpo/base";

    const graph = new FynpoDepGraph({ cwd: process.cwd() });
    await graph.resolve();

    // packages found, and how they relate
    console.log(Object.keys(graph.packages.byName));

    Reads the repo's packages and builds the dependency graph between them - direct and indirect, across dependencies, devDependencies, optionalDependencies and peerDependencies. Gives you topological ordering for running tasks in dependency order, and resolves a name@<semver> reference to the local name@version that satisfies it.

    Its autoSearched flag records whether packages were discovered by walking the repository rather than explicit scan patterns. Auto-search is enabled by default and stops at package directories, so nested demos and test fixtures are not discovered automatically.

    With auto-search enabled, packages.include adds explicit paths without filtering out automatically discovered packages. These paths can cross package boundaries. For example, include only dev-tools/create-fynapp/examples/* to manage those examples alongside the ordinary packages auto-search finds. Excludes still apply to all packages.

    With packages.autoSearch: false, include supplies the exclusive scan patterns instead, defaulting to packages/* when empty. The legacy packages array supplies both additive includes and the publish allow list; its discovery scope can therefore widen. To preserve a restricted discovery set, use object-form excludes or disable auto-search explicitly.

    Set packages.autoSearch.stopOnPackageJsonFound: false to continue below package directories. With this opt-in, nested packages remain in the local dependency graph, but carry managed: false unless their path directly matches packages.include; fynpo skips those packages for lifecycle and release commands while still maintaining their local dependency ranges during prepare.

    stopOnPackageJsonFound affects discovery only; it has no effect when auto-search is disabled.

    Loads and normalizes the repo's fynpo.json / fynpo.config.js.

    The lower-level pieces if you want the package list or the dep relations without the graph object.

    Helpers for parsing and formatting package references and dependency sections.

    Exported as a namespace (import { caching } from "@fynpo/base") - input/output hashing used for fynpo's task caching: processInput, processOutput, processLifecycleInput, readHashDigest.

    Small utilities shared by the tools.

    See the full API reference for every function, option, and type.

    Licensed under the Apache License, Version 2.0.

    caching
    FynpoConfigError
    FynpoConfigManager
    FynpoDepGraph
    PackageRef
    AutoSearchConfig
    ConfigOptions
    DEP_SECTIONS
    FynpoPackageInfo
    FynpoPackages
    FynpoTopoPackages
    GitignoreMatcher
    PackageBasicInfo
    PackageDepData
    PackageDepRef
    PackageDepRelation
    PackagesConfig
    ReadFynpoOptions
    posixify
    formatFynpoConfigError
    getDepSection
    includeFilter
    isFynpoConfigError
    makeDepStep
    makeGitignoreMatcher
    outOfScopePackages
    packageScope
    pkgId
    pkgInfoId
    readJson
    readJsonSync
    readPkgJson
    readPkgJsonSync
    resolvePackagesConfig
    scanPatterns
    writeJson
    writeJsonSync