-
-
Notifications
You must be signed in to change notification settings - Fork 33
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: don't fail if .npmrc exists in project root #161
Conversation
🦋 Changeset detectedLatest commit: 52c263e The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
see also #78 (comment) |
Ah, I'm sorry I didn't see that. It was a little confusing running into though. Setting a dummy I agree it would be breaking, but An alternative implementation could perhaps leverage |
I think a new environment variable like |
Sorry for leaving this open so long. Maybe we should introduce a variable like |
Is there any usage case for |
Not that I know of no, To be honest though I'm not sure why this cli-tool even checks and fails if there is no I can try to make an MR with Edit: Seems like I'm misremembering npm walking up parent dirs checking for |
I'm not quite sure for this feature, I'd like to keep this tool as simple as possible, and sync with upstream. Custom auth directories may be great but I'd not recommend to use non-standard So, I still think |
Currently,
changesets-gitlab
will only check the the${HOME}/.npmrc
path, or use the NPM_TOKEN variable assuming its for the public npm registry. While it's showed in the example in the README, it's not explicitly mentioned.A common pattern used in GitLab CI/CD examples, is to append auth to the project roots
.npmrc
file. When I set up the pipeline like I normally would, I was surprised to see it output that no .npmrc file was found. I'd imagine someone migrating from an old setup or following what they know from multiple guides could run into this as well.