@labdigital/commercetools-mock 2.16.0 → 2.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -9
- package/dist/index.cjs +2 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/repositories/shopping-list.ts +2 -1
- package/src/services/shopping-list.test.ts +18 -1
package/README.md
CHANGED
|
@@ -79,7 +79,15 @@ describe('A module', () => {
|
|
|
79
79
|
|
|
80
80
|
## Contributing
|
|
81
81
|
|
|
82
|
-
|
|
82
|
+
This codebases use [@changesets](https://github.com/changesets/changesets) for release and version management
|
|
83
|
+
|
|
84
|
+
- Create a feature branch with new features / fixes (see [Adding a new service](#adding-a-service))
|
|
85
|
+
- When your code changes are complete, add a changeset file to your feature branch using `pnpm changeset`
|
|
86
|
+
- Create a PR to request your changes to be merged to main
|
|
87
|
+
- After your PR is merged, GitHub actions will create a release PR or add your changeset to an existing release PR
|
|
88
|
+
- When the release is ready merge the release branch. A new version will be released
|
|
89
|
+
|
|
90
|
+
### Adding a new service {#adding-a-service}
|
|
83
91
|
|
|
84
92
|
Implement the following:
|
|
85
93
|
|
|
@@ -88,11 +96,3 @@ Implement the following:
|
|
|
88
96
|
- Add new service to src/ctMock.ts ctMock.\_services
|
|
89
97
|
- Add new service to src/storage.ts InMemoryStorage
|
|
90
98
|
- Adjust src/types.ts RepositoryMap and possibly serviceTypes
|
|
91
|
-
|
|
92
|
-
### Releasing
|
|
93
|
-
|
|
94
|
-
This codebases use [@changesets](https://github.com/changesets/changesets) for release and version management
|
|
95
|
-
|
|
96
|
-
- Create a new changeset using `pnpm changeset`
|
|
97
|
-
- Push the changes to the `main` branch.
|
|
98
|
-
- GitHub actions will create a release PR. When the release is ready merge the release branch
|
package/dist/index.cjs
CHANGED
|
@@ -6290,7 +6290,7 @@ var ShoppingListRepository = class extends AbstractResourceRepository {
|
|
|
6290
6290
|
this._storage
|
|
6291
6291
|
)
|
|
6292
6292
|
};
|
|
6293
|
-
if (variantId) {
|
|
6293
|
+
if (productId && variantId) {
|
|
6294
6294
|
return lineItem;
|
|
6295
6295
|
}
|
|
6296
6296
|
if (sku) {
|
|
@@ -6309,6 +6309,7 @@ var ShoppingListRepository = class extends AbstractResourceRepository {
|
|
|
6309
6309
|
];
|
|
6310
6310
|
const variantId2 = allVariants.find((e) => e.sku === sku)?.id;
|
|
6311
6311
|
lineItem.variantId = variantId2;
|
|
6312
|
+
lineItem.productId = product.id;
|
|
6312
6313
|
return lineItem;
|
|
6313
6314
|
}
|
|
6314
6315
|
if (productId) {
|