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
[@types/shopify-buy] Add language to the Config interface #46541
Conversation
If the Shopify store supports multiple languages, the Storefront API can return translated resource types and fields. ```ts // Initializing a client to return translated content const clientWithTranslatedContent = Client.buildClient({ domain: 'your-shop-name.myshopify.com', storefrontAccessToken: 'your-storefront-access-token', language: 'ja-JP' });```
@Gomah Thank you for submitting this PR! This is a live comment which I will keep updated. This PR doesn't modify any tests, so it's hard to know what's being fixed, and your changes might regress in the future. Have you considered adding tests to cover the change you're making? Including tests allows this PR to be merged by yourself and the owners of this module. This can potentially save days of time for you. Code ReviewsThis PR can be merged once it's reviewed by a DT maintainer. Status
Once every item on this list is checked, I'll ask you for permission to merge and publish the changes. Diagnostic Information: What the bot saw about this PR{
"type": "info",
"now": "-",
"pr_number": 46541,
"author": "Gomah",
"owners": [
"openminder",
"straiforos",
"totemika",
"kilinkis",
"chrisworman-pela",
"MaciekBaron"
],
"dangerLevel": "ScopedAndUntested",
"headCommitAbbrOid": "76fa592",
"headCommitOid": "76fa59235af76db0ff08c2e2b24712850832b3ab",
"mergeIsRequested": true,
"stalenessInDays": 0,
"lastPushDate": "2020-08-04T06:33:45.000Z",
"lastCommentDate": "2020-08-09T02:22:27.000Z",
"maintainerBlessed": false,
"reviewLink": "https://github.com/DefinitelyTyped/DefinitelyTyped/pull/46541/files",
"hasMergeConflict": false,
"authorIsOwner": false,
"isFirstContribution": false,
"popularityLevel": "Well-liked by everyone",
"anyPackageIsNew": false,
"packages": [
"shopify-buy"
],
"files": [
{
"path": "types/shopify-buy/index.d.ts",
"kind": "definition",
"package": "shopify-buy"
}
],
"hasDismissedReview": false,
"ciResult": "pass",
"lastReviewDate": "2020-08-08T01:08:36.000Z",
"reviewersWithStaleReviews": [],
"approvalFlags": 6,
"isChangesRequested": false
} |
🔔 @openminder @straiforos @totemika @kilinkis @chrisworman-pela @MaciekBaron — please review this PR in the next few days. Be sure to explicitly select |
Inspecting the JavaScript source for this package found some properties that are not in the .d.ts files. shopify-buy (unpkg)was missing the following properties:
|
👋 Hi there! I’ve run some quick measurements against master and your PR. These metrics should help the humans reviewing this PR gauge whether it might negatively affect compile times or editor responsiveness for users who install these typings. Let’s review the numbers, shall we? Comparison details 📊
It looks like nothing changed too much. I won’t post performance data again unless it gets worse. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an optional parameter added to the interface which is safe for addition and extension as far as I am aware, test may want to be revisited if this could be added at the moment this will suffice and thank you for your contribution @Gomah!
I double checked on the current API Docs for this, seems like it could be nonoptional so if tests do not break I would leave it be.
@Gomah may I set this to merge or if you would like put in the comment ready to merge. I would like this to not impeed your work. |
Oops hopefully that doesn't merge it 🤦🤦♂️ |
Ready to merge |
… the Config interface by @Gomah If the Shopify store supports multiple languages, the Storefront API can return translated resource types and fields. ```ts // Initializing a client to return translated content const clientWithTranslatedContent = Client.buildClient({ domain: 'your-shop-name.myshopify.com', storefrontAccessToken: 'your-storefront-access-token', language: 'ja-JP' });```
If the Shopify store supports multiple languages, the Storefront API can return translated resource types and fields.
Please fill in this template.
Use a meaningful title for the pull request. Include the name of the package modified.
Test the change in your own code. (Compile and run.)
Follow the advice from the readme.
Avoid common mistakes.
Run
npm run lint package-name
(ortsc
if notslint.json
is present).Provide a URL to documentation or source code which provides context for the suggested changes: https://github.com/Shopify/js-buy-sdk#initializing-the-client
Add or edit tests to reflect the change. (Run with
npm test
.)N/A as the change require adding locales to the existing shopfront.