nuxt-seo-utils 7.0.19 → 8.0.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.
Files changed (32) hide show
  1. package/README.md +8 -1
  2. package/bin/nuxt-seo-utils.mjs +2 -0
  3. package/dist/cli.d.mts +2 -0
  4. package/dist/cli.d.ts +2 -0
  5. package/dist/cli.mjs +118 -0
  6. package/dist/module.d.mts +25 -0
  7. package/dist/module.d.ts +140 -0
  8. package/dist/module.json +1 -1
  9. package/dist/module.mjs +229 -18
  10. package/dist/runtime/app/composables/polyfills.d.ts +4 -3
  11. package/dist/runtime/app/composables/polyfills.js +1 -2
  12. package/dist/runtime/app/composables/useBreadcrumbItems.d.ts +2 -2
  13. package/dist/runtime/app/composables/useBreadcrumbItems.js +7 -7
  14. package/dist/runtime/app/composables/useFallbackTitle.d.ts +1 -0
  15. package/dist/runtime/app/composables/useFallbackTitle.js +31 -0
  16. package/dist/runtime/app/composables/useShareLinks.d.ts +78 -0
  17. package/dist/runtime/app/composables/useShareLinks.js +94 -0
  18. package/dist/runtime/app/logic/applyDefaults.js +10 -6
  19. package/dist/runtime/app/plugins/0.routeRules.js +10 -5
  20. package/dist/runtime/app/plugins/1.absoluteImageUrls.server.js +1 -1
  21. package/dist/runtime/app/plugins/inferSeoMetaPlugin.js +1 -1
  22. package/dist/runtime/app/plugins/minifyScripts.server.d.ts +2 -0
  23. package/dist/runtime/app/plugins/minifyScripts.server.js +52 -0
  24. package/dist/runtime/app/plugins/siteConfig.js +4 -3
  25. package/dist/runtime/app/plugins/titles.js +6 -17
  26. package/dist/runtime/server/middleware/redirectCanonical.js +2 -2
  27. package/dist/runtime/server/routes/__nuxt-seo-utils/debug.d.ts +6 -0
  28. package/dist/runtime/server/routes/__nuxt-seo-utils/debug.js +10 -0
  29. package/dist/runtime/shared/minify.d.ts +14 -0
  30. package/dist/runtime/shared/minify.js +133 -0
  31. package/package.json +75 -40
  32. package/dist/runtime/server/tsconfig.json +0 -3
@@ -1,21 +1,22 @@
1
- import { injectHead, useHead, useSeoMeta } from "#imports";
2
1
  import { useSiteConfig } from "#site-config/app/composables/useSiteConfig";
3
2
  import { createSitePathResolver } from "#site-config/app/composables/utils";
3
+ import { injectHead, useHead, useSeoMeta, useServerSeoMeta } from "@unhead/vue";
4
4
  import { TemplateParamsPlugin } from "@unhead/vue/plugins";
5
5
  import { useError, useRoute, useRuntimeConfig } from "nuxt/app";
6
6
  import { stringifyQuery } from "ufo";
7
7
  import { computed, toValue } from "vue";
