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

Log dev server access for log level verbose or more #2402

Merged

Conversation

lustoykov
Copy link
Contributor

@lustoykov lustoykov commented Dec 12, 2018

Attempts to address #2390

Failing tests

Error: Cannot find module '@parcel/Logger'

any idea how to import that properly so that CI works? It's fine locally.

@@ -1,9 +1,11 @@
const assert = require('assert');
const path = require('path');
const fs = require('@parcel/fs');
const logger = require('@parcel/Logger');
Copy link
Contributor Author

Choose a reason for hiding this comment

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

any guidance on how to import that properly? Seems to work locally, but not in CI.

Copy link
Member

Choose a reason for hiding this comment

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

You have a typo it's lowercase l, '@parcel/logger'

const protocol = req.connection.encrypted ? 'https' : 'http';
const fullUrl = `${protocol}://${req.headers.host}${req.url}`;

logger.verbose(fullUrl);
Copy link
Member

Choose a reason for hiding this comment

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

Probably a good idea to add some more info here, besides from just a url, something like Request: <url>

@lustoykov
Copy link
Contributor Author

lustoykov commented Dec 13, 2018

Thanks for the input! I think we're getting there 😆

CI fails with one last error, but I'm clueless about it, see screenshot

screenshot 2018-12-13 at 16 52 55

Also, here's a screenshot of the final solution

screenshot 2018-12-13 at 16 12 17

On a side note: If full test suite is ran, I've noticed the test 1) should auto install babel plugins in javascript.js (besides some others vue-related) fails and this might be due to faulty .babelrc configuration left from a possible migration Babel 6 -> Babel 7.

I think in Babel 7 the non-root babel-plugin-autoinstall/.babelrc is being ignored since not explicitly specified otherwise. Therefore @babel/plugin-proposal-class-properties is never being installed and the assertion fails. The other problem is that even if .babelrc is explicitly specified, test is fine only on first run where @babel/plugin-proposal-class-properties is actually installed and package.json modified respectively. However, in the test itself package.json is reverted to its previous state. In the next run, babel sees that @babel/plugin-proposal-class-properties is in node_modules and doesn't bother to modify package.json and the assertion fails again.

devongovett
devongovett previously approved these changes Dec 17, 2018
Copy link
Member

@devongovett devongovett left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution!

@devongovett devongovett merged commit 84f2894 into parcel-bundler:master Dec 17, 2018
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