Skip to content

Fix CLI-init package publishing conflicts - #16559

Merged
Vladimir Morozov (vmoroz) merged 1 commit into
microsoft:mainfrom
vmoroz:PR/fix-verdaccio-publish-conflicts
Nov 2, 2026
Merged

Vladimir Morozov (vmoroz) merged 1 commit into
microsoft:mainfrom
vmoroz:PR/fix-verdaccio-publish-conflicts

Conversation

@vmoroz

@vmoroz Vladimir Morozov (vmoroz) commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

Description

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • This change requires a documentation update
  • Automation (AI changes or Github Actions to reduce effort of manual tasks)

Why

After #16501, CLI-init checks for published packages through PackageFeedProxy,
while CI's Verdaccio uplink uses the authenticated Azure Artifacts feed. A version
missing from the proxy can already exist in that feed, causing an E409 conflict
when the test tries to publish it again.

What

Registry consistency

  • Check existing versions through the same local Verdaccio registry used for
    publishing, so the lookup sees packages already present in its uplink.

Regression coverage

  • Exercise the actual CLI-init command with published and unpublished scoped and
    unscoped packages. Keep explicit test-file paths compatible with Node 24.

Screenshots

Not applicable; CI-only change.

Testing

Full CI passed before rebasing. On the rebased branch, yarn test (Node 24.22.2),
yarn lint:fix, yarn format, and yarn change --type prerelease all passed;
no change files were needed.

Changelog

Should this change be included in the release notes: no

Fix duplicate package publishing in CLI-init validation.

Microsoft Reviewers: Open in CodeFlow

Check published versions through the local Verdaccio registry so pruning and publishing see the same packages. Add regression tests for scoped and unscoped packages.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 2, 2026 20:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues remain for the change aligning package-availability checks with the publishing registry.

No open issues 🎉

What changed in this PR

Fixes CLI-init duplicate-publish conflicts caused by checking package availability through a different registry than the one used for publishing after #16501.

Changes:

  • Checks published versions through local Verdaccio, matching the publishing registry and its configured uplink.
  • Adds Windows regression tests for published and unpublished scoped and unscoped packages.
  • Documents the registry behavior and includes the tests in the root test command.
File Description
package.json Adds the regression test file to the test command.
.ado/​tests/​verdaccio-pruning.test.cjs Tests package pruning through the publishing registry using the actual CLI-init command.
.ado/​templates/​verdaccio-start.yml Directs published-version checks to local Verdaccio.
.ado/​README.md Explains how matching registries prevents duplicate-publish conflicts.

Review effort: Balanced

@vmoroz
Vladimir Morozov (vmoroz) merged commit 0180c04 into microsoft:main Nov 2, 2026
32 checks passed
@vmoroz
Vladimir Morozov (vmoroz) deleted the PR/fix-verdaccio-publish-conflicts branch November 2, 2026 21:58
Vladimir Morozov (vmoroz) added a commit that referenced this pull request Nov 2, 2026
Backport of #16559.

(cherry picked from commit 79774fa)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Vladimir Morozov (vmoroz) added a commit that referenced this pull request Nov 2, 2026
Backport of #16559.

(cherry picked from commit 79774fa)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

3 participants