Skip to content

Commit f0648b9

Browse files
authored
Use internal npm feed for API package pipeline (#1827)
## Summary - route API package installs through the `Pylance_PublicPackages` Azure Artifacts feed - reuse the shared `Pylance-Eng` npm setup template for authentication and registry configuration - rewrite public npm URLs in lockfiles before installing dependencies ## Validation - parsed `build/azure-pipeline.npm.yml` with PyYAML - ran `git diff --check` 1ES guidance confirms that `npmAuthenticate@0` alone does not redirect lockfile-pinned `registry.npmjs.org` downloads; the shared setup-template pattern matches the sibling VS Code extension repositories. Copilot-Session: 16c019ed-4e8f-4460-ad18-3b8cd11ea04b
1 parent 2d020fb commit f0648b9

1 file changed

Lines changed: 13 additions & 4 deletions

File tree

‎build/azure-pipeline.npm.yml‎

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ resources:
99
type: git
1010
name: 1ESPipelineTemplates/MicroBuildTemplate
1111
ref: refs/tags/release
12+
- repository: templates
13+
type: git
14+
name: DevDiv/Pylance-Eng
15+
ref: refs/heads/main
1216

1317
parameters:
1418
- name: quality
@@ -31,6 +35,10 @@ variables:
3135
value: '@vscode/python-environments'
3236
- name: PackageDir
3337
value: api
38+
- name: NodeVersion
39+
value: '22.21.1'
40+
- name: AZURE_ARTIFACTS_FEED
41+
value: 'https://devdiv.pkgs.visualstudio.com/DevDiv/_packaging/Pylance_PublicPackages/npm/registry/'
3442
- name: npmTag
3543
${{ if eq(parameters.quality, 'preview') }}:
3644
value: next
@@ -66,10 +74,11 @@ extends:
6674
targetPath: $(Build.ArtifactStagingDirectory)
6775
artifactName: npm-package
6876
steps:
69-
- task: NodeTool@0
70-
inputs:
71-
versionSpec: '22.21.1'
72-
displayName: Select Node version
77+
- template: azure-pipelines/extension/templates/steps/setup.yml@templates
78+
parameters:
79+
installPython: false
80+
customNPMRegistry: $(AZURE_ARTIFACTS_FEED)
81+
nodeVersion: $(NodeVersion)
7382

7483
- script: npm install
7584
workingDirectory: $(Build.SourcesDirectory)/api

0 commit comments

Comments
 (0)