Turbopack's analyzer: always treat promises as truth-y and non-nullish (#94186)
Promises are not included in the list of JavaScript's falsy values, therefore, they are always truthy. See https://developer.mozilla.org/en-US/docs/Glossary/Truthy. Additionally, promises are neither `null` or `undefined` so they are not nullish: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Nullish_coalescing. This PR updates Turbopack's analyzer to reflect this + adds unit tests for `is_truthy` and `is_nullish`.
Showing
Please
register
or
sign in
to comment