svelte-vitals 0.47.0 → 0.47.1

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/bin.js CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  runAnalyzeCliGunshi
4
- } from "./chunk-MZO3HVTN.js";
5
- import "./chunk-5UQ6P2M2.js";
4
+ } from "./chunk-YOPSTV5U.js";
5
+ import "./chunk-XUKZINHZ.js";
6
6
  import "./chunk-43FGGQQZ.js";
7
7
  import "./chunk-M5KM5SV7.js";
8
8
  import {
@@ -21,7 +21,7 @@ async function runCli(argv, io = consoleIO, env = process.env) {
21
21
  try {
22
22
  const locale = resolveLocale(env);
23
23
  if (argv[0] === "complete") {
24
- const { runCompleteCliGunshi } = await import("./complete-BDKGAUQX.js");
24
+ const { runCompleteCliGunshi } = await import("./complete-7QUINX6A.js");
25
25
  return { code: await runCompleteCliGunshi(argv, io), exit: "natural" };
26
26
  }
27
27
  if (argv[0] === "docs") {
@@ -491,9 +491,9 @@ function tagsFromHead(head) {
491
491
  ...descText !== void 0 ? { text: descText } : {}
492
492
  });
493
493
  } else if (node.name === "link") {
494
- const rel = attrText(attributes, "rel");
494
+ const rel = attrText(attributes, "rel")?.toLowerCase();
495
495
  const hasAs = findAttr3(attributes, "as") !== void 0;
496
- const asLiteral = attrText(attributes, "as");
496
+ const asLiteral = attrText(attributes, "as")?.toLowerCase();
497
497
  const hasCrossorigin = findAttr3(attributes, "crossorigin") !== void 0;
498
498
  const hreflang = attrText(attributes, "hreflang");
499
499
  const href = attrText(attributes, "href");
@@ -945,7 +945,7 @@ async function resolveRoute(rt, cwd, pageRel, config, layouts, cache, aliases, a
945
945
  const files = chainFiles(pageRel, layouts);
946
946
  const chainOrder = new Map(files.map((f, i) => [f.rel, i]));
947
947
  const composed = /* @__PURE__ */ new Map();
948
- const jsonldTags = [];
948
+ const additiveTags = [];
949
949
  let broadOwn = false;
950
950
  let broadInherited = false;
951
951
  const images = [];
@@ -974,7 +974,8 @@ async function resolveRoute(rt, cwd, pageRel, config, layouts, cache, aliases, a
974
974
  const resolved = await resolveFileTags(rt, cwd, rel, parsed, config, MAX_DEPTH, /* @__PURE__ */ new Set([rel]), cache, aliases);
975
975
  for (const tag of resolved.tags) {
976
976
  const stamped = { ...tag, presence: isPage ? "own" : "inherited", file: rel };
977
- if (tag.kind === "jsonld") jsonldTags.push(stamped);
977
+ if (tag.kind === "jsonld" || tag.kind === "script" || tag.kind === "link" && tag.rel !== "canonical")
978
+ additiveTags.push(stamped);
978
979
  else composed.set(tagKey(tag), stamped);
979
980
  }
980
981
  if (resolved.broad) {
@@ -995,7 +996,7 @@ async function resolveRoute(rt, cwd, pageRel, config, layouts, cache, aliases, a
995
996
  const literalIds = idNodes.filter((n) => n.key !== "");
996
997
  const route = deriveRoute(pageRel);
997
998
  return {
998
- head: { route, source: "static", tags: [...composed.values(), ...jsonldTags], file: pageRel },
999
+ head: { route, source: "static", tags: [...composed.values(), ...additiveTags], file: pageRel },
999
1000
  images: { route, images },
1000
1001
  headings: { route, headings, componentHeadings },
1001
1002
  a11y: {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  run
3
- } from "./chunk-5UQ6P2M2.js";
3
+ } from "./chunk-XUKZINHZ.js";
4
4
  import {
5
5
  VALUE_FLAGS,
6
6
  parseRunArgs,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ROOT_ARGS
3
- } from "./chunk-MZO3HVTN.js";
4
- import "./chunk-5UQ6P2M2.js";
3
+ } from "./chunk-YOPSTV5U.js";
4
+ import "./chunk-XUKZINHZ.js";
5
5
  import {
6
6
  DOCS_LIST_ARGS,
7
7
  DOCS_ROOT_ARGS,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ROOT_ARGS
3
- } from "./chunk-MZO3HVTN.js";
4
- import "./chunk-5UQ6P2M2.js";
3
+ } from "./chunk-YOPSTV5U.js";
4
+ import "./chunk-XUKZINHZ.js";
5
5
  import {
6
6
  JA_ARG_DESCRIPTIONS
7
7
  } from "./chunk-A5DVJX5O.js";
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  routeMatcher,
7
7
  run,
8
8
  spinnerEnabled
9
- } from "./chunk-5UQ6P2M2.js";
9
+ } from "./chunk-XUKZINHZ.js";
10
10
  import {
11
11
  loadConfigFile
12
12
  } from "./chunk-M5KM5SV7.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svelte-vitals",
3
- "version": "0.47.0",
3
+ "version": "0.47.1",
4
4
  "description": "A deterministic SvelteKit code-health scanner (SEO, performance, correctness, security, architecture, accessibility) — not a runtime Web Vitals reporter.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -52,7 +52,7 @@
52
52
  "magicast": "^0.5.4",
53
53
  "svelte": "^5.56.8",
54
54
  "tinyglobby": "^0.2.17",
55
- "@svelte-vitals/core": "0.43.0"
55
+ "@svelte-vitals/core": "0.43.1"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@gunshi/docs": "0.37.1",