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
refactor(kit,nuxt,schema): use consola
and improve test dx
#23302
Conversation
Run & review this pull request in StackBlitz Codeflow. |
TLDR: output is more stable yet, Logs are still somehow leaking and spamming CI/Test output. Also, we have random failures with Ubuntu preset (most likely concurrency) but i gues it is worth to iterate over such big refactor into smaller steps... |
try { | ||
requests.push(req.url().replace(url('/'), '/')) | ||
} catch (err) { | ||
// TODO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what kind of error was being triggered here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The lovely context is not available one by late calling url()
! Turns out we somehow still keep loading the Browser pages after tests are being done and we don't have context anymore.
This was more visible in new nuxi-edge case because we early close server properly now and made it more visible.
However i think would be nice later investigate root causes. Seems we are wasting too much on browser allocation in our tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice find!
consola
and improve test dx
π Linked issue
Extracted from #23225
β Type of change
π Description
This PR refactors all packages to leverage consola logger exported from
@nuxt/kit
.We use a magical conosla wrapper in CLI that was automatically wrapping all console usages but it can be easily missed when running in tests or with programmatic usage.
Exceptions:
process.client
to avoid clattering outputAdded back a (warning level) eslint rule also for
no-console
Note: This PR also contains small other eslint tweaks to remove all current warnings.
π Checklist