Socket
Socket
Sign inDemoInstall

@nuxtjs/color-mode

Package Overview
Dependencies
4
Maintainers
4
Versions
42
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.9 to 2.0.10

7

CHANGELOG.md

@@ -5,2 +5,9 @@ # Changelog

### [2.0.10](https://github.com/nuxt-community/color-mode-module/compare/v2.0.9...v2.0.10) (2021-06-11)
### Bug Fixes
* module stability ([#92](https://github.com/nuxt-community/color-mode-module/issues/92)) ([e9aa91c](https://github.com/nuxt-community/color-mode-module/commit/e9aa91c8caf56d6cae1dfe641034a1960bee6269))
### [2.0.9](https://github.com/nuxt-community/color-mode-module/compare/v2.0.8...v2.0.9) (2021-05-24)

@@ -7,0 +14,0 @@

5

lib/templates/color-scheme.js

@@ -12,7 +12,2 @@ export default {

render (createElement, { parent, data, props, children }) {
const { $colorMode } = parent
if (!$colorMode.unknown) {
return children
}
// transform props for <client-only>

@@ -19,0 +14,0 @@ props = {

23

lib/templates/plugin.server.js

@@ -11,10 +11,23 @@ import Vue from 'vue'

}
const addScript = (head) => {
head.script = head.script || []
head.script.push(script)
const serializeProp = '__dangerouslyDisableSanitizersByTagID'
head[serializeProp] = head[serializeProp] || {}
head[serializeProp]['<%= options.hid %>'] = ['innerHTML']
}
export default function (ctx, inject) {
ctx.app.head.script.push(script)
if (typeof ctx.app.head === 'function') {
const originalHead = ctx.app.head
ctx.app.head = function () {
const head = originalHead.call(this) || {}
addScript(head)
return head
}
} else {
addScript(ctx.app.head)
}
const serializeProp = '__dangerouslyDisableSanitizersByTagID'
ctx.app.head[serializeProp] = ctx.app.head[serializeProp] || {}
ctx.app.head[serializeProp]['<%= options.hid %>'] = ['innerHTML']
const preference = '<%= options.preference %>'

@@ -21,0 +34,0 @@

{
"name": "@nuxtjs/color-mode",
"version": "2.0.9",
"version": "2.0.10",
"description": "Dark and Light mode for NuxtJS with auto detection",

@@ -40,6 +40,6 @@ "repository": "nuxt-community/color-mode-module",

"babel-eslint": "latest",
"babel-jest": "^26.6.3",
"babel-jest": "^27.0.2",
"eslint": "^7.21.0",
"husky": "latest",
"jest": "^26.6.3",
"jest": "^27.0.4",
"nuxt": "^2.15.3",

@@ -46,0 +46,0 @@ "rollup": "^2.41.0",

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc