-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: bundling error in @vitest/coverage-v8
Upstream fix in vitest-dev/vitest#5549
- Loading branch information
Showing
3 changed files
with
28 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
diff --git a/dist/provider.js b/dist/provider.js | ||
index e1eb11d..a815f1c 100644 | ||
--- a/dist/provider.js | ||
+++ b/dist/provider.js | ||
@@ -1800,14 +1800,8 @@ const CovBranch = requireBranch(); | ||
const CovFunction = require_function(); | ||
const CovSource = requireSource(); | ||
const { sliceRange } = requireRange(); | ||
-const compatError = Error(`requires Node.js ${require$$9.engines.node}`); | ||
-const { readFileSync } = require$$10; | ||
-let readFile = () => { throw compatError }; | ||
-try { | ||
- readFile = require('fs').promises.readFile; | ||
-} catch (_err) { | ||
- // most likely we're on an older version of Node.js. | ||
-} | ||
+const { readFileSync } = require$$9; | ||
+const readFile = promises.readFile; | ||
const { TraceMap } = requireTraceMapping_umd(); | ||
const isOlderNode10 = /^v10\.(([0-9]\.)|(1[0-5]\.))/u.test(process.version); | ||
const isNode8 = /^v8\./.test(process.version); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.