MCPcopy Index your code
hub / github.com/di-sukharev/opencommit / getCommitLintModuleType

Function getCommitLintModuleType

out/cli.cjs:85085–85093  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

85083 try {
85084 const resolvedPath = require.resolve(moduleName, { paths: [basePath] });
85085 return resolvedPath;
85086 } catch {
85087 }
85088 }
85089 throw new Error(`Cannot find module ${moduleName}`);
85090};
85091var getCommitLintModuleType = async () => {
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}`);

Callers 1

getCommitLintPWDConfigFunction · 0.70

Calls 2

findModulePathFunction · 0.70
parseMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…