Skip to content

Commit 24e1283

Browse files
author
Rami Bououni
committed
npm config
1 parent 4a05c92 commit 24e1283

File tree

2 files changed

+35
-24
lines changed

2 files changed

+35
-24
lines changed

docs/artifacts/get-started-npm.md

Lines changed: 34 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,90 @@
11
---
2-
title: Publish and download npm packages
3-
description: Learn how to set up your project to manage your npm packages in Azure Artifacts.
2+
title: Publish and download npm packages with Azure Artifacts
3+
description: Learn how to configure your npm project to publish and consume packages using Azure Artifacts.
44
ms.service: azure-devops-artifacts
55
ms.topic: quickstart
66
ms.assetid: 5BFBA0C3-85ED-40C9-AC5F-F686923160D6
7-
ms.date: 05/28/2024
7+
ms.date: 06/17/2025
88
monikerRange: '>= azure-devops-2020'
99
"recommendations": "true"
1010
---
1111

12-
# Get started with npm packages in Azure Artifacts
12+
# Get started with managing npm packages in Azure Artifacts
1313

1414
[!INCLUDE [version-gt-eq-2020](../includes/version-gt-eq-2020.md)]
1515

16-
Using Azure Artifacts, you can publish and download your npm packages from feeds and public registries such as npmjs.com. This quickstart will guide you through creating your feed, configuring your project, and managing npm packages with your Azure Artifacts feed.
16+
With Azure Artifacts, you can publish and download npm packages from both your own feeds and public registries such as npmjs.com. This quickstart guides you through creating a feed, configuring your project, and managing npm packages using Azure Artifacts.
1717

1818
## Prerequisites
1919

