Skip to content

docs: correct saveSession JSDoc default in importer config#149

Open
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/fix-importer-savesession-jsdoc-default
Open

docs: correct saveSession JSDoc default in importer config#149
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/fix-importer-savesession-jsdoc-default

Conversation

@devin-ai-integration
Copy link
Copy Markdown
Contributor

Summary

The JSDoc for saveSession on OneSchemaInitParams in packages/importer/src/config.ts says "Defaults to false", but:

  • DEFAULT_PARAMS in the same file sets saveSession: true.
  • The public docs at docs.oneschema.co/docs/javascript#savesession state "Defaults to true".
  • importer.ts only reads/writes the resume token when mergedParams.saveSession is truthy, so the true default is what's actually observed in practice.

This PR updates the inline docstring to "Defaults to true" so it matches the code default and the public docs. No runtime behavior change.

Context: this mismatch came up while debugging a customer who had passed is_required: true via templateOverrides and saw it silently not take effect. The root cause was that the SDK was resuming a cached session (per the default saveSession: true), which skips re-applying templateOverrides. The defaults are working as designed; the docstring was the only thing out of sync.

Scope note: intentionally not touching the saveSession JSDoc in packages/filefeeds/src/config.ts or packages/filefeeds-react/src/OneSchemaFileFeeds.tsx — the FileFeeds DEFAULT_PARAMS does not set saveSession, so it genuinely defaults to falsy there.

Review & Testing Checklist for Human

  • Confirm "Defaults to true" is the intended behavior for @oneschema/importer going forward (matches public docs today).
  • Sanity-check that no downstream consumer relies on the wrong JSDoc being authoritative (unlikely — it's a docstring).

Notes

Pure docstring change; no tests or behavior affected.

Link to Devin session: https://app.devin.ai/sessions/ece94f7d5a6241b8ad1c3ed12a3f0b3b

The JSDoc above `saveSession` said "Defaults to false", but
`DEFAULT_PARAMS` sets it to `true` and the public docs at
docs.oneschema.co/docs/javascript state "Defaults to true". Update the
inline docstring to match the actual behavior and the public docs.

Co-Authored-By: jonathan <jonathan@oneschema.co>
@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

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.

0 participants