fetch-css 4.0.7 → 4.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/crx-to-zip.js +0 -2
- package/index.js +3 -3
- package/package.json +9 -10
package/crx-to-zip.js
CHANGED
package/index.js
CHANGED
|
@@ -5,10 +5,10 @@ import {parseFragment} from "parse5";
|
|
|
5
5
|
import unzipper from "unzipper";
|
|
6
6
|
import urlToolkit from "url-toolkit";
|
|
7
7
|
import crxToZip from "./crx-to-zip.js";
|
|
8
|
-
import
|
|
8
|
+
import {fetch as undiciFetch} from "undici";
|
|
9
9
|
import fetchEnhanced from "fetch-enhanced";
|
|
10
10
|
|
|
11
|
-
const fetch = fetchEnhanced(
|
|
11
|
+
const fetch = fetchEnhanced(undiciFetch, {undici: true});
|
|
12
12
|
const clone = cloner();
|
|
13
13
|
|
|
14
14
|
async function extract(res) {
|
|
@@ -71,7 +71,7 @@ function extractCssFromJs(js) {
|
|
|
71
71
|
onToken: token => {
|
|
72
72
|
if (token.type.label === "string") {
|
|
73
73
|
const str = token.value.trim()
|
|
74
|
-
.replace(/\n/
|
|
74
|
+
.replace(/\n/g, "")
|
|
75
75
|
.replace(/^\);}/, ""); // this is probably not universal to webpack's css-in-js strings
|
|
76
76
|
|
|
77
77
|
if (str.length > 25 && isValidCSS(str)) { // hackish treshold to ignore short strings that may be valid CSS,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fetch-css",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.9",
|
|
4
4
|
"description": "Extract CSS from websites and browser extensions",
|
|
5
5
|
"author": "silverwind",
|
|
6
6
|
"repository": "silverwind/fetch-css",
|
|
@@ -22,21 +22,20 @@
|
|
|
22
22
|
"crx-to-zip.js"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"acorn": "8.8.
|
|
26
|
-
"base-64": "1.0.0",
|
|
25
|
+
"acorn": "8.8.2",
|
|
27
26
|
"crypto-js": "4.1.1",
|
|
28
|
-
"fetch-enhanced": "11.1.
|
|
29
|
-
"node-fetch": "3.3.0",
|
|
27
|
+
"fetch-enhanced": "11.1.1",
|
|
30
28
|
"parse5": "7.1.2",
|
|
31
|
-
"postcss": "8.4.
|
|
29
|
+
"postcss": "8.4.23",
|
|
32
30
|
"rfdc": "1.3.0",
|
|
31
|
+
"undici": "5.22.0",
|
|
33
32
|
"unzipper": "0.10.11",
|
|
34
33
|
"url-toolkit": "2.2.5"
|
|
35
34
|
},
|
|
36
35
|
"devDependencies": {
|
|
37
|
-
"eslint": "8.
|
|
38
|
-
"eslint-config-silverwind": "
|
|
39
|
-
"updates": "
|
|
40
|
-
"versions": "
|
|
36
|
+
"eslint": "8.40.0",
|
|
37
|
+
"eslint-config-silverwind": "69.0.2",
|
|
38
|
+
"updates": "14.1.0",
|
|
39
|
+
"versions": "11.0.0"
|
|
41
40
|
}
|
|
42
41
|
}
|