npm / dependency-cruiser
dependency-cruiser
What changed in dependency-cruiser 10 to 18, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-23.
25 breaking2 deprecations11 new APIs and options7 performance14 behavior and defaults10 tooling16 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initdependency-cruiser 1829 changes
Breaking changes 3
Report values are inserted as-is instead of expanding $& and similar replacement patterns.
The dot-webpage reporter is no longer experimental and replaces the name x-dot-webpage.
Support for Node.js 20 and 25 was dropped, so projects using those versions must upgrade.
Deprecations 1
The depcruise-baseline command is deprecated in favor of dependency-cruiser --baseline.
New APIs and options 5
The new baseline-mode value format sorts the baseline so future diffs are easier to read after manual edits.
Set baseline.staleEntriesSeverity to error to make the err, null, azure-devops and teamcity reporters exit with a non-zero code when the baseline contains stale entries.
Exposes baseline functionality as a regular dependency-cruiser option, with the same functionality as depcruise-baseline.
Updating the baseline can now remove fixed violations without adding new ones.
Configurations can now be written in TypeScript.
Performance 1
Cycle detection skips searching dependencies that cannot be part of a cycle, making detection faster.
Behavior and default changes 7
swc can handle all ts* extension variants.
Import extraction now supports imports inside module and namespace blocks.
The err, err-html and markdown reporters now show the number of stale entries in the baseline.
Baseline updates now show how many violations are new, unchanged, or removed.
Nested .gitignore files are now taken into account.
dependency-cruiser now warns at runtime when TypeScript, Babel, or SWC is needed but a usable compiler is not present.
The report's table heads are now sticky.
Tooling 4
Extraction now supports TypeScript 7.1's native compiler, currently with the TypeScript 7.1 beta.
The markdown report adds a baseline stale table.
The swc compiler can now parse tsx and jsx.
The swc compiler now recognizes type-only imports.
Fixes and other changes 8
Output no longer starts with an empty first line when its first word is wider than the wrap width.
Correctly handles bundledDependencies: true during extraction and resolution.
Passes the file name to the TypeScript transpiler to prevent it choking on imports from './module'.
Resolves tsconfig paths without baseUrl from the tsconfig directory.
Warnings are more precise: dependency-cruiser no longer reports a missing TypeScript compiler when installed swc is sufficient for the configured features.
Svelte components that use top-level await can now be compiled.
Finds the SWC Visitor when Bun hands over the default export, fixing extraction in that case.
The graph summary is now more deterministic.
dependency-cruiser 1722 changes
Breaking changes 2
AJV is no longer a runtime dependency, reducing dependency management and making installation faster.
Support for Node.js 18, 21, and 23 was dropped; supported versions are ^20.12, ^22, and >=24.
New APIs and options 3
Adds a configuration option for err-* and markdown reporters to show unresolved module names in the to-part of violations.
Adds the ancestor matcher for dependency-cruiser configuration.
Adds a suffix option for clickable links.
Performance 5
The reachables algorithm runs 1.3–1.5x faster, potentially improving runs with reachables in the rule set.
Regex compilations are cached throughout dependency-cruiser, making validation 1.5–2.5x faster.
JSON schemas are pre-compiled at build time, making the validation step 10x faster.
Performance optimizations make runs on TypeScript sources faster.
Algorithm updates improve performance.
Behavior and default changes 3
Enriches violations with the unresolved module name and the dependency types.
Dependents are now analyzed when --reaches or --focus are the only reason to do so.
The ndjson listener output now includes runId and user and system totals.
Tooling 4
Adds a basic consistency check for TypeScript and Babel features against transpiler availability.
Dependency-cruiser can now be used with TypeScript v6.
Dependency-cruiser now detects imports done with process.getBuiltinModule.
Working with bun modules is easier; bun modules were already supported.
Fixes and other changes 5
Retains Svelte 5+ dependencies used exclusively outside <script> sections during extraction.
The flat dot reporter now respects collapse patterns.
Extraction works again when TypeScript is not installed.
Fixes tsconfig not working when using the API.
Calls ITranspilerWrapper.isAvailable() correctly in the Svelte pre process.
dependency-cruiser 169 changes
Breaking changes 4
Alias type derivation is more correct and precise, which can cause rules on aliased dependency types to report issues not reported by previous versions.
Cycle entries change from module-name strings to objects containing each module name and its dependency types from the previous module in the cycle.
Cycle restrictions can match dependency types as well as module paths;
viaandviaOnlynow take objects with path, pathNot, dependencyTypes, and dependencyTypesNot properties.Reachability routes change from module-name strings to objects containing each module name and its dependency types from the previous module in the route.
Deprecations 1
The old notation for
viaandviaOnlycontinues to work but is deprecated.
New APIs and options 1
Adds dependency types for triple-slash references, imports, dynamic imports, exports, and pre-compilation-only dependencies, enabling rules and styling to distinguish them.
Behavior and default changes 1
Conditional coloring can now match arrays.
Fixes and other changes 2
Files and stdout now end with a trailing newline.
Detects type-only dependencies written inline in import and export braces, such as
import { type SomeType }.
dependency-cruiser 153 changes
Breaking changes 1
Subpath imports are now labeled alias and alias-subpath-import instead of undetermined; rules checking undetermined may need updating.
New APIs and options 1
The real dependency type is available alongside aliases. Rules that explicitly check dependencyTypes continue to work and may uncover transgressions missed by earlier versions.
Behavior and default changes 1
Reports link to npmjs for npm modules and nodejs.org for Node modules.
dependency-cruiser 141 changes
Breaking changes 1
The minimum supported Node.js version is now 18.17; Node.js 16 and 19 are no longer supported.
dependency-cruiser 1313 changes
Breaking changes 9
When a default-named configuration file exists, the CLI uses it without requiring --config; pass --no-config to run without a configuration file.
Configuration utility interfaces are now asynchronous, except for the utility to extract TypeScript configurations.
The cruise API is now asynchronous, so callers must await it.
The fourth parameter is now an object that can contain a tsConfig, a babelConfig, or both, instead of being reserved for a normalized TypeScript configuration.
The API is ESM-only and can only be called from ESM code.
The format API is now asynchronous.
On Windows, glob patterns must use forward slashes because the updated node-glob no longer accepts backslashes as path separators.
Node.js 14 is no longer supported; users who cannot move to higher versions can keep using dependency-cruiser v12.
Yarn 1 Plug'n Play is no longer supported; Yarn 2 and 3 Plug'n Play remain supported.
New APIs and options 1
A null reporter is available.
Performance 1
Lazy loading reporters, initialization, caching, and other code reduces startup time; deferring analytical modules also speeds up runs served entirely from cache.
Behavior and default changes 2
Configurations for dependency-cruiser, Babel, and webpack can now use ESM; previously supported formats remain supported.
Dot reporters now display dynamic dependencies as dotted lines by default, distinguishing them from regular dependencies.
dependency-cruiser 124 changes
Breaking changes 2
Support for Node 12 and 17 was dropped; dependency-cruiser supports Node ^14, ^16 and >=18.
Reporters that emit stability metrics as values from 0–100 now include a percentage sign.
Tooling 2
dependency-cruiser adds support for the .d.cts extension.
dependency-cruiser adds support for the .d.mts extension.
dependency-cruiser 112 changes
Breaking changes 2
.d.ts is now consistently treated as a separate extension, which can cause rules touching .d.ts modules to be triggered when only .d.ts was specified.
TypeScript in Vue single-file components is now supported, so rules that touch those components might be triggered when they were not before.
dependency-cruiser 102 changes
Breaking changes 1
dependency-cruiser now supports Node.js ^12.20, ^14 and >=16, dropping support for earlier versions.
Fixes and other changes 1
In rules with dependents, pathNot in the from part is now correctly treated as an exclusion rather than as a regular path.