apify 4.0.0-beta.93 → 4.0.0-beta.95

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.
Files changed (2) hide show
  1. package/dist/charging.js +9 -0
  2. package/package.json +2 -2
package/dist/charging.js CHANGED
@@ -182,6 +182,15 @@ export class ChargingManager {
182
182
  chargeableWithinLimit: this.calculateChargeableWithinLimit(),
183
183
  };
184
184
  }
185
+ // Match the Python SDK: a non-positive count never reaches the platform and never
186
+ // mutates local charge state (a negative count would otherwise decrement the budget).
187
+ if (count <= 0) {
188
+ return {
189
+ eventChargeLimitReached: false,
190
+ chargedCount: 0,
191
+ chargeableWithinLimit: this.calculateChargeableWithinLimit(),
192
+ };
193
+ }
185
194
  const chargingState = this.#chargingState;
186
195
  if (chargingState === undefined) {
187
196
  throw new Error('ChargingManager is not initialized');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apify",
3
- "version": "4.0.0-beta.93",
3
+ "version": "4.0.0-beta.95",
4
4
  "description": "The scalable web crawling and scraping library for JavaScript/Node.js. Enables development of data extraction and web automation jobs (not only) with headless Chrome and Puppeteer.",
5
5
  "engines": {
6
6
  "node": ">=22.13.0"
@@ -83,7 +83,7 @@
83
83
  "husky": "^9.1.7",
84
84
  "lint-staged": "^17.6.0",
85
85
  "oxfmt": "0.77.0",
86
- "oxlint": "1.92.0",
86
+ "oxlint": "1.93.0",
87
87
  "oxlint-tsgolint": "7.0.2006",
88
88
  "playwright": "^1.65.0",
89
89
  "puppeteer": "^25.16.0",