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

Add verbose boolean to option #179

Open
3 tasks done
hugo-daclon opened this issue Feb 13, 2024 · 3 comments
Open
3 tasks done

Add verbose boolean to option #179

hugo-daclon opened this issue Feb 13, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@hugo-daclon
Copy link
Contributor

Description

As a dev using this plugin, I would benefit a verbosity parameter that logs messages like the existing

vite:istanbul> Sourcemaps was automatically enabled for code coverage to be accurate.
 To hide this message set build.sourcemap to true, 'inline' or 'hidden'.

that would tell me if instrumentation is being done or not and possibly also telling why, as it would allow me to not loose time debugging my configuration.

Suggested solution

example:

istanbulPlugin({
    include: 'src/*',
    exclude: ['node_modules', 'test/'],
    cypress: true,
    requireEnv: true,
    verbose: true
}),

would give

$ npx vite
vite:istanbul> Not instrumenting the code because CYPRESS_COVERAGE is not set.
 To hide this message, unset the istanbul verbose option

Alternative

No response

Additional context

Duplicate Issue avoidance:
I've searched all issues (closed and open) for words such as "verbose" or "verbosity".

Validations

  • Read the Contributing Guidelines.
  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
@hugo-daclon hugo-daclon added the enhancement New feature or request label Feb 13, 2024
@hugo-daclon hugo-daclon closed this as not planned Won't fix, can't repro, duplicate, stale Feb 14, 2024
@hugo-daclon hugo-daclon reopened this Feb 14, 2024
@hugo-daclon
Copy link
Contributor Author

hugo-daclon commented Feb 14, 2024

oops

@iFaxity
Copy link
Owner

iFaxity commented Feb 17, 2024

Hi @Nol-go,

Totally agree, will add a PR with a verbose option to log messages as well as more messages for a reason of not running the plugin due to the configuration.

@iFaxity iFaxity self-assigned this Feb 17, 2024
@hugo-daclon
Copy link
Contributor Author

hugo-daclon commented Feb 17, 2024

This coups also ne usefull during devlopment of features or bug resolutions, as I experienced with my PR, things like getting chunk id's in different colors depending on instrumentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants