| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
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) | 1 个月前 | |
chore(test): classifies tests - puts mocks in separate folders from fixtures (#557) | 4 年前 | |
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) | 1 个月前 | |
chore: replaces eslint with oxlint (#1074) ## Description - replaces eslint with oxlint - fixes some (now) low-hanging fruit ## Motivation and Context Simplify my life. ## How Has This Been Tested? - [x] green ci ## 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) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [x] Chore (thing that needs doing for hygiene purposes) | 3 个月前 | |
refactor: introduces use of node imports aliasses in package.json (#851) ## Description Use import aliases in package.json for ... - [x] `utl/*` - [x] `meta.js` - [x] `graph-utl/*` - [x] `extract/*` - [x] `enrich/*` - [x] `report/*` - [x] `main/*` - [x] `cache/*` - [x] `cli/*` - [x] the json schemas - [x] `validate/*` - [x] `config-utl/*` ## Motivation and Context - Makes code easier to read (and move around, might it come to that) - Dog fooding a feature I've not used in any other project ## How Has This Been Tested? - [x] green ci ## Types of changes - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] Documentation only change - [x] 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) | 3 年前 | |
refactor: introduces use of node imports aliasses in package.json (#851) ## Description Use import aliases in package.json for ... - [x] `utl/*` - [x] `meta.js` - [x] `graph-utl/*` - [x] `extract/*` - [x] `enrich/*` - [x] `report/*` - [x] `main/*` - [x] `cache/*` - [x] `cli/*` - [x] the json schemas - [x] `validate/*` - [x] `config-utl/*` ## Motivation and Context - Makes code easier to read (and move around, might it come to that) - Dog fooding a feature I've not used in any other project ## How Has This Been Tested? - [x] green ci ## Types of changes - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] Documentation only change - [x] 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) | 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). | 3 个月前 | |
fix: removes all unused catch parameters | 3 个月前 | |
refactor: introduces use of node imports aliasses in package.json (#851) ## Description Use import aliases in package.json for ... - [x] `utl/*` - [x] `meta.js` - [x] `graph-utl/*` - [x] `extract/*` - [x] `enrich/*` - [x] `report/*` - [x] `main/*` - [x] `cache/*` - [x] `cli/*` - [x] the json schemas - [x] `validate/*` - [x] `config-utl/*` ## Motivation and Context - Makes code easier to read (and move around, might it come to that) - Dog fooding a feature I've not used in any other project ## How Has This Been Tested? - [x] green ci ## Types of changes - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] Documentation only change - [x] 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) | 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). | 3 个月前 | |
feat(baseline): renames baseline-mode 'view' to 'format' & sorts the baseline on write - it's more correct while still useful. "view" will be added to the regular output & reporters - consistenlty sorting makes comparing & diffs easier to do (+ it will sort stuff manually added to the baseline) | 1 个月前 | |
feat(cli): replaces --baseline-shrink-only option with --baseline-mode option (#1091) ## Description - replaces the `--baseline-shrink-only` option with `--baseline-mode` that takes one of the values `full` and `shrink-only` _Not_ a breaking change because `--baseline-shrink-only` (or even `--baseline`) has not shipped yet and only lived on the main branch. ## Motivation and Context - Less likely to be confused with a standalone option. - Maps more cleanly to the internal model as well as the option in the configuration file format. ## How Has This Been Tested? - [x] green ci - [x] updated automated non-regression tests ## 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) | 1 个月前 | |
chore!: drops support for node 18, 21 and 23 BREAKING (#1004) ## Description - drops support for node 18, 21 and 23; sets the minimum required node version to 20.12, - updates the ci to reflect this ## Motivation and Context We follow the node.js release cycle (as slow as possible) -- node 18 and 21 are end of life since 2025-03-27 and 2024-04-10 (!) respectively and shouldn't be run in production anymore. Same goes for node 23. Moreover node 20 has been in production since 2023-03-18, node 22 since 2024-03-24, so most serious consumers will have migrated to one of these versions already - if they aren't on node 24, that is. We've tried to keep this off as long as possible but some of our dependencies (like commander.js) dropped support for node 18 and we want to keep those up to date to keep dependency-cruiser secure. Moreover node.js 20+ has useful features that makes it possible to do away with some 3rd party libraries, reducing dependency-cruiser's maintenance surface. Reference: https://nodejs.org/en/about/previous-releases ## How Has This Been Tested? - [x] green ci ## 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) - [ ] New feature (non-breaking change which adds functionality) - [x] Breaking change (fix or feature that would cause existing functionality to change) ## 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). | 1 年前 | |
refactor(cli): makes stderr, stdout configurable - so we can test their uses more easily (#898) ## Description, Motivation and Context - same as #897, but instead for the CLI - removes now unnecessary intercept-stdout devDependency ## How Has This Been Tested? - [x] green ci - [x] adapted automated non-regression tests ## Types of changes - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] Documentation only change - [x] 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) | 2 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 1 个月前 | ||
| 4 年前 | ||
| 1 个月前 | ||
| 3 个月前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 3 个月前 | ||
| 3 个月前 | ||
| 3 年前 | ||
| 3 个月前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 1 年前 | ||
| 2 年前 |