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

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.55.0 to 4.56.5

9

CHANGELOG.md
# Change Log
## 4.56.5
### Patch Changes
- [#1464](https://github.com/vue-styleguidist/vue-styleguidist/pull/1464) [`41c29560`](https://github.com/vue-styleguidist/vue-styleguidist/commit/41c29560f58d9e7964a8c646c29f2b9ce1b834b8) Thanks [@elevatebart](https://github.com/elevatebart)! - Issue 1458 multiple root elements, implement staticRenderFns optimizations in 2.7.14
- Updated dependencies [[`41c29560`](https://github.com/vue-styleguidist/vue-styleguidist/commit/41c29560f58d9e7964a8c646c29f2b9ce1b834b8)]:
- vue-inbrowser-compiler-demi@4.56.5
## 4.55.0

@@ -4,0 +13,0 @@

2

lib/adaptCreateElement.d.ts

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

export declare type CreateElementFunction = (component: string | object, attributes?: {
export type CreateElementFunction = (component: string | object, attributes?: {
[k: string]: any;

@@ -3,0 +3,0 @@ }, children?: any | any[]) => any[] | any;

@@ -168,2 +168,3 @@ 'use strict';

function compileTemplateForEval(compiledComponent) {
var _a, _b;
if (compiledComponent.template) {

@@ -180,6 +181,3 @@ const { bindings } = vueInbrowserCompilerDemi.compileScript({

});
compiledComponent.script = `
${vueInbrowserCompilerDemi.isVue3 ? 'const Vue = require("vue")' : ''}
const comp = (function() {${compiledComponent.script}})()
comp.render = function() {${vueInbrowserCompilerDemi.compileTemplate({
const _compiledTemplate = vueInbrowserCompilerDemi.compileTemplate({
source: compiledComponent.template,

@@ -193,4 +191,12 @@ filename: EXAMPLE_FILENAME,

}
}).code}}
${vueInbrowserCompilerDemi.isVue3 ? `comp.render = comp.render()` : ``}
});
compiledComponent.script = `
${vueInbrowserCompilerDemi.isVue3 ? 'const Vue = require("vue")' : ''}
const comp = (function() {${compiledComponent.script}})()${((_a = _compiledTemplate.staticRenderFns) === null || _a === void 0 ? void 0 : _a.length) ? `
comp.staticRenderFns = [${(_b = _compiledTemplate.staticRenderFns) === null || _b === void 0 ? void 0 : _b.map((fn, i) => {
return `function(){${fn}}`;
}).join(',')}]` : ''}
comp.render = function() {${_compiledTemplate.code}}
${vueInbrowserCompilerDemi.isVue3
? `comp.render = comp.render()` : ''}
return comp`;

@@ -197,0 +203,0 @@ delete compiledComponent.template;

@@ -161,2 +161,3 @@ import { isVue3, parseComponent, compileScript, compileTemplate } from 'vue-inbrowser-compiler-demi';

function compileTemplateForEval(compiledComponent) {
var _a, _b;
if (compiledComponent.template) {

@@ -173,6 +174,3 @@ const { bindings } = compileScript({

});
compiledComponent.script = `
${isVue3 ? 'const Vue = require("vue")' : ''}
const comp = (function() {${compiledComponent.script}})()
comp.render = function() {${compileTemplate({
const _compiledTemplate = compileTemplate({
source: compiledComponent.template,

@@ -186,4 +184,12 @@ filename: EXAMPLE_FILENAME,

}
}).code}}
${isVue3 ? `comp.render = comp.render()` : ``}
});
compiledComponent.script = `
${isVue3 ? 'const Vue = require("vue")' : ''}
const comp = (function() {${compiledComponent.script}})()${((_a = _compiledTemplate.staticRenderFns) === null || _a === void 0 ? void 0 : _a.length) ? `
comp.staticRenderFns = [${(_b = _compiledTemplate.staticRenderFns) === null || _b === void 0 ? void 0 : _b.map((fn, i) => {
return `function(){${fn}}`;
}).join(',')}]` : ''}
comp.render = function() {${_compiledTemplate.code}}
${isVue3
? `comp.render = comp.render()` : ''}
return comp`;

@@ -190,0 +196,0 @@ delete compiledComponent.template;

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

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

"camelcase": "^5.3.1",
"vue-inbrowser-compiler-demi": "^4.55.0",
"vue-inbrowser-compiler-demi": "^4.56.5",
"vue-inbrowser-compiler-independent-utils": "^4.55.0"

@@ -29,3 +29,3 @@ },

"tslib": "2.4.1",
"typescript": "4.8.4",
"typescript": "4.9.4",
"rollup": "2.79.1",

@@ -32,0 +32,0 @@ "vue": "2.7.14"

@@ -21,18 +21,26 @@ import { compileScript, compileTemplate, isVue3 } from 'vue-inbrowser-compiler-demi'

)
const _compiledTemplate = compileTemplate({
source: compiledComponent.template,
filename: EXAMPLE_FILENAME,
id: '-',
compilerOptions: {
bindingMetadata: bindings,
prefixIdentifiers: true,
mode: 'function'
}
})
compiledComponent.script = `
${isVue3 ? 'const Vue = require("vue")' : ''}
const comp = (function() {${compiledComponent.script}})()
comp.render = function() {${
compileTemplate({
source: compiledComponent.template,
filename: EXAMPLE_FILENAME,
id: '-',
compilerOptions: {
bindingMetadata: bindings,
prefixIdentifiers: true,
mode: 'function'
}
}).code
}}
${isVue3 ? `comp.render = comp.render()` : ``}
const comp = (function() {${compiledComponent.script}})()${
_compiledTemplate.staticRenderFns?.length ? `
comp.staticRenderFns = [${_compiledTemplate.staticRenderFns
?.map((fn, i) => {
return `function(){${fn}}`
})
.join(',')}]` : ''}
comp.render = function() {${_compiledTemplate.code}}
${
isVue3
? `comp.render = comp.render()`:''
}
return comp`

@@ -39,0 +47,0 @@ delete compiledComponent.template

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