Commit e70af8f
committed
Address review round 3: homepage type check, preserve MPL notice
1. The homepage check coerced with String(), so ["https://example.com"] passed
by array-to-string coercion. It now requires a string, then https, then a
parseable URL. Verified against array, object, number, boolean, null and
"https://" with no host; a valid string and an absent homepage still pass.
2. The updater stripped every upstream comment, including the Public Suffix
List's MPL 2.0 notice, leaving the snapshot with no licence while the
repository declares MIT. The notice is now carried into the generated file,
read from upstream rather than hardcoded so a reworded notice still lands,
and the updater refuses to write if it cannot find it. README records that
the snapshot is MPL 2.0 and dev-only, outside the files allowlist, so the
published package remains MIT.
Guards are now 34 must-fail plus 6 must-pass, all verified by mutation, and the
licence guard was verified by serving the updater a list with the notice removed.1 parent 68c25a8 commit e70af8f
4 files changed
Lines changed: 47 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
83 | 89 | | |
84 | 90 | | |
85 | 91 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
2 | 7 | | |
3 | 8 | | |
4 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
17 | 34 | | |
18 | | - | |
| 35 | + | |
19 | 36 | | |
20 | 37 | | |
21 | 38 | | |
| |||
28 | 45 | | |
29 | 46 | | |
30 | 47 | | |
31 | | - | |
32 | | - | |
33 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
34 | 57 | | |
35 | 58 | | |
36 | 59 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | | - | |
152 | | - | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
153 | 159 | | |
154 | 160 | | |
155 | 161 | | |
| |||
0 commit comments