Repository navigation
Detect missing owner_type in eligible UI extensions - #48
Merged
Merged
Conversation
efegokdemir
marked this pull request as ready for review
October 21, 2026 19:02
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What changed?
Adds
UG-EXT-001for missingowner_typein eligible Checkout and Customer Account UI extension metafield declarations. It reports safe table locations, warns for target 2026-10 and errors from target 2027-01. The existing automatic-discount rule now also recognizes literal references to the removedDiscountAutomaticConnectionandDiscountAutomaticEdgetypes.User-facing capabilities
The existing
scan --target 2027-01command reports deployment-blocking extension declarations without guessing an owner type or exposing namespace/key values. A short migration guide covers the version boundary and relevant declarations.Implementation
The extension file is parsed as TOML and source table locations are associated with parsed declarations. Detection is limited to Checkout and Customer Account UI extension targets; unrelated extension types and targets are ignored.
Evidence and false-positive review
Tests cover both surfaces, nested and repeated declarations, version boundaries, present values, unrelated targets and types, comments, strings, malformed TOML and redaction. The existing GraphQL 17 Dependabot PR #43 and CodeQL PRs #44–#47 were left untouched; this change retains GraphQL 16.14.2 because the new TOML rule does not need GraphQL 17.
Compatibility
The CLI minimum is Node.js 22; the Action remains on Node.js 24. Hosted CI also runs the protected Node.js 20 check. The change adds
@iarna/tomlwith its licence notice. Package version stays 0.3.0. Proposed next version: 0.4.0.Testing
On Node.js 22 and 24: clean install,
npm test(54/54 each),npm run coverage(97.13% statements/lines, 85.75% branches, 95.93% functions),npm run lint,npm run check:dist,npm run action:check,npm run package:smoke,npm pack --dry-run,npm audit --audit-level=high(0 vulnerabilities), andactionlint .github/workflows/ci.ymlpassed. Hosted GitHub Actions passed on Node.js 20, 22 and 24, plus CodeQL, Dependency Review and Snyk. Scorecard has no PR-branch result; its workflow is configured for main pushes and weekly runs.Security
The rule does not infer owner types and reports no namespace or key values. Malformed TOML fails safely without printing configuration content. The scanner stays offline and does not execute scanned files.
Limitations
This adds only missing-property detection for the documented extension surfaces. It does not validate that a supplied owner type is correct, infer resource ownership, or add speculative 2027-01 rules. Shopify describes 2027-01 as a release candidate until its stable date.
Release impact
Recommend 0.4.0 after review and hosted CI. The Node.js 22 minimum is a documented compatibility break. No version was bumped on this branch.
Review checklist