dependent-build

raw JSON →
0.1.6 verified Sat Apr 25 auth: no javascript

Configures multi-project dependency builds to ensure downstream projects are not broken. Version 0.1.6 is an early-stage (pre-1.0) tool that reads a YAML configuration file and triggers dependent project builds, typically in CI pipelines. It targets small repositories and enforces an order of builds when dependencies change. Only supports Node >= 4. The API and configuration format may change.

error Error: Cannot find module 'js-yaml'
cause Missing dependency js-yaml when using dependent-build programmatically without installing it.
fix
Run 'npm install js-yaml' as the package declares it as a peer dependency.
error dependent-build: config file not found: dependent-build.yml
cause Configuration file is missing or not located at the expected path.
fix
Ensure a 'dependent-build.yml' file exists in the root directory or pass a custom 'config' path.
error dependent-build: Project 'X' dependency cycle detected
cause Circular dependency in the YAML configuration (e.g., A depends on B, B depends on A).
fix
Remove circular dependency by restructuring project dependencies.
breaking Configuration format and API may change without warning in future versions.
fix Pin to a specific minor version (e.g., 0.1.x) and test upgrades.
deprecated No deprecated features documented yet.
gotcha Only supports Node >= 4. If CI matrix includes older Node versions, builds will fail.
fix Use node-version-check to skip dependent-build on older Node versions.
breaking YAML configuration file must exist at the project root; otherwise, the tool throws an error.
fix Create a 'dependent-build.yml' file or provide custom path via options.
npm install dependent-build
yarn add dependent-build
pnpm add dependent-build

Shows programmatic usage: import named function, call with options, and handle promise resolution.

import { dependentBuild } from 'dependent-build';

// Configuration example (dependent-build.yml):
// projects:
//   - name: lib-a
//     depends:
//       - lib-b
//   - name: lib-c
//     depends:
//       - lib-a
//       - lib-b

dependentBuild({
  config: 'dependent-build.yml',
  cwd: process.cwd(),
  silent: false
}).then(() => {
  console.log('Build order resolved and triggered');
}).catch(err => {
  console.error('Build failed:', err);
});