Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@vueuse/head

Package Overview
Dependencies
Maintainers
3
Versions
97
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vueuse/head - npm Package Compare versions

Comparing version 1.0.0-rc.10 to 1.0.0-rc.11

66

dist/index.js

@@ -57,26 +57,2 @@ "use strict";

// src/encoding/index.ts
var escapeHtml = (s) => s.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/'/g, "&#39;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
var escapeJS = (s) => s.replace(/["'\\\n\r\u2028\u2029]/g, (character) => {
switch (character) {
case '"':
case "'":
case "\\":
return `\\${character}`;
case "\n":
return "\\n";
case "\r":
return "\\r";
case "\u2028":
return "\\u2028";
case "\u2029":
return "\\u2029";
}
return character;
});
var sanitiseAttrName = (str) => str.replace(/[\s"'><\/=]/g, "").replace(/[^a-zA-Z0-9_-]/g, "");
var sanitiseAttrValue = (str) => escapeJS(
str.replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;")
);
// src/ssr/index.ts

@@ -122,13 +98,10 @@ var propsToString = (props) => {

tag.options.beforeTagRender(tag);
if (tag.tag === "title") {
if (tag.tag === "title")
titleHtml = tagToString(tag);
} else if (tag.tag === "htmlAttrs" || tag.tag === "bodyAttrs") {
for (const k in tag.props) {
attrs[tag.tag][sanitiseAttrName(k)] = sanitiseAttrValue(tag.props[k]);
}
} else if ((_b = tag.options) == null ? void 0 : _b.body) {
else if (tag.tag === "htmlAttrs" || tag.tag === "bodyAttrs")
attrs[tag.tag] = { ...attrs[tag.tag], ...tag.props };
else if ((_b = tag.options) == null ? void 0 : _b.body)
bodyHtml.push(tagToString(tag));
} else {
else
headHtml.push(tagToString(tag));
}
}

@@ -374,4 +347,5 @@ headHtml.push(`<meta name="${HEAD_COUNT_KEY}" content="${headHtml.length}">`);

Object.entries(tag.props).forEach(([k, v]) => {
if (v !== false)
$el.setAttribute(k, v);
if (v !== false) {
$el.setAttribute(k, v === true ? "" : String(v));
}
});

@@ -502,2 +476,26 @@ if (tag.children) {

// src/encoding/index.ts
var escapeHtml = (s) => s.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/'/g, "&#39;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
var escapeJS = (s) => s.replace(/["'\\\n\r\u2028\u2029]/g, (character) => {
switch (character) {
case '"':
case "'":
case "\\":
return `\\${character}`;
case "\n":
return "\\n";
case "\r":
return "\\r";
case "\u2028":
return "\\u2028";
case "\u2029":
return "\\u2029";
}
return character;
});
var sanitiseAttrName = (str) => str.replace(/[\s"'><\/=]/g, "").replace(/[^a-zA-Z0-9_-]/g, "");
var sanitiseAttrValue = (str) => escapeJS(
str.replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;")
);
// src/components.ts

@@ -504,0 +502,0 @@ var import_vue2 = require("vue");

{
"name": "@vueuse/head",
"version": "1.0.0-rc.10",
"version": "1.0.0-rc.11",
"packageManager": "pnpm@7.5.0",

@@ -51,4 +51,4 @@ "description": "Document head manager for Vue 3. SSR ready.",

"@antfu/eslint-config": "^0.27.0",
"@nuxt/kit": "3.0.0-rc.11",
"@nuxt/test-utils": "3.0.0-rc.11",
"@nuxt/kit": "3.0.0-rc.12",
"@nuxt/test-utils": "3.0.0-rc.12",
"@vitejs/plugin-vue": "^3.1.2",

@@ -66,10 +66,10 @@ "@vitejs/plugin-vue-jsx": "^2.0.1",

"mlly": "^0.5.16",
"nuxt": "3.0.0-rc.11",
"nuxt": "^3.0.0-rc.12",
"pathe": "^0.3.9",
"playwright": "^1.27.1",
"simple-git-hooks": "^2.8.0",
"tsup": "^6.2.3",
"simple-git-hooks": "^2.8.1",
"tsup": "^6.3.0",
"typescript": "^4.8.4",
"vite": "^3.1.8",
"vitest": "^0.24.2",
"vitest": "^0.24.3",
"vue": "^3.2.41",

@@ -76,0 +76,0 @@ "vue-router": "^4.1.5"

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc