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-shared packages (#1051)

Martin Adámeka8b1fbcc3f6e
diff --git a/package.json b/package.json
index 745c5ae94..e87295603 100644
--- a/package.json
+++ b/package.json
@@ -51,17 +51,20 @@
"lint:fix": "eslint ./src ./test --ext .js,.jsx --fix"
},
"dependencies": {
+ "@apify/consts": "^1.0.0",
+ "@apify/datastructures": "^1.0.0",
+ "@apify/log": "^1.0.0",
"@apify/ps-tree": "^1.1.4",
- "@apify/storage-local": "^2.0.1-beta.0",
+ "@apify/storage-local": "^2.0.1",
+ "@apify/utilities": "^1.0.0",
"@types/cheerio": "^0.22.28",
"@types/domhandler": "^2.4.1",
"@types/node": "^14",
"@types/puppeteer": "^5.4.3",
"@types/socket.io": "^2.1.13",
"@types/tough-cookie": "^4.0.0",
- "apify-client": "^1.0.3",
- "apify-shared": "^0.7.5",
- "browser-pool": "^1.1.2",
+ "apify-client": "^1.2.4",
+ "browser-pool": "^1.2.0-beta.1",
"cheerio": "1.0.0-rc.3",
"content-type": "^1.0.4",
"express": "^4.17.1",
@@ -78,7 +81,7 @@
"stream-json": "^1.7.1",
"tough-cookie": "^4.0.0",
"underscore": "^1.13.0",
- "ws": "^7.3.1"
+ "ws": "^7.4.6"
},
"devDependencies": {
"@apify/eslint-config": "^0.1.3",
diff --git a/src/actor.js b/src/actor.js
index 8b8b42b49..b5c320239 100644
--- a/src/actor.js
+++ b/src/actor.js
@@ -1,7 +1,7 @@
import ow from 'ow';
import * as path from 'path';
import * as _ from 'underscore';
-import { ENV_VARS, INTEGER_ENV_VARS, ACT_JOB_STATUSES } from 'apify-shared/consts';
+import { ENV_VARS, INTEGER_ENV_VARS, ACT_JOB_STATUSES } from '@apify/consts';
import log from './utils_log';
import { EXIT_CODES } from './constants';
import { initializeEvents, stopEvents } from './events';
diff --git a/src/apify.js b/src/apify.js
index c18bd288d..c8e1c7362 100644
--- a/src/apify.js
+++ b/src/apify.js
@@ -1,5 +1,5 @@
import ow from 'ow';
-import { ACT_JOB_STATUSES, ENV_VARS } from 'apify-shared/consts';
+import { ACT_JOB_STATUSES, ENV_VARS } from '@apify/consts';
import { getEnv } from './actor';
import { initializeEvents, stopEvents } from './events';
import { StorageManager } from './storages/storage_manager';
diff --git a/src/autoscaling/autoscaled_pool.js b/src/autoscaling/autoscaled_pool.js
index e25be9fe1..44d063e60 100644
--- a/src/autoscaling/autoscaled_pool.js
+++ b/src/autoscaling/autoscaled_pool.js
@@ -1,4 +1,4 @@
-import { betterSetInterval, betterClearInterval } from 'apify-shared/utilities';
+import { betterSetInterval, betterClearInterval } from '@apify/utilities';
import ow from 'ow';
import Snapshotter, { SnapshotterOptions } from './snapshotter'; // eslint-disable-line import/named,no-unused-vars
import SystemStatus, { SystemStatusOptions } from './system_status'; // eslint-disable-line import/named,no-unused-vars
diff --git a/src/autoscaling/snapshotter.js b/src/autoscaling/snapshotter.js
index 6857d5b51..151ce0d4e 100644
--- a/src/autoscaling/snapshotter.js
+++ b/src/autoscaling/snapshotter.js
@@ -1,7 +1,7 @@
import * as os from 'os';
import ow from 'ow';
-import { betterSetInterval, betterClearInterval } from 'apify-shared/utilities';
-import { ACTOR_EVENT_NAMES, ENV_VARS } from 'apify-shared/consts';
+import { betterSetInterval, betterClearInterval } from '@apify/utilities';
+import { ACTOR_EVENT_NAMES, ENV_VARS } from '@apify/consts';
import { getMemoryInfo, isAtHome, apifyClient } from '../utils';
import events from '../events';
import defaultLog from '../utils_log';
diff --git a/src/browser_launchers/browser_launcher.js b/src/browser_launchers/browser_launcher.js
index 42c58f596..31468f319 100644
--- a/src/browser_launchers/browser_launcher.js
+++ b/src/browser_launchers/browser_launcher.js
@@ -1,5 +1,5 @@
import ow from 'ow';
-import { ENV_VARS } from 'apify-shared/consts';
+import { ENV_VARS } from '@apify/consts';
import { getTypicalChromeExecutablePath, isAtHome } from '../utils';
import { BrowserPlugin } from './browser_plugin'; // eslint-disable-line no-unused-vars
diff --git a/src/cache_container.js b/src/cache_container.js
index 733398ef2..0da0f8d14 100644
--- a/src/cache_container.js
+++ b/src/cache_container.js
@@ -1,4 +1,4 @@
-import * as LruCache from 'apify-shared/lru_cache';
+import { LruCache } from '@apify/datastructures';
/**
* Used to manage all globally created caches, such as request queue cache
diff --git a/src/configuration.js b/src/configuration.js
index 1933fb12e..6450d5871 100644
--- a/src/configuration.js
+++ b/src/configuration.js
@@ -1,4 +1,4 @@
-import { ENV_VARS, LOCAL_ENV_VARS } from 'apify-shared/consts';
+import { ENV_VARS, LOCAL_ENV_VARS } from '@apify/consts';
import { join } from 'path';
import { ApifyStorageLocal } from '@apify/storage-local';
import * as ApifyClient from 'apify-client';
diff --git a/src/constants.js b/src/constants.js
index a20f3e3d4..075a134a2 100644
--- a/src/constants.js
+++ b/src/constants.js
@@ -1,4 +1,4 @@
-import { ACTOR_EVENT_NAMES } from 'apify-shared/consts';
+import { ACTOR_EVENT_NAMES } from '@apify/consts';
/**
* The default user agent used by `Apify.launchPuppeteer`.
diff --git a/src/crawlers/basic_crawler.js b/src/crawlers/basic_crawler.js
index ada947d5d..add246fc0 100644
--- a/src/crawlers/basic_crawler.js
+++ b/src/crawlers/basic_crawler.js
@@ -1,5 +1,5 @@
-import { ACTOR_EVENT_NAMES } from 'apify-shared/consts';
-import { cryptoRandomObjectId } from 'apify-shared/utilities';
+import { ACTOR_EVENT_NAMES } from '@apify/consts';
+import { cryptoRandomObjectId } from '@apify/utilities';
import ow, { ArgumentError } from 'ow';
import * as _ from 'underscore';
import AutoscaledPool from '../autoscaling/autoscaled_pool'; // eslint-disable-line import/no-duplicates
diff --git a/src/crawlers/cheerio_crawler.js b/src/crawlers/cheerio_crawler.js
index d0ade5057..39abef271 100644
--- a/src/crawlers/cheerio_crawler.js
+++ b/src/crawlers/cheerio_crawler.js
@@ -1,5 +1,5 @@
/* eslint-disable class-methods-use-this */
-import { readStreamToString, concatStreamToBuffer } from 'apify-shared/streams_utilities';
+import { readStreamToString, concatStreamToBuffer } from '@apify/utilities';
import * as cheerio from 'cheerio';
import * as contentTypeParser from 'content-type';
import * as htmlparser from 'htmlparser2';
diff --git a/src/events.js b/src/events.js
index 759b22f55..dcfd46572 100644
--- a/src/events.js
+++ b/src/events.js
@@ -1,6 +1,6 @@
import { EventEmitter } from 'events';
import * as WebSocket from 'ws';
-import { ENV_VARS, ACTOR_EVENT_NAMES } from 'apify-shared/consts';
+import { ENV_VARS, ACTOR_EVENT_NAMES } from '@apify/consts';
import { ACTOR_EVENT_NAMES_EX } from './constants';
import defaultLog from './utils_log';
import { Configuration } from './configuration';
diff --git a/src/live_view/live_view_server.js b/src/live_view/live_view_server.js
index a41a340b9..e20f56268 100644
--- a/src/live_view/live_view_server.js
+++ b/src/live_view/live_view_server.js
@@ -4,8 +4,8 @@ import * as path from 'path';
import { promisify } from 'util';
import * as express from 'express';
import * as socketio from 'socket.io';
-import { promisifyServerListen } from 'apify-shared/utilities';
-import { ENV_VARS, LOCAL_ENV_VARS } from 'apify-shared/consts';
+import { promisifyServerListen } from '@apify/utilities';
+import { ENV_VARS, LOCAL_ENV_VARS } from '@apify/consts';
import { Page } from 'puppeteer'; // eslint-disable-line no-unused-vars
import { addTimeoutToPromise } from '../utils';
import Snapshot from './snapshot';
diff --git a/src/proxy_configuration.js b/src/proxy_configuration.js
index 48ad1b0ee..6167d21db 100644
--- a/src/proxy_configuration.js
+++ b/src/proxy_configuration.js
@@ -1,5 +1,4 @@
-import { ENV_VARS } from 'apify-shared/consts';
-import { APIFY_PROXY_VALUE_REGEX } from 'apify-shared/regexs';
+import { APIFY_PROXY_VALUE_REGEX, ENV_VARS } from '@apify/consts';
import ow from 'ow';
import { COUNTRY_CODE_REGEX } from './constants';
import { apifyClient } from './utils';
diff --git a/src/puppeteer_utils.js b/src/puppeteer_utils.js
index 31425c687..38038cb58 100644
--- a/src/puppeteer_utils.js
+++ b/src/puppeteer_utils.js
@@ -3,7 +3,7 @@ import ow from 'ow';
import * as vm from 'vm';
import * as util from 'util';
import * as _ from 'underscore';
-import * as LruCache from 'apify-shared/lru_cache';
+import { LruCache } from '@apify/datastructures';
import { Page, Response, DirectNavigationOptions } from 'puppeteer'; // eslint-disable-line no-unused-vars
import log from './utils_log';
import { validators } from './validators';
diff --git a/src/request.js b/src/request.js
index c0fcd3f95..4fc5f684c 100644
--- a/src/request.js
+++ b/src/request.js
@@ -1,4 +1,4 @@
-import { normalizeUrl } from 'apify-shared/utilities';
+import { normalizeUrl } from '@apify/utilities';
import * as crypto from 'crypto';
import ow, { ArgumentError } from 'ow';
import * as util from 'util';
diff --git a/src/session_pool/session.js b/src/session_pool/session.js
index c073797a9..915ece726 100644
--- a/src/session_pool/session.js
+++ b/src/session_pool/session.js
@@ -1,4 +1,4 @@
-import { cryptoRandomObjectId } from 'apify-shared/utilities';
+import { cryptoRandomObjectId } from '@apify/utilities';
import ow from 'ow';
import { Cookie, CookieJar } from 'tough-cookie';
import EVENTS from './events';
diff --git a/src/stealth/stealth.js b/src/stealth/stealth.js
index 8a2f5d15a..6e04c9518 100644
--- a/src/stealth/stealth.js
+++ b/src/stealth/stealth.js
@@ -1,6 +1,6 @@
import * as _ from 'underscore';
import { Page, Browser } from 'puppeteer'; // eslint-disable-line no-unused-vars
-import { cryptoRandomObjectId } from 'apify-shared/utilities';
+import { cryptoRandomObjectId } from '@apify/utilities';
import globalLog from '../utils_log';
import hidingTricks from './hiding_tricks';
diff --git a/src/storages/dataset.js b/src/storages/dataset.js
index 3fd4fc39a..ba2c3c771 100644
--- a/src/storages/dataset.js
+++ b/src/storages/dataset.js
@@ -1,6 +1,6 @@
import ow from 'ow';
import * as _ from 'underscore';
-import { MAX_PAYLOAD_SIZE_BYTES } from 'apify-shared/consts';
+import { MAX_PAYLOAD_SIZE_BYTES } from '@apify/consts';
import { StorageManager } from './storage_manager';
import log from '../utils_log';
diff --git a/src/storages/key_value_store.js b/src/storages/key_value_store.js
index 075e5ecea..fc4acd739 100644
--- a/src/storages/key_value_store.js
+++ b/src/storages/key_value_store.js
@@ -1,6 +1,5 @@
-import { KEY_VALUE_STORE_KEY_REGEX } from 'apify-shared/regexs';
-import { ENV_VARS, KEY_VALUE_STORE_KEYS } from 'apify-shared/consts';
-import { jsonStringifyExtended } from 'apify-shared/utilities';
+import { ENV_VARS, KEY_VALUE_STORE_KEYS, KEY_VALUE_STORE_KEY_REGEX } from '@apify/consts';
+import { jsonStringifyExtended } from '@apify/utilities';
import ow, { ArgumentError } from 'ow';
import { StorageManager } from './storage_manager';
import log from '../utils_log';
diff --git a/src/storages/request_queue.js b/src/storages/request_queue.js
index 11fb62613..872a814a1 100644
--- a/src/storages/request_queue.js
+++ b/src/storages/request_queue.js
@@ -1,8 +1,7 @@
import * as crypto from 'crypto';
-import * as LruCache from 'apify-shared/lru_cache';
-import * as ListDictionary from 'apify-shared/list_dictionary';
-import { REQUEST_QUEUE_HEAD_MAX_LIMIT } from 'apify-shared/consts';
-import { cryptoRandomObjectId } from 'apify-shared/utilities';
+import { ListDictionary, LruCache } from '@apify/datastructures';
+import { REQUEST_QUEUE_HEAD_MAX_LIMIT } from '@apify/consts';
+import { cryptoRandomObjectId } from '@apify/utilities';
import ow from 'ow';
import { StorageManager } from './storage_manager';
import { sleep } from '../utils';
diff --git a/src/storages/storage_manager.js b/src/storages/storage_manager.js
index 08253dcb1..d53e0d5a4 100644
--- a/src/storages/storage_manager.js
+++ b/src/storages/storage_manager.js
@@ -1,4 +1,4 @@
-import { ENV_VARS } from 'apify-shared/consts';
+import { ENV_VARS } from '@apify/consts';
/* eslint-disable no-unused-vars,import/named,import/no-duplicates,import/order */
// @ts-ignore
diff --git a/src/utils.js b/src/utils.js
index 97fc7e7b3..591d9e556 100644
--- a/src/utils.js
+++ b/src/utils.js
@@ -3,7 +3,7 @@ import * as psTree from '@apify/ps-tree';
import { execSync } from 'child_process';
import * as ApifyClient from 'apify-client';
import { version as apifyClientVersion } from 'apify-client/package.json';
-import { ACT_JOB_TERMINAL_STATUSES, ENV_VARS } from 'apify-shared/consts';
+import { ACT_JOB_TERMINAL_STATUSES, ENV_VARS } from '@apify/consts';
import * as cheerio from 'cheerio';
import * as contentTypeParser from 'content-type';
import * as fs from 'fs';
diff --git a/src/utils_log.js b/src/utils_log.js
index 8c7dfeac1..7f7d93f57 100644
--- a/src/utils_log.js
+++ b/src/utils_log.js
@@ -1,7 +1,7 @@
// Changes to the JsDoc here need to be replicated to types-apify/apify-shared/log.d.ts
// This file is mainly for building the docs, not to provide typings
// For the output of "main" typings to be correct, this file should be references
-// instead of 'apify-shared/log'
+// instead of '@apify/log'
/**
* @typedef {object} LoggerOptions
@@ -190,6 +190,7 @@
*/
// variable can't be the same from the namespace above
-import * as Log from 'apify-shared/log';
+import log, { Log, LoggerOptions, LogLevel, Logger, LoggerJson, LoggerText } from '@apify/log';
-export default Log;
+export { Log, LoggerOptions, LogLevel, Logger, LoggerJson, LoggerText };
+export default log;
diff --git a/test/_helper.js b/test/_helper.js
index f81be9a5a..e0d314a76 100644
--- a/test/_helper.js
+++ b/test/_helper.js
@@ -1,5 +1,5 @@
import fs from 'fs-extra';
-import { ENV_VARS } from 'apify-shared/consts';
+import { ENV_VARS } from '@apify/consts';
// Log unhandled rejections.
// process.on('unhandledRejection', (err) => {
diff --git a/test/actor.test.js b/test/actor.test.js
index 93f3f402f..4e74b3856 100644
--- a/test/actor.test.js
+++ b/test/actor.test.js
@@ -1,7 +1,7 @@
import path from 'path';
import _ from 'underscore';
import sinon from 'sinon';
-import { ENV_VARS, ACT_JOB_STATUSES } from 'apify-shared/consts';
+import { ENV_VARS, ACT_JOB_STATUSES } from '@apify/consts';
import { ApifyCallError } from '../build/errors';
import * as utils from '../build/utils';
diff --git a/test/apify.test.js b/test/apify.test.js
index 837a347e9..b35c5d8f2 100644
--- a/test/apify.test.js
+++ b/test/apify.test.js
@@ -1,6 +1,6 @@
import path from 'path';
import _ from 'underscore';
-import { ACT_JOB_STATUSES, ENV_VARS, KEY_VALUE_STORE_KEYS } from 'apify-shared/consts';
+import { ACT_JOB_STATUSES, ENV_VARS, KEY_VALUE_STORE_KEYS } from '@apify/consts';
import ApifyClient from 'apify-client';
import { ApifyCallError } from '../build/errors';
import * as utils from '../build/utils';
diff --git a/test/autoscaling/snapshotter.test.js b/test/autoscaling/snapshotter.test.js
index 20b2aa5a6..65a4dfaf8 100644
--- a/test/autoscaling/snapshotter.test.js
+++ b/test/autoscaling/snapshotter.test.js
@@ -2,7 +2,7 @@
import os from 'os';
import sinon from 'sinon';
-import { ACTOR_EVENT_NAMES, ENV_VARS } from 'apify-shared/consts';
+import { ACTOR_EVENT_NAMES, ENV_VARS } from '@apify/consts';
import log from '../../build/utils_log';
import * as Apify from '../../build/index';
import events from '../../build/events';
diff --git a/test/browser_launchers/playwright_launcher.test.js b/test/browser_launchers/playwright_launcher.test.js
index 2f526ef67..e3eda2e5e 100644
--- a/test/browser_launchers/playwright_launcher.test.js
+++ b/test/browser_launchers/playwright_launcher.test.js
@@ -5,7 +5,7 @@ import portastic from 'portastic';
import basicAuthParser from 'basic-auth-parser';
import _ from 'underscore';
import sinon from 'sinon';
-import { ENV_VARS } from 'apify-shared/consts';
+import { ENV_VARS } from '@apify/consts';
import Apify from '../../build/index';
import * as utils from '../../build/utils';
diff --git a/test/browser_launchers/puppeteer_launcher.test.js b/test/browser_launchers/puppeteer_launcher.test.js
index 98f693958..ef24d6f85 100644
--- a/test/browser_launchers/puppeteer_launcher.test.js
+++ b/test/browser_launchers/puppeteer_launcher.test.js
@@ -5,7 +5,7 @@ import portastic from 'portastic';
import basicAuthParser from 'basic-auth-parser';
import _ from 'underscore';
import sinon from 'sinon';
-import { ENV_VARS } from 'apify-shared/consts';
+import { ENV_VARS } from '@apify/consts';
import Apify from '../../build/index';
import * as utils from '../../build/utils';
diff --git a/test/constants.test.js b/test/constants.test.js
index 101da3f01..cb5a2f508 100644
--- a/test/constants.test.js
+++ b/test/constants.test.js
@@ -1,4 +1,4 @@
-import { ACTOR_BASE_DOCKER_IMAGES, BUILD_TAG_LATEST, ENV_VARS } from 'apify-shared/consts';
+import { ACTOR_BASE_DOCKER_IMAGES, BUILD_TAG_LATEST, ENV_VARS } from '@apify/consts';
import { ACTOR_EVENT_NAMES_EX } from '../build/constants';
describe('consts', () => {
diff --git a/test/crawlers/basic_crawler.test.js b/test/crawlers/basic_crawler.test.js
index f5532d88d..c171a4e07 100644
--- a/test/crawlers/basic_crawler.test.js
+++ b/test/crawlers/basic_crawler.test.js
@@ -1,6 +1,6 @@
import _ from 'underscore';
import sinon from 'sinon';
-import { ACTOR_EVENT_NAMES } from 'apify-shared/consts';
+import { ACTOR_EVENT_NAMES } from '@apify/consts';
import log from '../../build/utils_log';
import * as Apify from '../../build';
import * as keyValueStore from '../../build/storages/key_value_store';
diff --git a/test/crawlers/browser_crawler.test.js b/test/crawlers/browser_crawler.test.js
index ae209fbca..81ac861a0 100644
--- a/test/crawlers/browser_crawler.test.js
+++ b/test/crawlers/browser_crawler.test.js
@@ -1,7 +1,7 @@
/* eslint-disable no-prototype-builtins */
import { URL } from 'url';
-import { ENV_VARS } from 'apify-shared/consts';
+import { ENV_VARS } from '@apify/consts';
import sinon from 'sinon';
import { BrowserPool, PuppeteerPlugin } from 'browser-pool';
import puppeteer from 'puppeteer';
diff --git a/test/crawlers/cheerio_crawler.test.js b/test/crawlers/cheerio_crawler.test.js
index b8b5a4f1f..46aa9b1b7 100644
--- a/test/crawlers/cheerio_crawler.test.js
+++ b/test/crawlers/cheerio_crawler.test.js
@@ -2,7 +2,7 @@
import fs from 'fs';
import path from 'path';
-import { ENV_VARS } from 'apify-shared/consts';
+import { ENV_VARS } from '@apify/consts';
import express from 'express';
import bodyParser from 'body-parser';
import sinon from 'sinon';
@@ -688,7 +688,8 @@ describe('CheerioCrawler', () => {
const sessions = [];
const failed = [];
const cheerioCrawler = new Apify.CheerioCrawler({
- requestList: await Apify.openRequestList('timeoutTest', [`http://${HOST}:${port}/timeout?a=12`,
+ requestList: await Apify.openRequestList(`timeoutTest-${Math.random()}`, [
+ `http://${HOST}:${port}/timeout?a=12`,
`http://${HOST}:${port}/timeout?a=23`,
]),
maxRequestRetries: 1,
diff --git a/test/crawlers/playwright_crawler.test.js b/test/crawlers/playwright_crawler.test.js
index 0770a8652..c38e6ad1f 100644
--- a/test/crawlers/playwright_crawler.test.js
+++ b/test/crawlers/playwright_crawler.test.js
@@ -1,4 +1,4 @@
-import { ENV_VARS } from 'apify-shared/consts';
+import { ENV_VARS } from '@apify/consts';
import playwright from 'playwright';
import log from '../../build/utils_log';
import * as Apify from '../../build';
diff --git a/test/crawlers/puppeteer_crawler.test.js b/test/crawlers/puppeteer_crawler.test.js
index a11107eeb..916fd687b 100644
--- a/test/crawlers/puppeteer_crawler.test.js
+++ b/test/crawlers/puppeteer_crawler.test.js
@@ -1,4 +1,4 @@
-import { ENV_VARS } from 'apify-shared/consts';
+import { ENV_VARS } from '@apify/consts';
import sinon from 'sinon';
import log from '../../build/utils_log';
import * as Apify from '../../build';
diff --git a/test/events.test.js b/test/events.test.js
index 4c4004fb4..7e6e0f994 100644
--- a/test/events.test.js
+++ b/test/events.test.js
@@ -1,6 +1,6 @@
import WebSocket from 'ws';
import sinon from 'sinon';
-import { ENV_VARS } from 'apify-shared/consts';
+import { ENV_VARS } from '@apify/consts';
import { ACTOR_EVENT_NAMES_EX } from '../build/constants';
import { sleep } from '../build/utils';
diff --git a/test/live_view/live_view_server.test.js b/test/live_view/live_view_server.test.js
index 244989318..716a58b0d 100644
--- a/test/live_view/live_view_server.test.js
+++ b/test/live_view/live_view_server.test.js
@@ -2,7 +2,7 @@ import path from 'path';
import { promisify } from 'util';
import fs from 'fs-extra';
import io from 'socket.io-client';
-import { ENV_VARS, LOCAL_ENV_VARS } from 'apify-shared/consts';
+import { ENV_VARS, LOCAL_ENV_VARS } from '@apify/consts';
import Apify from '../../build/index';
import LiveViewServer from '../../build/live_view/live_view_server';
import { requestAsBrowser } from '../../build/utils_request';
diff --git a/test/local_storage_dir_emulator.js b/test/local_storage_dir_emulator.js
index 47f46a28e..21a5c9a04 100644
--- a/test/local_storage_dir_emulator.js
+++ b/test/local_storage_dir_emulator.js
@@ -1,5 +1,5 @@
-import { cryptoRandomObjectId } from 'apify-shared/utilities';
-import { LOCAL_STORAGE_SUBDIRS, LOCAL_ENV_VARS, ENV_VARS } from 'apify-shared/consts';
+import { cryptoRandomObjectId } from '@apify/utilities';
+import { LOCAL_STORAGE_SUBDIRS, LOCAL_ENV_VARS, ENV_VARS } from '@apify/consts';
import fs from 'fs-extra';
import path from 'path';
import log from '../build/utils_log';
diff --git a/test/main.test.js b/test/main.test.js
index a9d458b7e..4a9b51317 100644
--- a/test/main.test.js
+++ b/test/main.test.js
@@ -2,7 +2,7 @@
import {
ENV_VARS,
KEY_VALUE_STORE_KEYS,
-} from 'apify-shared/consts';
+} from '@apify/consts';
import ApifyDefault from '../build/index';
// eslint-disable-next-line import/no-duplicates
import * as ApifyWithWildcard from '../build/index';
diff --git a/test/proxy_configuration.test.js b/test/proxy_configuration.test.js
index 96c39dcae..e5e18a8b7 100644
--- a/test/proxy_configuration.test.js
+++ b/test/proxy_configuration.test.js
@@ -1,5 +1,5 @@
import sinon from 'sinon';
-import { ENV_VARS, LOCAL_ENV_VARS } from 'apify-shared/consts';
+import { ENV_VARS, LOCAL_ENV_VARS } from '@apify/consts';
import Apify from '../build/index';
import * as requestUtils from '../build/utils_request';
import * as utils from '../build/utils';
diff --git a/test/request.test.js b/test/request.test.js
index b1b8c441e..896a5c721 100644
--- a/test/request.test.js
+++ b/test/request.test.js
@@ -1,5 +1,5 @@
import util from 'util';
-import { normalizeUrl } from 'apify-shared/utilities';
+import { normalizeUrl } from '@apify/utilities';
import { hashPayload } from '../build/request';
import Apify from '../build/index';
diff --git a/test/session_pool/session_pool.test.js b/test/session_pool/session_pool.test.js
index cacac4bd4..73697124e 100644
--- a/test/session_pool/session_pool.test.js
+++ b/test/session_pool/session_pool.test.js
@@ -4,7 +4,7 @@ import events from '../../build/events';
import { ACTOR_EVENT_NAMES_EX } from '../../build/constants';
import { Session } from '../../build/session_pool/session';
import LocalStorageDirEmulator from '../local_storage_dir_emulator';
-import defaultLog from '../../build/utils_log';
+import { Log } from '../../build/utils_log';
describe('SessionPool - testing session pool', () => {
let sessionPool;
@@ -58,7 +58,7 @@ describe('SessionPool - testing session pool', () => {
expect(sessionPool[key]).toEqual(value);
});
// log is appended to sessionOptions after sessionPool instantiation
- expect(sessionPool.sessionOptions).toEqual({ ...opts.sessionOptions, log: expect.any(defaultLog.Log) });
+ expect(sessionPool.sessionOptions).toEqual({ ...opts.sessionOptions, log: expect.any(Log) });
});
test('should work using openSessionPool', async () => {
@@ -83,7 +83,7 @@ describe('SessionPool - testing session pool', () => {
expect(sessionPool[key]).toEqual(value);
});
// log is appended to sessionOptions after sessionPool instantiation
- expect(sessionPool.sessionOptions).toEqual({ ...opts.sessionOptions, log: expect.any(defaultLog.Log) });
+ expect(sessionPool.sessionOptions).toEqual({ ...opts.sessionOptions, log: expect.any(Log) });
});
describe('should retrieve session', () => {
diff --git a/test/storages/dataset.test.js b/test/storages/dataset.test.js
index b8a9384f0..782a87e7c 100644
--- a/test/storages/dataset.test.js
+++ b/test/storages/dataset.test.js
@@ -1,7 +1,7 @@
import {
ENV_VARS,
MAX_PAYLOAD_SIZE_BYTES,
-} from 'apify-shared/consts';
+} from '@apify/consts';
import { apifyClient } from '../../build/utils';
import {
Dataset,
diff --git a/test/storages/key_value_store.test.js b/test/storages/key_value_store.test.js
index a66fb1007..2c40a3c22 100644
--- a/test/storages/key_value_store.test.js
+++ b/test/storages/key_value_store.test.js
@@ -1,6 +1,6 @@
import {
ENV_VARS,
-} from 'apify-shared/consts';
+} from '@apify/consts';
import { apifyClient } from '../../build/utils';
import {
KeyValueStore,
diff --git a/test/utils.test.js b/test/utils.test.js
index 9fa6f5c04..ad9b5adc1 100644
--- a/test/utils.test.js
+++ b/test/utils.test.js
@@ -6,7 +6,7 @@ import path from 'path';
import os from 'os';
import cheerio from 'cheerio';
import semver from 'semver';
-import { ENV_VARS } from 'apify-shared/consts';
+import { ENV_VARS } from '@apify/consts';
import Apify from '../build/index';
import * as utils from '../build/utils';
import log from '../build/utils_log';
diff --git a/tsconfig.json b/tsconfig.json
index 5e29b2922..9f7c71317 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -29,7 +29,7 @@
"alwaysStrict": true,
"noStrictGenericChecks": true,
"strictNullChecks": true,
- "allowSyntheticDefaultImports": false,
+ "allowSyntheticDefaultImports": true,
"esModuleInterop": false,
"declarationDir": "types/",
"outDir": "build/"
diff --git a/website/tools/build_docs.js b/website/tools/build_docs.js
index 9fa1a9eba..0c44b5283 100644
--- a/website/tools/build_docs.js
+++ b/website/tools/build_docs.js
@@ -6,7 +6,6 @@ const prettier = require('prettier'); // eslint-disable-line
const got = require('got');
const prettierConfig = require('./prettier.config');
const sidebars = require('../sidebars.json');
-const { readStreamToString } = require('apify-shared/streams_utilities'); // eslint-disable-line
const BASE_URL = '..';
const DOCS_DIR = path.join(__dirname, '..', '..', 'docs');