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(e2e): force-include copied packages when pushing test actors (#4365)

Martin Adámek31467aada097
diff --git a/.gitignore b/.gitignore
index 5b8eb9c4d..f3820b0e2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -28,6 +28,7 @@ crawlee_storage
storage
.turbo
test/e2e/**/packages
+test/e2e/**/.actorignore
.yarn
diff --git a/test/e2e/tools.mjs b/test/e2e/tools.mjs
index 6c4fe1bc7..59dac4bd3 100644
--- a/test/e2e/tools.mjs
+++ b/test/e2e/tools.mjs
@@ -298,6 +298,8 @@ async function copyPackages(dirName) {
const srcPackagesDir = join(dirname(fileURLToPath(import.meta.url)), '..', '..', 'packages');
const destPackagesDir = join(dirName, 'packages');
await fs.remove(destPackagesDir);
+ // `apify push` skips gitignored files, and the copied packages are gitignored.
+ await fs.writeFile(join(dirName, '.actorignore'), '!packages\n');
// npm (used when building the actor on the platform) understands neither pnpm's `workspace:`
// protocol nor its `catalog:` protocol. Parse the catalog from pnpm-workspace.yaml so
@@ -412,6 +414,7 @@ async function copyPackages(dirName) {
export async function clearPackages(dirName) {
const destPackagesDir = join(dirName, 'actor', 'packages');
await fs.remove(destPackagesDir);
+ await fs.remove(join(dirName, 'actor', '.actorignore'));
}
/**