Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for contract-based app modules #4465

Merged
merged 4 commits into from
Sep 20, 2024

Conversation

isaacroldan
Copy link
Contributor

@isaacroldan isaacroldan commented Sep 18, 2024

WHY are these changes introduced?

We need to support app modules that define their schema using contracts. We already had this for data, but that solution only supported config-extensions (defined in the app.toml).

This solution adds support for contract-based non-config modules.

WHAT is this pull request doing?

Add a new createContractBasedModuleSpecification to easily generate this kind of specifications.

Apply it to marketing activity extension and remove the custom config for it.

How to test your changes?

Post-release steps

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

Copy link
Contributor

Thanks for your contribution!

Depending on what you are working on, you may want to request a review from a Shopify team:

  • Themes: @shopify/advanced-edits
  • UI extensions: @shopify/ui-extensions-cli
    • Checkout UI extensions: @shopify/checkout-ui-extensions-api-stewardship
  • Hydrogen: @shopify/hydrogen
  • Other: @shopify/app-inner-loop

Copy link
Contributor

github-actions bot commented Sep 18, 2024

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
73.03% (+0.03% 🔼)
8392/11491
🟡 Branches
69.57% (+0.01% 🔼)
4093/5883
🟡 Functions
71.81% (+0.07% 🔼)
2181/3037
🟡 Lines
73.38% (+0.03% 🔼)
7941/10822
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟢
... / specification.ts
94.74% (-1.56% 🔻)
90.48% (-2.02% 🔻)
87.5% (-2.98% 🔻)
93.88% (-1.77% 🔻)

Test suite run success

1890 tests passing in 858 suites.

Report generated by 🧪jest coverage report action from c0478b4

@isaacroldan isaacroldan marked this pull request as ready for review September 19, 2024 10:05
Copy link
Contributor

We detected some changes at either packages/*/src or packages/cli-kit/assets/cli-ruby/** 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.

@isaacroldan isaacroldan added this pull request to the merge queue Sep 20, 2024
Merged via the queue into main with commit 1c26162 Sep 20, 2024
@isaacroldan isaacroldan deleted the support-non-config-contract-modules branch September 20, 2024 09:53
...field,
// NOTE: we're not using this id anywhere, generating it to satisfy the schema
// decided not to remove it from the schema for now to minimize the risk of breaking changes
id: randomUUID(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there an alternative way for us to generate this id in CLI since it's been removed here?

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.

2 participants