Commit 5ff30dd
authored
feat: support parsing existing package.json descriptions as markdown (#2132)
## PR Checklist
- [x] Addresses an existing open issue: fixes #1934
- [x] That issue was marked as [`status: accepting
prs`](https://github.com/JoshuaKGoldberg/create-typescript-app/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22)
- [x] Steps in
[CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/create-typescript-app/blob/main/.github/CONTRIBUTING.md)
were taken
## Overview
Makes parsing around HTML (`README.md`) vs. markdown (`package.json`)
descriptions smarter. [`marked`](https://marked.js.org) in inline mode
is used to parse existing `package.json` descriptions, before they're
checked against the README.md one.
Also normalizes the output `package.json`'s `description` to be plain
text, since neither GitHub nor npm support rich text
(#1934 (comment)).
Example improvement:
JoshuaKGoldberg/eslint-plugin-erasable-syntax-only@c43f07b
🎁1 parent 4679042 commit 5ff30dd
File tree
10 files changed
+119
-40
lines changed- src
- blocks
- html
- options
- utils
10 files changed
+119
-40
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
| |||
Some 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 | |
|---|---|---|---|
| |||
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
188 | | - | |
| 188 | + | |
| 189 | + | |
189 | 190 | | |
190 | 191 | | |
191 | 192 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | | - | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | 6 | | |
16 | 7 | | |
17 | 8 | | |
18 | 9 | | |
19 | 10 | | |
| 11 | + | |
20 | 12 | | |
21 | 13 | | |
22 | 14 | | |
23 | | - | |
24 | 15 | | |
25 | 16 | | |
26 | | - | |
| 17 | + | |
27 | 18 | | |
28 | 19 | | |
29 | | - | |
30 | | - | |
31 | 20 | | |
32 | 21 | | |
33 | 22 | | |
| 23 | + | |
34 | 24 | | |
35 | 25 | | |
36 | | - | |
| 26 | + | |
37 | 27 | | |
38 | 28 | | |
39 | | - | |
| 29 | + | |
40 | 30 | | |
41 | 31 | | |
42 | | - | |
43 | | - | |
44 | 32 | | |
45 | 33 | | |
46 | 34 | | |
| 35 | + | |
47 | 36 | | |
48 | 37 | | |
49 | 38 | | |
50 | 39 | | |
51 | 40 | | |
52 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
53 | 62 | | |
54 | 63 | | |
55 | 64 | | |
56 | | - | |
57 | | - | |
58 | 65 | | |
59 | 66 | | |
60 | 67 | | |
| 68 | + | |
61 | 69 | | |
62 | 70 | | |
63 | 71 | | |
64 | 72 | | |
65 | 73 | | |
66 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
67 | 88 | | |
68 | 89 | | |
69 | 90 | | |
70 | | - | |
71 | | - | |
72 | 91 | | |
73 | 92 | | |
74 | 93 | | |
| 94 | + | |
75 | 95 | | |
76 | 96 | | |
77 | 97 | | |
78 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
79 | 112 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
1 | 3 | | |
2 | 4 | | |
| 5 | + | |
3 | 6 | | |
4 | 7 | | |
5 | 8 | | |
6 | 9 | | |
7 | 10 | | |
| 11 | + | |
8 | 12 | | |
9 | | - | |
10 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
11 | 16 | | |
12 | 17 | | |
13 | 18 | | |
14 | | - | |
| 19 | + | |
| 20 | + | |
15 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
16 | 39 | | |
17 | | - | |
18 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
19 | 44 | | |
20 | 45 | | |
21 | | - | |
| 46 | + | |
| 47 | + | |
22 | 48 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
0 commit comments