@crawlee/core 4.0.0-beta.94 → 4.0.0-beta.96

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crawlee/core",
3
- "version": "4.0.0-beta.94",
3
+ "version": "4.0.0-beta.96",
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.0.0"
@@ -53,9 +53,9 @@
53
53
  "@apify/pseudo_url": "^2.0.59",
54
54
  "@apify/timeout": "^0.3.2",
55
55
  "@apify/utilities": "^2.15.5",
56
- "@crawlee/fs-storage": "4.0.0-beta.94",
57
- "@crawlee/types": "4.0.0-beta.94",
58
- "@crawlee/utils": "4.0.0-beta.94",
56
+ "@crawlee/fs-storage": "4.0.0-beta.96",
57
+ "@crawlee/types": "4.0.0-beta.96",
58
+ "@crawlee/utils": "4.0.0-beta.96",
59
59
  "@sapphire/async-queue": "^1.5.5",
60
60
  "@sapphire/shapeshift": "^4.0.0",
61
61
  "@vladfrangu/async_event_emitter": "^2.4.6",
@@ -79,5 +79,5 @@
79
79
  }
80
80
  }
81
81
  },
82
- "gitHead": "35f62988d94ddf8a3e304f81be16202ca6479c07"
82
+ "gitHead": "b5c20fe6cecad57a6e3dd26b4137776d4b62588a"
83
83
  }
@@ -189,9 +189,15 @@ const serviceLocatorStorage = new AsyncLocalStorage();
189
189
  */
190
190
  export function bindMethodsToServiceLocator(serviceLocator, target) {
191
191
  let proto = Object.getPrototypeOf(target);
192
+ const seenKeys = new Set();
192
193
  while (proto !== null && proto !== Object.prototype) {
193
194
  const propertyKeys = [...Object.getOwnPropertyNames(proto), ...Object.getOwnPropertySymbols(proto)];
194
195
  for (const propertyKey of propertyKeys) {
196
+ // The chain is walked derived-first, so the first occurrence of a key is the one dynamic
197
+ // dispatch would pick — a subclass override must not be clobbered by its base version.
198
+ if (seenKeys.has(propertyKey))
199
+ continue;
200
+ seenKeys.add(propertyKey);
195
201
  const descriptor = Object.getOwnPropertyDescriptor(proto, propertyKey);
196
202
  // We use property descriptors rather than accessing target[propertyKey] directly,
197
203
  // because that would trigger getters and cause unwanted side effects.