Skip to content

Commit

Permalink
fix: make bigint support optimistic when browserslist not found
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-akait authored Aug 2, 2024
2 parents 1ff2ba9 + eaab7e7 commit 4047985
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion lib/config/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -1122,7 +1122,8 @@ const applyOutputDefaults = (
F(
environment,
"bigIntLiteral",
() => /** @type {boolean | undefined} */ (tp && tp.bigIntLiteral)
() =>
tp && optimistic(/** @type {boolean | undefined} */ (tp.bigIntLiteral))
);
F(
environment,
Expand Down
8 changes: 4 additions & 4 deletions test/Defaults.unittest.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ describe("snapshots", () => {
"environment": Object {
"arrowFunction": true,
"asyncFunction": true,
"bigIntLiteral": undefined,
"bigIntLiteral": true,
"const": true,
"destructuring": true,
"document": true,
Expand Down Expand Up @@ -350,7 +350,7 @@ describe("snapshots", () => {
"environment": Object {
"arrowFunction": true,
"asyncFunction": true,
"bigIntLiteral": undefined,
"bigIntLiteral": true,
"const": true,
"destructuring": true,
"document": true,
Expand Down Expand Up @@ -2067,7 +2067,7 @@ describe("snapshots", () => {
@@ ... @@
- "arrowFunction": true,
- "asyncFunction": true,
- "bigIntLiteral": undefined,
- "bigIntLiteral": true,
- "const": true,
- "destructuring": true,
+ "arrowFunction": false,
Expand Down Expand Up @@ -2101,7 +2101,7 @@ describe("snapshots", () => {
@@ ... @@
- "arrowFunction": true,
- "asyncFunction": true,
- "bigIntLiteral": undefined,
- "bigIntLiteral": true,
- "const": true,
- "destructuring": true,
+ "arrowFunction": false,
Expand Down

0 comments on commit 4047985

Please sign in to comment.