Skip to content

Commit

Permalink
test: omit annotations coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
antongolub committed May 4, 2024
1 parent 78ea421 commit 76f7adf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/build-js.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ plugins.push(
hooks: [
{
on: 'end',
pattern: /\.cjs/,
pattern: new RegExp('(' + entryPoints.map(e => path.parse(e).name).join('|') + ')\\.cjs$'),
transform(contents) {
return contents
.toString()
Expand All @@ -97,6 +97,7 @@ plugins.push(
)
.replaceAll('require("fs/promises")', 'require("fs").promises')
.replaceAll('}).prototype', '}).prototype || {}')
.replace(/\/\/ Annotate the CommonJS export names for ESM import in node:/, ($0) => `/* c8 ignore next 100 */\n${$0}`)
},
},
],
Expand Down

0 comments on commit 76f7adf

Please sign in to comment.