8000 [get-css] Remove dependency on request by johman10 · Pull Request #306 · cssstats/cssstats · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@johman10
Copy link
Contributor
@johman10 johman10 commented Dec 7, 2020

We started using get-css to extract css from a user input website.

Upon deploying we figured out that request is required in our source to make it work because of a missing dependency in requestretry. Upon further investigation it turned out that this library was depending on requestretry, but not actually using the features from it, so I figured to remove that.

However, request itself is deprecated and should perhaps be replaced, for that purpose this also switched to node-fetch instead.

Small note: this (might) change the minimum version required by get-css. Request supports Node >=6, Node-fetch support ^10.17 || >=12.3, this support can be brought down by adding a globalThis polyfill as described here.

I hope this PR is appreciated even though it might not be asked for. ;)

@vercel
Copy link
vercel bot commented Dec 7, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/css-stats/cssstats/ea95csosq
✅ Preview: https://cssstats-git-remove-request-dependency-for-get-css.css-stats.vercel.app

"scripts": {
"format": "prettier --no-semi --single-quote --write {test,utils,bin}/**/*.js index.js",
"test": "node test/test && mocha test 'test/**/*.js'"
"test": "ava 'test/**/*.js'"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was unable to run without using ava, because the tests depend on it, so I also added it to the dev dependencies and remove mocha.

Copy link
Member
@johno johno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😻😻😻

@johno johno merged commit 86f3c5e into cssstats:master Dec 8, 2020
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.

2 participants

0