Commit bc5e35a
authored
fix(types)!: fix
* fix(types): fix @netlify/headers-parser types
These types were very weak, containing plentiful `any`s, both explicit and implicit, as
well as some incorrect inferred types.
* chore(tsconfig): simplify tsconfig strict config
We should be opting *into* strict mode and only opting *out* of some flags incrementally
while we fix errors.
This commit:
- flips the global `strict` on
- removes values being set to the default via the above
- stops disabling flags that obscured no errors (or very few, which I then fixed)
- moves a few flag disablings to the specific packages that require it
- explictly configures strict flags for already rather strict packages
* fix(types): mark netlify.toml [[headers]].values required
* style: add empty line after imports
* refactor: improve variable name
* docs: add inline comment explain funky type
* refactor: remove incorrect extraneous property from type
* fix(parseAllHeaders)!: mark `minimal` as required
All callers already pass in a non-nil `boolean`, so this is only technically breaking.
* fix(types)!: increase strictness of optional types
* fix(types): add missing PollingStrategy.name type
* feat(types): export Category, PollingStrategy@netlify/headers-parser types (#6104)1 parent 2aa50a6 commit bc5e35a
File tree
31 files changed
+235
-117
lines changed- packages
- build-info/src
- frameworks
- settings
- build
- config/src
- mutations
- headers-parser
- src
- tests
- helpers
- nock-udp
- testing
- src
- zip-it-and-ship-it
- src
- runtimes/node/in_source_config
31 files changed
+235
-117
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
324 | 324 | | |
325 | 325 | | |
326 | 326 | | |
327 | | - | |
| 327 | + | |
328 | 328 | | |
329 | 329 | | |
330 | 330 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
| 15 | + | |
21 | 16 | | |
22 | 17 | | |
23 | 18 | | |
24 | 19 | | |
25 | | - | |
26 | 20 | | |
27 | 21 | | |
28 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
288 | 288 | | |
289 | 289 | | |
290 | 290 | | |
291 | | - | |
| 291 | + | |
292 | 292 | | |
293 | 293 | | |
294 | 294 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
6 | 9 | | |
7 | 10 | | |
8 | 11 | | |
9 | 12 | | |
10 | 13 | | |
11 | 14 | | |
12 | 15 | | |
13 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
14 | 22 | | |
15 | 23 | | |
16 | 24 | | |
| |||
37 | 45 | | |
38 | 46 | | |
39 | 47 | | |
40 | | - | |
| 48 | + | |
41 | 49 | | |
42 | 50 | | |
43 | 51 | | |
44 | 52 | | |
45 | | - | |
| 53 | + | |
46 | 54 | | |
47 | 55 | | |
48 | 56 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
0 commit comments