Skip to content

Stricter schema validation for extension and web TOMLs#7124

Open
gonzaloriestra wants to merge 1 commit intomainfrom
strict-toml-validation
Open

Stricter schema validation for extension and web TOMLs#7124
gonzaloriestra wants to merge 1 commit intomainfrom
strict-toml-validation

Conversation

@gonzaloriestra
Copy link
Copy Markdown
Contributor

@gonzaloriestra gonzaloriestra commented Mar 30, 2026

WHY are these changes introduced?

Related to https://shopify.slack.com/archives/C05E3BDFDRB/p1774273758576219

WHAT is this pull request doing?

  • Reject unrecognized top-level keys in shopify.extension.toml (unified format) and shopify.web.toml by adding .strict() to UnifiedSchema and baseWebConfigurationSchema
  • Previously, unknown keys were silently stripped by Zod's default behavior, causing misplaced configuration (e.g., putting [metaobjects] in extension TOML instead of app TOML) to be silently ignored
  • Errors are collected via the existing AppErrors mechanism, consistent with how shopify.app.toml already rejects unsupported sections
30-48-s3px5-et34r

How to test your changes?

Add an unknown field to shopify.extension.toml or shopify.web.toml and run deploy

Measuring impact

How do we know this change was effective? Please choose one:

  • n/a - this doesn't need measurement, e.g. a linting rule or a bug-fix
  • Existing analytics will cater for this addition
  • PR includes analytics changes to measure impact

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes

@github-actions
Copy link
Copy Markdown
Contributor

Coverage report

St.
Category Percentage Covered / Total
🟢 Statements 82.42% 15152/18383
🟡 Branches 74.93% 7461/9957
🟢 Functions 81.43% 3805/4673
🟢 Lines 82.81% 14326/17299

Test suite run success

4004 tests passing in 1532 suites.

Report generated by 🧪jest coverage report action from 290f0c5

@gonzaloriestra gonzaloriestra changed the title Strict validation for extension and web TOMLs Stricter schema validation for extension and web TOMLs Mar 30, 2026
@gonzaloriestra gonzaloriestra marked this pull request as ready for review March 30, 2026 13:55
@gonzaloriestra gonzaloriestra requested a review from a team as a code owner March 30, 2026 13:55
@github-actions
Copy link
Copy Markdown
Contributor

We detected some changes at packages/*/src and there are no updates in the .changeset.
If the changes are user-facing, run pnpm changeset add to track your changes and include them in the next release CHANGELOG.

Caution

DO NOT create changesets for features which you do not wish to be included in the public changelog of the next CLI release.

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