From 1a9ded6518ddbc417ae124e6c11b4568c61e45d7 Mon Sep 17 00:00:00 2001 From: Sebastian Beltran Date: Wed, 10 Jul 2024 19:35:59 -0500 Subject: [PATCH] build(scanner): change module resolution --- config/tsconfig/base.json | 3 ++- packages/cli/src/commands/scan.ts | 4 +++- packages/scanner/src/helpers/transpile-packages.ts | 3 ++- packages/scanner/src/index.ts | 2 -- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/config/tsconfig/base.json b/config/tsconfig/base.json index 230b50f..eb58995 100644 --- a/config/tsconfig/base.json +++ b/config/tsconfig/base.json @@ -10,7 +10,8 @@ "noEmit": true, "inlineSources": false, "isolatedModules": true, - "moduleResolution": "node", + "moduleDetection": "force", + "moduleResolution": "Bundler", "noUnusedLocals": false, "noUnusedParameters": false, "preserveWatchOutput": true, diff --git a/packages/cli/src/commands/scan.ts b/packages/cli/src/commands/scan.ts index a9a63db..17920c1 100644 --- a/packages/cli/src/commands/scan.ts +++ b/packages/cli/src/commands/scan.ts @@ -1,6 +1,8 @@ import path from 'node:path' -import { generateReport, scanFolder } from '@rapidbuild/scanner' +import { generateReport } from '@rapidbuild/scanner' +import { scanFolder } from '@rapidbuild/scanner/helpers' + import ora from 'ora' import { cyan, green } from 'picocolors' diff --git a/packages/scanner/src/helpers/transpile-packages.ts b/packages/scanner/src/helpers/transpile-packages.ts index 4621834..627bd03 100644 --- a/packages/scanner/src/helpers/transpile-packages.ts +++ b/packages/scanner/src/helpers/transpile-packages.ts @@ -1,9 +1,10 @@ import type { ConfigReport, Project } from '@/types' import { getFileOfPath } from '@/utils/splitPath' -import { getLanguages, getPackageManager } from '..' import { getFormatters } from './get-formatter' +import { getLanguages } from './get-languages' import { getLinters } from './get-linter' +import { getPackageManager } from './get-package-manager' import { resolveFiles } from './resolve-files' export const transpileMainPackage = async (files: string[], config: ConfigReport) => { diff --git a/packages/scanner/src/index.ts b/packages/scanner/src/index.ts index 03f89ca..c18a31c 100644 --- a/packages/scanner/src/index.ts +++ b/packages/scanner/src/index.ts @@ -34,5 +34,3 @@ export async function generateReport(files: string[], config?: ConfigReport): Pr return configProject } - -export * from './helpers'