Skip to content

build: onboard npm restores to CFS - #462

Merged
Swapnil Nagar (swapnil-nagar) merged 1 commit into
v4.xfrom
fabiocav/cfs-update
Jul 31, 2026
Merged

build: onboard npm restores to CFS#462
Swapnil Nagar (swapnil-nagar) merged 1 commit into
v4.xfrom
fabiocav/cfs-update

Conversation

@fabiocav

Copy link
Copy Markdown
Member

Summary

  • route npm dependency restores through the Azure Functions public Central Feed Service feed
  • explicitly map the only scope in the complete resolved production graph (@azure)
  • authenticate the checked-in source-root .npmrc before every reusable Azure Pipelines npm execution path
  • preserve the existing npm publishing service connection and shipped package contents

Audit

The repository has one npm project and no workspaces. Its resolved production graph contains @azure/functions-extensions-base and cookie, so @azure is the only production scope requiring an explicit mapping. All repository pipeline definitions, templates, scripts, global-install paths, and packaging inputs were reviewed. There are no NuGet, pip, uv, global npm install, or sudo npm restore paths to migrate. Lockfile URLs remain unchanged. The config contains no always-auth, replace-registry-host, or credentials.

Validation

  • restored with npm ci --loglevel=http from a truly empty cache under a path containing spaces
  • observed 644 CFS requests and 388 Azure Artifacts blob requests, with zero registry.npmjs.org requests and zero HTTP 401 responses
  • ran build, production webpack/minification, lint, version validation, unit tests, and production audit
  • parsed all modified YAML and confirmed authentication precedes the first npm command in every template
  • ran npm pack --dry-run, reproduced the pipeline-staged package, and validated the release script against a quoted drop path containing spaces
  • confirmed .npmrc, lockfiles, credentials, pipeline files, tests, and build scripts are absent from the 96-file package

Caveats and lessons

The feed requires authentication even for the public upstream route; local validation used an ephemeral user config outside the repository, while Azure Pipelines uses npmAuthenticate@0. The Npm@1 publish task intentionally retains its existing npm publishing endpoint because it publishes the customer package rather than restoring dependencies. A default CFS registry handles unscoped and development dependencies, while the explicit scope mapping is derived only from the complete production graph.

Route repository dependency restores through the azfunc public Central Feed Service feed and authenticate each reusable Azure Pipelines npm path.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 71244b0f-e67a-45fc-8442-4a7b079bfe2c
@fabiocav
Fabio Cavalcante (fabiocav) requested a review from a team as a code owner July 31, 2026 16:13
@swapnil-nagar
Swapnil Nagar (swapnil-nagar) merged commit 113f3a1 into v4.x Jul 31, 2026
15 checks passed
@swapnil-nagar
Swapnil Nagar (swapnil-nagar) deleted the fabiocav/cfs-update branch July 31, 2026 22:00
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