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

chore(cli): remove findup-sync from root move to utils package && format ts files #806

Merged
merged 13 commits into from May 30, 2019

Conversation

anshumanv
Copy link
Member

remove findup-sync from package dir and move to utils

ISSUES CLOSED: #805

What kind of change does this PR introduce?
refactor mostly

Did you add tests for your changes?
yes

If relevant, did you update the documentation?
NA

Summary
removed findup-sync package from root, ported to utils

Does this PR introduce a breaking change?
Yes

Other information

* chore(cli): move constants to a separate file

moved all constants to a separate file for CLI scopre and imported from there.

ISSUES CLOSED: webpack#772

* chore(cli): lint files, rm console.log

Format all code using prettier, remove console.log

ISSUES CLOSED: webpack#772

* chore(cli): codacy fix

codacy fix

* chore(cli): split destructuring into multiple lines

split constants destructuring to multiple lines in config-yargs

* chore(cli): update var name, revert oc

update var name, revert oc

* chore(cli): moved constants to utils

moved constants to utils directory
bin/utils/convert-argv.js Outdated Show resolved Hide resolved
@anshumanv anshumanv changed the title chore(cli): remove findup-sync from package dir and move to utils chore(cli): remove findup-sync from root move to utils package Mar 27, 2019
Copy link
Contributor

@ematipico ematipico left a comment

Choose a reason for hiding this comment

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

Please import the utility as it was a package

@anshumanv
Copy link
Member Author

Can we possibly disable Travis comments as everyone can just follow the stack trace on Travis page? Comments seem to create a lot of noise. 😅

@ematipico
Copy link
Contributor

Sometimes people don't know how get to Travis logs and also from mobile it's not easy to read it. Here it helps and you also get a notification.

@anshumanv
Copy link
Member Author

@ematipico makes sense, can you help me figure out why tests are failing? Probably I'm missing something simple. 🤔

@anshumanv
Copy link
Member Author

@ematipico still no help, it installs the npm version and not the local version, can you suggest something?

@misterdev
Copy link
Contributor

misterdev commented Apr 5, 2019

Have you tried npm link inside utils and then npm link @webpack-cli/utils where you want to use it?
It should also be added as a dependency :)

Update: I'm not from my PC so I may have said obvious things, if it is failing in the CI I don't think it can work without republishing the utils package

@anshumanv
Copy link
Member Author

anshumanv commented Apr 5, 2019

Yeah works that way, locally. How do we make it work here? 🤔

@ematipico
Copy link
Contributor

You have to run Lerna bootstrap in order to link correctly the packages

@anshumanv
Copy link
Member Author

So the key is about listing @webpack-cli/utils as a local depency which installs from file, but that would mean every inter package dependency needs to be converted to local dep which will be installed from the local package and not from npm, should we go for it @ematipico

@ematipico
Copy link
Contributor

ematipico commented Apr 7, 2019

The real issue is that during the CI we don't call the command npm run bootstrap to link the packages before running the tests. We don't need to do any sort of link or local dep as you mentioned.

On your machine works because you linked correctly all the packages by running the command npm run bootstrap but it looks like we don't do the same on Travis/Azure. So I think, order to fix your issue, we just need to run that command before running the tests.

@anshumanv
Copy link
Member Author

anshumanv commented Apr 7, 2019

If I understand correctly it seems we are running it @ematipico -

npm run bootstrap

🤔

@ematipico
Copy link
Contributor

That's weird 😮

@ematipico ematipico closed this Apr 7, 2019
@ematipico ematipico reopened this Apr 7, 2019
bin/utils/convert-argv.js Outdated Show resolved Hide resolved
@webpack-bot
Copy link

@anshumanv Thanks for your update.

I labeled the Pull Request so reviewers will review it again.

@evenstensberg Please review the new changes.

use relative path for now
@anshumanv
Copy link
Member Author

@evenstensberg PTAL ✨

#806 (comment)

@anshumanv
Copy link
Member Author

@evenstensberg it's recommended to use relative imports for tests - lerna/lerna#2052 (comment)

Copy link
Member

@evenstensberg evenstensberg left a comment

Choose a reason for hiding this comment

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

Nearly there

packages/utils/path-utils.ts Outdated Show resolved Hide resolved
packages/utils/path-utils.ts Outdated Show resolved Hide resolved
@evenstensberg evenstensberg changed the title chore(cli): remove findup-sync from root move to utils package chore(cli): remove findup-sync from root move to utils package && format ts files May 30, 2019
@webpack-bot
Copy link

Thank you for your pull request! The most important CI builds succeeded, we’ll review the pull request soon.

Copy link
Member

@evenstensberg evenstensberg left a comment

Choose a reason for hiding this comment

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

lgtm, thanks for taking the time! 💙

@evenstensberg evenstensberg merged commit f6e57a8 into webpack:master May 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhancement: remove findup-sync from root package and move to utils
7 participants