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

feat: DEBUG flag and project.json validation #31

Merged
merged 3 commits into from
Jun 11, 2024

Conversation

EladBezalel
Copy link
Collaborator

@EladBezalel EladBezalel commented May 13, 2024

  • added bunch of console.debug to print out TRAF progress (used with DEBUG=true env var)
  • added warning for faulty project.json (missing name or sourceRoot properties) and fallback-ing to file path

raz-ezra-lmnd
raz-ezra-lmnd previously approved these changes May 15, 2024
const tsConfigPath = resolve(cwd, tsConfig);

if (existsSync(tsConfigPath)) {
if (verbose) {
logger.log(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@EladBezalel maybe a change in approach, maybe we can start using logger.debug and then we can set the debug level or the DEBUG env var and this way u won't need to do the if (verbose) part and the logger should know how to handle log levels.

wdyt? the benefit here is that this will reduce the amount of branching in code and will make it a bit nicer and u won't have to add additional logic for params

Copy link
Collaborator

@levan-giguashvili-lmnd levan-giguashvili-lmnd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks fine, but one thing, u might want to remove from the PR description, commits and other places that u added a verbose flag

@EladBezalel EladBezalel changed the title feat: verbose mode and project.json validation feat: DEBUG flag and project.json validation Jun 11, 2024
@EladBezalel EladBezalel merged commit a813e6c into main Jun 11, 2024
14 checks passed
@EladBezalel EladBezalel deleted the verbose-mode-and-project-validation branch June 11, 2024 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants