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

Parcel 2: Extract Logger into its own package #2134

Closed
devongovett opened this issue Oct 15, 2018 · 7 comments
Closed

Parcel 2: Extract Logger into its own package #2134

devongovett opened this issue Oct 15, 2018 · 7 comments

Comments

@devongovett
Copy link
Member

Extract the logger from Parcel 1 into its own package in the monorepo for Parcel 2, as @parcel/logger. It should go in the packages/core/logger folder. Parcel 1 should be updated to use the new package as well.

@devongovett devongovett added this to the Parcel 2 milestone Oct 15, 2018
@devongovett devongovett added this to To do in Parcel 2 via automation Oct 15, 2018
@webtaculars
Copy link
Contributor

Hi @devongovett. I would be happy to help on this issue if you can guide me.

@devongovett
Copy link
Member Author

@webtaculars awesome! I am working on setting the monorepo up today on master, and once that's done it's a matter of moving some files around and getting the new package set up. Will comment back here when ready. Thanks!

@devongovett
Copy link
Member Author

devongovett commented Oct 17, 2018

@webtaculars ok, monorepo is set up!

So basically what needs to happen is this:

  • Make a folder in packages/core/logger.
  • Move Logger.js and other local dependencies (mostly utils) into packages/core/logger/src, and the tests into packages/core/logger/test. Looks like it's also dependent on the worker farm, which is being extracted into its own package in Parcel 2: Extract worker farm into its own package #2132. May need to wait for that one first...
  • Create a package.json file for the @parcel/logger package in that folder. Add all of the dependencies of the Logger.js to that package.json.
  • Setup a test script for that package using mocha.

Please comment back here if you have questions, and thanks for the help! 🙏

@webtaculars
Copy link
Contributor

Hi @devongovett, I have created a pull request GH-2165. But I have a few questions

  1. @parcel/logger uses prettyError.js and emoji.js utils. You asked me to move utils from the core but these two utils are also used by other modules. So I have replicated both utils functions in the logger package. Any other way to implement this that you can suggest?

  2. Since you asked me to wait for the worker farm issue, I have created the PR by taking workerfarm-package branch as the base. Should I create the PR from master?

@devongovett devongovett moved this from To do to In progress in Parcel 2 Oct 18, 2018
@devongovett
Copy link
Member Author

Awesome, thanks!

  1. Hmm yeah. I'm not certain what we're going to do with these types of utils yet. Perhaps a @parcel/utils package? Or maybe in these two cases, they could be accessed as part of the logger package?

  2. I merged that branch into master, so if you could rebase that would be great.

@webtaculars
Copy link
Contributor

  1. I was thinking to make both the utils functions as a part of logger package.

  2. Rebase done

Parcel 2 automation moved this from In progress to Done Oct 18, 2018
@devongovett
Copy link
Member Author

Awesome, thanks for your work on this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Parcel 2
  
Done
Development

No branches or pull requests

2 participants