Commit 08eae47
committed
feat: add binDir step to normalize function
This adds the `binDir` step to `.normalize()`. This will translate `directories.bin` into a `.bin` entry.
`read-package-json-fast` technically had TWO apis. You could call it as exported, or you could call `.normalize`. The only difference between the two was that `.normalize` did not include the translation of `directories.bin` into `.bin`. We don't need another top level api for this package. Adding `binDir` to the `normalize` step is the right one. That's part of preparing a package for local consumption. I'm relatively certain we have bugs we've missed here because of this. This also means any bugs we fix in `binDir` will be fixed in all use cases. The existing `binDir` step (using glob) is also preferable to the code that `read-package-json-fast` was using (using manual recursive directory walking).
Ultimately this will help us finish porting existing code that uses `read-package-json-fast` to this library.1 parent 23c29a9 commit 08eae47
3 files changed
Lines changed: 19 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| |||
112 | 113 | | |
113 | 114 | | |
114 | 115 | | |
115 | | - | |
| 116 | + | |
116 | 117 | | |
117 | 118 | | |
118 | 119 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
106 | 110 | | |
107 | 111 | | |
108 | 112 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
170 | 183 | | |
171 | 184 | | |
172 | 185 | | |
| |||
0 commit comments