Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: replaces 'glob' with 'picomatch' (#841)
## Description - replaces `glob` with `picomatch` This PR makes use of the fact that dependency-cruiser just dropped support for node 16 and 19, using nodejs >=18.17 feature - `readdirSync`'s `recursive` option. ## Motivation and Context See #839 reduces number of external dependencies, which reduces both security risks, maintenance effort and install size. Not the goal of this exercise, but it also reduces the start-up time and the execution speed of the gatherInitialSources step: Not the goal of this exercise, but good to know: the execution speed seems to have a bit improved over the previous situation: |test|glob|picomatch| |-- |-- |-- | `npm test -f "[I] extract/gatherInitialSources"` as measured by mocha | 70ms | 43ms | gatherInitialSources step in `node ./bin/dependency-cruise.mjs --no-cache -Tnull 'src/**'` ('real' time)| 39ms | 24ms | gatherInitialSources step in `node ./bin/dependency-cruise.mjs --no-cache -Tnull src` ('real' time)| 14ms | 8ms | nodejs starting step ('loading external modules') in `node ./bin/dependency-cruise.mjs --no-cache -Tnull 'src/**'` ('real' time)| 340ms | 326ms > all averages over ~5 runs, on a quiet old mac (2,6 GHz Quad-Core Intel Core i7) ## 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)
- Loading branch information