Skip to content

Commit

Permalink
chore: add changeset
Browse files Browse the repository at this point in the history
  • Loading branch information
bartoszherba committed Apr 11, 2024
1 parent f721636 commit 5065b31
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .changeset/eight-islands-scream.md
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<typeof sdkConfig>(sdkConfig);
```

- [CHANGED] Made the `ssrApiUrl` property in `ModuleOptions.ts` optional.

0 comments on commit 5065b31

Please sign in to comment.