8
+ const LOCALE_UNDERSCORE_RE = /_/g;
8
9
  export function applyDefaults() {
9
10
  const siteConfig = useSiteConfig({
10
11
  resolveRefs: false
11
12
  });
12
13
  const resolveCurrentLocale = () => {
13
14
  const locale = toValue(siteConfig.currentLocale) || toValue(siteConfig.defaultLocale) || "en";
14
- return locale.replace(/_/g, "-");
15
+ return locale.replace(LOCALE_UNDERSCORE_RE, "-");
15
16
  };
16
17
  const head = injectHead();
17
18
  head.use(TemplateParamsPlugin);
18
- const { canonicalQueryWhitelist, canonicalLowercase } = useRuntimeConfig().public["seo-utils"];
19
+ const { canonicalQueryWhitelist, canonicalLowercase, tagPriority } = useRuntimeConfig().public["seo-utils"];
19
20
  const route = useRoute();
20
21
  const resolveUrl = createSitePathResolver({ withBase: true, absolute: true });
21
22
  const err = useError();
@@ -43,13 +44,16 @@ export function applyDefaults() {
43
44
  // give nuxt.config values higher priority
44
45
  tagPriority: "low"
45
46
  };
47
+ const seoMetaPriority = {
48
+ tagPriority
49
+ };
46
50
  useHead({
47
51
  htmlAttrs: { lang: resolveCurrentLocale },
48
52
  templateParams: {
49
53
  site: () => siteConfig,
50
54
  siteName: () => siteConfig.name
51
55
  },
52
- titleTemplate: "%s %separator %siteName",
56
+ titleTemplate: () => err.value ? "%s" : "%s %separator %siteName",
53
57
  link: [() => canonicalUrl.value]
54
58
  }, minimalPriority);
55
59
  const seoMeta = {
@@ -71,11 +75,11 @@ export function applyDefaults() {
71
75
  ogSiteName: siteConfig.name
72
76
  };
73
77
  if (siteConfig.description)
74
- seoMeta.description = siteConfig.description;
78
+ useServerSeoMeta({ description: siteConfig.description }, minimalPriority);
75
79
  if (siteConfig.twitter) {
76
80
  const id = siteConfig.twitter.startsWith("@") ? siteConfig.twitter : `@${siteConfig.twitter}`;
77
81
  seoMeta.twitterCreator = id;
78
82
  seoMeta.twitterSite = id;
79
83
  }
80
- useSeoMeta(seoMeta, minimalPriority);
84
+ useSeoMeta(seoMeta, seoMetaPriority);
81
85
  }
@@ -1,16 +1,21 @@
1
- import { injectHead, useSeoMeta } from "#imports";
2
- import { defineNuxtPlugin, getRouteRules, useRequestEvent, useState } from "nuxt/app";
1
+ import { injectHead, useSeoMeta } from "@unhead/vue";
2
+ import { defineNuxtPlugin, getRouteRules, useRequestEvent, useRuntimeConfig, useState } from "nuxt/app";
3
3
  export default defineNuxtPlugin({
4
4
  enforce: "post",
5
+ env: { islands: false },
5
6
  async setup() {
6
7
  const head = injectHead();
8
+ if (!head)
9
+ return;
10
+ const { tagPriority } = useRuntimeConfig().public["seo-utils"];
7
11
  const routeRuleState = useState("nuxt-seo-utils:routeRules", () => null);
8
12
  if (import.meta.server) {
9
13
  const event = useRequestEvent();
10
14
  const routeRules = await getRouteRules(event);
15
+ const rules = routeRules;
11
16
  routeRuleState.value = {
12
- head: routeRules.head,
13
- seoMeta: routeRules.seoMeta
17
+ head: rules.head,
18
+ seoMeta: rules.seoMeta
14
19
  };
15
20
  }
16
21
  if (routeRuleState.value) {
@@ -18,7 +23,7 @@ export default defineNuxtPlugin({
18
23
  if (headInput)
19
24
  head.push(headInput);
20
25
  if (seoMeta)
21
- useSeoMeta(seoMeta);
26
+ useSeoMeta(seoMeta, { tagPriority });
22
27
  }
23
28
  }
24
29
  });
@@ -1,5 +1,5 @@
1
- import { injectHead } from "#imports";
2
1
  import { createSitePathResolver } from "#site-config/app/composables/utils";
2
+ import { injectHead } from "@unhead/vue";
3
3
  import { defineNuxtPlugin } from "nuxt/app";
4
4
  import { unref } from "vue";
5
5
  export default defineNuxtPlugin({
@@ -1,5 +1,5 @@
1
- import { injectHead } from "#imports";
2
1
  import { InferSeoMetaPlugin } from "@unhead/addons";
2
+ import { injectHead } from "@unhead/vue";
3
3
  import { defineNuxtPlugin } from "nuxt/app";
4
4
  import { TemplateParamsPlugin } from "unhead/plugins";
5
5
  export default defineNuxtPlugin(() => {
@@ -0,0 +1,2 @@
1
+ declare const _default: import("#app").Plugin<Record<string, unknown>> & import("#app").ObjectPlugin<Record<string, unknown>>;
2
+ export default _default;
@@ -0,0 +1,52 @@
1
+ import { injectHead } from "@unhead/vue";
2
+ import { defineNuxtPlugin } from "nuxt/app";
3
+ import { minifyCSS, minifyJS, minifyJSON } from "../../shared/minify.js";
4
+ const JSON_TYPES = /* @__PURE__ */ new Set(["application/json", "application/ld+json"]);
5
+ const SKIP_JS_TYPES = /* @__PURE__ */ new Set(["application/json", "application/ld+json", "speculationrules", "importmap"]);
6
+ export default defineNuxtPlugin({
7
+ enforce: "post",
8
+ setup() {
9
+ const head = injectHead();
10
+ if (!head)
11
+ return;
12
+ head.use({
13
+ key: "minify-inline",
14
+ hooks: {
15
+ "ssr:render": ({ tags }) => {
16
+ for (const tag of tags) {
17
+ const content = tag.innerHTML;
18
+ if (!content)
19
+ continue;
20
+ if (tag.tag === "script") {
21
+ const type = tag.props.type;
22
+ if (type && JSON_TYPES.has(type)) {
23
+ try {
24
+ const minified = minifyJSON(content);
25
+ if (minified.length < content.length)
26
+ tag.innerHTML = minified;
27
+ } catch {
28
+ }
29
+ continue;
30
+ }
31
+ if (type && SKIP_JS_TYPES.has(type))
32
+ continue;
33
+ try {
34
+ const minified = minifyJS(content);
35
+ if (minified.length < content.length)
36
+ tag.innerHTML = minified;
37
+ } catch {
38
+ }
39
+ } else if (tag.tag === "style") {
40
+ try {
41
+ const minified = minifyCSS(content);
42
+ if (minified.length < content.length)
43
+ tag.innerHTML = minified;
44
+ } catch {
45
+ }
46
+ }
47
+ }
48
+ }
49
+ }
50
+ });
51
+ }
52
+ });
@@ -1,10 +1,11 @@
1
- import { injectHead } from "#imports";
2
1
  import { useSiteConfig } from "#site-config/app/composables/useSiteConfig";
3
- import { defineNuxtPlugin } from "nuxt/app";
2
+ import { injectHead } from "@unhead/vue";
3
+ import { defineNuxtPlugin, useRuntimeConfig } from "nuxt/app";
4
4
  export default defineNuxtPlugin(() => {
5
5
  const head = injectHead();
6
6
  if (!head)
7
7
  return;
8
+ const { tagPriority } = useRuntimeConfig().public["seo-utils"];
8
9
  const siteConfig = useSiteConfig();
9
10
  const input = {
10
11
  meta: [],
@@ -25,7 +26,7 @@ export default defineNuxtPlugin(() => {
25
26
  {
26
27
  name: "description",
27
28
  content: "%site.description",
28
- tagPriority: "low"
29
+ tagPriority
29
30
  }
30
31
  );
31
32
  }
@@ -1,26 +1,15 @@
1
- import { useHead } from "#imports";
2
- import { defineNuxtPlugin, useError, useRoute } from "nuxt/app";
3
- import { titleCase } from "scule";
4
- import { withoutTrailingSlash } from "ufo";
5
- import { computed } from "vue";
1
+ import { useHead } from "@unhead/vue";
2
+ import { defineNuxtPlugin } from "nuxt/app";
3
+ import { useFallbackTitle } from "../composables/useFallbackTitle.js";
6
4
  export default defineNuxtPlugin({
7
5
  name: "nuxt-seo:fallback-titles",
8
6
  env: {
9
7
  islands: false
10
8
  },
9
+ // we need to wait for the i18n plugin to run first
10
+ dependsOn: ["nuxt-site-config:i18n"],
11
11
  setup() {
12
- const route = useRoute();
13
- const err = useError();
14
- const title = computed(() => {
15
- if (err.value && [404, 500].includes(err.value?.statusCode)) {
16
- return `${err.value.statusCode} - ${err.value.message}`;
17
- }
18
- if (typeof route.meta?.title === "string")
19
- return route.meta?.title;
20
- const path = withoutTrailingSlash(route.path || "/");
21
- const lastSegment = path.split("/").pop();
22
- return lastSegment ? titleCase(lastSegment) : null;
23
- });
12
+ const title = useFallbackTitle();
24
13
  const minimalPriority = {
25
14
  // give nuxt.config values higher priority
26
15
  tagPriority: 101
@@ -1,4 +1,4 @@
1
- import { useSiteConfig } from "#site-config/server/composables/useSiteConfig";
1
+ import { getSiteConfig } from "#site-config/server/composables/getSiteConfig";
2
2
  import { defineEventHandler, getRequestHost, sendRedirect, setHeader } from "h3";
3
3
  import { joinURL } from "ufo";
4
4
  export default defineEventHandler((e) => {
@@ -12,7 +12,7 @@ export default defineEventHandler((e) => {
12
12
  if (path.split("/").pop()?.includes(".")) {
13
13
  return;
14
14
  }
15
- const siteConfig = useSiteConfig(e);
15
+ const siteConfig = getSiteConfig(e);
16
16
  if (!siteConfig.url || siteConfig.env !== "production") {
17
17
  return;
18
18
  }
@@ -0,0 +1,6 @@
1
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, {
2
+ siteConfig: {
3
+ url: string;
4
+ };
5
+ }>;
6
+ export default _default;
@@ -0,0 +1,10 @@
1
+ import { getSiteConfig } from "#site-config/server/composables";
2
+ import { defineEventHandler } from "h3";
3
+ export default defineEventHandler((e) => {
4
+ const siteConfig = getSiteConfig(e);
5
+ return {
6
+ siteConfig: {
7
+ url: siteConfig.url
8
+ }
9
+ };
10
+ });
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Lightweight JS minifier in pure JS (no native deps).
3
+ * Strips comments and collapses whitespace while preserving string literals.
4
+ */
5
+ export declare function minifyJS(code: string): string;
6
+ /**
7
+ * Lightweight CSS minifier in pure JS (no native deps).
8
+ * Strips comments and collapses whitespace while preserving string literals.
9
+ */
10
+ export declare function minifyCSS(code: string): string;
11
+ /**
12
+ * Minify JSON by stripping whitespace via parse/stringify round-trip.
13
+ */
14
+ export declare function minifyJSON(code: string): string;
@@ -0,0 +1,133 @@
1
+ export function minifyJS(code) {
2
+ let result = "";
3
+ let i = 0;
4
+ const len = code.length;
5
+ while (i < len) {
6
+ const ch = code[i];
7
+ if (ch === "'" || ch === '"' || ch === "`") {
8
+ const quote = ch;
9
+ result += ch;
10
+ i++;
11
+ while (i < len && code[i] !== quote) {
12
+ if (code[i] === "\\") {
13
+ result += code[i++];
14
+ }
15
+ result += code[i++];
16
+ }
17
+ if (i < len)
18
+ result += code[i++];
19
+ } else if (ch === "/" && code[i + 1] === "/") {
20
+ i += 2;
21
+ while (i < len && code[i] !== "\n")
22
+ i++;
23
+ } else if (ch === "/" && code[i + 1] === "*") {
24
+ i += 2;
25
+ while (i < len && !(code[i] === "*" && code[i + 1] === "/"))
26
+ i++;
27
+ i += 2;
28
+ } else if (ch === " " || ch === " " || ch === "\n" || ch === "\r") {
29
+ let hasNewline = false;
30
+ while (i < len && (code[i] === " " || code[i] === " " || code[i] === "\n" || code[i] === "\r")) {
31
+ if (code[i] === "\n")
32
+ hasNewline = true;
33
+ i++;
34
+ }
35
+ const prev = result.at(-1);
36
+ const next = code[i];
37
+ if (hasNewline && prev && next && prev !== "{" && prev !== "}" && prev !== ";" && next !== "}" && next !== ";")
38
+ result += "\n";
39
+ else if (prev && next && isIdentChar(prev) && isIdentChar(next))
40
+ result += " ";
41
+ else if (prev && next && (prev === "+" && next === "+" || prev === "-" && next === "-"))
42
+ result += " ";
43
+ } else {
44
+ result += ch;
45
+ i++;
46
+ }
47
+ }
48
+ return result.trim();
49
+ }
50
+ export function minifyCSS(code) {
51
+ let result = "";
52
+ let i = 0;
53
+ let parenDepth = 0;
54
+ const len = code.length;
55
+ while (i < len) {
56
+ const ch = code[i];
57
+ if (ch === "'" || ch === '"') {
58
+ const quote = ch;
59
+ result += ch;
60
+ i++;
61
+ while (i < len && code[i] !== quote) {
62
+ if (code[i] === "\\")
63
+ result += code[i++];
64
+ result += code[i++];
65
+ }
66
+ if (i < len)
67
+ result += code[i++];
68
+ } else if (ch === "/" && code[i + 1] === "*") {
69
+ i += 2;
70
+ while (i < len && !(code[i] === "*" && code[i + 1] === "/"))
71
+ i++;
72
+ i += 2;
73
+ } else if (ch === "(") {
74
+ parenDepth++;
75
+ result += ch;
76
+ i++;
77
+ } else if (ch === ")") {
78
+ parenDepth = Math.max(0, parenDepth - 1);
79
+ result += ch;
80
+ i++;
81
+ } else if (ch === " " || ch === " " || ch === "\n" || ch === "\r") {
82
+ while (i < len && (code[i] === " " || code[i] === " " || code[i] === "\n" || code[i] === "\r"))
83
+ i++;
84
+ const prev = result.at(-1);
85
+ const next = code[i];
86
+ if (next === "!")
87
+ continue;
88
+ if (parenDepth > 0) {
89
+ if (prev && next && !isCSSCalcPunctuation(prev) && !isCSSCalcPunctuation(next))
90
+ result += " ";
91
+ } else if (prev && next && !isCSSPunctuation(prev) && !isCSSPunctuation(next)) {
92
+ result += " ";
93
+ }
94
+ } else if (ch === ";") {
95
+ let j = i + 1;
96
+ while (j < len && (code[j] === " " || code[j] === " " || code[j] === "\n" || code[j] === "\r"))
97
+ j++;
98
+ if (code[j] === "}") {
99
+ i++;
100
+ } else {
101
+ result += ch;
102
+ i++;
103
+ }
104
+ } else if (ch === "0" && code[i + 1] === "." && (code[i + 2] ?? "") >= "0" && (code[i + 2] ?? "") <= "9") {
105
+ const prev = result.at(-1);
106
+ if (prev && prev >= "0" && prev <= "9") {
107
+ result += ch;
108
+ i++;
109
+ } else {
110
+ i++;
111
+ }
112
+ } else {
113
+ result += ch;
114
+ i++;
115
+ }
116
+ }
117
+ return result.trim();
118
+ }
119
+ function isIdentChar(ch) {
120
+ return ch >= "a" && ch <= "z" || ch >= "A" && ch <= "Z" || ch >= "0" && ch <= "9" || ch === "_" || ch === "$";
121
+ }
122
+ function isCSSBasePunctuation(ch) {
123
+ return ch === "{" || ch === "}" || ch === ";" || ch === ":" || ch === ",";
124
+ }
125
+ function isCSSPunctuation(ch) {
126
+ return isCSSBasePunctuation(ch) || ch === ">" || ch === "+" || ch === "~";
127
+ }
128
+ function isCSSCalcPunctuation(ch) {
129
+ return isCSSBasePunctuation(ch) || ch === "*" || ch === "/";
130
+ }
131
+ export function minifyJSON(code) {
132
+ return JSON.stringify(JSON.parse(code));
133
+ }
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "nuxt-seo-utils",
3
3
  "type": "module",
4
- "version": "7.0.19",
4
+ "version": "8.0.1",
5
5
  "description": "SEO utilities to improve your Nuxt sites discoverability and shareability",
6
6
  "license": "MIT",
7
7
  "funding": "https://github.com/sponsors/harlan-zw",
8
- "homepage": "https://nuxtseo.com/docs/utils",
8
+ "homepage": "https://nuxtseo.com/docs/seo-utils",
9
9
  "repository": {
10
10
  "type": "git",
11
11
  "url": "git+https://github.com/harlan-zw/nuxt-seo-utils.git"
@@ -20,7 +20,11 @@
20
20
  }
21
21
  },
22
22
  "main": "./dist/module.mjs",
23
+ "bin": {
24
+ "nuxt-seo-utils": "./bin/nuxt-seo-utils.mjs"
25
+ },
23
26
  "files": [
27
+ "bin",
24
28
  "dist"
25
29
  ],
26
30
  "build": {
@@ -31,58 +35,89 @@
31
35
  "@unhead/vue/utils"
32
36
  ]
33
37
  },
38
+ "peerDependencies": {
39
+ "esbuild": ">=0.17.0",
40
+ "lightningcss": ">=1.20.0",
41
+ "nuxt": "^3.0.0 || ^4.0.0",
42
+ "rolldown": ">=1.0.0-beta.0"
43
+ },
44
+ "peerDependenciesMeta": {
45
+ "esbuild": {
46
+ "optional": true
47
+ },
48
+ "lightningcss": {
49
+ "optional": true
50
+ },
51
+ "rolldown": {
52
+ "optional": true
53
+ }
54
+ },
34
55
  "dependencies": {
35
- "@nuxt/kit": "^4.2.1",
36
- "@unhead/addons": "^2.0.19",
56
+ "@nuxt/devtools-kit": "^3.2.4",
57
+ "@nuxt/kit": "^4.4.2",
58
+ "@unhead/addons": "^2.1.12",
59
+ "citty": "^0.2.1",
37
60
  "defu": "^6.1.4",
38
61
  "escape-string-regexp": "^5.0.0",
39
- "fast-glob": "^3.3.3",
40
62
  "image-size": "^2.0.2",
41
- "nuxt-site-config": "^3.2.11",
63
+ "nuxt-site-config": "^4.0.1",
64
+ "nuxtseo-layer-devtools": "^0.3.0",
65
+ "nuxtseo-shared": "^0.7.0",
42
66
  "pathe": "^2.0.3",
43
67
  "pkg-types": "^2.3.0",
44
68
  "scule": "^1.3.0",
45
- "semver": "^7.7.3",
46
- "ufo": "^1.6.1"
69
+ "semver": "^7.7.4",
70
+ "sirv": "^3.0.2",
71
+ "tinyglobby": "^0.2.15",
72
+ "ufo": "^1.6.3"
73
+ },
74
+ "optionalDependencies": {
75
+ "sharp": "^0.34.5"
47
76
  },
48
77
  "devDependencies": {
49
- "@antfu/eslint-config": "^6.4.1",
78
+ "@antfu/eslint-config": "^7.7.3",
50
79
  "@nuxt/module-builder": "^1.0.2",
51
- "@nuxt/schema": "^4.2.1",
52
- "@nuxt/test-utils": "^3.21.0",
53
- "@nuxt/ui": "^4.2.1",
54
- "@nuxtjs/eslint-config-typescript": "^12.1.0",
55
- "@nuxtjs/i18n": "^10.2.1",
56
- "@types/node": "^24.10.1",
57
- "@unhead/vue": "^2.0.19",
80
+ "@nuxt/schema": "^4.4.2",
81
+ "@nuxt/test-utils": "^4.0.0",
82
+ "@nuxt/ui": "^4.6.0",
83
+ "@nuxtjs/i18n": "^10.2.4",
84
+ "@types/node": "^25.5.0",
85
+ "@unhead/vue": "^2.1.12",
58
86
  "@vue/test-utils": "^2.4.6",
59
- "bumpp": "^10.3.2",
60
- "case-police": "^2.1.1",
61
- "cheerio": "^1.1.2",
62
- "eslint": "^9.39.1",
63
- "happy-dom": "^20.0.11",
64
- "markdownlint-cli": "^0.46.0",
65
- "nuxt": "^4.2.1",
66
- "nuxt-content-twoslash": "^0.1.2",
67
- "playwright-core": "^1.57.0",
68
- "sass": "^1.94.2",
69
- "typescript": "^5.9.3",
70
- "vitest": "^4.0.15",
71
- "vue-tsc": "^3.1.5"
87
+ "bumpp": "^11.0.1",
88
+ "case-police": "^2.2.0",
89
+ "cheerio": "^1.2.0",
90
+ "eslint": "^10.1.0",
91
+ "eslint-plugin-harlanzw": "^0.11.0",
92
+ "happy-dom": "^20.8.8",
93
+ "lint-staged": "^16.4.0",
94
+ "markdownlint-cli": "^0.48.0",
95
+ "nuxt": "^4.4.2",
96
+ "nuxt-content-twoslash": "^0.4.0",
97
+ "playwright-core": "^1.58.2",
98
+ "sass": "^1.98.0",
99
+ "typescript": "^6.0.2",
100
+ "ultrahtml": "^1.6.0",
101
+ "unbuild": "^3.6.1",
102
+ "vitest": "^4.1.1",
103
+ "vue-tsc": "^3.2.6"
72
104
  },
73
105
  "scripts": {
74
- "lint": "eslint . --fix",
75
- "stub": "nuxt-build-module build --stub && nuxt-module-build prepare",
76
- "build": "pnpm stub && nuxt-module-build build",
77
- "dev": "nuxi dev playground",
78
- "dev:build": "nuxi build playground",
79
- "typecheck": "vue-tsc --noEmit",
80
- "dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground && nuxi prepare test/fixtures/basic && nuxi prepare test/fixtures/i18n",
106
+ "build": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxt-module-build build",
107
+ "build:client": "nuxt generate devtools",
108
+ "dev": "nuxt dev playground",
109
+ "devtools": "nuxt dev devtools --port 3030",
110
+ "dev:prepare": "nuxt-module-build prepare && nuxt prepare playground && pnpm prepare:fixtures",
111
+ "stub": "nuxt-module-build build --stub && nuxt-module-build prepare",
112
+ "lint": "eslint .",
113
+ "lint:fix": "eslint . --fix",
114
+ "typecheck": "nuxt typecheck",
115
+ "prepare:fixtures": "nuxt prepare test/fixtures/basic && nuxt prepare test/fixtures/i18n",
116
+ "test": "vitest",
117
+ "test:run": "vitest run --exclude '**/\\_\\_runtime\\_\\_/**'",
118
+ "test:runtime": "cd test/fixtures/basic && vitest --run",
81
119
  "release": "pnpm build && bumpp -x \"npx changelogen --output=CHANGELOG.md\"",
82
120
  "lint:docs": "markdownlint ./docs/content && case-police 'docs/content/**/*.md' *.md",
83
- "lint:docs:fix": "markdownlint ./docs/content --fix && case-police 'docs/content/**/*.md' *.md --fix",
84
- "twoslash:verify": "nuxt-content-twoslash verify --content-dir docs/content",
85
- "test": "pnpm dev:prepare && vitest --run --exclude **/__runtime__ && pnpm test:runtime",
86
- "test:runtime": "cd test/fixtures/basic && vitest --run"
121
+ "lint:docs:fix": "markdownlint ./docs/content --fix && case-police 'docs/content/**/*.md' *.md --fix"
87
122
  }
88
123
  }
@@ -1,3 +0,0 @@
1
- {
2
- "extends": "../../../../.nuxt/tsconfig.server.json"
3
- }