@unchainedshop/core-orders 4.8.26 → 4.8.27

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.
@@ -29,12 +29,13 @@ export const configureOrdersModuleQueries = ({ Orders }) => {
29
29
  const options = {
30
30
  sort: {
31
31
  updated: -1,
32
+ _id: -1,
32
33
  },
33
34
  };
34
35
  return Orders.findOne(selector, options);
35
36
  },
36
37
  findCarts: async ({ userIds }, options) => {
37
- return Orders.find({ status: { $eq: null }, userId: { $in: userIds } }, { sort: { updated: -1 }, ...options }).toArray();
38
+ return Orders.find({ status: { $eq: null }, userId: { $in: userIds } }, { sort: { updated: -1, _id: -1 }, ...options }).toArray();
38
39
  },
39
40
  count: async (query) => {
40
41
  const orderCount = await Orders.countDocuments(buildFindSelector(query));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@unchainedshop/core-orders",
3
3
  "description": "Order management module for the Unchained Engine",
4
- "version": "4.8.26",
4
+ "version": "4.8.27",
5
5
  "main": "lib/orders-index.js",
6
6
  "types": "lib/orders-index.d.ts",
7
7
  "type": "module",
@@ -35,9 +35,9 @@
35
35
  },
36
36
  "homepage": "https://github.com/unchainedshop/unchained#readme",
37
37
  "dependencies": {
38
- "@unchainedshop/events": "^4.8.12",
39
- "@unchainedshop/mongodb": "^4.8.12",
40
- "@unchainedshop/utils": "^4.8.12"
38
+ "@unchainedshop/events": "^4.8.27",
39
+ "@unchainedshop/mongodb": "^4.8.27",
40
+ "@unchainedshop/utils": "^4.8.27"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@types/node": "^26.2.0",