@unhead/addons 1.1.1 → 1.1.2

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.
@@ -23,6 +23,8 @@ const TreeshakeServerComposables = unplugin.createUnplugin(() => {
23
23
  transformInclude(id) {
24
24
  const { pathname, search } = ufo.parseURL(decodeURIComponent(node_url.pathToFileURL(id).href));
25
25
  const { type } = ufo.parseQuery(search);
26
+ if (pathname.includes("node_modules"))
27
+ return false;
26
28
  if (pathname.endsWith(".vue") && (type === "script" || !search))
27
29
  return true;
28
30
  if (pathname.match(/\.((c|m)?j|t)sx?$/g))
@@ -72,6 +74,8 @@ const UseSeoMetaTransform = unplugin.createUnplugin(() => {
72
74
  transformInclude(id) {
73
75
  const { pathname, search } = ufo.parseURL(decodeURIComponent(node_url.pathToFileURL(id).href));
74
76
  const { type } = ufo.parseQuery(search);
77
+ if (pathname.includes("node_modules"))
78
+ return false;
75
79
  if (pathname.endsWith(".vue") && (type === "script" || !search))
76
80
  return true;
77
81
  if (pathname.match(/\.((c|m)?j|t)sx?$/g))
@@ -126,7 +130,7 @@ const UseSeoMetaTransform = unplugin.createUnplugin(() => {
126
130
  }
127
131
  if (calleeName === "useServerSeoMeta") {
128
132
  if (output.length)
129
- output.push("})");
133
+ output.push("});");
130
134
  output.push("useServerHead({", " meta: [");
131
135
  } else if (calleeName === "useSeoMeta") {
132
136
  output.push(" meta: [");
@@ -167,7 +171,7 @@ const UseSeoMetaTransform = unplugin.createUnplugin(() => {
167
171
  if (output) {
168
172
  if (meta.length)
169
173
  output.push(" ]");
170
- output.push("})");
174
+ output.push("});");
171
175
  s.overwrite(node.start, node.end, output.join("\n"));
172
176
  }
173
177
  }
@@ -21,6 +21,8 @@ const TreeshakeServerComposables = createUnplugin(() => {
21
21
  transformInclude(id) {
22
22
  const { pathname, search } = parseURL(decodeURIComponent(pathToFileURL(id).href));
23
23
  const { type } = parseQuery(search);
24
+ if (pathname.includes("node_modules"))
25
+ return false;
24
26
  if (pathname.endsWith(".vue") && (type === "script" || !search))
25
27
  return true;
26
28
  if (pathname.match(/\.((c|m)?j|t)sx?$/g))
@@ -70,6 +72,8 @@ const UseSeoMetaTransform = createUnplugin(() => {
70
72
  transformInclude(id) {
71
73
  const { pathname, search } = parseURL(decodeURIComponent(pathToFileURL(id).href));
72
74
  const { type } = parseQuery(search);
75
+ if (pathname.includes("node_modules"))
76
+ return false;
73
77
  if (pathname.endsWith(".vue") && (type === "script" || !search))
74
78
  return true;
75
79
  if (pathname.match(/\.((c|m)?j|t)sx?$/g))
@@ -124,7 +128,7 @@ const UseSeoMetaTransform = createUnplugin(() => {
124
128
  }
125
129
  if (calleeName === "useServerSeoMeta") {
126
130
  if (output.length)
127
- output.push("})");
131
+ output.push("});");
128
132
  output.push("useServerHead({", " meta: [");
129
133
  } else if (calleeName === "useSeoMeta") {
130
134
  output.push(" meta: [");
@@ -165,7 +169,7 @@ const UseSeoMetaTransform = createUnplugin(() => {
165
169
  if (output) {
166
170
  if (meta.length)
167
171
  output.push(" ]");
168
- output.push("})");
172
+ output.push("});");
169
173
  s.overwrite(node.start, node.end, output.join("\n"));
170
174
  }
171
175
  }
package/dist/vite.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const UseSeoMetaTransform = require('./shared/addons.9f407fbd.cjs');
3
+ const UseSeoMetaTransform = require('./shared/addons.279b6dc2.cjs');
4
4
  require('node:url');
5
5
  require('unplugin');
6
6
  require('unplugin-ast');
package/dist/vite.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { T as TreeshakeServerComposables, U as UseSeoMetaTransform } from './shared/addons.6a0db036.mjs';
1
+ import { T as TreeshakeServerComposables, U as UseSeoMetaTransform } from './shared/addons.fcdb0ca2.mjs';
2
2
  import 'node:url';
3
3
  import 'unplugin';
4
4
  import 'unplugin-ast';
package/dist/webpack.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const UseSeoMetaTransform = require('./shared/addons.9f407fbd.cjs');
3
+ const UseSeoMetaTransform = require('./shared/addons.279b6dc2.cjs');
4
4
  require('node:url');
5
5
  require('unplugin');
6
6
  require('unplugin-ast');
package/dist/webpack.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { T as TreeshakeServerComposables, U as UseSeoMetaTransform } from './shared/addons.6a0db036.mjs';
1
+ import { T as TreeshakeServerComposables, U as UseSeoMetaTransform } from './shared/addons.fcdb0ca2.mjs';
2
2
  import 'node:url';
3
3
  import 'unplugin';
4
4
  import 'unplugin-ast';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@unhead/addons",
3
3
  "type": "module",
4
- "version": "1.1.1",
4
+ "version": "1.1.2",
5
5
  "packageManager": "pnpm@7.27.1",
6
6
  "author": "Harlan Wilton <harlan@harlanzw.com>",
7
7
  "license": "MIT",
@@ -57,9 +57,9 @@
57
57
  "ufo": "^1.1.0",
58
58
  "unplugin": "^1.1.0",
59
59
  "unplugin-ast": "^0.7.0",
60
- "@unhead/shared": "1.1.1",
61
- "@unhead/schema": "1.1.1",
62
- "unhead": "1.1.1"
60
+ "@unhead/schema": "1.1.2",
61
+ "@unhead/shared": "1.1.2",
62
+ "unhead": "1.1.2"
63
63
  },
64
64
  "devDependencies": {
65
65
  "@babel/types": "^7.21.0"