Skip to content

Fixies for running with artifactory 4.14.1 - #3172

Merged
bestander merged 2 commits into
yarnpkg:masterfrom
rogeriochaves:fixies-artifactory-4.14.1
Apr 25, 2017
Merged

bestander merged 2 commits into
yarnpkg:masterfrom
rogeriochaves:fixies-artifactory-4.14.1

Conversation

@rogeriochaves

@rogeriochaves rogeriochaves commented Apr 17, 2017 •

Copy link
Copy Markdown
Contributor

Summary

This will help solving #521

I use a private NPM registry hosted via Artifactory v4.14.1 and I was having some issues.

The first one is that apparently this version of Artifactory still does not support the application/vnd.npm.install-v1+json header implemented on #3112. To fix that, I noted by reading npm docs that we can add a fallback to application/json.

This allowed yarn to correctly download metadata from artifactory. Then, I had another problem, with the isRequestToRegistry function implemented on #2598. The problem was that although I do specify https://myartifactory for my registy, some dependencies gets the https replaced with http by yarn, preventing it from sending the authentication header. I don't know why this happens, maybe its artifactory itself telling yarn to use http (I've noted it happens on public dependencies)

So, I've modified the function isRequestToRegistry to understand that https://myartifactory and http://myartifactory is still the same registry.

Test plan

I've added extra test cases to isRequestToRegistry functional test, maybe some snapshots testing needs to be changed for the vnd.npm header, but they gave no errors on my machine.

Cheers!

@tuto

tuto commented Apr 17, 2017

Copy link
Copy Markdown

we need this in our team 💃
very useful and necesary

Thank you very much Rogerio

@rogeriochaves

Copy link
Copy Markdown
Contributor Author

@Daniel15 @bestander @kittens could you review this PR? We really need this

@bestander
bestander merged commit e4a5102 into yarnpkg:master Apr 25, 2017
@joyarzun

Copy link
Copy Markdown

Wowwww finally, thanks @bestander and @rogeriochaves

@Daniel15

Copy link
Copy Markdown
Member

Thanks for the pull request! If you want to use this today (before a new stable/RC release comes out), you can grab a nightly build: https://yarnpkg.com/en/docs/nightly

This was referenced Apr 28, 2017
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.

5 participants