20-
- An Azure DevOps organization. [Create one for free](../organizations/accounts/create-organization.md).
21-
22-
- An Azure DevOps project. Create a new [project](../organizations/projects/create-project.md#create-a-project) if you don't have one already.
23-
24-
- [Download and install Node.js and npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm).
20+
| **Product** | **Requirements** |
21+
|--------------------|--------------------|
22+
| **Azure DevOps** | - An Azure DevOps [organization](../organizations/accounts/create-organization.md).<br>- An Azure DevOps [project](../organizations/projects/create-project.md).<br> - [Download and install Node.js and npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm). |
2523

2624
## Create a feed
2725

2826
[!INCLUDE [](includes/create-feed.md)]
2927

3028
## Connect to a feed
3129

32-
> [!NOTE]
33-
> `vsts-npm-auth` is not supported in Azure DevOps Server.
30+
Azure Artifacts recommends using two separate *.npmrc* files. The first should be kept locally in the *$HOME* directory (Linux/macOS) or *$env.HOME* (Windows) to securely store your credentials. This allows the npm client to access your credentials for authentication.
3431

35-
Azure Artifacts recommends using two .npmrc files. The first one should be placed in the *$home* directory (Linux/macOS) or *$env.HOME* (Windows) to securely store your credentials. This allows the npm client to locate the file and retrieve your credentials for authentication, enabling you to share your config file without exposing your credentials. In this section, we will set up the second *.npmrc* file, which should be placed in the same directory as your *package.json* file.
32+
In this section, you'll configure the second *.npmrc* file, which should be placed in the same directory as your *package.json* file.
33+
34+
This setup lets you to share your configuration file without exposing your credentials.
3635

3736
::: moniker range="azure-devops"
3837

3938
1. Sign in to your Azure DevOps organization, and then navigate to your project.
4039

41-
1. Select **Artifacts**, and then select **Connect to feed**.
40+
1. Select **Artifacts**, select your feed from the dropdown menu, and then select **Connect to feed**.
4241

43-
1. Select **npm** from the left navigation area. If this is your first time using Azure Artifacts with npm, make sure you've installed the prerequisites.
42+
1. In the left navigation pane, select **npm**. If this is your first time using Azure Artifacts with npm, make sure you've installed the prerequisites.
4443

45-
1. Follow the instructions in the **Project setup** section to set up your config file and connect to your feed.
44+
1. Under the **Project setup** section, select **Windows** or **Other** depending on your operating system, then follow the provided instructions to configure your config file and connect to your Azure Artifacts feed.
4645

47-
:::image type="content" source="media/npm-project-setup-azure-devops.png" alt-text="A screenshot that shows how to set up an npm project and connect to an Azure Artifacts feed in Azure DevOps Services.":::
46+
:::image type="content" source="media/npm-project-setup-azure-devops.png" alt-text="A screenshot displaying how to set up an npm project and connect to a feed in Azure DevOps Services.":::
4847

4948
::: moniker-end
5049

50+
5151
::: moniker range="azure-devops-2022"
5252

53+
> [!NOTE]
54+
> The `vsts-npm-auth` is not supported in Azure DevOps Server.
55+
5356
1. Sign in to your Azure DevOps collection, and then navigate to your project.
5457

55-
1. Select **Artifacts**, and then select **Connect to Feed**.
58+
1. Select **Artifacts**, select your feed from the dropdown menu, and then select **Connect to feed**.
59+
60+
1. In the left navigation pane, select **npm**. If this is your first time using Azure Artifacts with npm, make sure you've installed the prerequisites.
5661

57-
1. Select **npm** from the left, and then follow the instructions in the **Project setup** section to connect to your feed.
62+
1. Under the **Project setup** section, select **Windows** or **Other** depending on your operating system, then follow the provided instructions to configure your config file and connect to your Azure Artifacts feed.
5863

59-
:::image type="content" source="media/npm-project-setup-server-2022-1.png" alt-text="A screenshot that shows how to set up an npm project and connect to an Azure Artifacts feed in Azure DevOps Server 2022.":::
64+
:::image type="content" source="media/npm-project-setup-server-2022-1.png" alt-text="A screenshot displaying how to set up an npm project and connect to an Azure Artifacts feed in Azure DevOps Server 2022.":::
6065

6166
::: moniker-end
6267

68+
6369
::: moniker range="azure-devops-2020"
6470

71+
> [!NOTE]
72+
> The `vsts-npm-auth` is not supported in Azure DevOps Server.
73+
6574
1. Sign in to your Azure DevOps collection, and then navigate to your project.
6675

67-
1. Select **Artifacts**, and then select **Connect to feed**.
76+
1. Select **Artifacts**, select your feed from the dropdown menu, and then select **Connect to feed**.
77+
78+
1. In the left navigation pane, select **npm**. If this is your first time using Azure Artifacts with npm, make sure you've installed the prerequisites.
6879

69-
1. Select **npm** from the left, and then follow the instructions in **Project setup** to set up your config file and connect to your feed.
80+
1. Under the **Project setup** section, select **Windows** or **Other** depending on your operating system, then follow the provided instructions to configure your config file and connect to your Azure Artifacts feed.
7081

7182
:::image type="content" source="media/npm-project-setup-server-2020-1.png" alt-text="A screenshot that shows how to set up an npm project and connect to an Azure Artifacts feed in Azure DevOps Server 2020.":::
7283

7384
::: moniker-end
7485

7586
> [!IMPORTANT]
76-
> npm supports a single `registry` in your .npmrc file. Multiple registries are possible with [scopes](npm/scopes.md) and [upstream sources](npm/upstream-sources.md).
87+
> npm supports only a single `registry` setting in your *.npmrc* file. To use multiple registries, you must use [upstream sources](npm/upstream-sources.md) or [scopes](npm/scopes.md).
7788
7889
## Publish packages
7990

docs/artifacts/includes/create-feed.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,4 @@ ms.date: 03/15/2024
4848
::: moniker-end
4949

5050
> [!NOTE]
51-
> By default, newly created feeds have their project's **Build Service** value set to **Feed and Upstream Reader (Collaborator)**.
51+
> By default, the **Build Service** for the project *(for example: projectName Build Service (orgName))* is assigned the **Feed and Upstream Reader (Collaborator)** role when a new feed is created.

0 commit comments

Comments
 (0)