@coinagerie/vocabulary
v0.0.9
Published
File discovery, word splitting, folding, and exclusion that turn a codebase into a sorted list of headwords
Maintainers
Readme
@coinagerie/vocabulary
File discovery, word splitting, folding, and exclusion: the part of coinagerie that turns a codebase into a sorted list of headwords.
npm install @coinagerie/vocabularyTest
nx run coinagerie-vocabulary:vitest👔 Conformetry
This project was generated from the nestjs-service-project conformetry template.
🪙 Coinagerie
The words this package uses that the root glossary does not define, regenerated with nx run coinagerie-vocabulary:coinagerie-check:write.
- aspect: Example word in folding tests, where aspects folds into the singular aspect; also a fixture file name.
- breadth: The maximumBreadth limit, set to seven in this project's callidescope configuration, bounding callees per function.
- bundle: Fixture path dist/bundle.js that discovery tests use to check an exclude list drops the dist folder.
- glossary: The GLOSSARY.md file discovery skips so a glossary's own headwords never count as codebase vocabulary.
- headword: The single form a word folds into, which the glossary lists once and exclusion compares against.
- phase: A word split from the fixture file aspect-phase-emoji.service.ts, testing that hyphenated names split into words.
- term: A word of at least two code points that counts toward the vocabulary, as defined by TERM_LENGTH_PATTERN.
- verb: Lemmatizer step from wink-lemmatizer reducing an inflected verb form to its base, as configuring to configure.
- vocabulary: The sorted list of every word the codebase uses, produced by VocabularyService.collect after folding and exclusion.
🔭 Callidescope
Call stacks traced through projects/ic-suite/coinagerie/coinagerie-vocabulary, deepest first. Each frame shows what it takes, what it returns, and what its documentation says.
| Measure | Value | | --- | --- | | Callables | 42 | | Files | 25 | | Calls traced | 44 | | Call stacks | 0 | | Deepest stack | 0 | | Stacks through recursion | 0 | | Unfollowable calls | 1 |
Limits
What this project is judged against, as declared in its own callidescope.config.ts.
| Limit | Value |
| --- | --- |
| maximumDepth | 7 |
| maximumBreadth | 7 |
Call stacks (depth)
None.
Breadth
| Callable | Breadth | Calls directly | Location |
| --- | --- | --- | --- |
| DiscoveryService.discover | 7 | DiscoveryService.findRepositoryRoot, DiscoveryService.map(…), DiscoveryService.filter(…), DiscoveryService.map(…), DiscoveryService.filter(…), DiscoveryService.walk, DiscoveryService.readAncestorScopes | projects/ic-suite/coinagerie/coinagerie-vocabulary/src/modules/discovery/discovery.service.ts:152 |
| VocabularyService.collect | 7 | DiscoveryService.discover, VocabularyService.map(…), VocabularyService.excludedHeadwords, VocabularyService.collectFile, FoldingService.headword, VocabularyService.matchesPattern, VocabularyService.filter(…) | projects/ic-suite/coinagerie/coinagerie-vocabulary/src/modules/vocabulary/vocabulary.service.ts:108 |
| DiscoveryService.walk | 4 | DiscoveryService.toPosix, IgnoreRulesService.readScope, DiscoveryService.flatMap(…), DiscoveryService.filter(…) | projects/ic-suite/coinagerie/coinagerie-vocabulary/src/modules/discovery/discovery.service.ts:107 |
| Callable | Breadth | Calls directly | Location |
| --- | --- | --- | --- |
| DiscoveryService.readAncestorScopes | 3 | DiscoveryService.filter(…), DiscoveryService.toPosix, DiscoveryService.flatMap(…) | projects/ic-suite/coinagerie/coinagerie-vocabulary/src/modules/discovery/discovery.service.ts:78 |
| DiscoveryService.flatMap(…) | 3 | IgnoreRulesService.isIgnored, DiscoveryService.isExcludedFolder, DiscoveryService.walk | projects/ic-suite/coinagerie/coinagerie-vocabulary/src/modules/discovery/discovery.service.ts:122 |
| WordsService.splitIdentifier | 3 | WordsService.filter(…), WordsService.map(…), WordsService.flatMap(…) | projects/ic-suite/coinagerie/coinagerie-vocabulary/src/modules/words/words.service.ts:43 |
| VocabularyService.collectFile | 3 | WordsService.splitPath, LanguagesService.tokenizerFor, VocabularyService.flatMap(…) | projects/ic-suite/coinagerie/coinagerie-vocabulary/src/modules/vocabulary/vocabulary.service.ts:42 |
| DiscoveryService.isExcludedFolder | 2 | DiscoveryService.toPosix, DiscoveryService.some(…) | projects/ic-suite/coinagerie/coinagerie-vocabulary/src/modules/discovery/discovery.service.ts:56 |
| DiscoveryService.isSelected | 2 | DiscoveryService.some(…), DiscoveryService.some(…) | projects/ic-suite/coinagerie/coinagerie-vocabulary/src/modules/discovery/discovery.service.ts:67 |
| IgnoreRulesService.isIgnored | 1 | IgnoreRulesService.toScopedPath | projects/ic-suite/coinagerie/coinagerie-vocabulary/src/modules/discovery/ignore-rules.service.ts:49 |
| DiscoveryService.flatMap(…) | 1 | IgnoreRulesService.readScope | projects/ic-suite/coinagerie/coinagerie-vocabulary/src/modules/discovery/discovery.service.ts:86 |
| DiscoveryService.map(…) | 1 | DiscoveryService.toPosix | projects/ic-suite/coinagerie/coinagerie-vocabulary/src/modules/discovery/discovery.service.ts:163 |
| DiscoveryService.filter(…) | 1 | DiscoveryService.isSelected | projects/ic-suite/coinagerie/coinagerie-vocabulary/src/modules/discovery/discovery.service.ts:166 |
| FoldingService.headword | 1 | FoldingService.fold | projects/ic-suite/coinagerie/coinagerie-vocabulary/src/modules/folding/folding.service.ts:49 |
| WordsService.filter(…) | 1 | WordsService.isTerm | projects/ic-suite/coinagerie/coinagerie-vocabulary/src/modules/words/words.service.ts:48 |
| WordsService.splitPath | 1 | WordsService.splitIdentifier | projects/ic-suite/coinagerie/coinagerie-vocabulary/src/modules/words/words.service.ts:56 |
| VocabularyService.flatMap(…) | 1 | WordsService.splitIdentifier | projects/ic-suite/coinagerie/coinagerie-vocabulary/src/modules/vocabulary/vocabulary.service.ts:57 |
| VocabularyService.excludedHeadwords | 1 | FoldingService.headword | projects/ic-suite/coinagerie/coinagerie-vocabulary/src/modules/vocabulary/vocabulary.service.ts:70 |
| VocabularyService.matchesPattern | 1 | VocabularyService.some(…) | projects/ic-suite/coinagerie/coinagerie-vocabulary/src/modules/vocabulary/vocabulary.service.ts:88 |
🕸️ Codependix
Dependency graphs exported by codependix, regenerated by nx run configuration:codependix:write.
Nx Neighborhood
graph LR
coinagerie_cli["coinagerie-cli"]
coinagerie_configuration["coinagerie-configuration"]
coinagerie_languages["coinagerie-languages"]
coinagerie_vocabulary["coinagerie-vocabulary"]
coinagerie_cli --> coinagerie_vocabulary
coinagerie_vocabulary --> coinagerie_configuration
coinagerie_vocabulary --> coinagerie_languages
classDef subject fill:#7c3aed,color:#fff,stroke:#4c1d95,stroke-width:2px
class coinagerie_vocabulary subjectNestJS Module Graph
flowchart LR
CssModule
DiscoveryModule
FoldingModule
HclModule
JsonModule
LanguagesModule
PythonModule
ScannerModule
ShellModule
SqlModule
TomlModule
TypescriptModule
VocabularyModule
WordsModule
YamlModule
CssModule --> ScannerModule
HclModule --> ScannerModule
JsonModule --> ScannerModule
LanguagesModule --> CssModule
LanguagesModule --> HclModule
LanguagesModule --> JsonModule
LanguagesModule --> PythonModule
LanguagesModule --> ShellModule
LanguagesModule --> SqlModule
LanguagesModule --> TomlModule
LanguagesModule --> TypescriptModule
LanguagesModule --> YamlModule
PythonModule --> ScannerModule
ShellModule --> ScannerModule
SqlModule --> ScannerModule
TomlModule --> ScannerModule
VocabularyModule --> DiscoveryModule
VocabularyModule --> FoldingModule
VocabularyModule --> LanguagesModule
VocabularyModule --> WordsModuleFile Imports
graph LR
file_callidescope_config_ts["callidescope.config.ts"]
file_codependix_config_ts["codependix.config.ts"]
file_codometer_config_ts["codometer.config.ts"]
file_coinagerie_config_ts["coinagerie.config.ts"]
file_eslint_config_ts["eslint.config.ts"]
file_src_index_ts["src/index.ts"]
file_src_index_unit_test_ts["src/index.unit.test.ts"]
file_src_modules_discovery_discovery_constants_ts["src/modules/discovery/discovery.constants.ts"]
file_src_modules_discovery_discovery_module_ts["src/modules/discovery/discovery.module.ts"]
file_src_modules_discovery_discovery_service_ts["src/modules/discovery/discovery.service.ts"]
file_src_modules_discovery_discovery_service_unit_test_ts["src/modules/discovery/discovery.service.unit.test.ts"]
file_src_modules_discovery_discovery_types_ts["src/modules/discovery/discovery.types.ts"]
file_src_modules_discovery_ignore_rules_service_ts["src/modules/discovery/ignore-rules.service.ts"]
file_src_modules_discovery_ignore_rules_service_unit_test_ts["src/modules/discovery/ignore-rules.service.unit.test.ts"]
file_src_modules_folding_folding_constants_ts["src/modules/folding/folding.constants.ts"]
file_src_modules_folding_folding_module_ts["src/modules/folding/folding.module.ts"]
file_src_modules_folding_folding_service_ts["src/modules/folding/folding.service.ts"]
file_src_modules_folding_folding_service_unit_test_ts["src/modules/folding/folding.service.unit.test.ts"]
file_src_modules_folding_folding_types_ts["src/modules/folding/folding.types.ts"]
file_src_modules_vocabulary_vocabulary_constants_ts["src/modules/vocabulary/vocabulary.constants.ts"]
file_src_modules_vocabulary_vocabulary_module_ts["src/modules/vocabulary/vocabulary.module.ts"]
file_src_modules_vocabulary_vocabulary_service_ts["src/modules/vocabulary/vocabulary.service.ts"]
file_src_modules_vocabulary_vocabulary_service_unit_test_ts["src/modules/vocabulary/vocabulary.service.unit.test.ts"]
file_src_modules_vocabulary_vocabulary_types_ts["src/modules/vocabulary/vocabulary.types.ts"]
file_src_modules_words_words_constants_ts["src/modules/words/words.constants.ts"]
file_src_modules_words_words_module_ts["src/modules/words/words.module.ts"]
file_src_modules_words_words_service_ts["src/modules/words/words.service.ts"]
file_src_modules_words_words_service_unit_test_ts["src/modules/words/words.service.unit.test.ts"]
file_src_modules_words_words_types_ts["src/modules/words/words.types.ts"]
file_testing_mocks_ts["testing/mocks.ts"]
file_testing_setup_ts["testing/setup.ts"]
file_vite_config_ts["vite.config.ts"]
file_vitest_config_ts["vitest.config.ts"]
file_src_index_unit_test_ts --> file_src_index_ts
file_src_modules_discovery_discovery_module_ts --> file_src_modules_discovery_discovery_service_ts
file_src_modules_discovery_discovery_module_ts --> file_src_modules_discovery_ignore_rules_service_ts
file_src_modules_discovery_discovery_service_ts --> file_src_modules_discovery_discovery_constants_ts
file_src_modules_discovery_discovery_service_ts --> file_src_modules_discovery_discovery_types_ts
file_src_modules_discovery_discovery_service_ts --> file_src_modules_discovery_ignore_rules_service_ts
file_src_modules_discovery_discovery_service_unit_test_ts --> file_src_modules_discovery_discovery_service_ts
file_src_modules_discovery_discovery_service_unit_test_ts --> file_src_modules_discovery_ignore_rules_service_ts
file_src_modules_discovery_ignore_rules_service_ts --> file_src_modules_discovery_discovery_types_ts
file_src_modules_discovery_ignore_rules_service_unit_test_ts --> file_src_modules_discovery_discovery_types_ts
file_src_modules_discovery_ignore_rules_service_unit_test_ts --> file_src_modules_discovery_ignore_rules_service_ts
file_src_modules_folding_folding_module_ts --> file_src_modules_folding_folding_service_ts
file_src_modules_folding_folding_service_ts --> file_src_modules_words_words_constants_ts
file_src_modules_folding_folding_service_unit_test_ts --> file_src_modules_folding_folding_service_ts
file_src_modules_vocabulary_vocabulary_module_ts --> file_src_modules_discovery_discovery_module_ts
file_src_modules_vocabulary_vocabulary_module_ts --> file_src_modules_folding_folding_module_ts
file_src_modules_vocabulary_vocabulary_module_ts --> file_src_modules_vocabulary_vocabulary_service_ts
file_src_modules_vocabulary_vocabulary_module_ts --> file_src_modules_words_words_module_ts
file_src_modules_vocabulary_vocabulary_service_ts --> file_src_modules_discovery_discovery_service_ts
file_src_modules_vocabulary_vocabulary_service_ts --> file_src_modules_folding_folding_service_ts
file_src_modules_vocabulary_vocabulary_service_ts --> file_src_modules_words_words_service_ts
file_src_modules_vocabulary_vocabulary_service_unit_test_ts --> file_src_modules_discovery_discovery_module_ts
file_src_modules_vocabulary_vocabulary_service_unit_test_ts --> file_src_modules_folding_folding_module_ts
file_src_modules_vocabulary_vocabulary_service_unit_test_ts --> file_src_modules_vocabulary_vocabulary_service_ts
file_src_modules_vocabulary_vocabulary_service_unit_test_ts --> file_src_modules_words_words_module_ts
file_src_modules_words_words_module_ts --> file_src_modules_words_words_service_ts
file_src_modules_words_words_service_ts --> file_src_modules_words_words_constants_ts
file_src_modules_words_words_service_unit_test_ts --> file_src_modules_words_words_service_ts⏲️ Codometer
Project
TypeScript
JavaScript
Python
JSON
YAML
TOML
Shell
SQL
HCL
CSS
Conventions
Jupyter
Markdown
