-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
fix(owner): Fix the currently broken yarn owner
command
#5593
Conversation
const pkg = await config.registries.npm.request(name); | ||
reporter.step(1, 1, reporter.lang('ownerGetting', name)); | ||
const pkg = await config.registries.npm.request(name, { | ||
headers: {Accept: 'application/json'}, |
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.
Do we have to specify the headers? Isn't config.registries.npm
doing it for us?
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.
I tried without headers and it didn't work, and such json headers appear in other commands also.
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.
@arcanis - maybe we can add this by default in a separate diff if it is not done already?
@rubycut can you merge from master and see if that fixes the broken builds? |
@BYK , I rebased to master, nothing changed. macos checks always fail (free plan?), appveyor also fails, which doesn't seem to be connect with my pull request, appveyor error message: Build started |
This doesn't happen on master or on other pull requests. Something is up with how this is set up. I'll see what's wrong. For some reason both services are trying to use your account instead of Yarn's account. |
yarn owner
command
Thanks a lot! |
**Summary** Follow up to #5593. Looks like we need to send `Accept: application/json` header with most of the registry requests so this patch adds it by default and removes the ad-hoc headers from info and owner commands. **Test plan** Existing tests should pass.
@BYK when I started development, I opened my own circle-ci account, because I was working on enterprise tests, maybe that was the issue. If I fork your repo, can I automatically run tests on circle-ci during development in forked repo without opening account there? I doubt that. So, what is is the proper workflow? |
@rubycut - ah, that probably explains it. You can't use Yarn's CircleCI account unless you submit a PR to it. Once a PR is opened, CircleCI should run that specific PR in Yarn's account. I'll let them know of this issue. Thanks for the help! |
…from npm (#5667) **Summary** Follow up to #5593. Looks like we use an npm-specific request header to reduce the bandwidth. That said, for some commands, we need the full responses, which was achieved by setting the `Accept: application/json` header manually. This patch introduces a more descriptive request option, `unfiltered` to standardize this usage. See https://github.com/npm/npm-registry-client#requests for more info. **Test plan** Existing tests should pass.
Summary
yarn owner
#3893Test plan
Yarn now correctly displays the list of package owners. Also added automated tests.