unhead 1.4.1 → 1.5.0

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
@@ -281,6 +281,7 @@ function createHeadCore(options = {}) {
281
281
  filterMode(plugin.mode, ssr) && hooks.addHooks(plugin.hooks || {});
282
282
  },
283
283
  push(input, entryOptions) {
284
+ delete entryOptions?.head;
284
285
  const entry = {
285
286
  _i: entryCount++,
286
287
  input,
@@ -419,7 +420,8 @@ function getActiveHead() {
419
420
  }
420
421
 
421
422
  function useHead(input, options = {}) {
422
- return getActiveHead()?.push(input, options);
423
+ const head = options.head || getActiveHead();
424
+ return head?.push(input, options);
423
425
  }
424
426
 
425
427
  function useHeadSafe(input, options = {}) {
package/dist/index.mjs CHANGED
@@ -280,6 +280,7 @@ function createHeadCore(options = {}) {
280
280
  filterMode(plugin.mode, ssr) && hooks.addHooks(plugin.hooks || {});
281
281
  },
282
282
  push(input, entryOptions) {
283
+ delete entryOptions?.head;
283
284
  const entry = {
284
285
  _i: entryCount++,
285
286
  input,
@@ -418,7 +419,8 @@ function getActiveHead() {
418
419
  }
419
420
 
420
421
  function useHead(input, options = {}) {
421
- return getActiveHead()?.push(input, options);
422
+ const head = options.head || getActiveHead();
423
+ return head?.push(input, options);
422
424
  }
423
425
 
424
426
  function useHeadSafe(input, options = {}) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "unhead",
3
3
  "type": "module",
4
- "version": "1.4.1",
4
+ "version": "1.5.0",
5
5
  "author": "Harlan Wilton <harlan@harlanzw.com>",
6
6
  "license": "MIT",
7
7
  "funding": "https://github.com/sponsors/harlan-zw",
@@ -30,9 +30,9 @@
30
30
  ],
31
31
  "dependencies": {
32
32
  "hookable": "^5.5.3",
33
- "@unhead/dom": "1.4.1",
34
- "@unhead/schema": "1.4.1",
35
- "@unhead/shared": "1.4.1"
33
+ "@unhead/dom": "1.5.0",
34
+ "@unhead/schema": "1.5.0",
35
+ "@unhead/shared": "1.5.0"
36
36
  },
37
37
  "scripts": {
38
38
  "build": "unbuild .",