Skip to content

Conversation

@lumaxis
Copy link
Contributor

@lumaxis lumaxis commented May 18, 2017

As discussed with @bestander in yarnpkg/yarn#3231, I added a quick post explaining the new feature.

I don't really know what the guidelines are for the posts on your blog so I tried to align myself to some of the previous ones. Feel free to criticize or change anything as it makes sense to you 👍

Copy link
Member

@bestander bestander left a comment

Choose a reason for hiding this comment

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

Just fixed a typo and added a suggestion


Starting with version `0.26.0`, Yarn now understands a new configuration option called `custom-host-suffix`. This allows you to keep the same strict URL validations for most of your package URLs but also selectively loosen that check for a specific registry provider so that Yarn will now match the URLs where the host part ends with the value from this new option.

Simply add `custom-host-suffix` to either your global user-level `.npmrc` or your project's individual `.npmrc` and Yarn will be able to download your packages as desired.
Copy link
Member

Choose a reason for hiding this comment

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

How about .yarnrc with an example?

yarn config set custom-host-suffix <url>

Copy link
Contributor Author

@lumaxis lumaxis May 18, 2017

Choose a reason for hiding this comment

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

@bestander The custom-host-suffix actually does not work with .yarnrc right now, as far as I can tell.
I think npm-registry.js only loads config values from .npmrc: https://github.com/yarnpkg/yarn/blob/master/src/registries/npm-registry.js#L132

Copy link
Member

Choose a reason for hiding this comment

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

Yeah but there us yarn-registry that inherits from npm-registry and reads .yarnrc.
Could you please check if yarnrc works as well?
I expect that it should work.

Copy link

Choose a reason for hiding this comment

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

Can confirm - doesn't work to add custom-host-suffix to .yarnrc with 0.26.0-20170524.1610. Had to put it into .npmrc and haven't investigated further.

Copy link
Member

Choose a reason for hiding this comment

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

Ok, let's merge as is and iterate further

@bestander bestander merged commit 02589f6 into yarnpkg:master Jun 15, 2017
@bestander
Copy link
Member

Thanks, @lumaxis!

@gsklee
Copy link
Contributor

gsklee commented Jun 16, 2017

@bestander Maybe modify the post date so it can come on top as the newest post?

@bestander
Copy link
Member

bestander commented Jun 16, 2017 via email

@lumaxis
Copy link
Contributor Author

lumaxis commented Jun 16, 2017

@gsklee @bestander Added #530

@lumaxis lumaxis deleted the post-custom-host-suffix branch June 16, 2017 17:04
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.

5 participants