Skip to main content

NodeConfig

Configures and enables the Node.js platform. Docs: https://moonrepo.dev/docs/config/toolchain#node

Index

Properties

optionaladdEnginesConstraint

addEnginesConstraint?: boolean = ```ts true ```

When version is defined, syncs the version as a constraint to package.json engines.

binExecArgs

binExecArgs: string[]

Arguments to automatically pass to all tasks that execute the node binary.

bun

bun: null | BunpmConfig

Options for Bun, when used as a package manager.

optionaldedupeOnLockfileChange

dedupeOnLockfileChange?: boolean = ```ts true ```

Automatically dedupes the lockfile when dependencies have changed.

dependencyVersionFormat

dependencyVersionFormat: NodeVersionFormat = NodeVersionFormat

The dependency version format to use when syncing projects as dependencies.

inferTasksFromScripts

inferTasksFromScripts: boolean

Automatically infer moon tasks from package.json scripts.

npm

Options for npm, when used as a package manager.

packageManager

The package manager to use for installing dependencies.

plugin

plugin: null | string

Location of the WASM plugin to use for Node.js support.

pnpm

pnpm: null | PnpmConfig

Options for pnpm, when used as a package manager.

rootPackageOnly

rootPackageOnly: boolean

Assumes only the root package.json is used for dependencies. Can be used to support the "one version policy" pattern.

optionalsyncProjectWorkspaceDependencies

syncProjectWorkspaceDependencies?: boolean = ```ts true ```

Automatically syncs moon project-to-project relationships as dependencies for each package.json in the workspace.

syncVersionManagerConfig

syncVersionManagerConfig: null | NodeVersionManager = null | NodeVersionManager

When version is defined, syncs the version to the chosen config.

version

version: null | string

The version of Node.js to download, install, and run node tasks with.

@envvar

MOON_NODE_VERSION

yarn

yarn: null | YarnConfig

Options for Yarn, when used as a package manager.