Skip to content
This repository was archived by the owner on Oct 6, 2022. It is now read-only.

Commit c74e81e

Browse files
authored
Merge pull request #501 from AVGP/release-3.1.0
Release 3.1.0
2 parents 50036a4 + daea270 commit c74e81e

4 files changed

Lines changed: 16 additions & 10 deletions

File tree

package-lock.json

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

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "rendertron",
3-
"version": "3.0.0",
3+
"version": "3.1.0",
44
"description": "Renders webpages using headless Chrome for usage by bots",
55
"license": "Apache-2.0",
66
"repository": "https://github.com/GoogleChrome/rendertron",
@@ -55,6 +55,6 @@
5555
"nodemon": "^2.0.6",
5656
"supertest": "^6.0.1",
5757
"tslint": "^6.1.3",
58-
"typescript": "~4.0.5"
58+
"typescript": "4.0.5"
5959
}
6060
}

src/rendertron.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -152,11 +152,6 @@ export class Rendertron {
152152
return;
153153
}
154154

155-
let options = undefined;
156-
if (ctx.method === 'POST' && ctx.request.body) {
157-
options = ctx.request.body;
158-
}
159-
160155
const dimensions = {
161156
width: Number(ctx.query['width']) || this.config.width,
162157
height: Number(ctx.query['height']) || this.config.height
@@ -166,7 +161,7 @@ export class Rendertron {
166161

167162
try {
168163
const img = await this.renderer.screenshot(
169-
url, mobileVersion, dimensions, options, ctx.query.timezoneId);
164+
url, mobileVersion, dimensions, ctx.query.timezoneId);
170165

171166
for (const key in this.config.headers) {
172167
ctx.set(key, this.config.headers[key]);

src/test/app-test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ test('renders shadow DOM - webcomponents-lite.js polyfill', async (t: ExecutionC
120120
});
121121

122122
test('script tags and link[rel=import] tags are stripped', async (t: ExecutionContext) => {
123-
const res = await server.get(`/render/${testBase}include-script.html`);
123+
const res = await server.get(`/render/${testBase}include-script.html?wc-inject-polyfills=true`);
124124
t.is(res.status, 200);
125125
t.false(res.text.indexOf('script src') !== -1);
126126
t.true(res.text.indexOf('injectedElement') !== -1);

0 commit comments

Comments
 (0)