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

prefer local over global npmrc file #39

Merged
merged 5 commits into from
Jun 8, 2017
Merged

Conversation

svnlto
Copy link
Contributor

@svnlto svnlto commented Jun 8, 2017

This PR changes the default behaviour of this library so it'll look for a local npmrc file first before defaulting to global.

I found this to be very useful in build scenarios that are not able to provide encapsulated environments.

.npmrc Outdated
@@ -1,2 +1,3 @@
registry=http://registry.npmjs.org/
save-exact=true
//npm.example.com/:_authToken=${NPM_TOKEN}
Copy link
Owner

Choose a reason for hiding this comment

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

could you remove this line - break CI

@bahmutov
Copy link
Owner

bahmutov commented Jun 8, 2017

Love it! Could you remove the token in the .npmrc file and push the change, and I will merge it

@svnlto
Copy link
Contributor Author

svnlto commented Jun 8, 2017

Done 👍

@svnlto
Copy link
Contributor Author

svnlto commented Jun 8, 2017

Looks like something else is breaking now?

@bahmutov
Copy link
Owner

bahmutov commented Jun 8, 2017

yeah, seems one of the tests it putting NPM_TOKEN into the .npmrc and then trying to run more tests fails. I will merge your pull request and will fix this later tonight.

Thank you for the code, will try to publish tonight

@bahmutov bahmutov merged commit e2b47bf into bahmutov:master Jun 8, 2017
@svnlto svnlto mentioned this pull request Jun 8, 2017
@hutson
Copy link
Contributor

hutson commented Jul 9, 2017

@bahmutov I recently came across this pull request, because the functionality described by @svnlto is exactly what I'm looking for to help with isolating unit tests for npm-publish-git-tags - https://gitlab.com/hyper-expanse/npm-publish-git-tag/merge_requests/2/

I'd just like to ask, when you have a few minutes, if you wouldn't mind publishing this pull request to the npm registry so I can use it in my project.

bahmutov added a commit that referenced this pull request Jul 10, 2017
bahmutov added a commit that referenced this pull request Jul 10, 2017
@bahmutov
Copy link
Owner

Version 1.13.0 has been published to NPM. The full release note can be found at npm-utils/releases/tag/v1.13.0.

Tip: safely upgrade dependency npm-utils in your project using next-update

@bahmutov
Copy link
Owner

@hbetts I have pushed this feature (BTW I implemented https://github.com/bahmutov/github-post-release based on your https://github.com/gitter-badger/semantic-release-github-notifier) and was released.

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.

None yet

3 participants