interface PackageJson {
    bundledDependencies?: Record<string, string>;
    catalogs?: Record<string, Record<string, string>>;
    dependencies?: Record<string, string>;
    description?: string;
    devDependencies?: Record<string, string>;
    engines?: Record<string, string>;
    fuman?: {
        distOnlyFields?: Record<string, unknown>;
        jsr?: "skip" | "only";
        keepScripts?: string[];
        npm?: "skip" | "only";
        ownVersioning?: boolean;
        private?: boolean;
    };
    homepage?: string;
    keywords?: string[];
    license?: string;
    name?: string;
    optionalDependencies?: Record<string, string>;
    packageManager?: string;
    peerDependencies?: Record<string, string>;
    pnpm?: { overrides: Record<string, string> };
    private?: boolean;
    repository?: string | { type: string; url: string };
    scripts?: Record<string, string>;
    type?: "module" | "commonjs";
    version?: string;
    workspaces?: string[];
    [key: string]: any;
}

Indexable

  • [key: string]: any

Properties

bundledDependencies?: Record<string, string>
catalogs?: Record<string, Record<string, string>>
dependencies?: Record<string, string>
description?: string
devDependencies?: Record<string, string>
engines?: Record<string, string>
fuman?: {
    distOnlyFields?: Record<string, unknown>;
    jsr?: "skip" | "only";
    keepScripts?: string[];
    npm?: "skip" | "only";
    ownVersioning?: boolean;
    private?: boolean;
}

fuman-specific package.json fields

Type declaration

  • OptionaldistOnlyFields?: Record<string, unknown>

    any additional fields that will be shallowly merged into the resulting package.json. for more complex modifications than shallow merging, consider using build.config.js

  • Optionaljsr?: "skip" | "only"

    whether the package should be published to jsr (skip – it won't be published to jsr, only – it will only be published to jsr)

  • OptionalkeepScripts?: string[]

    by default @fuman/build strips all scripts, but you can keep some of them by passing their names here

  • Optionalnpm?: "skip" | "only"

    whether the package should be published to npm (skip – it won't be published to npm, only – it will only be published to npm)

  • OptionalownVersioning?: boolean

    whether this package has its own versioning scheme (be careful with this option! this might break cross-release semver compatibility)

  • Optionalprivate?: boolean

    whether this package should not be published

homepage?: string
keywords?: string[]
license?: string
name?: string
optionalDependencies?: Record<string, string>
packageManager?: string
peerDependencies?: Record<string, string>
pnpm?: { overrides: Record<string, string> }
private?: boolean
repository?: string | { type: string; url: string }
scripts?: Record<string, string>
type?: "module" | "commonjs"
version?: string
workspaces?: string[]