Skip to content

Comments

handle forward migrations#4297

Merged
samuelstroschein merged 5 commits intomainfrom
add-migration-logic
Jan 9, 2026
Merged

handle forward migrations#4297
samuelstroschein merged 5 commits intomainfrom
add-migration-logic

Conversation

@samuelstroschein
Copy link
Member

@samuelstroschein samuelstroschein commented Jan 9, 2026

Note

Introduces forward-migration safety via project metadata and conditional regeneration of generated files.

  • New project.inlang/.meta.json storing highestSdkVersion; written by saveProjectToDirectory and read via readProjectMeta
  • loadProjectFromDirectory compares versions (compareSemver, pickHighestVersion) and, if older, refreshes .gitignore and README.md (without exporting) using skipExporting; if newer, leaves files untouched
  • Extracted path helpers to path-helpers.ts (absolutePathFromProject, withAbsolutePaths); updated imports
  • Added semver/metadata utilities in meta.ts with tests; extensive tests for meta behavior and conditional file writes
  • README template updated (removed inline comment); .gitignore content adjusted and conditionally written
  • New skipExporting option in saveProjectToDirectory to update metadata only

Written by Cursor Bugbot for commit 19782a4. This will update automatically on new commits. Configure here.

@changeset-bot
Copy link

changeset-bot bot commented Jan 9, 2026

🦋 Changeset detected

Latest commit: 19782a4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 7 packages
Name Type
@inlang/sdk Minor
@inlang/cli Patch
@inlang/plugin-i18next Patch
@inlang/plugin-m-function-matcher Patch
@inlang/plugin-t-function-matcher Patch
@inlang/rpc Patch
@inlang/editor-component Major

Not sure what this means? Click here to learn what changesets are.

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

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c1d8e5a1da

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

…nd functionality. Introduced a structured type for parsed semver and enhanced prerelease handling.
…when the meta version is higher. Update tests to verify this behavior.
@samuelstroschein samuelstroschein merged commit aa44de8 into main Jan 9, 2026
3 checks passed
@samuelstroschein samuelstroschein deleted the add-migration-logic branch January 9, 2026 22:31
@github-actions github-actions bot locked and limited conversation to collaborators Jan 9, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant