@unhead/addons 1.1.23 → 1.1.26
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/index.cjs +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +2 -2
- package/dist/shared/{addons.0ba23e37.mjs → addons.322c468f.mjs} +8 -6
- package/dist/shared/{addons.4e843ef1.cjs → addons.668d74b0.cjs} +13 -7
- package/dist/vite.cjs +1 -1
- package/dist/vite.mjs +1 -1
- package/dist/webpack.cjs +1 -1
- package/dist/webpack.mjs +1 -1
- package/package.json +8 -8
package/dist/index.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const shared = require('@unhead/shared');
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
function InferSeoMetaPlugin(options = {}) {
|
|
6
6
|
return shared.defineHeadPlugin({
|
|
7
7
|
hooks: {
|
|
8
8
|
entries: {
|
|
@@ -60,7 +60,7 @@ const InferSeoMetaPlugin = (options = {}) => {
|
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
});
|
|
63
|
-
}
|
|
63
|
+
}
|
|
64
64
|
|
|
65
65
|
const DefaultCriticalTags = {
|
|
66
66
|
htmlAttrs: {
|
package/dist/index.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ interface InferSeoMetaPluginOptions {
|
|
|
20
20
|
*/
|
|
21
21
|
twitterCard?: false | 'summary' | 'summary_large_image' | 'app' | 'player';
|
|
22
22
|
}
|
|
23
|
-
declare
|
|
23
|
+
declare function InferSeoMetaPlugin(options?: InferSeoMetaPluginOptions): _unhead_schema.HeadPlugin;
|
|
24
24
|
|
|
25
25
|
declare const DefaultCriticalTags: {
|
|
26
26
|
htmlAttrs: {
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineHeadPlugin, resolveTitleTemplate } from '@unhead/shared';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
function InferSeoMetaPlugin(options = {}) {
|
|
4
4
|
return defineHeadPlugin({
|
|
5
5
|
hooks: {
|
|
6
6
|
entries: {
|
|
@@ -58,7 +58,7 @@ const InferSeoMetaPlugin = (options = {}) => {
|
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
});
|
|
61
|
-
}
|
|
61
|
+
}
|
|
62
62
|
|
|
63
63
|
const DefaultCriticalTags = {
|
|
64
64
|
htmlAttrs: {
|
|
@@ -7,12 +7,14 @@ import { resolveMetaKeyType, resolveMetaKeyValue, resolvePackedMetaObjectValue }
|
|
|
7
7
|
import MagicString from 'magic-string';
|
|
8
8
|
import { findStaticImports, parseStaticImport } from 'mlly';
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
10
|
+
function RemoveFunctions(functionNames) {
|
|
11
|
+
return {
|
|
12
|
+
onNode: (node) => node.type === "CallExpression" && node.callee.type === "Identifier" && functionNames.includes(node.callee.name),
|
|
13
|
+
transform() {
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
}
|
|
16
18
|
const TreeshakeServerComposables = createUnplugin((options = {}) => {
|
|
17
19
|
options.enabled = typeof options.enabled !== "undefined" ? options.enabled : true;
|
|
18
20
|
return {
|
|
@@ -9,12 +9,18 @@ const unhead = require('unhead');
|
|
|
9
9
|
const MagicString = require('magic-string');
|
|
10
10
|
const mlly = require('mlly');
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
|
|
13
|
+
|
|
14
|
+
const MagicString__default = /*#__PURE__*/_interopDefaultCompat(MagicString);
|
|
15
|
+
|
|
16
|
+
function RemoveFunctions(functionNames) {
|
|
17
|
+
return {
|
|
18
|
+
onNode: (node) => node.type === "CallExpression" && node.callee.type === "Identifier" && functionNames.includes(node.callee.name),
|
|
19
|
+
transform() {
|
|
20
|
+
return false;
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
}
|
|
18
24
|
const TreeshakeServerComposables = unplugin.createUnplugin((options = {}) => {
|
|
19
25
|
options.enabled = typeof options.enabled !== "undefined" ? options.enabled : true;
|
|
20
26
|
return {
|
|
@@ -339,7 +345,7 @@ const UseSeoMetaTransform = unplugin.createUnplugin((options = {}) => {
|
|
|
339
345
|
}
|
|
340
346
|
}
|
|
341
347
|
const ast = this.parse(code);
|
|
342
|
-
const s = new
|
|
348
|
+
const s = new MagicString__default(code);
|
|
343
349
|
const extraImports = /* @__PURE__ */ new Set();
|
|
344
350
|
walk(ast, {
|
|
345
351
|
enter(_node) {
|
package/dist/vite.cjs
CHANGED
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.322c468f.mjs';
|
|
2
2
|
import 'node:url';
|
|
3
3
|
import 'unplugin';
|
|
4
4
|
import 'unplugin-ast';
|
package/dist/webpack.cjs
CHANGED
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.322c468f.mjs';
|
|
2
2
|
import 'node:url';
|
|
3
3
|
import 'unplugin';
|
|
4
4
|
import 'unplugin-ast';
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unhead/addons",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.1.
|
|
5
|
-
"packageManager": "pnpm@7.
|
|
4
|
+
"version": "1.1.26",
|
|
5
|
+
"packageManager": "pnpm@7.32.0",
|
|
6
6
|
"author": "Harlan Wilton <harlan@harlanzw.com>",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"funding": "https://github.com/sponsors/harlan-zw",
|
|
@@ -52,16 +52,16 @@
|
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"@rollup/pluginutils": "^5.0.2",
|
|
54
54
|
"magic-string": "^0.30.0",
|
|
55
|
-
"mlly": "^1.
|
|
55
|
+
"mlly": "^1.2.0",
|
|
56
56
|
"ufo": "^1.1.1",
|
|
57
|
-
"unplugin": "^1.1
|
|
57
|
+
"unplugin": "^1.3.1",
|
|
58
58
|
"unplugin-ast": "^0.7.0",
|
|
59
|
-
"@unhead/schema": "1.1.
|
|
60
|
-
"@unhead/shared": "1.1.
|
|
61
|
-
"unhead": "1.1.
|
|
59
|
+
"@unhead/schema": "1.1.26",
|
|
60
|
+
"@unhead/shared": "1.1.26",
|
|
61
|
+
"unhead": "1.1.26"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
|
-
"@babel/types": "^7.21.
|
|
64
|
+
"@babel/types": "^7.21.4",
|
|
65
65
|
"estree-walker": "^3.0.3"
|
|
66
66
|
},
|
|
67
67
|
"scripts": {
|