fix: make `bigint` support optimistic when browserslist not found

This commit is contained in:
Alexander Akait 2024-08-02 20:39:05 +03:00 committed by GitHub
commit 4047985205
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 5 deletions

View File

@ -1122,7 +1122,8 @@ const applyOutputDefaults = (
F(
environment,
"bigIntLiteral",
() => /** @type {boolean | undefined} */ (tp && tp.bigIntLiteral)
() =>
tp && optimistic(/** @type {boolean | undefined} */ (tp.bigIntLiteral))
);
F(
environment,

View File

@ -118,7 +118,7 @@ describe("snapshots", () => {
"environment": Object {
"arrowFunction": true,
"asyncFunction": true,
"bigIntLiteral": undefined,
"bigIntLiteral": true,
"const": true,
"destructuring": true,
"document": true,
@ -350,7 +350,7 @@ describe("snapshots", () => {
"environment": Object {
"arrowFunction": true,
"asyncFunction": true,
"bigIntLiteral": undefined,
"bigIntLiteral": true,
"const": true,
"destructuring": true,
"document": true,
@ -2067,7 +2067,7 @@ describe("snapshots", () => {
@@ ... @@
- "arrowFunction": true,
- "asyncFunction": true,
- "bigIntLiteral": undefined,
- "bigIntLiteral": true,
- "const": true,
- "destructuring": true,
+ "arrowFunction": false,
@ -2101,7 +2101,7 @@ describe("snapshots", () => {
@@ ... @@
- "arrowFunction": true,
- "asyncFunction": true,
- "bigIntLiteral": undefined,
- "bigIntLiteral": true,
- "const": true,
- "destructuring": true,
+ "arrowFunction": false,