Skip to content

Fix import ordering in client auth#2442

Merged
felixweinberger merged 1 commit into
mainfrom
fweinberger/fix-client-auth-import-order
Jul 6, 2026
Merged

Fix import ordering in client auth#2442
felixweinberger merged 1 commit into
mainfrom
fweinberger/fix-client-auth-import-order

Conversation

@felixweinberger

Copy link
Copy Markdown
Contributor

Lint autofix: stampErrorBrands sits out of order in the client/auth.ts import list. #2384 and #2422 each passed CI individually, but their combination trips simple-import-sort on main — any freshly-branched PR now inherits the warning. Two-line reorder, no behavior change.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • My code follows the repository's style guidelines
  • New and existing tests pass locally

@felixweinberger felixweinberger requested a review from a team as a code owner July 6, 2026 18:20
@changeset-bot

changeset-bot Bot commented Jul 6, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: e35c984

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Jul 6, 2026

Copy link
Copy Markdown

Open in StackBlitz

@modelcontextprotocol/client

npm i https://pkg.pr.new/@modelcontextprotocol/client@2442

@modelcontextprotocol/codemod

npm i https://pkg.pr.new/@modelcontextprotocol/codemod@2442

@modelcontextprotocol/core

npm i https://pkg.pr.new/@modelcontextprotocol/core@2442

@modelcontextprotocol/server

npm i https://pkg.pr.new/@modelcontextprotocol/server@2442

@modelcontextprotocol/server-legacy

npm i https://pkg.pr.new/@modelcontextprotocol/server-legacy@2442

@modelcontextprotocol/express

npm i https://pkg.pr.new/@modelcontextprotocol/express@2442

@modelcontextprotocol/fastify

npm i https://pkg.pr.new/@modelcontextprotocol/fastify@2442

@modelcontextprotocol/hono

npm i https://pkg.pr.new/@modelcontextprotocol/hono@2442

@modelcontextprotocol/node

npm i https://pkg.pr.new/@modelcontextprotocol/node@2442

commit: e35c984

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM — trivial two-line import reorder to satisfy simple-import-sort, no behavior change.

Extended reasoning...

Overview

The PR touches a single file, packages/client/src/client/auth.ts, and only reorders one named import (stampErrorBrands) within an existing import statement from @modelcontextprotocol/core-internal. The import list previously had stampErrorBrands between checkResourceAllowed and LATEST_PROTOCOL_VERSION; the PR moves it after resourceUrlFromServerUrl, which matches simple-import-sort's ASCII ordering (uppercase identifiers before lowercase). The PR description explains this is a lint fix for an ordering issue introduced by the combination of #2384 and #2422, both of which passed CI individually.

Security risks

None. No logic, control flow, or API surface changes — the same symbols are imported from the same module; only their textual order changes.

Level of scrutiny

Minimal scrutiny is appropriate. This is a purely mechanical, style-only change with zero runtime impact, equivalent to running the lint autofix. The changeset-bot warning about a missing changeset is fine since a lint-only reorder does not warrant a version bump.

Other factors

The bug hunting system found no issues, there are no outstanding reviewer comments, and the change is exactly what the description claims. This fits squarely in the 'simple, mechanical, obvious' approval category.

@felixweinberger felixweinberger merged commit d2f1bed into main Jul 6, 2026
20 checks passed
@felixweinberger felixweinberger deleted the fweinberger/fix-client-auth-import-order branch July 6, 2026 18:24
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.

1 participant