Michael Angelo Go
Michael Angelo Go

Reputation: 141

Azure Devops Artifacts: disable saving packages from upstream sources

I have a feed for npm packages with npmjs set as upstream source (by default). When you try to install your uploaded custom package with other dependencies, those dependency packages get saved automatically in your feed to save time for future installs. I however do not want it and want my feed to only host my own packages and just download from the upstream source every time an install is made. Is there a way to do this?

Upvotes: 5

Views: 2790

Answers (2)

Michael Angelo Go
Michael Angelo Go

Reputation: 141

What I did instead is make all our packages in a scope and modify the npmrc file to use the azure feed for only that scope so the rest of the packages still gets downloaded from registry.npmjs.org

here's what the .npmrc file would look like

registry=https://registry.npmjs.org/

@customScope:registry=https://ourregistry.org/ourfeed

always-auth=true

Upvotes: 6

Leo Liu
Leo Liu

Reputation: 76760

Is there a way to do this?

The answer is yes.

If you are creating new feed, you could uncheck the option Upstream sources when you creating the new feed:

enter image description here

If the feed is already created by you, you could delete the upstream sources. Go to the Settings->Upstream sources:

enter image description here

enter image description here

Hope this helps.

Upvotes: 1

Related Questions