single-file-core 1.5.44 → 1.5.46
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/core/helper.js +12 -2
- package/core/index.js +11 -4
- package/core/infobar.js +25 -4
- package/core/lib/processor-helper-common.js +6 -2
- package/core/lib/processor-helper-inline.js +10 -5
- package/core/lib/processor-helper.js +10 -5
- package/core/util.js +8 -2
- package/eslint.config.mjs +31 -0
- package/modules/css-fonts-minifier.js +2 -2
- package/modules/css-matched-rules.js +1 -0
- package/modules/html-images-alt-minifier.js +1 -0
- package/modules/html-minifier.js +2 -1
- package/modules/html-serializer.js +2 -2
- package/modules/template-formatter.js +12 -2
- package/package.json +6 -3
- package/processors/compression/compression.js +1 -1
- package/processors/frame-tree/content/content-frame-tree.js +7 -2
- package/processors/hooks/content/content-hooks-frames-web.js +4 -1
- package/processors/hooks/content/content-hooks-frames.js +1 -1
- package/processors/lazy/content/content-lazy-loader.js +3 -2
- package/single-file-infobar.js +7 -1
- package/single-file.js +0 -2
- package/vendor/css-media-query-parser.js +1 -1
- package/vendor/css-minifier.js +4 -3
- package/vendor/css-tree.js +10 -10
- package/vendor/css-unescape.js +0 -1
- package/vendor/html-srcset-parser.js +2 -2
- package/vendor/mime-type-parser.js +2 -2
- package/.eslintrc.js +0 -40
package/vendor/css-unescape.js
CHANGED
|
@@ -98,7 +98,7 @@ function process(input) {
|
|
|
98
98
|
// 4. Splitting loop: Collect a sequence of characters that are space
|
|
99
99
|
// characters or U+002C COMMA characters. If any U+002C COMMA characters
|
|
100
100
|
// were collected, that is a parse error.
|
|
101
|
-
while (true) {
|
|
101
|
+
while (true) {
|
|
102
102
|
collectCharacters(regexLeadingCommasOrSpaces);
|
|
103
103
|
|
|
104
104
|
// 5. If position is past the end of input, return candidates and abort these steps.
|
|
@@ -144,7 +144,7 @@ function process(input) {
|
|
|
144
144
|
// 8.3. Let state be in descriptor.
|
|
145
145
|
state = "in descriptor";
|
|
146
146
|
|
|
147
|
-
while (true) {
|
|
147
|
+
while (true) {
|
|
148
148
|
|
|
149
149
|
// 8.4. Let c be the character at position.
|
|
150
150
|
c = input.charAt(pos);
|
|
@@ -81,7 +81,6 @@ let utils, parser, serializer, MIMEType;
|
|
|
81
81
|
|
|
82
82
|
position++;
|
|
83
83
|
|
|
84
|
-
// eslint-disable-next-line no-constant-condition
|
|
85
84
|
while (true) {
|
|
86
85
|
while (position < input.length && input[position] !== "\"" && input[position] !== "\\") {
|
|
87
86
|
value += input[position];
|
|
@@ -273,7 +272,8 @@ let utils, parser, serializer, MIMEType;
|
|
|
273
272
|
static parse(string) {
|
|
274
273
|
try {
|
|
275
274
|
return new this(string);
|
|
276
|
-
|
|
275
|
+
// eslint-disable-next-line no-unused-vars
|
|
276
|
+
} catch (error) {
|
|
277
277
|
return null;
|
|
278
278
|
}
|
|
279
279
|
}
|
package/.eslintrc.js
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/* global module */
|
|
2
|
-
|
|
3
|
-
module.exports = {
|
|
4
|
-
"env": {
|
|
5
|
-
"es6": true,
|
|
6
|
-
"node": false,
|
|
7
|
-
"browser": false
|
|
8
|
-
},
|
|
9
|
-
"globals": {
|
|
10
|
-
"console": true
|
|
11
|
-
},
|
|
12
|
-
"extends": "eslint:recommended",
|
|
13
|
-
"parserOptions": {
|
|
14
|
-
"ecmaVersion": 2017,
|
|
15
|
-
"sourceType": "module"
|
|
16
|
-
},
|
|
17
|
-
"rules": {
|
|
18
|
-
"indent": [
|
|
19
|
-
"error",
|
|
20
|
-
"tab", {
|
|
21
|
-
"SwitchCase": 1
|
|
22
|
-
}
|
|
23
|
-
],
|
|
24
|
-
"linebreak-style": [
|
|
25
|
-
"error",
|
|
26
|
-
"unix"
|
|
27
|
-
],
|
|
28
|
-
"quotes": [
|
|
29
|
-
"error",
|
|
30
|
-
"double"
|
|
31
|
-
],
|
|
32
|
-
"semi": [
|
|
33
|
-
"error",
|
|
34
|
-
"always"
|
|
35
|
-
],
|
|
36
|
-
"no-console": [
|
|
37
|
-
"warn"
|
|
38
|
-
]
|
|
39
|
-
}
|
|
40
|
-
};
|