Skip to content

Conversation

@christian-byrne
Copy link
Contributor

@christian-byrne christian-byrne commented Sep 19, 2025

Summary

  • Replace custom compareVersions() with semver.compare()
  • Replace custom isSemVer() with semver.valid()
  • Remove deprecated version comparison functions from formatUtil.ts
  • Update all version comparison logic across components and stores
  • Fix tests to use semver mocking instead of formatUtil mocking

Benefits

  • Industry standard: Uses well-maintained, battle-tested semver package
  • Better reliability: Handles edge cases more robustly than custom implementation
  • Consistent behavior: All version comparisons now use the same underlying logic
  • Type safety: Better TypeScript support with proper semver types

Fixes #4787

┆Issue is synchronized with this Notion page by Unito

- Replace custom compareVersions() with semver.compare()
- Replace custom isSemVer() with semver.valid()
- Remove deprecated version comparison functions from formatUtil.ts
- Update all version comparison logic across components and stores
- Fix tests to use semver mocking instead of formatUtil mocking

Improves reliability and consistency by using industry-standard
semantic version handling. The semver package provides better
edge case handling and is well-maintained.

Fixes #4787
@christian-byrne christian-byrne requested review from a team as code owners September 19, 2025 03:43
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Sep 19, 2025
@github-actions
Copy link

github-actions bot commented Sep 19, 2025

🎭 Playwright Test Results

All tests passed!

⏰ Completed at: 09/19/2025, 06:49:24 PM UTC

📈 Summary

  • Total Tests: 450
  • Passed: 421 ✅
  • Failed: 0
  • Flaky: 0
  • Skipped: 29 ⏭️

📊 Test Reports by Browser

  • chromium: View Report • ✅ 414 / ❌ 0 / ⚠️ 0 / ⏭️ 29
  • chromium-2x: View Report • ✅ 2 / ❌ 0 / ⚠️ 0 / ⏭️ 0
  • chromium-0.5x: View Report • ✅ 1 / ❌ 0 / ⚠️ 0 / ⏭️ 0
  • mobile-chrome: View Report • ✅ 4 / ❌ 0 / ⚠️ 0 / ⏭️ 0

🎉 Click on the links above to view detailed test results for each browser configuration.

@christian-byrne christian-byrne changed the title Replace manual semantic versioning with semver package [refactor] Replace manual semantic version utilities/functions with semver package Sep 19, 2025
DrJKL
DrJKL previously approved these changes Sep 19, 2025
christian-byrne and others added 3 commits September 19, 2025 11:12
- Updated import paths for moved components and stores
- Kept semver imports instead of formatUtil
- Updated store path: @/stores/comfyManagerStore -> @/workbench/extensions/manager/stores/comfyManagerStore
- Updated component paths to workbench structure
… addresses review feedback

Converts all instances of 'import * as semver from "semver"' to use specific named imports like 'import { valid, compare } from "semver"' for consistency and improved tree-shaking.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@christian-byrne christian-byrne merged commit df2fda6 into main Sep 19, 2025
21 checks passed
@christian-byrne christian-byrne deleted the feat/replace-manual-semver-with-package branch September 19, 2025 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace all manual semver operations/utils with semver package

2 participants