@coinagerie/vocabulary 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/README.md +22 -88
- package/dist/src/index.d.ts +6 -2
- package/dist/src/index.js +8 -5
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
## 0.0.3 (2026-11-04)
|
|
2
|
+
|
|
3
|
+
### 🧱 Updated Dependencies
|
|
4
|
+
|
|
5
|
+
- Updated coinagerie-configuration to 0.0.3
|
|
6
|
+
- Updated coinagerie-languages to 0.0.3
|
|
7
|
+
|
|
8
|
+
## 0.0.2 (2026-11-04)
|
|
9
|
+
|
|
10
|
+
### 🚀 Features
|
|
11
|
+
|
|
12
|
+
- **coinagerie:** ✨ accept regular expressions in exclude.words ([#2109](https://github.com/organizzolini/codebase/pull/2109))
|
|
13
|
+
|
|
14
|
+
### 🧱 Updated Dependencies
|
|
15
|
+
|
|
16
|
+
- Updated coinagerie-configuration to 0.0.2
|
|
17
|
+
- Updated coinagerie-languages to 0.0.2
|
|
18
|
+
|
|
1
19
|
## 0.0.1 (2026-11-04)
|
|
2
20
|
|
|
3
21
|
### 🚀 Features
|
package/README.md
CHANGED
|
@@ -24,104 +24,37 @@ This project was generated from the [nestjs-service-project](../../configuration
|
|
|
24
24
|
|
|
25
25
|
The words this package uses that the root glossary does not define, regenerated with `nx run coinagerie-vocabulary:coinagerie-check:write`.
|
|
26
26
|
|
|
27
|
-
- **absolute**:
|
|
28
|
-
- **after**:
|
|
29
27
|
- **ancestor**:
|
|
30
28
|
- **aspect**:
|
|
31
29
|
- **breadth**:
|
|
32
|
-
- **bug**:
|
|
33
30
|
- **bundle**:
|
|
34
|
-
- **chunk**:
|
|
35
|
-
- **clear**:
|
|
36
|
-
- **compile**:
|
|
37
|
-
- **compiler**:
|
|
38
|
-
- **configure**:
|
|
39
|
-
- **console**:
|
|
40
|
-
- **constant**:
|
|
41
|
-
- **controller**:
|
|
42
|
-
- **debug**:
|
|
43
|
-
- **decorator**:
|
|
44
|
-
- **deep**:
|
|
45
|
-
- **define**:
|
|
46
|
-
- **describe**:
|
|
47
|
-
- **discover**:
|
|
48
31
|
- **discovery**:
|
|
49
32
|
- **dist**:
|
|
50
33
|
- **doc**:
|
|
51
|
-
- **each**:
|
|
52
|
-
- **entry**:
|
|
53
|
-
- **equal**:
|
|
54
|
-
- **experimental**:
|
|
55
|
-
- **extname**:
|
|
56
|
-
- **fake**:
|
|
57
|
-
- **flat**:
|
|
58
|
-
- **force**:
|
|
59
|
-
- **gitkeep**:
|
|
60
34
|
- **glossary**:
|
|
61
35
|
- **guide**:
|
|
62
36
|
- **headword**:
|
|
63
|
-
- **homepage**:
|
|
64
|
-
- **identifier**:
|
|
65
37
|
- **ignorecase**:
|
|
66
|
-
- **implementation**:
|
|
67
|
-
- **injectable**:
|
|
68
|
-
- **keep**:
|
|
69
|
-
- **least**:
|
|
70
|
-
- **length**:
|
|
71
|
-
- **link**:
|
|
72
38
|
- **logo**:
|
|
73
|
-
- **lower**:
|
|
74
39
|
- **lowercase**:
|
|
75
40
|
- **mark**:
|
|
76
|
-
- **maximum**:
|
|
77
|
-
- **md**:
|
|
78
|
-
- **meta**:
|
|
79
|
-
- **mkdtemp**:
|
|
80
|
-
- **mock**:
|
|
81
|
-
- **one**:
|
|
82
|
-
- **other**:
|
|
83
|
-
- **own**:
|
|
84
|
-
- **part**:
|
|
85
|
-
- **partial**:
|
|
86
41
|
- **phase**:
|
|
87
42
|
- **png**:
|
|
88
43
|
- **posix**:
|
|
89
|
-
- **promise**:
|
|
90
|
-
- **publish**:
|
|
91
|
-
- **readdir**:
|
|
92
|
-
- **real**:
|
|
93
|
-
- **recursive**:
|
|
94
|
-
- **relative**:
|
|
95
44
|
- **reload**:
|
|
96
|
-
- **resolution**:
|
|
97
45
|
- **scoped**:
|
|
98
|
-
- **segment**:
|
|
99
|
-
- **sep**:
|
|
100
|
-
- **separator**:
|
|
101
46
|
- **singular**:
|
|
102
|
-
- **slice**:
|
|
103
|
-
- **some**:
|
|
104
|
-
- **sort**:
|
|
105
|
-
- **split**:
|
|
106
|
-
- **spy**:
|
|
107
|
-
- **strict**:
|
|
108
47
|
- **symbolic**:
|
|
109
48
|
- **symlink**:
|
|
110
|
-
- **synthetic**:
|
|
111
|
-
- **temporary**:
|
|
112
49
|
- **term**:
|
|
113
50
|
- **thing**:
|
|
114
|
-
- **timer**:
|
|
115
|
-
- **tmpdir**:
|
|
116
51
|
- **tokenizer**:
|
|
117
52
|
- **unignored**:
|
|
118
53
|
- **unmock**:
|
|
119
54
|
- **vendor**:
|
|
120
55
|
- **verb**:
|
|
121
56
|
- **verdict**:
|
|
122
|
-
- **vi**:
|
|
123
57
|
- **vocabulary**:
|
|
124
|
-
- **walk**:
|
|
125
58
|
|
|
126
59
|
<!-- coinagerie:end -->
|
|
127
60
|
|
|
@@ -133,9 +66,9 @@ Call stacks traced through `projects/ic-suite/coinagerie/coinagerie-vocabulary`,
|
|
|
133
66
|
|
|
134
67
|
| Measure | Value |
|
|
135
68
|
| --- | --- |
|
|
136
|
-
| Callables |
|
|
69
|
+
| Callables | 42 |
|
|
137
70
|
| Files | 25 |
|
|
138
|
-
| Calls traced |
|
|
71
|
+
| Calls traced | 44 |
|
|
139
72
|
| Call stacks | 0 |
|
|
140
73
|
| Deepest stack | 0 |
|
|
141
74
|
| Stacks through recursion | 0 |
|
|
@@ -159,11 +92,11 @@ None.
|
|
|
159
92
|
| Callable | Breadth | Calls directly | Location |
|
|
160
93
|
| --- | --- | --- | --- |
|
|
161
94
|
| `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` |
|
|
162
|
-
| `VocabularyService.collect` |
|
|
95
|
+
| `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` |
|
|
163
96
|
| `DiscoveryService.walk` | 4 | `DiscoveryService.toPosix`, `IgnoreRulesService.readScope`, `DiscoveryService.flatMap(…)`, `DiscoveryService.filter(…)` | `projects/ic-suite/coinagerie/coinagerie-vocabulary/src/modules/discovery/discovery.service.ts:107` |
|
|
164
97
|
|
|
165
98
|
<details>
|
|
166
|
-
<summary>
|
|
99
|
+
<summary>16 more callables</summary>
|
|
167
100
|
|
|
168
101
|
| Callable | Breadth | Calls directly | Location |
|
|
169
102
|
| --- | --- | --- | --- |
|
|
@@ -182,6 +115,7 @@ None.
|
|
|
182
115
|
| `WordsService.splitPath` | 1 | `WordsService.splitIdentifier` | `projects/ic-suite/coinagerie/coinagerie-vocabulary/src/modules/words/words.service.ts:56` |
|
|
183
116
|
| `VocabularyService.flatMap(…)` | 1 | `WordsService.splitIdentifier` | `projects/ic-suite/coinagerie/coinagerie-vocabulary/src/modules/vocabulary/vocabulary.service.ts:57` |
|
|
184
117
|
| `VocabularyService.excludedHeadwords` | 1 | `FoldingService.headword` | `projects/ic-suite/coinagerie/coinagerie-vocabulary/src/modules/vocabulary/vocabulary.service.ts:70` |
|
|
118
|
+
| `VocabularyService.matchesPattern` | 1 | `VocabularyService.some(…)` | `projects/ic-suite/coinagerie/coinagerie-vocabulary/src/modules/vocabulary/vocabulary.service.ts:88` |
|
|
185
119
|
|
|
186
120
|
</details>
|
|
187
121
|
<!-- callidescope:end -->
|
|
@@ -325,8 +259,8 @@ graph LR
|
|
|
325
259
|
|
|
326
260
|
### Project
|
|
327
261
|
|
|
328
|
-

|
|
263
|
+

|
|
330
264
|

|
|
331
265
|

|
|
332
266
|
|
|
@@ -337,7 +271,7 @@ graph LR
|
|
|
337
271
|

|
|
338
272
|

|
|
339
273
|

|
|
340
|
-

|
|
341
275
|

|
|
342
276
|
|
|
343
277
|
### JavaScript
|
|
@@ -346,15 +280,15 @@ graph LR
|
|
|
346
280
|

|
|
347
281
|

|
|
348
282
|

|
|
349
|
-

|
|
284
|
+

|
|
285
|
+

|
|
286
|
+

|
|
287
|
+

|
|
354
288
|

|
|
355
289
|

|
|
356
|
-

|
|
291
|
+

|
|
358
292
|

|
|
359
293
|
|
|
360
294
|
### Python
|
|
@@ -510,20 +444,20 @@ graph LR
|
|
|
510
444
|
### Markdown
|
|
511
445
|
|
|
512
446
|

|
|
513
|
-

|
|
514
448
|

|
|
515
|
-

|
|
450
|
+

|
|
517
451
|

|
|
518
452
|

|
|
519
453
|

|
|
520
|
-

|
|
455
|
+

|
|
456
|
+

|
|
523
457
|

|
|
524
458
|

|
|
525
459
|

|
|
526
|
-

|
|
527
461
|

|
|
528
462
|

|
|
529
463
|

|
package/dist/src/index.d.ts
CHANGED
|
@@ -164,18 +164,22 @@ export declare class VocabularyService {
|
|
|
164
164
|
/** The words of one file: its path's, then its identifiers'. */
|
|
165
165
|
private collectFile;
|
|
166
166
|
/**
|
|
167
|
-
* The headwords the configuration leaves out.
|
|
167
|
+
* The headwords the configuration leaves out by exact word.
|
|
168
168
|
*
|
|
169
169
|
* Its words are folded the way the code's are, so exclusion compares
|
|
170
170
|
* headwords: excluding `service` covers `services`, and excluding
|
|
171
171
|
* `implements` covers the `implement` it folds into.
|
|
172
172
|
*/
|
|
173
173
|
private excludedHeadwords;
|
|
174
|
+
/** Whether a pattern leaves out a word: it matches the word or its headword. */
|
|
175
|
+
private matchesPattern;
|
|
174
176
|
/**
|
|
175
177
|
* Every word the configured files use, sorted and de-duplicated.
|
|
176
178
|
*
|
|
177
179
|
* The files a configuration writes a glossary to are left out, so a run
|
|
178
|
-
* never reads its own output back as vocabulary.
|
|
180
|
+
* never reads its own output back as vocabulary. A headword a pattern
|
|
181
|
+
* matches is left out wholly, as a string leaves out a headword: the pattern
|
|
182
|
+
* is tested against each occurrence's lowercase word and its headword.
|
|
179
183
|
*/
|
|
180
184
|
collect(configuration: ResolvedCoinagerieConfiguration): Promise<string[]>;
|
|
181
185
|
}
|
package/dist/src/index.js
CHANGED
|
@@ -176,18 +176,21 @@ var w = class VocabularyService {
|
|
|
176
176
|
}
|
|
177
177
|
return t;
|
|
178
178
|
}
|
|
179
|
+
matchesPattern(e, t, n) {
|
|
180
|
+
return n.some((n) => n.test(e) || n.test(t));
|
|
181
|
+
}
|
|
179
182
|
async collect(e) {
|
|
180
183
|
let t = this.discoveryService.discover({
|
|
181
184
|
directory: e.directory,
|
|
182
185
|
exclude: e.exclude.paths,
|
|
183
186
|
include: e.include,
|
|
184
187
|
skip: e.outputs.map((e) => e.path)
|
|
185
|
-
}), n = this.excludedHeadwords(e), r = /* @__PURE__ */ new Set(),
|
|
186
|
-
for (let
|
|
187
|
-
let
|
|
188
|
-
|
|
188
|
+
}), n = this.excludedHeadwords(e), r = e.exclude.patterns, i = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Set();
|
|
189
|
+
for (let s of t) for (let t of await this.collectFile(e.directory, s)) {
|
|
190
|
+
let s = a.get(t) ?? this.foldingService.headword(t, e);
|
|
191
|
+
a.set(t, s), this.matchesPattern(t, s, r) && o.add(s), n.has(s) || i.add(s);
|
|
189
192
|
}
|
|
190
|
-
return [...
|
|
193
|
+
return [...i].filter((e) => !o.has(e)).toSorted();
|
|
191
194
|
}
|
|
192
195
|
};
|
|
193
196
|
w = __decorate([e(), __decorateMetadata("design:paramtypes", [
|
package/package.json
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
"url": "https://github.com/organizzolini/codebase/issues"
|
|
5
5
|
},
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@coinagerie/configuration": "0.0.
|
|
8
|
-
"@coinagerie/languages": "0.0.
|
|
7
|
+
"@coinagerie/configuration": "0.0.3",
|
|
8
|
+
"@coinagerie/languages": "0.0.3",
|
|
9
9
|
"@nestjs/common": "^11.1.21 || ^12.0.1",
|
|
10
10
|
"ignore": "7.0.14",
|
|
11
11
|
"pluralize": "^8.0.0",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"strict": true
|
|
62
62
|
},
|
|
63
63
|
"types": "./dist/src/index.d.ts",
|
|
64
|
-
"version": "0.0.
|
|
64
|
+
"version": "0.0.3"
|
|
65
65
|
}
|