Skip to content

Commit

Permalink
Move from istanbul to v8 coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
ai committed Oct 23, 2023
1 parent 2614f28 commit d675871
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 304 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@size-limit/time": "workspace:^",
"@size-limit/webpack": "workspace:^",
"@size-limit/webpack-why": "workspace:^",
"@vitest/coverage-istanbul": "^0.34.6",
"@vitest/coverage-v8": "^0.34.6",
"clean-publish": "^4.2.0",
"cross-spawn": "^7.0.3",
"dual-publish": "^3.0.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/size-limit/parse-args.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default function parseArgs(plugins, argv) {
}
args.compareWith = nextArg
} else if (arg === '--watch') {
/* istanbul ignore next */
/* c8 ignore next */
args.watch = true
} else if (arg === '--highlight-less') {
args.highlightLess = true
Expand Down
2 changes: 1 addition & 1 deletion packages/size-limit/rm.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import fs from 'node:fs/promises'

export default async function rm(dir) {
if (!fs.rm) {
/* istanbul ignore next */
/* c8 ignore next 3 */
if (existsSync(dir)) {
await fs.rmdir(dir, { recursive: true })
}
Expand Down
4 changes: 2 additions & 2 deletions packages/size-limit/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import parseArgs from './parse-args.js'
import readPkgUp from './read-pkg-up.js'
import { SizeLimitError } from './size-limit-error.js'

/* c8 ignore next 10 */
function throttle(fn) {
let next, running
// istanbul ignore next
return () => {
clearTimeout(next)
next = setTimeout(async () => {
Expand Down Expand Up @@ -82,7 +82,7 @@ export default async process => {

await calcAndShow()

/* istanbul ignore if */
/* c8 ignore next 6 */
if (hasArg('--watch')) {
let watcher = chokidar.watch(['**/*'], {
ignored: '**/node_modules/**'
Expand Down

0 comments on commit d675871

Please sign in to comment.