Registry / devops / cheminfo-build

cheminfo-build

JSON →
library1.3.2jsnpmunverified

cheminfo-build is a specialized Command Line Interface (CLI) tool designed to streamline the build process for packages within the ChemInfo ecosystem. It automates common tasks such as bundling JavaScript for various environments (ESM, UMD), generating source maps, and creating minified versions. The package is currently at version 1.3.2 and receives regular updates, primarily for dependency management and minor fixes, with major breaking changes occurring less frequently. For example, v1.3.0 introduced significant changes to module resolution and bundle extensions. Its key differentiators include its focus on ChemInfo package conventions and its ability to handle modern JavaScript module formats (ESM, CJS) with configurable output paths and naming conventions.

npm install cheminfo-build
INSTALL
IMPORT
SIG · CHEMINFO-BUILD
C
cheminfo-build
devopsjavascriptv1.3.2
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

build
import { build } from 'cheminfo-build';
import cheminfoBuild from 'cheminfo-build'; // Incorrect if 'build' is a named export.
While primarily a CLI, `cheminfo-build` also exposes a programmatic API. Assuming a named export `build` for its core functionality based on package name and common patterns for build tools. Verify actual exports from the package's entry files for definitive symbols.
build
const { build } = require('cheminfo-build');
const build = require('cheminfo-build'); // Incorrect if 'build' is a named export, common error.
For CommonJS environments, requiring the package will expose its named exports, such as 'build'. Version 1.3.0 introduced the `.umd.cjs` bundle extension for CommonJS.
CLI Usage
npx cheminfo-build <options>
The primary and most common interaction with `cheminfo-build` is via its command-line interface. Using `npx` ensures you execute the project-local version without global installation.

Demonstrates installation and basic CLI usage of cheminfo-build within a project's `package.json` scripts, including options for entry, output, name, and disabling features like source maps or minification.

npm install -D cheminfo-build // Example package.json with a custom build script // This demonstrates how to integrate cheminfo-build into a typical project workflow. // { // "name": "my-cheminfo-package", // "version": "1.0.0", // "main": "dist/my-cheminfo-package.umd.cjs", // "module": "dist/my-cheminfo-package.esm.mjs", // "exports": { // ".": { // "import": "./dist/my-cheminfo-package.esm.mjs", // "require": "./dist/my-cheminfo-package.umd.cjs" // } // }, // "scripts": { // "build": "cheminfo-build -e src/index.js -o dist -n my-cheminfo-package --no-source-map" // } // } // To execute the build command defined in package.json: // In your terminal: // npm run build // Or, for direct CLI execution without a package.json script: // npx cheminfo-build -e src/index.js -o dist -n my-cheminfo-package --no-minify
cheminfo-build --version
Debug
Known issues
breakingStarting with version 1.3.0, `cheminfo-build` introduced significant breaking changes to its module resolution and bundle output conventions. It now prioritizes the `exports` field in `package.json` for determining module entry points, aligning with modern Node.js practices. Furthermore, UMD bundles are renamed to `.umd.cjs`, and new ESM bundles are generated with the `.esm.mjs` extension.
fix
Review and update your `package.json`'s `exports` field to correctly define module entry points for both CommonJS (`require`) and ESM (`import`) environments. Any build scripts, bundler configurations, or direct import paths that relied on the old `.js` extensions for UMD bundles must be updated to use the new `.umd.cjs` or `.esm.mjs` extensions. Prioritize `package.json` `exports` for robust module resolution over direct file paths.
affects: >=1.3.0
gotcha`cheminfo-build` frequently updates its internal dependencies, as indicated by recent releases. While typically non-breaking, these updates can sometimes introduce subtle changes, compatibility issues with older Node.js versions, or conflicts with other project dependencies if not regularly managed.
fix
Regularly update `cheminfo-build` to its latest patch version (e.g., `npm update cheminfo-build`). Always test your build process after updating, especially within CI/CD pipelines, to catch any unexpected behavior. Consider pinning to a major version (`^1.x.x`) to prevent automatic major version upgrades that could introduce unannounced breaking changes.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module 'cheminfo-build' or 'cheminfo-build/dist/my-package.js'
This error often occurs when attempting programmatic import of the package when it's not correctly installed, or when using an incorrect/deprecated path for a specific bundle file. This is especially relevant after v1.3.0's changes to bundle extensions (.umd.cjs, .esm.mjs) and export precedence.
fix
Ensure `cheminfo-build` is installed as a dependency (`npm install cheminfo-build` or `npm install -D cheminfo-build`). For programmatic use, rely on standard module imports like `import { build } from 'cheminfo-build'` or `const { build } = require('cheminfo-build')`, which correctly utilize `package.json`'s `exports` field for resolution, rather than hardcoding paths to `dist` files.
cheminfo-build: command not found
The `cheminfo-build` executable is not accessible in the system's PATH. This typically happens when the package is installed as a local `devDependency` and the command is not invoked from within the local `node_modules/.bin` directory or via `npx`.
fix
Execute the command using `npx cheminfo-build <options>` to leverage the locally installed version from your project's `node_modules`. Alternatively, ensure `node_modules/.bin` is included in your system's PATH, or call the executable directly from `node_modules/.bin/cheminfo-build`.
Upgrade
Version history
1.3.2latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
cheminfo-build — npm install cheminfo-build · libregistry