Skip to content

Add Azure Artifacts npm authentication refresh - #2339

Open
MackinnonBuck wants to merge 1 commit into
mainfrom
mackinnonbuck-add-sdk-npm-auth
Open

Add Azure Artifacts npm authentication refresh#2339
MackinnonBuck wants to merge 1 commit into
mainfrom
mackinnonbuck-add-sdk-npm-auth

Conversation

@MackinnonBuck

Copy link
Copy Markdown
Collaborator

Summary

  • add a guarded Azure Artifacts npm authentication refresh script for the repository's three nested npm packages
  • keep project configs scoped to @github while storing credentials at user level
  • document Microsoft contributor setup and cover platform commands, CLI gating, config output, and error propagation

Validation

  • npm test -- npm-auth-refresh.test.ts (15 passed)
  • npm run lint (passed with 3 existing warnings)
  • npm run typecheck
  • npx tsc --noEmit --strict --skipLibCheck --module NodeNext --moduleResolution NodeNext --target ES2022 --esModuleInterop test\npm-auth-refresh.test.ts
  • npx prettier --config .prettierrc.json --check test\npm-auth-refresh.test.ts ..\scripts\npm-auth-refresh.mjs ..\scripts\npm-auth-refresh.d.mts
  • node .\scripts\npm-auth-refresh.mjs --help

npm run format:check was also run; on this Windows checkout it reports existing CRLF formatting drift in 104 untouched Node files. All new auth files pass the targeted Prettier check above.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings August 14, 2026 22:46
@MackinnonBuck
MackinnonBuck requested a review from a team as a code owner August 14, 2026 22:46
Comment on lines +86 to +88
const result = spawnSync(invocation.command, invocation.args, {
stdio: "inherit",
});
@github-actions github-actions Bot mentioned this pull request Aug 14, 2026

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.

Pull request overview

Adds cross-platform Azure Artifacts npm authentication setup for Microsoft contributors.

Changes:

  • Adds guarded credential refresh and scoped .npmrc generation.
  • Adds comprehensive Vitest coverage.
  • Documents setup and ignores generated configurations.
Show a summary per file
File Description
scripts/npm-auth-refresh.mjs Implements configuration and authentication refresh.
scripts/npm-auth-refresh.d.mts Declares script types.
nodejs/test/npm-auth-refresh.test.ts Tests CLI and platform behavior.
nodejs/package.json Adds the refresh command.
CONTRIBUTING.md Documents contributor setup.
.gitignore Ignores generated .npmrc files.

Review details

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 5/6 changed files
  • Comments generated: 2
  • Review effort level: Balanced

export function writeProjectNpmConfigs(npmrcPaths) {
const config = buildProjectNpmConfig();
for (const npmrcPath of npmrcPaths) {
writeFileSync(npmrcPath, config, "utf8");
},
{
command: "artifacts-npm-credprovider",
args: ["-c", npmrcPath],
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