@svelte-vitals/vite 0.27.0 → 0.28.0
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/dist/hooks/index.js +2 -4
- package/dist/index.js +13 -17
- package/package.json +3 -3
package/dist/hooks/index.js
CHANGED
|
@@ -50,10 +50,8 @@ async function analyzeAndIngest(html, route, origin, rules, config, lastSignatur
|
|
|
50
50
|
];
|
|
51
51
|
const images = [{ route, images: imgs.map((img) => ({ ...img, file: route })) }];
|
|
52
52
|
const project = { hasRobotsTxt: true, hasSitemap: true, htmlLang };
|
|
53
|
-
const results =
|
|
54
|
-
|
|
55
|
-
config
|
|
56
|
-
);
|
|
53
|
+
const { results: ruleResults } = await runRules(rules, { heads: [head], headings, images, project, config });
|
|
54
|
+
const results = applyRuleSeverities(ruleResults, config);
|
|
57
55
|
const signature = findingSignature(results, config);
|
|
58
56
|
if (lastSignature.get(route) === signature) return;
|
|
59
57
|
lastSignature.set(route, signature);
|
package/dist/index.js
CHANGED
|
@@ -210,22 +210,17 @@ async function analyze(prerenderPagesDir, cwd, options, extraProjectFacts) {
|
|
|
210
210
|
const kitModules = await collectKitModuleFacts(cwd, project.kitAliases);
|
|
211
211
|
const sourceFiles = await collectSourceFiles(cwd);
|
|
212
212
|
const selected = selectRules(allRules, config);
|
|
213
|
-
const results =
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
}),
|
|
225
|
-
config
|
|
226
|
-
),
|
|
227
|
-
config
|
|
228
|
-
);
|
|
213
|
+
const { results: rawResults, examined } = await runRules(selected, {
|
|
214
|
+
heads,
|
|
215
|
+
headings,
|
|
216
|
+
images,
|
|
217
|
+
project,
|
|
218
|
+
components,
|
|
219
|
+
config,
|
|
220
|
+
kitModules,
|
|
221
|
+
sourceFiles
|
|
222
|
+
});
|
|
223
|
+
const results = applyOverrides(applyRuleSeverities(rawResults, config), config);
|
|
229
224
|
const { score } = computeScore(results, config);
|
|
230
225
|
const summary = summarize(results, config);
|
|
231
226
|
const failed = hasFailureAtOrAbove(summary, config.failOn);
|
|
@@ -236,7 +231,8 @@ Scanned ${components.length} component(s) under src/ for Correctness/Security/Ar
|
|
|
236
231
|
results,
|
|
237
232
|
config,
|
|
238
233
|
{ version: readPackageVersion() },
|
|
239
|
-
selected.map((r) => r.id)
|
|
234
|
+
selected.map((r) => r.id),
|
|
235
|
+
examined
|
|
240
236
|
);
|
|
241
237
|
return {
|
|
242
238
|
score,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@svelte-vitals/vite",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.28.0",
|
|
4
4
|
"description": "Vite/SvelteKit plugin for svelte-vitals — analyzes prerendered HTML during vite build.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
"esm-env": "^1.2.2",
|
|
43
43
|
"node-html-parser": "^9.0.1",
|
|
44
44
|
"tinyglobby": "^0.2.17",
|
|
45
|
-
"@svelte-vitals/core": "0.
|
|
46
|
-
"svelte-vitals": "0.
|
|
45
|
+
"@svelte-vitals/core": "0.37.0",
|
|
46
|
+
"svelte-vitals": "0.43.0"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"@sveltejs/kit": "^2.70.2",
|