Socket
Socket
Sign inDemoInstall

vue-inbrowser-compiler-utils

Package Overview
Dependencies
Maintainers
3
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-inbrowser-compiler-utils - npm Package Compare versions

Comparing version 4.44.17 to 4.44.20

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

## [4.44.20](https://github.com/vue-styleguidist/vue-styleguidist/compare/v4.44.19...v4.44.20) (2022-03-18)
### Bug Fixes
* create postinstall to adapt vue3 ([7de0803](https://github.com/vue-styleguidist/vue-styleguidist/commit/7de0803c670a0532af409f6798cc008ffb2e13bf))
## [4.44.17](https://github.com/vue-styleguidist/vue-styleguidist/compare/v4.44.16...v4.44.17) (2022-02-28)

@@ -8,0 +19,0 @@

1

lib/types/index.d.ts

@@ -0,1 +1,2 @@

export { h, resolveComponent, isVue3 } from 'vue-inbrowser-compiler-demi';
export { default as addScopedStyle } from './addScopedStyle';

@@ -2,0 +3,0 @@ export { default as adaptCreateElement, concatenate } from './adaptCreateElement';

46

lib/vue-inbrowser-compiler-utils.cjs.js

@@ -5,27 +5,8 @@ 'use strict';

var vueInbrowserCompilerDemi = require('vue-inbrowser-compiler-demi');
var camelCase = require('camelcase');
var Vue = require('vue');
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
function _interopNamespace(e) {
if (e && e.__esModule) return e;
var n = Object.create(null);
if (e) {
Object.keys(e).forEach(function (k) {
if (k !== 'default') {
var d = Object.getOwnPropertyDescriptor(e, k);
Object.defineProperty(n, k, d.get ? d : {
enumerable: true,
get: function () { return e[k]; }
});
}
});
}
n["default"] = e;
return Object.freeze(n);
}
var camelCase__default = /*#__PURE__*/_interopDefaultLegacy(camelCase);
var Vue__namespace = /*#__PURE__*/_interopNamespace(Vue);

@@ -103,12 +84,3 @@ /* eslint-disable no-control-regex */

var isVue3 = !!Vue__namespace.resolveComponent;
/**
* Reconcile Vue 2 and Vue 3 JSX attributes
* @param componentName
* @returns
*/
function resolveComponent(componentName) {
return isVue3 ? Vue__namespace.resolveComponent(componentName) : componentName;
}
/**
* Groups attributes passed to a React pragma to the VueJS fashion

@@ -124,3 +96,3 @@ * @param h the VueJS createElement function passed in render functions

}
var resolvedComponent = resolveComponent(comp);
var resolvedComponent = vueInbrowserCompilerDemi.resolveComponent(comp);
if (attr === undefined) {

@@ -204,3 +176,3 @@ return h(resolvedComponent);

var groupAttr = function (attrsIn) {
if (isVue3) {
if (vueInbrowserCompilerDemi.isVue3) {
Object.keys(attrsIn)

@@ -405,2 +377,14 @@ .filter(function (key) { return key.startsWith('vModel') || key.startsWith('v-model'); })

Object.defineProperty(exports, 'h', {
enumerable: true,
get: function () { return vueInbrowserCompilerDemi.h; }
});
Object.defineProperty(exports, 'isVue3', {
enumerable: true,
get: function () { return vueInbrowserCompilerDemi.isVue3; }
});
Object.defineProperty(exports, 'resolveComponent', {
enumerable: true,
get: function () { return vueInbrowserCompilerDemi.resolveComponent; }
});
exports.adaptCreateElement = adaptCreateElement;

@@ -407,0 +391,0 @@ exports.addScopedStyle = addScopedStyle;

@@ -0,3 +1,4 @@

import { resolveComponent, isVue3 } from 'vue-inbrowser-compiler-demi';
export { h, isVue3, resolveComponent } from 'vue-inbrowser-compiler-demi';
import camelCase from 'camelcase';
import * as Vue from 'vue';

@@ -75,12 +76,3 @@ /* eslint-disable no-control-regex */

var isVue3 = !!Vue.resolveComponent;
/**
* Reconcile Vue 2 and Vue 3 JSX attributes
* @param componentName
* @returns
*/
function resolveComponent(componentName) {
return isVue3 ? Vue.resolveComponent(componentName) : componentName;
}
/**
* Groups attributes passed to a React pragma to the VueJS fashion

@@ -87,0 +79,0 @@ * @param h the VueJS createElement function passed in render functions

{
"name": "vue-inbrowser-compiler-utils",
"version": "4.44.17",
"version": "4.44.20",
"description": "use this with vue-inbrowser-compiler to allow jsx compilation",

@@ -21,3 +21,4 @@ "module": "lib/vue-inbrowser-compiler-utils.esm.js",

"dependencies": {
"camelcase": "^5.3.1"
"camelcase": "^5.3.1",
"vue-inbrowser-compiler-demi": "^4.44.20"
},

@@ -43,3 +44,3 @@ "devDependencies": {

},
"gitHead": "713d792bc12ee6cbe0296787d80a2bf4af2721c2"
"gitHead": "80dca3647a335c086f3764d97276cd5d83c3970d"
}
import adaptCreateElement, { CreateElementFunction } from '../adaptCreateElement'
jest.mock('vue', () => {
jest.mock('vue-inbrowser-compiler-demi', () => {
return {
resolveComponent: (comp: string) => comp
resolveComponent: (comp: string) => comp,
isVue3: true
}

@@ -7,0 +8,0 @@ })

import camelCase from 'camelcase'
import * as Vue from 'vue'
import { isVue3, resolveComponent } from 'vue-inbrowser-compiler-demi'

@@ -10,14 +10,3 @@ export type CreateElementFunction = (

const isVue3 = !!(Vue as any).resolveComponent
/**
* Reconcile Vue 2 and Vue 3 JSX attributes
* @param componentName
* @returns
*/
function resolveComponent(componentName: any): any {
return isVue3 ? (Vue as any).resolveComponent(componentName) : componentName
}
/**
* Groups attributes passed to a React pragma to the VueJS fashion

@@ -24,0 +13,0 @@ * @param h the VueJS createElement function passed in render functions

@@ -0,1 +1,2 @@

export { h, resolveComponent, isVue3 } from 'vue-inbrowser-compiler-demi'
export { default as addScopedStyle } from './addScopedStyle'

@@ -2,0 +3,0 @@ export { default as adaptCreateElement, concatenate } from './adaptCreateElement'

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