@svelte-vitals/vite 0.17.0 → 0.18.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.
Files changed (2) hide show
  1. package/dist/index.js +9 -2
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -105,7 +105,10 @@ async function collectRenderedProject(cwd, htmlLang) {
105
105
  import { readFile as readFile3, access as access2 } from "fs/promises";
106
106
  import { join as join3 } from "path";
107
107
  import { glob as glob2 } from "tinyglobby";
108
- import { collectComponentFacts as collect } from "@svelte-vitals/core";
108
+ import {
109
+ collectComponentFacts as collect,
110
+ collectKitModuleFacts as collectKit
111
+ } from "@svelte-vitals/core";
109
112
  var nodeRuntime = {
110
113
  readFile: (path) => readFile3(path, "utf8"),
111
114
  async exists(path) {
@@ -122,6 +125,9 @@ var nodeRuntime = {
122
125
  function collectComponentFacts(root) {
123
126
  return collect(nodeRuntime, root);
124
127
  }
128
+ function collectKitModuleFacts(root) {
129
+ return collectKit(nodeRuntime, root);
130
+ }
125
131
 
126
132
  // src/version.ts
127
133
  import { readFileSync } from "fs";
@@ -159,8 +165,9 @@ async function analyze(prerenderPagesDir, cwd, options) {
159
165
  const { heads, headings, images, htmlLang } = await collectRenderedHeads(prerenderPagesDir);
160
166
  const project = await collectRenderedProject(cwd, htmlLang);
161
167
  const components = await collectComponentFacts(cwd);
168
+ const kitModules = await collectKitModuleFacts(cwd);
162
169
  const results = applyRuleSeverities(
163
- await runRules(selectRules(allRules, config), { heads, headings, images, project, components, config }),
170
+ await runRules(selectRules(allRules, config), { heads, headings, images, project, components, config, kitModules }),
164
171
  config
165
172
  );
166
173
  const { score } = computeScore(results, config);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@svelte-vitals/vite",
3
- "version": "0.17.0",
3
+ "version": "0.18.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.0",
44
44
  "tinyglobby": "^0.2.17",
45
- "@svelte-vitals/core": "0.25.0",
46
- "svelte-vitals": "0.28.0"
45
+ "@svelte-vitals/core": "0.26.0",
46
+ "svelte-vitals": "0.29.0"
47
47
  },
48
48
  "peerDependencies": {
49
49
  "@sveltejs/kit": "^2.69.2",