@unhead/addons 3.0.0-beta.10 → 3.0.0-beta.11
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.
|
@@ -112,7 +112,7 @@ const UseSeoMetaTransform = createUnplugin((options = {}) => {
|
|
|
112
112
|
enter(node, parent) {
|
|
113
113
|
if (node.type === "Identifier" && !(parent?.type === "CallExpression" && parent.callee === node) && parent?.type !== "ImportSpecifier") {
|
|
114
114
|
const decl2 = scopeTracker.getDeclaration(node.name);
|
|
115
|
-
if (decl2 instanceof ScopeTrackerImport && isValidPackage(decl2.importNode.source.value) && SEO_META_NAMES.has(decl2.node.imported.name)) {
|
|
115
|
+
if (decl2 instanceof ScopeTrackerImport && isValidPackage(decl2.importNode.source.value) && decl2.node.type === "ImportSpecifier" && decl2.node.imported.type === "Identifier" && SEO_META_NAMES.has(decl2.node.imported.name)) {
|
|
116
116
|
valueReferenced.add(decl2.node.imported.name);
|
|
117
117
|
}
|
|
118
118
|
}
|
|
@@ -122,7 +122,7 @@ const UseSeoMetaTransform = createUnplugin((options = {}) => {
|
|
|
122
122
|
let originalName;
|
|
123
123
|
let importDecl = null;
|
|
124
124
|
if (decl instanceof ScopeTrackerImport) {
|
|
125
|
-
if (!isValidPackage(decl.importNode.source.value))
|
|
125
|
+
if (!isValidPackage(decl.importNode.source.value) || decl.node.type !== "ImportSpecifier" || decl.node.imported.type !== "Identifier")
|
|
126
126
|
return;
|
|
127
127
|
originalName = decl.node.imported.name;
|
|
128
128
|
importDecl = decl.importNode;
|
|
@@ -177,8 +177,6 @@ const UseSeoMetaTransform = createUnplugin((options = {}) => {
|
|
|
177
177
|
}
|
|
178
178
|
let value = code.substring(property.value.start, property.value.end);
|
|
179
179
|
if (property.value.type === "ArrayExpression") {
|
|
180
|
-
if (output === false)
|
|
181
|
-
return;
|
|
182
180
|
const elements = property.value.elements;
|
|
183
181
|
if (!elements.length)
|
|
184
182
|
return;
|
package/dist/vite.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as TreeshakeServerComposables, U as UseSeoMetaTransform } from './shared/addons.
|
|
1
|
+
import { T as TreeshakeServerComposables, U as UseSeoMetaTransform } from './shared/addons.f3glm58r.mjs';
|
|
2
2
|
import 'node:url';
|
|
3
3
|
import 'magic-string';
|
|
4
4
|
import 'oxc-parser';
|
package/dist/webpack.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import * as unplugin from 'unplugin';
|
|
1
2
|
import { U as UnpluginOptions } from './shared/addons.51MZ0zeg.mjs';
|
|
2
3
|
|
|
3
|
-
declare const _default: (options?: UnpluginOptions) =>
|
|
4
|
+
declare const _default: (options?: UnpluginOptions) => unplugin.WebpackPluginInstance[];
|
|
4
5
|
|
|
5
6
|
export { UnpluginOptions, _default as default };
|
package/dist/webpack.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import * as unplugin from 'unplugin';
|
|
1
2
|
import { U as UnpluginOptions } from './shared/addons.51MZ0zeg.js';
|
|
2
3
|
|
|
3
|
-
declare const _default: (options?: UnpluginOptions) =>
|
|
4
|
+
declare const _default: (options?: UnpluginOptions) => unplugin.WebpackPluginInstance[];
|
|
4
5
|
|
|
5
6
|
export { UnpluginOptions, _default as default };
|
package/dist/webpack.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as TreeshakeServerComposables, U as UseSeoMetaTransform } from './shared/addons.
|
|
1
|
+
import { T as TreeshakeServerComposables, U as UseSeoMetaTransform } from './shared/addons.f3glm58r.mjs';
|
|
2
2
|
import 'node:url';
|
|
3
3
|
import 'magic-string';
|
|
4
4
|
import 'oxc-parser';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unhead/addons",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.0.0-beta.
|
|
4
|
+
"version": "3.0.0-beta.11",
|
|
5
5
|
"description": "Unhead addons for build tools and bundlers.",
|
|
6
6
|
"author": "Harlan Wilton <harlan@harlanzw.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"dist"
|
|
53
53
|
],
|
|
54
54
|
"peerDependencies": {
|
|
55
|
-
"unhead": "3.0.0-beta.
|
|
55
|
+
"unhead": "^3.0.0-beta.11"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
58
|
"@rollup/pluginutils": "^5.3.0",
|
|
@@ -64,8 +64,8 @@
|
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
66
|
"rollup": "^4.55.1",
|
|
67
|
-
"vite": "^7.
|
|
68
|
-
"unhead": "3.0.0-beta.
|
|
67
|
+
"vite": "^7.3.1",
|
|
68
|
+
"unhead": "3.0.0-beta.11"
|
|
69
69
|
},
|
|
70
70
|
"scripts": {
|
|
71
71
|
"build": "unbuild",
|