Tags: apify/proxy-chain
Tags
test(e2e): upgrade puppeteer to v25 to fix broken e2e navigation (#666) * test(e2e): stabilize flaky puppeteer e2e tests The puppeteer-backed e2e cases intermittently timed out, with every puppeteer test in a run hanging for the full 30s mocha timeout (e.g. run 26625946119 took 29m as ~50 tests each burned 30s). Two root causes: - The tests opted into `headless: 'new'`, which in the bundled Chromium (pptr 19 / Chromium ~115) is markedly slower and flakier to start in CI than the legacy `headless: true` mode, for no functional gain here. - The launch retry only caught thrown errors, not hangs. puppeteer's default launch/navigation timeouts equal the mocha timeout, so a stuck launch or navigation killed the test before the retry could help. Switch to legacy headless, and retry the whole launch -> navigate -> read cycle with a fresh browser, bounding each step with an explicit timeout so a hang surfaces as a catchable rejection. Puppeteer test timeout is raised to fit the retry attempts plus backoff. * test(e2e): upgrade puppeteer to v25 to fix broken e2e navigation The puppeteer e2e tests started failing wholesale (all 52 cases timing out on navigation) after the GitHub-hosted runner image bumped from ubuntu24/20260518 to ubuntu24/20260525. puppeteer was pinned at 19.11.1, whose bundled Chromium (~115, mid-2023) launches but can no longer navigate on the newer OS, while curl through the same proxy still works. Upgrade puppeteer to v25, which ships a current Chromium built for the new image. Adjust the two renamed launch options: - `ignoreHTTPSErrors` -> `acceptInsecureCerts` - `headless: 'new'` -> `headless: true` (the `'new'` value was removed; the modern headless mode is now the default `true`). This also reverts the earlier launch/navigate retry + per-step timeout experiment: it was based on a wrong root cause (assumed flaky spawns), didn't help, and tripled the failing run's wall-clock time by retrying a browser whose navigation could never succeed. Verified locally with puppeteer 25 that the new launch options launch and navigate, both directly and through an HTTP proxy.
chore(changelog): backfill missing 3.0.0 entries (#657)
feat(ci): add Bun runtime jobs (unit + curated/full e2e) (#650) * feat: add Bun runtime support Bun's TypeScript loader does not automatically elide type-only re-exports the way ts-node does, so `export { CustomResponse }` from `src/index.ts` threw a SyntaxError ("export 'CustomResponse' not found"). Mark it as a type-only re-export so both runtimes can load the module. Adds a `test:bun` npm script that runs the existing mocha suite under Bun's runtime, plus a `Test on Bun` job in the check workflow so Bun coverage runs on every PR and release. https://claude.ai/code/session_01PE9wGrZ1wb7Nuq9czWjJz4 * ci: prevent Bun test job from hanging Mocha keeps the process alive while there are open handles. Under Bun some sockets in the integration tests stay open after a failure, which leaves mocha waiting forever and exhausts the job's default 6-hour timeout. Pass --exit so mocha force-exits after the run, and cap the Bun job at 15 minutes as a safety net. https://claude.ai/code/session_01PE9wGrZ1wb7Nuq9czWjJz4 * ci: scope Bun test job to unit tests The Bun job timed out on CI running the e2e suite (8m+, exit 255). The e2e tests exercise HTTP/1.1 pipelining through ProxyChain.Server and util.promisify(stream.pipeline) over upstream HTTP responses; both have known runtime gaps in Bun 1.3 that cause individual tests to hang on their per-test mocha timeout, compounding into the job timeout. Limit test:bun to the unit suite so we still validate that the library loads cleanly under Bun and the utility functions behave the same. Document the scope (and the reason) in test/README.md so the next contributor doesn't expand it without checking those Bun bugs are fixed. https://claude.ai/code/session_01PE9wGrZ1wb7Nuq9czWjJz4 * ci: rename Bun unit job; add Bun e2e job with full/compatible toggle - Rename the Bun unit job from 'Tests on Bun' to 'Unit tests on Bun' to mirror the Node 'Unit tests' naming. - Tag the Node e2e job as 'E2E tests (Node.js 24)' so the runtime is visible from the check list. - Add a 'bun_e2e' job that runs the Bun e2e suite. Scope is controlled by a new `bun_e2e_mode` workflow input: * 'compatible' (default on PRs/release) runs a curated subset of e2e files (currently tcp_tunnel.js + socks.js) that exercise Bun-friendly code paths. * 'full' runs the entire e2e suite. Triggered manually via Actions → Check → Run workflow. - Add `test:bun:e2e:compatible` and `test:bun:e2e:full` npm scripts and document the toggle (and how to extend the compatible subset) in test/README.md. https://claude.ai/code/session_01PE9wGrZ1wb7Nuq9czWjJz4 * ci: shrink Bun e2e 'compatible' subset to validation-only tests The previous compatible subset (tcp_tunnel.js + socks.js) had 4 of 8 test failures on CI. Without log access from this sandbox I can't attribute them to specific tests, so falling back to the minimal subset that is guaranteed to be Bun-safe: the two URL-validation tests in test/e2e/tcp_tunnel.js (selected via --grep 'throws error'). They exercise createTunnel's error paths through chai+mocha without binding sockets, opening upstream HTTP, or otherwise touching the Bun runtime gaps. The README explains how to widen the subset as networked e2e tests are confirmed. https://claude.ai/code/session_01PE9wGrZ1wb7Nuq9czWjJz4 * ci: align Bun check names with the Node.js naming convention Node.js jobs use parenthesised qualifiers (Unit tests (Node.js 24), E2E tests (Node.js 24)). Bring the Bun jobs into the same shape: - Unit tests on Bun → Unit tests (Bun) - E2E tests on Bun (compatible) → E2E tests (Bun, compatible) https://claude.ai/code/session_01PE9wGrZ1wb7Nuq9czWjJz4 --------- Co-authored-by: Claude <noreply@anthropic.com>
chore: Split unit and e2e tests into separate CI jobs (#651) * chore(ci): split unit and e2e tests into separate jobs Reorganises tests to mirror apify/mcpc: - Move pure unit tests to `test/unit/` (`tools.js`) and the network/server-backed tests to `test/e2e/`. Shared helpers stay in `test/utils/`. SSL fixtures move alongside the e2e tests. - Add `test:unit` and `test:e2e` npm scripts; `npm test` still runs both suites under nyc with the `--insecure-http-parser` Node option that the e2e suite needs. - Split the Check workflow into a `unit` job that runs the matrix (Node.js 20/22/24) on ubuntu-24.04 with `fail-fast: false` plus lint on Node.js 24, and a single `e2e` job that runs on Node.js 24 with the `localhost-test` hosts entry. * chore(ci): extract lint into its own job Per review on #651: the unit job ran lint on Node 24 only, which made the job name misleading and coupled a lint failure to unit-test reporting on that one matrix entry. Lint now runs as a dedicated job alongside unit and e2e. --------- Co-authored-by: Claude <noreply@anthropic.com>
feat: release version 3.0 (#652) * feat!: update minimal supported version of Node.js to v20 (#638) * chore: remove typeSocket assertion helper (#653) * feat!: migrate from CJS to ESM (#654) * feat: upgrade typescript to v5 (#655) * feat!: replace nodeify by async/await (#656) * chore: format changelog markdown * docs: add new version info into changelog * chore: bump package version to a major one Close #637
PreviousNext