Registry / devops / nundler

nundler

JSON →
library0.2.0jsnpmunverified

Nundler (version 0.2.0) is an early-stage utility designed for JavaScript and TypeScript projects that explicitly aim to *avoid* traditional bundling paradigms, or for workflows where fine-grained control over module resolution and dependency analysis is preferred over monolithic output. Instead of merging and optimizing code into a single or few output files, Nundler focuses on assisting developers in understanding and managing module graphs in an unbundled context. Its release cadence is currently unpredictable given its alpha status. Key differentiators include its focus on unbundled environments, potentially offering tools for dynamic import analysis, dependency introspection, or optimized loading strategies without modifying source code for bundling purposes. This tool could be beneficial for scenarios like serverless functions with strict individual file size limits, or development environments emphasizing native ESM module loading directly in Node.js.

npm install nundler
INSTALL
IMPORT
SIG · NUNDLER
N
nundler
devopsjavascriptv0.2.0
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.

analyzeDependencies
import { analyzeDependencies } from 'nundler'
const { analyzeDependencies } = require('nundler')
Primary utility for dependency analysis. Nundler primarily targets modern Node.js environments and recommends ESM imports.
resolveModulePath
import { resolveModulePath } from 'nundler'
import resolveModulePath from 'nundler'
A specific utility for resolving module paths in an unbundled context. Not a default export.
DependencyGraph
import type { DependencyGraph } from 'nundler'
Type import for the structure returned by analysis functions. Important for TypeScript users.

Demonstrates how to use `analyzeDependencies` to inspect a project's module graph without bundling, logging a summary of internal and external dependencies.

import { analyzeDependencies } from 'nundler'; import * as path from 'node:path'; import * as fs from 'node:fs/promises'; async function main() { const projectRoot = process.cwd(); // Or a specific path, e.g., './src' console.log(`Analyzing dependencies in: ${projectRoot}`); try { const analysisResult = await analyzeDependencies(projectRoot, { entryPoints: ['index.js', 'main.ts'], // Specify your main entry points ignoreNodeModules: true, // further options to control analysis depth or file types }); console.log('--- Dependency Graph Summary ---'); if (analysisResult.graph) { console.log(`Total modules found: ${analysisResult.graph.nodes.length}`); console.log(`Total dependencies: ${analysisResult.graph.edges.length}`); // Example: Log unique external dependencies const externalDeps = new Set(analysisResult.graph.edges .filter(edge => edge.type === 'external') .map(edge => edge.target)); console.log('External dependencies:', Array.from(externalDeps).join(', ')); } else { console.log('No dependency graph generated, check entry points and options.'); } if (analysisResult.errors && analysisResult.errors.length > 0) { console.warn('\n--- Warnings/Errors during analysis ---'); analysisResult.errors.forEach(err => console.warn(`- ${err.message} (File: ${err.file})`)); } } catch (error) { console.error('An error occurred during analysis:', error); } } main().catch(console.error);
nundler --version
Debug
Known issues
breakingAs a pre-1.0 release (v0.2.0), Nundler's API is highly unstable and subject to frequent, significant breaking changes without prior notice. Semantic Versioning is not strictly followed for minor/patch releases at this stage.
fix
Always pin to an exact version (`"nundler": "0.2.0"`) and thoroughly test after any updates. Refer to GitHub issues for potential unannounced changes.
affects: >=0.1.0
gotchaNundler is explicitly *not* a bundler. It will not optimize, transpile, or merge your code. Misinterpreting its purpose and expecting bundled output or performance optimizations from it will lead to incorrect assumptions and frustration.
fix
Understand Nundler's core value proposition: unbundled dependency analysis and resolution. For bundling, use tools like Webpack, Rollup, or esbuild.
affects: >=0.1.0
gotchaPerformance may vary significantly with very large codebases. Since Nundler aims to analyze individual modules, processing projects with tens of thousands of files or complex module resolution schemes might be slow.
fix
Start with smaller sub-projects or specific entry points. Report performance issues on the GitHub repository with reproduction steps. Optimize your project's module structure where possible.
affects: >=0.1.0
Errors
Common errors & fixes
TypeError: Cannot read properties of undefined (reading 'someMethod')
Attempting to use an API method that has been renamed, removed, or is not correctly imported due to API instability in pre-1.0 versions.
fix
Consult the latest source code or documentation (if available) on the GitHub repository for recent API changes. Ensure named imports match current exports.
Error: Cannot find module 'nundler' from '<your-project-path>'
The `nundler` package is not installed or not resolvable in the current project context.
fix
Run `npm install nundler` or `yarn add nundler` in your project directory. If using ESM, ensure your `package.json` has `"type": "module"` or use `.mjs` files.
Upgrade
Version history
0.2.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources