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

Fix missing global shopify type for Admin #2493

Merged
merged 1 commit into from
Nov 29, 2024
Merged

Fix missing global shopify type for Admin #2493

merged 1 commit into from
Nov 29, 2024

Conversation

vividviolet
Copy link
Member

@vividviolet vividviolet commented Nov 25, 2024

Background

The shopify global declaration was incorrect all along. With these changes doing shopify.extend inside an extension now works to pick up the types.

Try this out by consuming the snapshot build and inside an extension either use the /// <reference types="@shopify/ui-extensions/admin" /> or import the extension function.

This comment has been minimized.

@vividviolet
Copy link
Member Author

/snapit

@shopify-github-actions-access
Copy link
Contributor

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

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

"@shopify/data-extensions": "0.0.0-snapshot-20241125211200",
"@shopify/ui-extensions": "0.0.0-snapshot-20241125211200",
"@shopify/ui-extensions-react": "0.0.0-snapshot-20241125211200"

@belalsj
Copy link
Contributor

belalsj commented Nov 27, 2024

I'm still getting type any even when using the snapshot version .. am I missing something?

Screenshot 2024-11-27 at 15 41 45

@vividviolet
Copy link
Member Author

vividviolet commented Nov 27, 2024

The global is now fixed.

@vividviolet
Copy link
Member Author

/snapit

@vividviolet
Copy link
Member Author

/snapit

@shopify-github-actions-access
Copy link
Contributor

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

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

"@shopify/data-extensions": "0.0.0-snapshot-20241127163639",
"@shopify/ui-extensions": "0.0.0-snapshot-20241127163639",
"@shopify/ui-extensions-react": "0.0.0-snapshot-20241127163639"

Copy link
Contributor

@kumar303 kumar303 left a comment

Choose a reason for hiding this comment

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

I didn't tophat but looks good ✨ I have no idea what le_shopify was and it doesn't exist anywhere. I guess it was a typo 🤷 or the Quebecois API we unshipped 🇨🇦

Comment on lines +12 to +15
// conflicts with build/ts/globals.d.ts
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
const shopify: ShopifyGlobal;
Copy link
Contributor

Choose a reason for hiding this comment

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

You'll also need to patch the checkout-web fork of this file otherwise it might get accidentally reset during our publishing process. This is annoying, sorry 😅

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah ok, will do

@vividviolet vividviolet merged commit fd4dd2b into unstable Nov 29, 2024
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.

4 participants