Skip to content

Commit 59fcd22

Browse files
fix: add skipLibCheck until Crawlee types are resolved
1 parent 9386d17 commit 59fcd22

File tree

10 files changed

+31
-27
lines changed

10 files changed

+31
-27
lines changed

.DS_Store

6 KB
Binary file not shown.

checker-cheerio/package-lock.json

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

checker-cheerio/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
"node": ">=16.0.0"
88
},
99
"dependencies": {
10-
"apify": "^3.0.0",
11-
"crawlee": "^3.0.0",
10+
"apify": "^3.1.0",
11+
"crawlee": "^3.1",
1212
"cheerio": "^1.0.0-rc.10"
1313
},
1414
"devDependencies": {
@@ -18,7 +18,7 @@
1818
"@typescript-eslint/parser": "^5.32.0",
1919
"eslint": "^8.20.0",
2020
"ts-node": "^10.9.1",
21-
"typescript": "4.7.4"
21+
"typescript": "^4.8"
2222
},
2323
"scripts": {
2424
"start": "npm run start:dev",

checker-cheerio/src/handleFailedRequest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { log } from 'crawlee';
22

3-
import type { CheerioCrawlingContext} from 'crawlee';
3+
import type { CheerioCrawlingContext } from 'crawlee';
44

55
import type { ActorCheckDetailedOutput } from './typedefs.js';
66

checker-cheerio/src/handlePage.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export async function handlePage(
1919
if (input.saveSnapshot) {
2020
const key = `SNAPSHOT-${Math.random().toString()}`;
2121
await Actor.setValue(`${key}.html`, body, { contentType: 'text/html' });
22-
htmlUrl = `https://api.apify.com/v2/key-value-stores/${getEnv().defaultKeyValueStoreId}/records/${key}.html?disableRedirect=true`;
22+
htmlUrl = `https://api.apify.com/v2/key-value-stores/${Actor.getEnv().defaultKeyValueStoreId}/records/${key}.html?disableRedirect=true`;
2323
}
2424

2525
state.totalPages.push({ url: request.url, htmlUrl });
@@ -72,7 +72,6 @@ export async function handlePage(
7272
userData: req.userData,
7373
}) as PseudoUrlInput,
7474
),
75-
requestQueue,
7675
baseUrl: request.loadedUrl,
7776
});
7877
}

checker-cheerio/src/main.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,9 @@ Actor.main(async () => {
7979

8080
// TODO: Consider making this an option in the CheerioCrawler instead of needing to override a function
8181
// We don't want the crawler to throw errors on bad statuses
82-
Reflect.set(crawler, '_throwOnBlockedRequest', () => {});
82+
Reflect.set(crawler, '_throwOnBlockedRequest', () => {
83+
// Do nothing
84+
});
8385

8486
await crawler.run();
8587

checker-cheerio/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"target": "ES2022",
66
"outDir": "dist",
77
"noUnusedLocals": false,
8-
"lib": ["DOM"]
8+
"lib": ["DOM"],
9+
"skipLibCheck": true
910
},
1011
"include": [
1112
"./src/**/*"

checker-puppeteer/src/handlePage.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ export async function handlePage(
3232
if (input.saveSnapshot) {
3333
const key = `SNAPSHOT-${Math.random().toString()}`;
3434
await puppeteerUtils.saveSnapshot(page, { key });
35-
screenshotUrl = `https://api.apify.com/v2/key-value-stores/${getEnv().defaultKeyValueStoreId}/records/${key}.jpg?disableRedirect=true`;
36-
htmlUrl = `https://api.apify.com/v2/key-value-stores/${getEnv().defaultKeyValueStoreId}/records/${key}.html?disableRedirect=true`;
35+
screenshotUrl = `https://api.apify.com/v2/key-value-stores/${Actor.getEnv().defaultKeyValueStoreId}/records/${key}.jpg?disableRedirect=true`;
36+
htmlUrl = `https://api.apify.com/v2/key-value-stores/${Actor.getEnv().defaultKeyValueStoreId}/records/${key}.html?disableRedirect=true`;
3737
}
3838

3939
state.totalPages.push({ url: request.url, htmlUrl, screenshotUrl });

checker-puppeteer/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"target": "ES2022",
88
"outDir": "dist",
99
"noUnusedLocals": false,
10-
"lib": ["DOM"]
10+
"lib": ["DOM"],
11+
"skipLibCheck": true
1112
},
1213
"include": [
1314
"./src/**/*"

starter/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"target": "ES2022",
66
"outDir": "dist",
77
"noUnusedLocals": false,
8-
"lib": ["DOM"]
8+
"lib": ["DOM"],
9+
"skipLibCheck": true
910
},
1011
"include": [
1112
"./src/**/*"

0 commit comments

Comments
 (0)