Skip to content

Commit

Permalink
chore: add missing c8 ignore stop markers (#263)
Browse files Browse the repository at this point in the history
  • Loading branch information
brc-dd authored Jun 4, 2024
1 parent a00cad8 commit de0dab0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,9 @@ async function yamlLoader(_, content) {
`'yaml' is required for the YAML configuration files. Make sure it is installed\nError: ${e.message}`
)
}
/* c8 ignore stop */
}
return yaml.parse(content);
return yaml.parse(content)
}

/** @return {import('lilconfig').Options} */
Expand Down
5 changes: 5 additions & 0 deletions src/req.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,23 @@ async function req(name, rootFile = __filename) {
/* c8 ignore start */
throw err
}
/* c8 ignore stop */
}

if (tsx === undefined) {
try {
tsx = await import('tsx/cjs/api')
} catch (error) {
/* c8 ignore start */
importError.push(error)
}
/* c8 ignore stop */
}

if (tsx) {
let loaded = tsx.require(name, rootFile)
return loaded && '__esModule' in loaded ? loaded.default : loaded
/* c8 ignore start */
}

if (jiti === undefined) {
Expand All @@ -57,6 +61,7 @@ async function req(name, rootFile = __filename) {
.map(error => error.message)
.join('\n')}`
)
/* c8 ignore stop */
}

module.exports = req

0 comments on commit de0dab0

Please sign in to comment.