Commit 674b001
committed
refactor: improve package validation and cache hit tracking
- replace custom regex in sanitizePackageName with validate-npm-package-name for alignment with npm’s official rules
- add local type declaration for validate-npm-package-name to fix TS7016 error
- refactor package filtering to use a loop instead of .filter() with side effects, ensuring accurate cache hit metrics
Notes:
- kept existing setTimeout(...).unref() pattern as-is (did not switch to timers/promises) per decision1 parent 80787b9 commit 674b001
File tree
4 files changed
+38
-23
lines changed- src/typingsInstaller
4 files changed
+38
-23
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
117 | 120 | | |
118 | 121 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
205 | 204 | | |
206 | 205 | | |
207 | 206 | | |
| |||
815 | 814 | | |
816 | 815 | | |
817 | 816 | | |
818 | | - | |
819 | | - | |
820 | | - | |
821 | | - | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
822 | 820 | | |
| 821 | + | |
| 822 | + | |
823 | 823 | | |
824 | | - | |
825 | | - | |
| 824 | + | |
826 | 825 | | |
827 | 826 | | |
828 | 827 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
0 commit comments