arangojs 10.2.1 → 10.3.0

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/esm/databases.js CHANGED
@@ -1719,6 +1719,16 @@ export class Database {
1719
1719
  query = query.toAQL();
1720
1720
  }
1721
1721
  const { allowDirtyRead, retryOnConflict, count, batchSize, cache, memoryLimit, ttl, timeout, ...opts } = options;
1722
+ // Accept legacy maxPlans and new maxNumberOfPlans; always send maxNumberOfPlans
1723
+ const { maxPlans, maxNumberOfPlans, ...remainingOpts } = opts;
1724
+ const normalizedOptions = {
1725
+ ...remainingOpts,
1726
+ ...(maxNumberOfPlans !== undefined
1727
+ ? { maxNumberOfPlans }
1728
+ : maxPlans !== undefined
1729
+ ? { maxNumberOfPlans: maxPlans }
1730
+ : {}),
1731
+ };
1722
1732
  return this.request({
1723
1733
  method: "POST",
1724
1734
  pathname: "/_api/cursor",
@@ -1730,7 +1740,7 @@ export class Database {
1730
1740
  cache,
1731
1741
  memoryLimit,
1732
1742
  ttl,
1733
- options: opts,
1743
+ options: normalizedOptions,
1734
1744
  },
1735
1745
  allowDirtyRead,
1736
1746
  retryOnConflict,