-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: module type depreciacion (#1516)
* fix: type inference for the module build * chore: add changeset * Apply suggestions from code review Co-authored-by: Wojciech Sikora <[email protected]> --------- Co-authored-by: Wojciech Sikora <[email protected]>
- Loading branch information
1 parent
938440e
commit ae8a741
Showing
3 changed files
with
35 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
"@vue-storefront/magento-sdk": patch | ||
--- | ||
|
||
### Change Log | ||
|
||
- [CHANGED] Deprecated the `MagentoModuleType` interface in `index.ts`. It is no longer necessary to use this type. Please, check documentation of `magentoModule` for alternatives. Below you can find a snippet of the new way of using `magentoModule`. Pay attention to the `buildModule` function that is used to create a module instance, it no longer requires the `MagentoModuleType` type as a generic parameter. | ||
|
||
```ts | ||
import { initSDK, buildModule } from '@vue-storefront/sdk'; | ||
import { magentoModule, MagentoModuleType } from '@vue-storefront/magento2-sdk' | ||
|
||
const sdkConfig = { | ||
magento: | ||
buildModule( | ||
magentoModule, | ||
{ | ||
apiUrl: 'http://localhost:8181/magento', | ||
} | ||
) | ||
}; | ||
|
||
export const sdk = initSDK(sdkConfig); | ||
``` | ||
|
||
- [CHANGED] Made the `ssrApiUrl` property in `ModuleOptions.ts` optional. |
This file contains 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
This file contains 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