[codex] Clarify inlang save workflows#4352
Merged
Merged
Conversation
🦋 Changeset detectedLatest commit: cfa52ff The changes in this PR will be included in the next version bump. This PR includes changesets to release 7 packages
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 |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
inlang-website | ac3f7c4 | Commit Preview URL Branch Preview URL |
Apr 29 2026, 04:11 AM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
newProject->loadProjectInMemory->project.toBlob()quickstart for creating and saving packed.inlangfilessaveProjectToDirectory()saves across the getting started, CRUD, unpacked project, writing a tool, and generated README docssaveProjectToDirectory()throw when translation data exists but no exporter plugin is configured, preventing silent empty-directory savessaveProjectToDirectory()acceptnode:fsas well asnode:fs/promises, so load/save examples can use one fs importpathPatternwrites@6.1.4version, plus path-resolution notesproject.errors.get()andproject.close()in plugin and script-style docsmessageIdsnippets/docs/writing-a-tooland/docs/settings-referenceWhy
The docs eval showed agents could handle the shallow in-memory quickstart, but broke down around plugin loading, unpacked saves, fs usage, diagnostics, lifecycle, and concrete message shapes. The worst failure was silent data loss when saving translation data to an unpacked directory without an exporter plugin. This PR makes the current docs path runnable and explicit for those deeper workflows.
Validation
pnpm view @inlang/plugin-i18next version->6.1.4pnpm --filter @inlang/sdk testpnpm --filter @inlang/sdk buildpnpm --filter @inlang/plugin-i18next testgit diff --checkpnpm --filter @inlang/website-v2 lintwas attempted earlier, but the current worktree is missing generated/site type setup such assrc/router.tsx'srouteTree.genand marketplace workspace package type declarations, so it could not isolate this change.Note
Medium Risk
Behavioral change in
saveProjectToDirectory()(now throws and changes fs-module expectations) could break existing callers or scripts that relied on previous no-op/unwritten export behavior, but the change is localized and covered by new tests.Overview
Updates docs/README copy across the repo to position
.inlangas the canonical SQLite-based project file (with version control via lix), and to clearly distinguish packed saves (project.toBlob()) from the Git-friendly unpacked directory plus plugin-driven import/export (including guidance to checkproject.errors.get()and toproject.close()). It also adds a newMessage Shapesreference page and updates plugin examples (notably i18next) and docs routing aliases/redirects.Hardens
@inlang/sdk’ssaveProjectToDirectory()by accepting bothnode:fsandnode:fs/promises, auto-creating exporter target directories forpathPatternoutputs, and throwing when translation data exists but no exporter plugin is configured (preventing silent “empty” unpacked saves); tests are added for these behaviors.Reviewed by Cursor Bugbot for commit cfa52ff. Bugbot is set up for automated code reviews on this repo. Configure here.