Skip to content

fix(sheet): store the schema under bootgs-utils:schema, keep reading the old key - #567

Merged
MaksymStoianov merged 1 commit into
developfrom
fix/schema-metadata-key
Nov 3, 2026
Merged

MaksymStoianov merged 1 commit into
developfrom
fix/schema-metadata-key

Conversation

@MaksymStoianov

Copy link
Copy Markdown
Member

Stacked on #566 (base docs/readme-i18n); GitHub retargets it to develop once #566 is merged.

insertSchema stores a sheet's schema in developer metadata. With the move to @bootgs/utils the key changes from apps-script-utils:schema to bootgs-utils:schema, without breaking spreadsheets that already carry a schema:

  • insertSchema writes the new key and removes the old entry, so a spreadsheet migrates the next time its schema is written;
  • getSchema reads both keys; when both exist, the new key wins;
  • removeSchema removes both;
  • LEGACY_SCHEMA_METADATA_KEYS lists the old keys (the check is inlined, so no new public function).

Tests added: legacy schema is read, current key wins over legacy, legacy entry is removed by removeSchema, and insertSchema migrates a legacy entry. Full suite 2538/2538, build, Prettier, docs:check.

🤖 Generated with Claude Code

…the old key

insertSchema writes the schema to developer metadata under
bootgs-utils:schema. getSchema and removeSchema also accept the key used
by apps-script-utils 2.x and older (apps-script-utils:schema), the
current key winning when both exist, and insertSchema removes the old
entry when it writes, so existing spreadsheets migrate on their own.
LEGACY_SCHEMA_METADATA_KEYS lists the old keys.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Base automatically changed from docs/readme-i18n to develop November 3, 2026 15:04
@MaksymStoianov
MaksymStoianov merged commit 2f7133e into develop Nov 3, 2026
@MaksymStoianov
MaksymStoianov deleted the fix/schema-metadata-key branch November 3, 2026 15:04
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.

1 participant