@crawlee/core 4.0.0-beta.94 → 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.
- package/package.json +5 -5
- package/service_locator.js +6 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crawlee/core",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
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.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.
|
|
57
|
-
"@crawlee/types": "4.0.0-beta.
|
|
58
|
-
"@crawlee/utils": "4.0.0-beta.
|
|
56
|
+
"@crawlee/fs-storage": "4.0.0-beta.95",
|
|
57
|
+
"@crawlee/types": "4.0.0-beta.95",
|
|
58
|
+
"@crawlee/utils": "4.0.0-beta.95",
|
|
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": "
|
|
82
|
+
"gitHead": "ba8602d011706fb5c9930232402156eb5b657eb3"
|
|
83
83
|
}
|
package/service_locator.js
CHANGED
|
@@ -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.
|