Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core): compilation issue due to barrel-less property #148

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions packages/core/src/lib/main/parse-project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import throwIfNull from '../util/throw-if-null';
import { TsData } from '../file-info/ts-data';
import { Module } from '../modules/module';
import { SheriffConfig } from '../config/sheriff-config';
import { findModulePaths } from "../modules/find-module-paths";
import { findModulePaths } from '../modules/find-module-paths';

export type ParsedResult = {
fileInfo: FileInfo;
Expand All @@ -22,7 +22,7 @@ export const parseProject = (
traverse: boolean,
tsData: TsData,
config: SheriffConfig,
fileContent?: string
fileContent?: string,
): ParsedResult => {
const unassignedFileInfo = generateUnassignedFileInfo(
entryFile,
Expand All @@ -38,14 +38,19 @@ export const parseProject = (
const getFileInfo = (path: FsPath) =>
throwIfNull(fileInfoMap.get(path), `cannot find FileInfo for ${path}`);

const modulePaths = findModulePaths(projectDirs, config.tagging, config.barrelFileName);
const modulePaths = findModulePaths(
projectDirs,
config.tagging,
config.barrelFileName,
config.enableBarrelLess,
);
const modules = createModules(
unassignedFileInfo,
modulePaths,
rootDir,
fileInfoMap,
getFileInfo,
config.barrelFileName
config.barrelFileName,
);
fillFileInfoMap(fileInfoMap, modules);

Expand Down
Loading