Commit 1b4a654
lib: make getCallSites sourceMap option truly optional
When calling the `util.getCallSites(...)` API, if the `options`
argument is omitted, then the `options.sourceMap` option is defaulted
to false. However, if any empty `options` is passed, it would throw
an error is `sourceMap` was not explicitly given. This relaxes that
so that `sourceMap` can be left unspecified.
For instance, before this commit, `getCallSites({})` would throw an
error.
Also, add more test coverage of this.
PR-URL: #57388
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Jason Zhang <xzha4350@gmail.com>1 parent dd7ea96 commit 1b4a654
2 files changed
+20
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
388 | 388 | | |
389 | 389 | | |
390 | 390 | | |
391 | | - | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
392 | 394 | | |
393 | 395 | | |
394 | 396 | | |
| |||
397 | 399 | | |
398 | 400 | | |
399 | 401 | | |
400 | | - | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
401 | 405 | | |
402 | 406 | | |
403 | 407 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
0 commit comments