()
| 85092 | const packageFile = "@commitlint/load/package.json"; |
| 85093 | const packageJsonPath = findModulePath(packageFile); |
| 85094 | const packageJson = JSON.parse(await import_promises.default.readFile(packageJsonPath, "utf8")); |
| 85095 | if (!packageJson) { |
| 85096 | throw new Error(`Failed to parse ${packageFile}`); |
| 85097 | } |
| 85098 | return packageJson.type === "module" ? "esm" : "cjs"; |
| 85099 | }; |
| 85100 | var getCommitLintPWDConfig = async () => { |
| 85101 | let load, modulePath; |
| 85102 | switch (await getCommitLintModuleType()) { |
| 85103 | case "cjs": |
| 85104 | modulePath = findModulePath("@commitlint/load"); |
| 85105 | load = require(modulePath).default; |
| 85106 | break; |
| 85107 | case "esm": |
| 85108 | modulePath = findModulePath("@commitlint/load/lib/load.js"); |
| 85109 | load = (await import(modulePath)).default; |
| 85110 | break; |
| 85111 | } |
| 85112 | if (load && typeof load === "function") { |
| 85113 | return await load(); |
no test coverage detected
searching dependent graphs…