You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Migration Guide: @moltin/sdk to @elasticpath/js-sdk
2
+
3
+
## Background and rationale
4
+
5
+
The Elastic Path Commerce Cloud JavaScript SDK has been migrated from `@moltin/sdk` to `@elasticpath/js-sdk`. This was an overdue change, and will allow us to consolidate our version control usage behind the @elasticpath namespace.
6
+
7
+
We are also taking this opportunity to entirely remove legacy naming (moltin) from the codebase to avoid confusion.
8
+
9
+
## Key Changes
10
+
11
+
-**Package Name**: The package name has changed from `@moltin/sdk` to `@elasticpath/js-sdk`.
12
+
-**GitHub Repository**: The GitHub repository has moved from `moltin/js-sdk` to `elasticpath/js-sdk`.
13
+
14
+
> ![NOTE]
15
+
> We are aligning the package name with the repository name, i.e. `js-sdk`, rather than just `sdk`. We are reserving the `sdk` name for future use.
[](https://twitter.com/intent/follow?screen_name=elasticpath)
9
9
10
-
> A simple to use API interface to help get you off the ground quickly and efficiently with your Elastic Path Commerce Cloud JavaScript apps.
10
+
> [!IMPORTANT]
11
+
> This repository has been migrated from [@moltin/sdk](https://www.npmjs.com/package/@moltin/sdk). If you are a previous user of the Moltin SDK, read our [guide](MIGRATION_GUIDE.md) to learn more about migrating your implementation to this codebase
12
+
13
+
A simple to use API interface to help get you off the ground quickly and efficiently with your Elastic Path Commerce Cloud JavaScript apps.
Install the package from [npm](https://www.npmjs.com/package/@elasticpath/sdk) and import in your project.
19
+
Install the package from [npm](https://www.npmjs.com/package/@elasticpath/js-sdk) and import in your project.
17
20
18
21
```bash
19
-
npm install --save @elasticpath/sdk
22
+
npm install --save @elasticpath/js-sdk
20
23
```
21
24
22
25
## ⛽️ Usage
23
26
24
-
To get started, instantiate a new ElasticPath client with your store credentials.
27
+
To get started, instantiate a new Elastic Path client with your store credentials.
28
+
29
+
30
+
> [!NOTE]
31
+
> This requires an [Elastic Path Commerce Cloud](https://www.elasticpath.com) account. You can sign up for a free trial [here](https://cm.elasticpath.com/free-trial)
25
32
26
-
> **Note:** This requires an [Elastic Path Commerce Cloud](https://www.elasticpath.com) account.
By default the Elastic Path Commerce Cloud SDK persists data to `window.localStorage` in the browser and `node-localstorage` in Node. If this doesn't suit your needs you can override the default storage with a `MemoryStorageFactory` which will persist data for the life cycle of the JavaScript VM:
You can also extend any base interface compatible with flows to create any custom interfaces that you might be using by re-declaring `@elasticpath/sdk` module. Following example adds several properties to `ProductsBase` interface that correspond to flows added to the backend.
283
+
You can also extend any base interface compatible with flows to create any custom interfaces that you might be using by re-declaring `@elasticpath/js-sdk` module. Following example adds several properties to `ProductsBase` interface that correspond to flows added to the backend.
278
284
279
285
In your project add a definition file (with a `.d.ts` extension) with a following code:
0 commit comments