@unhead/addons 1.1.25 → 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 CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  const shared = require('@unhead/shared');
4
4
 
5
- const InferSeoMetaPlugin = (options = {}) => {
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 const InferSeoMetaPlugin: (options?: InferSeoMetaPluginOptions) => _unhead_schema.HeadPlugin;
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
- const InferSeoMetaPlugin = (options = {}) => {
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
- const RemoveFunctions = (functionNames) => ({
11
- onNode: (node) => node.type === "CallExpression" && node.callee.type === "Identifier" && functionNames.includes(node.callee.name),
12
- transform() {
13
- return false;
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
- const RemoveFunctions = (functionNames) => ({
13
- onNode: (node) => node.type === "CallExpression" && node.callee.type === "Identifier" && functionNames.includes(node.callee.name),
14
- transform() {
15
- return false;
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 MagicString(code);
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
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const UseSeoMetaTransform = require('./shared/addons.4e843ef1.cjs');
3
+ const UseSeoMetaTransform = require('./shared/addons.668d74b0.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.0ba23e37.mjs';
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
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const UseSeoMetaTransform = require('./shared/addons.4e843ef1.cjs');
3
+ const UseSeoMetaTransform = require('./shared/addons.668d74b0.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.0ba23e37.mjs';
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.25",
5
- "packageManager": "pnpm@7.30.0",
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",
@@ -56,12 +56,12 @@
56
56
  "ufo": "^1.1.1",
57
57
  "unplugin": "^1.3.1",
58
58
  "unplugin-ast": "^0.7.0",
59
- "@unhead/schema": "1.1.25",
60
- "@unhead/shared": "1.1.25",
61
- "unhead": "1.1.25"
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.3",
64
+ "@babel/types": "^7.21.4",
65
65
  "estree-walker": "^3.0.3"
66
66
  },
67
67
  "scripts": {