Skip to content

ui-extensions-tester: support explicit resource management#4114

Merged
kumar303 merged 1 commit into2026-04-rcfrom
03-16-ui-extensions-tester_support_explicit_resource_management_using_keyword_
Mar 18, 2026
Merged

ui-extensions-tester: support explicit resource management#4114
kumar303 merged 1 commit into2026-04-rcfrom
03-16-ui-extensions-tester_support_explicit_resource_management_using_keyword_

Conversation

@kumar303
Copy link
Copy Markdown
Contributor

@kumar303 kumar303 commented Mar 16, 2026

Support explicit resource management (using keyword) and prefer this as the library interface.

Notes

  • New setUpExtension function as the entry point
  • Caching: allow setUpExtension() to be called repeatedly
  • Backward compatibility: The existing getExtension function remains unchanged for runtimes that don't support Explicit Resource Management

🎩

📄 Preview the README

Using the snapshot packages (below), I verified I could create a test suite via using. This required some build fixes 👍

Checklist

  • I have 🎩'd these changes
  • I have updated relevant documentation

@github-actions
Copy link
Copy Markdown
Contributor

🚨🚨🚨 Docs migration in progress 🚨🚨🚨

We are actively migrating UI extension reference docs to MDX in the areas/platforms/shopify-dev zone of the monorepo. This impacts docs for the following surfaces:

During this migration, please be aware of the following:

.doc.ts files are being deprecated. Changes to .doc.ts files in this repo will not be reflected in the new MDX-based docs. If you need to update docs for a reference that has already been migrated, make your changes directly in the areas/platforms/shopify-dev zone of the monorepo instead.

Doc comments in .ts source files (the comment blocks above types and functions) are also affected. Generating docs from these comments currently requires a newer version of the @shopify/generate-docs library that isn't yet available. Updates to doc comments may not produce the expected output until the migration is complete.

Examples that previously lived in this repo are being moved to the areas/platforms/shopify-dev zone of the monorepo and should be authored there going forward.

What should I do?

  • If your PR includes changes to .doc.ts files, doc comments, or examples, please reach out to us in #devtools-proj-templated-refs so we can help ensure your updates are captured correctly.
  • If your PR is limited to source code changes (non-docs), you can ignore this notice.

Thanks for your patience while we complete the migration! 🙏

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@kumar303 kumar303 force-pushed the 03-16-ui-extensions-tester_support_explicit_resource_management_using_keyword_ branch 5 times, most recently from 3d6a007 to f1d7514 Compare March 16, 2026 14:20
@kumar303 kumar303 marked this pull request as ready for review March 16, 2026 14:30
@kumar303
Copy link
Copy Markdown
Contributor Author

/snapit

@shopify-github-actions-access
Copy link
Copy Markdown
Contributor

🫰✨ Thanks @kumar303! Your snapshots have been published to npm.

Test the snapshots by updating your package.json with the newly published versions:

"@shopify/ui-extensions": "0.0.0-snapshot-20260316150650",
"@shopify/ui-extensions-tester": "0.0.0-snapshot-20260316150650"

@kumar303 kumar303 force-pushed the 03-16-ui-extensions-tester_support_explicit_resource_management_using_keyword_ branch from f1d7514 to d1775d0 Compare March 16, 2026 15:30
@kumar303
Copy link
Copy Markdown
Contributor Author

/snapit

@shopify-github-actions-access
Copy link
Copy Markdown
Contributor

🫰✨ Thanks @kumar303! Your snapshots have been published to npm.

Test the snapshots by updating your package.json with the newly published versions:

"@shopify/ui-extensions": "0.0.0-snapshot-20260316153155",
"@shopify/ui-extensions-tester": "0.0.0-snapshot-20260316153155"

@kumar303 kumar303 force-pushed the 03-16-ui-extensions-tester_support_explicit_resource_management_using_keyword_ branch from d1775d0 to 22a296f Compare March 16, 2026 16:16
@kumar303
Copy link
Copy Markdown
Contributor Author

/snapit

@shopify-github-actions-access
Copy link
Copy Markdown
Contributor

🫰✨ Thanks @kumar303! Your snapshots have been published to npm.

Test the snapshots by updating your package.json with the newly published versions:

"@shopify/ui-extensions": "0.0.0-snapshot-20260316161701",
"@shopify/ui-extensions-tester": "0.0.0-snapshot-20260316161701"

@kumar303 kumar303 changed the title ui-extensions-tester: support explicit resource management (using keyword) ui-extensions-tester: support explicit resource management Mar 16, 2026
@kumar303 kumar303 force-pushed the 03-16-ui-extensions-tester_support_explicit_resource_management_using_keyword_ branch from 22a296f to abb17f3 Compare March 17, 2026 09:47
@robin-drexler
Copy link
Copy Markdown
Member

Caching: allow setUpExtension() to be called repeatedly

can you elaborate on this a bit? Wouldn't you want a new one to be created every time you call setUpExtension()?
Could caching cause any surprises for users?

@kumar303 kumar303 force-pushed the 03-16-ui-extensions-tester_support_explicit_resource_management_using_keyword_ branch from abb17f3 to 7ffd0cb Compare March 17, 2026 13:52
@kumar303 kumar303 requested a review from robin-drexler March 17, 2026 13:52
@kumar303 kumar303 force-pushed the 03-16-ui-extensions-tester_support_explicit_resource_management_using_keyword_ branch 2 times, most recently from 31559b4 to 48d0c19 Compare March 17, 2026 14:15
@kumar303
Copy link
Copy Markdown
Contributor Author

Caching: allow setUpExtension() to be called repeatedly

can you elaborate on this a bit? Wouldn't you want a new one to be created every time you call setUpExtension()? Could caching cause any surprises for users?

@robin-drexler The only thing cached is the extension object itself which looks for and parses the TOML file on construction. As for surprises, yes, you just made me realize tests that run in watch mode won't pick up changes made to the TOML file. I just fixed that. I can't think of any other surprises.

Copy link
Copy Markdown
Contributor Author

kumar303 commented Mar 18, 2026

Merge activity

  • Mar 18, 3:31 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Mar 18, 3:32 PM UTC: Graphite rebased this pull request as part of a merge.
  • Mar 18, 3:36 PM UTC: @kumar303 merged this pull request with Graphite.

@kumar303 kumar303 force-pushed the 03-16-ui-extensions-tester_support_explicit_resource_management_using_keyword_ branch from 48d0c19 to 9556ec6 Compare March 18, 2026 15:32
@kumar303 kumar303 merged commit 6483813 into 2026-04-rc Mar 18, 2026
6 checks passed
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