Skip to content

fix(provider): handle v-prefixed SDK versions - #1097

Open
pengqima wants to merge 1 commit into
magiclabs:masterfrom
pengqima:master
Open

fix(provider): handle v-prefixed SDK versions#1097
pengqima wants to merge 1 commit into
magiclabs:masterfrom
pengqima:master

Conversation

@pengqima

Copy link
Copy Markdown

📦 Pull Request

This PR updates isMajorVersionAtLeast to handle SDK version strings prefixed with v or V, such as v19.0.0.

The provider code already uses v-prefixed removal versions in ProductConsolidationMethodRemovalVersions, but the version comparison helper previously parsed those values as NaN. This change normalizes the optional prefix before reading the major version.

✅ Fixed Issues

  • N/A

🚨 Test instructions

Ran:

  • ../../../node_modules/.bin/jest test/spec/util/isMajorVersionAtLeast.spec.ts --runInBand --coverage=false
  • ./node_modules/.bin/prettier --check packages/@magic-sdk/provider/src/util/version-check.ts packages/@magic-sdk/provider/test/spec/util/isMajorVersionAtLeast.spec.ts
  • ./node_modules/.bin/eslint packages/@magic-sdk/provider/src/util/version-check.ts packages/@magic-sdk/provider/test/spec/util/isMajorVersionAtLeast.spec.ts
  • PKG=@magic-sdk/provider yarn build
  • git diff --check

⚠️ Don't forget to add a semver label!

Please 🚨 ONLY ADD ONE 🚨 of the following labels, failing to do so may lead to adverse versioning of your changes when published:

  • patch: Bug Fix?

Special Note

Please avoid adding any of the Priority labels as they conflict with the labels above ☝️

Signed-off-by: pengqima <pengqima@outlook.com>
@pengqima
pengqima requested a review from a team as a code owner June 25, 2026 17:12
@pengqima

pengqima commented Aug 1, 2026

Copy link
Copy Markdown
Author

@Ethella @joshuascan Hi, Could you please review this PR at your convenience? Thank you very much.

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