From a2bde672e2b4773febff5713078faed1cf82549a Mon Sep 17 00:00:00 2001 From: Divyansh Singh <40380293+brc-dd@users.noreply.github.com> Date: Tue, 4 Jun 2024 14:27:23 +0530 Subject: [PATCH] chore: add missing c8 ignore stop markers --- src/index.js | 3 ++- src/req.js | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 909e395..d8e35c1 100644 --- a/src/index.js +++ b/src/index.js @@ -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} */ diff --git a/src/req.js b/src/req.js index bd7cb39..41feae5 100644 --- a/src/req.js +++ b/src/req.js @@ -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) { @@ -57,6 +61,7 @@ async function req(name, rootFile = __filename) { .map(error => error.message) .join('\n')}` ) + /* c8 ignore stop */ } module.exports = req