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.

Removed TEST_BABEL_BUILD env var, updated README.md

Jan Curn5c55ed0e09d8
diff --git a/.travis.yml b/.travis.yml
index eab377c49..f4ef1e036 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,5 +1,7 @@
language: node_js
node_js:
+ - "7"
+ - "6"
- "5"
- "4"
script:
diff --git a/README.md b/README.md
index b6d5afb28..4de98d375 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,9 @@
-# apifier-sdk-js [![Build Status](https://travis-ci.org/Apifier/apifier-sdk-js.svg)](https://travis-ci.org/Apifier/apifier-sdk-js) [![npm version](https://badge.fury.io/js/apifier.svg)](http://badge.fury.io/js/apifier)
+# apify-runtime-js [![Build Status](https://travis-ci.org/Apifier/apify-runtime-js.svg)](https://travis-ci.org/Apifier/apify-runtime-js) [![npm version](https://badge.fury.io/js/apifier.svg)](http://badge.fury.io/js/apifier)
-Apifier runtime for JavaScript.
+Apifier Actor runtime for JavaScript.
This is a helper package that simplifies development of Apifier acts.
-It's still a work in progress, stay tuned.
+It is still a work in progress, stay tuned.
## Installation
@@ -101,6 +101,13 @@ argument called `context` which is an object such as:
// ID of the act run
actRunId: String,
+ // ID of the user who started the act (might be different than the owner of the act)
+ userId: String,
+
+ // Authentication token representing privileges given to the act run,
+ // which can be passed to Apifier API calls
+ token: String,
+
// Date when the act was started
startedAt: Date,
diff --git a/package.json b/package.json
index 6f5bcaef5..98059abee 100644
--- a/package.json
+++ b/package.json
@@ -35,7 +35,7 @@
"test": "npm run build && mocha --compilers js:babel-core/register --recursive",
"test-cov": "npm run build && babel-node node_modules/isparta/bin/isparta cover --report html --report text node_modules/.bin/_mocha",
"prepare": "npm run build",
- "prepublishOnly": "TEST_BABEL_BUILD=1 npm test && npm run lint",
+ "prepublishOnly": "npm test && npm run lint",
"clean": "rm -rf build",
"lint": "npm run build && eslint src test"
},
diff --git a/test/actor.js b/test/actor.js
index f880969d3..cfd85c7a1 100644
--- a/test/actor.js
+++ b/test/actor.js
@@ -5,17 +5,14 @@ import sinon from 'sinon';
import tmp from 'tmp';
import Promise from 'bluebird';
+// NOTE: use require() here because this is how its done in acts
+const Apifier = require('../build/index');
+
/* global process */
// TODO: override console.log() to test the error messages (now they are printed to console)
// TODO: test callback version of functions!!!
-// NOTE: use require() here because this is how its done in acts
-const Apifier = process.env.TEST_BABEL_BUILD ? require('../build/index') : require('../src/index');
-
-if (process.env.TEST_BABEL_BUILD) console.log('Running with TEST_BABEL_BUILD option');
-
-
/*
let freePorts = [];
before(() => {
diff --git a/test/utils.js b/test/utils.js
index 4f1032853..67106dc41 100644
--- a/test/utils.js
+++ b/test/utils.js
@@ -1,11 +1,7 @@
import BluebirdPromise from 'bluebird';
import { expect } from 'chai';
import * as utils from '../src/utils';
-
-// NOTE: use require() here because this how its done in acts
-const Apifier = process.env.TEST_BABEL_BUILD ? require('../build/index') : require('../src/index');
-
-if (process.env.TEST_BABEL_BUILD) console.log('Running with TEST_BABEL_BUILD option');
+import Apifier from '../build/index';
/* global process */