-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
The way the code below is written causes markings reports to fail for any markings in files which belong to the root package.
markings/packages/cli/src/index.ts
Lines 40 to 54 in cd3b380
| function getPackageFromFilename( | |
| repoRoot: string, | |
| filename: string, | |
| packagesByDirectory: Map<string, Package> | |
| ) { | |
| let currentDir = nodePath.dirname(filename); | |
| while (currentDir !== repoRoot) { | |
| let maybeCurrentPackage = packagesByDirectory.get(currentDir); | |
| if (maybeCurrentPackage !== undefined) { | |
| return maybeCurrentPackage; | |
| } | |
| currentDir = nodePath.dirname(currentDir); | |
| } | |
| throw new Error(`could not find package from ${JSON.stringify(filename)}`); | |
| } |
Metadata
Metadata
Assignees
Labels
No labels