Skip to content

Add Optional skipNpmrc input - #173

Closed
JP-Dhabolt wants to merge 1 commit into
changesets:mainfrom
JP-Dhabolt:skip-npmrc
Closed

Add Optional skipNpmrc input#173
JP-Dhabolt wants to merge 1 commit into
changesets:mainfrom
JP-Dhabolt:skip-npmrc

Conversation

@JP-Dhabolt

@JP-Dhabolt JP-Dhabolt commented Apr 14, 2022

Copy link
Copy Markdown

As part of trying to use this action for a private Azure DevOps Artifact Feed (where the .npmrc file uses username and _password instead of _authToken), I ran into the issue where the file was always modified by the action.

This PR adds an optional input called skipNpmrc which simply bypasses any checks, creation, or update of the .npmrc file. Not including the new input continues to behave exactly as it does today.

None of the code in the new createOrUpdateNpmrc function was modified, just extracted into the function.

While I am unblocked since I am running the action successfully now from the fork, I thought this might be generally useful if others have the same problem. If this is not in line with your vision of the action, please feel free to close. No hard feelings. 😄

@changeset-bot

changeset-bot Bot commented Apr 14, 2022

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 2c90823

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@changesets/action Minor

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

@jameslnewell

Copy link
Copy Markdown

This would benefit our use case with AWS CodeArtifact too.

We have a .npmrc file that contains

@scope:registry=https://abcd.d.codeartifact.ap-southeast-2.amazonaws.com/npm/npm/
//abcd.d.codeartifact.ap-southeast-2.amazonaws.com/npm/npm/:_authToken=XXXX

And changesets is overwriting .npmrc to contain

//registry.npmjs.org/:_authToken=undefined

@JP-Dhabolt

JP-Dhabolt commented Oct 14, 2022

Copy link
Copy Markdown
Author

@jameslnewell If you update your workflow that references this action to uses: JP-Dhabolt/changesets-action@skip-npmrc-compiled, it should act as a workaround until this gets merged in.

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.

2 participants