Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .npmrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@
# registry=https://pkgs.dev.azure.com/devdiv/_packaging/Pylance/npm/registry/
registry=https://pkgs.dev.azure.com/azure-public/vside/_packaging/msft_consumption/npm/registry/

always-auth=true
package-lock=false
4 changes: 2 additions & 2 deletions Build/PreBuild.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ try {
"Pylance version = $pylanceVersion"
"Pylance release type = $pylanceReleaseType"

# Get all the versions in the feed in descending order
$versions = npm view @pylance/pylance versions --json | ConvertFrom-Json
# CI prefers cached data for installs, but "latest" must refresh registry metadata.
$versions = npm view @pylance/pylance versions --json --prefer-offline=false --prefer-online=true | ConvertFrom-Json
[array]::Reverse($versions)

# Find the highest version with an appropriate patch number.
Expand Down
16 changes: 11 additions & 5 deletions Build/templates/restore_packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ parameters:

steps:

# Pylance releases require Node.js 24 or newer.
- task: NodeTool@0
displayName: 'Use Node.js 24'
inputs:
versionSpec: '24.x'

# Point NuGet HTTP cache to a pipeline-controlled location so we can cache it between runs.
# packages.config restores don't use the global-packages folder, but they do use the HTTP cache
# to avoid re-downloading packages from the feed.
Expand Down Expand Up @@ -78,27 +84,27 @@ steps:
- task: Cache@2
displayName: 'Cache node_modules'
inputs:
key: 'node_modules | "$(Agent.OS)" | package.json | ${{ parameters.pylanceVersion }} | ${{ parameters.pylanceReleaseType }}'
key: 'node_modules | "$(Agent.OS)" | "${{ parameters.pylanceVersion }}" | "${{ parameters.pylanceReleaseType }}" | package.json'
restoreKeys: |
node_modules | "$(Agent.OS)" | package.json
node_modules | "$(Agent.OS)" | "${{ parameters.pylanceVersion }}" | "${{ parameters.pylanceReleaseType }}"
node_modules | "$(Agent.OS)"
path: '$(Build.SourcesDirectory)\\node_modules'

# Cache npm downloads to speed up Pylance install (PreBuild.ps1 runs `npm install`)
- task: Cache@2
displayName: 'Cache npm'
inputs:
key: 'npm | "$(Agent.OS)" | package.json | ${{ parameters.pylanceVersion }} | ${{ parameters.pylanceReleaseType }}'
key: 'npm | "$(Agent.OS)" | "${{ parameters.pylanceVersion }}" | "${{ parameters.pylanceReleaseType }}" | package.json'
restoreKeys: |
npm | "$(Agent.OS)" | package.json
npm | "$(Agent.OS)" | "${{ parameters.pylanceVersion }}" | "${{ parameters.pylanceReleaseType }}"
npm | "$(Agent.OS)"
path: '$(Pipeline.Workspace)\\npm-cache'

# Cache PyPI wheel downloads used by install_pypi_package.py (debugpy/etwtrace)
- task: Cache@2
displayName: 'Cache PyPI wheels'
inputs:
key: 'pypi-wheels | "$(Agent.OS)" | ${{ parameters.debugpyVersion }}'
key: 'pypi-wheels | "$(Agent.OS)" | "${{ parameters.debugpyVersion }}"'
restoreKeys: |
pypi-wheels | "$(Agent.OS)"
path: '$(Pipeline.Workspace)\\pypi-wheel-cache'
Expand Down