Commit 1716739
refactor: comprehensive security, performance & architecture optimization (#11)
* refactor: comprehensive security, performance & architecture optimization
- Fix XSS vulnerability: escape HTML before markdown rendering in commit messages
- Fix delimiter collision: replace `|` with `\x1F` (Unit Separator) in git pretty formats
- Fix valaxy.config.ts: use `defineValaxyConfig` instead of `defineTheme`
- Cache git-log.json client-side to avoid redundant fetches on navigation
- Replace @octokit/rest with native fetch in client bundle (~100KB saved)
- Optimize deduplicateContributors from O(n²) to O(n) via Map grouping
- Replace sync execFileSync with async git.raw() in getLastUpdated
- Only cache changelog in CI mode for fresh data during dev
- Reduce maxConcurrentProcesses from 200 to 10
- Decouple GitLogChangelog.vue from @vueuse/metadata
- Add configurable changelog filter (includeTypes, includeBreaking)
- Add useGitLogState() composable with loading/error states
- Define types locally, remove @vueuse/metadata type dependency
- Move @octokit/rest to optionalDependencies
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* chore: update lock
* fix: address copilot review feedback
- Sanitize URLs in markdown renderer: block javascript:, data:, vbscript:
protocols in links and images to close XSS vector (copilot #3)
- Document Changelog.body as deprecated — field was never reliably populated
due to %b multiline conflicts with --name-only parsing (copilot #1, #2)
- Move @octokit/rest back to dependencies to prevent silent feature
loss when installed with --no-optional (copilot #4)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: address copilot review feedback (cycle 2)
- Block protocol-relative URLs (//evil.example) in sanitizeUrl regex
- Add res.ok check before parsing git-log.json response
- Fix comment/behavior mismatch on changelog cache condition
- Replace O(n²) indexOf dedup with Set-based O(n) dedup
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: address copilot review feedback (cycle 3)
- Fix nested <a> tags: only replace #issue refs in text content, not inside tags
- Fix breaking change detection: match conventional commit `type!:` pattern
instead of any `!` anywhere in message
- Fix type matching: require `type:`, `type(`, or `type!` after prefix to
prevent false positives like `feature:` matching `feat`
- Fix contributor map key: use email instead of name to avoid merging
distinct contributors with same display name
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: address remaining copilot review feedback
- Prevent nested <a> tags when commit messages contain markdown links
with issue references (e.g. `[#123](url)`) by splitting on anchor
elements before replacing #N patterns
- Include statusText and URL in fetchContributors error message for
easier debugging of rate-limit (403) responses
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: address copilot review feedback (cycle 4)
- Re-export ./types from index.ts so runtime helpers like
shouldIncludeCommit are available at runtime, not just types.
- Restore getLastUpdated to sync (backward compatible) and add
getLastUpdatedAsync for async pipelines.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* fix: address copilot review feedback (cycle 5)
- shouldIncludeCommit: when `includeBreaking: false`, also exclude
breaking commits whose type token is in `includeTypes` (e.g. `feat!:`,
`feat(scope)!:`). Previously they leaked through via the
`types.some(matchesType)` path.
- Cover the regression with explicit `feat!:` / `feat(scope)!:` /
`fix!:` test cases under `includeBreaking: false`.
- replaceIssueRefs: tokenize HTML into anchor blocks, single tags, and
text nodes so `#N` is only rewritten in text. Prevents `<img alt='#1'/>`
/ `<code>#1</code>` etc. from being rewritten in attributes/tag bodies.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* fix: address copilot review feedback (cycle 6)
- batchGetChangelog: bound git log with --max-count = maxCount * filePaths.length
so multi-path calls no longer read the full repo history when a maxCount
guard is set. Per-file slicing still happens in JS for correctness.
- Rewrite the two batch-parsing tests so they actually call flushGitLogBatch
(where parsing happens). Previously the mocked git.raw output was never
consumed, so the tests only verified frontmatter.path. New assertions
check that contributors are parsed with the \x1F separator and that
pipe-in-name authors are preserved verbatim.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 41ce535 commit 1716739
16 files changed
Lines changed: 1384 additions & 973 deletions
File tree
- client
- composables
- services
- components
- node
- test/node
- types
- utils
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
23 | | - | |
| 25 | + | |
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
8 | 39 | | |
9 | 40 | | |
10 | 41 | | |
| |||
24 | 55 | | |
25 | 56 | | |
26 | 57 | | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
| 58 | + | |
| 59 | + | |
31 | 60 | | |
32 | 61 | | |
33 | 62 | | |
| |||
42 | 71 | | |
43 | 72 | | |
44 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | 2 | | |
4 | 3 | | |
5 | 4 | | |
6 | | - | |
7 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
8 | 11 | | |
9 | 12 | | |
10 | 13 | | |
11 | 14 | | |
12 | | - | |
13 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
14 | 22 | | |
15 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
16 | 31 | | |
17 | 32 | | |
18 | 33 | | |
19 | 34 | | |
20 | | - | |
| 35 | + | |
21 | 36 | | |
22 | | - | |
| 37 | + | |
23 | 38 | | |
24 | 39 | | |
25 | 40 | | |
26 | | - | |
27 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
28 | 44 | | |
29 | | - | |
30 | | - | |
| 45 | + | |
| 46 | + | |
31 | 47 | | |
32 | 48 | | |
33 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
| 2 | + | |
4 | 3 | | |
5 | | - | |
| 4 | + | |
6 | 5 | | |
7 | 6 | | |
8 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
9 | 11 | | |
10 | 12 | | |
| 13 | + | |
11 | 14 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
| 15 | + | |
24 | 16 | | |
25 | 17 | | |
26 | 18 | | |
| |||
62 | 54 | | |
63 | 55 | | |
64 | 56 | | |
65 | | - | |
| 57 | + | |
66 | 58 | | |
67 | 59 | | |
68 | 60 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
| 1 | + | |
| 2 | + | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
4 | 10 | | |
5 | 11 | | |
6 | 12 | | |
| |||
12 | 18 | | |
13 | 19 | | |
14 | 20 | | |
15 | | - | |
16 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
17 | 24 | | |
18 | 25 | | |
19 | 26 | | |
20 | | - | |
21 | | - | |
22 | 27 | | |
23 | 28 | | |
24 | 29 | | |
25 | 30 | | |
26 | | - | |
| 31 | + | |
27 | 32 | | |
28 | 33 | | |
29 | 34 | | |
| |||
37 | 42 | | |
38 | 43 | | |
39 | 44 | | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
| 45 | + | |
| 46 | + | |
44 | 47 | | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
| 48 | + | |
| 49 | + | |
52 | 50 | | |
53 | | - | |
54 | 51 | | |
55 | 52 | | |
56 | 53 | | |
| |||
59 | 56 | | |
60 | 57 | | |
61 | 58 | | |
62 | | - | |
| 59 | + | |
63 | 60 | | |
64 | 61 | | |
65 | 62 | | |
66 | 63 | | |
67 | 64 | | |
68 | 65 | | |
69 | 66 | | |
70 | | - | |
| 67 | + | |
71 | 68 | | |
72 | 69 | | |
73 | | - | |
74 | | - | |
| 70 | + | |
| 71 | + | |
75 | 72 | | |
76 | 73 | | |
77 | 74 | | |
78 | 75 | | |
79 | 76 | | |
80 | | - | |
| 77 | + | |
| 78 | + | |
81 | 79 | | |
0 commit comments