Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: remove cheerio dependency #627

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

CosminPerRam
Copy link
Member

cheerio was added for Build And Shoot and was later used for Farming Simulator.
In the past, Build And Shoot had a request and regex implementation, and we are switching back to it (modified version, not original).
Farming Simulator seems to be a bit troublesome to be dealt with, remains to be seen.

According to this Bundlephobia scan of the package.json:
image
Shows that (without got at least), cheerio is almost half of the package size.
This wouldn't really be a trouble for modules, but it is for commonjs as its pulling the entire package.

ping: $(tr).find('td').eq(3).text().trim(),
team: $(tr).find('td').eq(4).text().toLowerCase(),
score: parseInt($(tr).find('td').eq(5).text())
name: cols[2].replace(/<.*?>/g, '').trim(),

Check failure

Code scanning / CodeQL

Incomplete multi-character sanitization High

This string may still contain
<script
, which may cause an HTML element injection vulnerability.
team: $(tr).find('td').eq(4).text().toLowerCase(),
score: parseInt($(tr).find('td').eq(5).text())
name: cols[2].replace(/<.*?>/g, '').trim(),
ping: cols[3].replace(/<.*?>/g, '').trim(),

Check failure

Code scanning / CodeQL

Incomplete multi-character sanitization High

This string may still contain
<script
, which may cause an HTML element injection vulnerability.
score: parseInt($(tr).find('td').eq(5).text())
name: cols[2].replace(/<.*?>/g, '').trim(),
ping: cols[3].replace(/<.*?>/g, '').trim(),
team: cols[4].replace(/<.*?>/g, '').toLowerCase().trim(),

Check failure

Code scanning / CodeQL

Incomplete multi-character sanitization High

This string may still contain
<script
, which may cause an HTML element injection vulnerability.
name: cols[2].replace(/<.*?>/g, '').trim(),
ping: cols[3].replace(/<.*?>/g, '').trim(),
team: cols[4].replace(/<.*?>/g, '').toLowerCase().trim(),
score: parseInt(cols[5].replace(/<.*?>/g, '').trim())

Check failure

Code scanning / CodeQL

Incomplete multi-character sanitization High

This string may still contain
<script
, which may cause an HTML element injection vulnerability.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant