Skip to content

Crawlee—A web scraping and browser automation library for Node.js to build reliable crawlers. In JavaScript and TypeScript. Extract data for AI, LLMs, RAG, or GPTs. Download HTML, PDF, JPG, PNG, and other files from websites. Works with Puppeteer, Playwright, Cheerio, JSDOM, and raw HTTP. Both headful and headless mode. With proxy rotation.

chore: update @apify/storage-local to v2 (#988)

Ondra Urbancbb7d89e592a
diff --git a/package.json b/package.json
index e81044233..367b72ee9 100644
--- a/package.json
+++ b/package.json
@@ -53,7 +53,7 @@
"dependencies": {
"@apify/http-request": "^2.1.1",
"@apify/ps-tree": "^1.1.3",
- "@apify/storage-local": "^1.0.4",
+ "@apify/storage-local": "^2.0.0",
"@types/cheerio": "^0.22.28",
"@types/domhandler": "^2.4.1",
"@types/node": "^14",
@@ -61,7 +61,7 @@
"@types/socket.io": "^2.1.13",
"@types/tough-cookie": "^4.0.0",
"apify-client": "^1.0.3",
- "apify-shared": "^0.6.0",
+ "apify-shared": "^0.7.5",
"browser-pool": "^1.1.2",
"cheerio": "1.0.0-rc.3",
"content-type": "^1.0.4",
diff --git a/src/storages/dataset.js b/src/storages/dataset.js
index 1bd747179..f5d1f2a00 100644
--- a/src/storages/dataset.js
+++ b/src/storages/dataset.js
@@ -8,7 +8,7 @@ import log from '../utils_log';
// @ts-ignore
import * as ApifyClient from 'apify-client';
// @ts-ignore
-import * as ApifyStorageLocal from '@apify/storage-local';
+import { ApifyStorageLocal } from '@apify/storage-local';
/* eslint-enable no-unused-vars,import/named,import/no-duplicates,import/order */
export const DATASET_ITERATORS_DEFAULT_LIMIT = 10000;
diff --git a/src/storages/key_value_store.js b/src/storages/key_value_store.js
index 367fecc99..b51c68d02 100644
--- a/src/storages/key_value_store.js
+++ b/src/storages/key_value_store.js
@@ -10,7 +10,7 @@ import log from '../utils_log';
// @ts-ignore
import * as ApifyClient from 'apify-client';
// @ts-ignore
-import * as ApifyStorageLocal from '@apify/storage-local';
+import { ApifyStorageLocal } from '@apify/storage-local';
/* eslint-enable no-unused-vars,import/named,import/no-duplicates,import/order */
/**
diff --git a/src/storages/request_queue.js b/src/storages/request_queue.js
index 7f5877aaf..ce7b34671 100644
--- a/src/storages/request_queue.js
+++ b/src/storages/request_queue.js
@@ -13,7 +13,7 @@ import Request, { RequestOptions } from '../request'; // eslint-disable-line imp
// @ts-ignore
import * as ApifyClient from 'apify-client';
// @ts-ignore
-import * as ApifyStorageLocal from '@apify/storage-local';
+import { ApifyStorageLocal } from '@apify/storage-local';
/* eslint-enable no-unused-vars,import/named,import/no-duplicates,import/order */
const MAX_CACHED_REQUESTS = 1000 * 1000;
diff --git a/src/storages/storage_manager.js b/src/storages/storage_manager.js
index 4656f576c..6a7d5fcfa 100644
--- a/src/storages/storage_manager.js
+++ b/src/storages/storage_manager.js
@@ -6,7 +6,7 @@ import * as utils from '../utils';
// @ts-ignore
import * as ApifyClient from 'apify-client';
// @ts-ignore
-import * as ApifyStorageLocal from '@apify/storage-local';
+import { ApifyStorageLocal } from '@apify/storage-local';
/* eslint-enable no-unused-vars,import/named,import/no-duplicates,import/order */
const DEFAULT_ID_ENV_VAR_NAMES = {
diff --git a/src/utils.js b/src/utils.js
index 3c5113f1a..ca2781020 100644
--- a/src/utils.js
+++ b/src/utils.js
@@ -1,6 +1,6 @@
import * as psTree from '@apify/ps-tree';
// eslint-disable-next-line import/no-extraneous-dependencies
-import * as ApifyStorageLocal from '@apify/storage-local';
+import { ApifyStorageLocal } from '@apify/storage-local';
import { execSync } from 'child_process';
import * as ApifyClient from 'apify-client';
import { version as apifyClientVersion } from 'apify-client/package.json';