Skip to content

better ide navigation and encapsulation for max migration version#9919

Merged
eliandoran merged 2 commits into
TriliumNext:mainfrom
contributor:qol-max-migration-version-definition
May 27, 2026
Merged

better ide navigation and encapsulation for max migration version#9919
eliandoran merged 2 commits into
TriliumNext:mainfrom
contributor:qol-max-migration-version-definition

Conversation

@contributor

Copy link
Copy Markdown
Contributor

Main motivation is better IDE navigation towards max migration value. Now, when you navigate to max version from AppInfo it goes as close as possible to actual version number. Previously, you had to do additional clicking and scrolling to view the value.

As a bonus, getMaxMigrationVersion is better API that hides implementation details of migration definitions.

@dosubot dosubot Bot added the size:S This PR changes 10-29 lines, ignoring generated files. label May 23, 2026

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request refactors the migration versioning system by replacing the MAX_MIGRATION_VERSION constant with a getMaxMigrationVersion() function and exporting the MIGRATIONS array directly. A review comment suggests improving the robustness of the new getMaxMigrationVersion() function by using optional chaining and a default value to prevent potential runtime errors if the migrations array is empty.

Comment thread packages/trilium-core/src/migrations/migrations.ts
@contributor contributor force-pushed the qol-max-migration-version-definition branch from b0753f6 to 63aa2c6 Compare May 27, 2026 14:12
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label May 27, 2026
@eliandoran eliandoran added this to the v0.104.0 milestone May 27, 2026
@eliandoran eliandoran merged commit 8aeee3f into TriliumNext:main May 27, 2026
13 checks passed
@contributor contributor deleted the qol-max-migration-version-definition branch May 28, 2026 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants