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( F(
environment, environment,
"bigIntLiteral", "bigIntLiteral",
() => /** @type {boolean | undefined} */ (tp && tp.bigIntLiteral) () =>
tp && optimistic(/** @type {boolean | undefined} */ (tp.bigIntLiteral))
); );
F( F(
environment, environment,

View File

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