NodeProjectConfig
How nodeProject is configured. image and source are required, so
interface in bldr/node-tools
How nodeProject is configured. image and source are required, so
omitting either is a compile error rather than a failure at build time.
Properties
arch: string
property
Platform to select from a multi-architecture image member. Ignored for the other source kinds. Defaults to the architecture of the node the build runs on, since these pods run there.
build: boolean | NodeTargetBuildOptions | WithId<NodeTargetBuildOptions>[]
property
The project's build output. Off unless asked for, because what a build produces and what it is called is the one thing no default can guess.
See NodeTargetBuildOptions, WithId.
cache: false
property
Set false to run every npm command against an empty download cache
instead of the workspace-wide one.
A cache cannot change what a build produces — its content never reaches an invocation cache key — so this is for the case where that guarantee is itself under test, not for correctness in ordinary builds.
deps: Record<string, Directory>
property
Other members' built npm packages, chained in as local dependencies
by package name -> built tree. Each is vendored at .bldr-deps/<dir> and
present for both npm ci and the build, so npm resolves it with no
registry. The consumer's package.json declares it as an ordinary
dependency pointing at that path:
"dependencies": { "@bldr/design-system": "file:.bldr-deps/bldr-design-system" }Because it is a file: directory dependency, a change flows straight
through on the next build — npm relinks it, no lockfile churn.
See Directory.
env: Record<string, string>
property
Extra environment variables for both the install and the build.
generated: { … }[]
property
Generated trees to layer into the project before building — a gRPC client, a codegen output. Grafted at the content level, so nothing is copied inside a container and the source member stays untouched.
See Directory.
image: any
property
The container rootfs the build runs in: a Node image member, a
ContainerImage (whose env and WORKDIR are honoured), or a raw
rootfs tree.
lint: boolean | BiomeLinterOptions | WithId<BiomeLinterOptions>[]
property
The lint gate. Opt in with true, which lints with Biome.
Off by default for the same reason bldr/rust-tools leaves clippy off:
a linter's verdict moves with its version, so switching it on everywhere
at once turns a tool upgrade into a repo-wide failure. A project opts in
when it is clean and intends to stay that way.
See BiomeLinterOptions, WithId.
lockfileTarget: boolean
property
Set false to keep this member's lockfile output target out of
nodeProject's hands — for a member that registers its own.
By default the member's first nodeProject registers lockfile
(see the factory).
lsp: boolean | NodeLspOptions
property
A TypeScript language server for this project (lsp).
Off by default, because it runs node_modules/.bin/typescript-language-server
and so needs typescript-language-server in the project's
devDependencies. Set true once it is there.
manifests: string[]
property
Which files key the dependency install. These are the only files
NodeProject.nodeModules sees, which is what makes its cache
independent of source edits — widening this to match source files would
defeat the split. Defaults to package.json + package-lock.json, and
.npmrc where the project has one.
resources: DagResources
property
What each of this project's pods is granted: the DAG's hard memory limit, page cache included, and what the node reserves for it. Omit for the node's default share — enough for an install or a bundle, not for a test runner that keeps several workers' worth of a DOM in memory.
See DagResources.
scope: Scope
property
Where this project's work appears in the build tree, one child per command
(npm ci, npm run build).
Required — see CargoConfig.scope: a builder with nowhere to put
its work lands wherever its first consumer happened to be.
See Scope.
source: Directory
property
The project source tree — package.json, the lockfile, src, …
See Directory.
test: boolean | NodeTestOptions | WithId<NodeTestOptions>[]
property
The unit test suite.
Opt in with true. Unlike a Rust crate, which has one Cargo, a member
here often has several projects: a release build, a Storybook, a dev
server, a docs generator. Declaring targets from every one of them gave
bldr/ui three test targets under three different scopes. So the
project that speaks for the member says so, and the rest stay quiet.
See NodeTestOptions, WithId.
typecheck: boolean | NodeCheckOptions | WithId<NodeCheckOptions>[]
property
The type check. Opt in with true, same reasoning as test.
See NodeCheckOptions, WithId.
visual: boolean | NodeVisualOptions | WithId<NodeVisualOptions>[]
property
The visual snapshot suite, and the baselines output that re-renders
its snapshots. Off unless asked for: most projects have none.
See NodeVisualOptions, WithId.