| feat(extract/tsc): adds support for imports inside module and namespace blocks (#1095) # Detect imports in ambient TypeScript declarations ## Description - Adds opt-in `detectImportsInAmbientModules` to detect imports, re-exports, c.s. inside ambient modules and namespaces, including nested and qualified namespaces. - Keeps the option disabled by default; enabling it selects the TypeScript parser. - Wires the option through config normalization, schemas, types, generated configs, initialization prompts, summarization and cache compatibility. - Bumps cache format version to prevent stale caches from hiding the option’s effect. - :tent: side-catch: Handle TypeScript ASTs with missing statements and - :tent: side-catch: use the built-in `dot-webpage` reporter in generated graph scripts. - :tent: side-catch: exclude some hard-to cover branches that only exist for robustness (e.g. `doThing (someUsuallyExistingArray ||[])` in a helper) from coverage ## Motivation and Context Imports inside ambient declarations were not included in dependency analysis. This adds a configurable way to detect them while preserving existing behavior by default. TypeScript must be installed to enable detection. ## How Has This Been Tested? - [x] Green CI - [x] Additional automated non-regression tests - [x] Adapted existing test fixtures ## Types of changes - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] Documentation only change - [ ] Refactor (non-breaking change which fixes an issue without changing functionality) - [x] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) | 3 天前 |
| chore(tools): uses node permission model prevents tool calls from writing stuff in unexpected places - which some sast scanners can flag, while there isn't any harm. trying the node permssion model was a good learning experience, though | 2 个月前 |
| chore(tools): makes the tools work again on node 22 | 2 个月前 |
| docs: standardizes the command name for running the command to 'dependency-cruiser' (#1083) ## Description - standardizes the command name for running the command to 'dependency-cruiser' in all documentation (including the --help output which necessitated renaming bin/dependency-cruise.mjs to bin/dependency-cruiser.mjs and updating the aliases in package.json to that) ## Motivation and Context There's currently three ways to invoke dependency-cruiser's main command (dependency-cruiser, dependency-cruise and depcruise) which were used interchangeably throughout the documentation. ## How Has This Been Tested? - [ ] green ci ## Types of changes - [ ] Bug fix (non-breaking change which fixes an issue) - [x] Documentation only change - [ ] Refactor (non-breaking change which fixes an issue without changing functionality) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) | 28 天前 |
| chore(tools): makes the tools work again on node 22 | 2 个月前 |
| chore(tools): makes the tools work again on node 22 | 2 个月前 |
| build(npm): updates external dependencies Up'em just updated these outdated dependencies in package.json: @babel/core 7.22.5 -> 7.22.8 devDependencies (policy: latest) @swc/core 1.3.67 -> 1.3.68 devDependencies (policy: latest) @types/node 20.3.3 -> 20.4.1 devDependencies (policy: latest) @typescript-eslint/eslint-plugin 5.60.1 -> 5.61.0 devDependencies (policy: latest) @typescript-eslint/parser 5.60.1 -> 5.61.0 devDependencies (policy: latest) acorn 8.9.0 -> 8.10.0 dependencies (policy: latest) glob 10.3.1 -> 10.3.3 dependencies (policy: latest) prettier 2.8.8 -> 3.0.0 devDependencies (policy: latest) semver 7.5.3 -> 7.5.4 dependencies (policy: latest) Up'em found these packages were outdated, but did not update them because of policies: svelte 3.59.1 devDependencies (policy: pin) | 3 年前 |
| 18.5.0 | 3 天前 |
| feat: adds environment inconsistency checks (starting with typescript and babel) (#1070) ## Description - adds environment inconsistency checks (e.g. there's a tsconfig, but there's no typescript transpiler installed we can use to handle it) and emit warnings when they're hit. Warnings shipping with this PR regard inconsistencies with - typescript - babel - swc - available in the _error_ reporter (which is the default and hence likely the most often used one) and the _json_ reporter. Other reporters will probably follow in later PR's. ## Motivation and Context See #1048, #1069 - There's a trend to run a type-skipping transpilers on typescript code (e.g. esbuild or maybe node.js rudimentary typescript support), without a type-checking transpiler (microsoft's typescript) installed. Currently dependency-cruiser is silent about it, which leads to confusion, - TypeScript 7.0 just shipped _without_ an API, so we cannot support that yet - the first issue on it is already in, and I expect more. If dependency-cruiser already tells what the issue is, that should limit the confusion (and save users having to raise an issue, and me answering them). ## How Has This Been Tested? - [x] green ci - [x] additional non-regression tests ## Screenshots <img width="929" height="326" alt="image" src="https://github.com/user-attachments/assets/79ab00a5-ee03-4c03-b07b-d4e15ae737bb" /> ## Types of changes - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] Documentation only change - [ ] Refactor (non-breaking change which fixes an issue without changing functionality) - [x] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] AI was used to write some of the code ## Checklist - [x] :book: - My change doesn't require a documentation update, or ... - it _does_ and I have updated it - [x] :balance_scale: - The contribution will be subject to [The MIT license](https://github.com/sverweij/dependency-cruiser/blob/main/LICENSE), and I'm OK with that. - The contribution is my own original work. - I am ok with the stuff in [**CONTRIBUTING.md**](https://github.com/sverweij/dependency-cruiser/blob/main/.github/CONTRIBUTING.md). | 2 个月前 |
| refactor(tools): folds d2 test fixture regeneration into existing report fixture regeneration | 2 年前 |
| chore(tools): adds a script that prints a readable AST from any tsc-readable file | 1 年前 |