Socket
Socket
Sign inDemoInstall

vue-inbrowser-compiler

Package Overview
Dependencies
Maintainers
3
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-inbrowser-compiler - npm Package Compare versions

Comparing version 4.71.1 to 4.72.0

tsconfig.json

6

CHANGELOG.md
# Change Log
## 4.72.0
### Minor Changes
- [`c972cff3`](https://github.com/vue-styleguidist/vue-styleguidist/commit/c972cff356257b0162a10f8857f33d75dff639c8) Thanks [@elevatebart](https://github.com/elevatebart)! - build compiler using the updated utils
## 4.71.1

@@ -4,0 +10,0 @@

2

lib/compileVueCodeForEvalFunction.d.ts

@@ -19,3 +19,3 @@ import { TransformOptions } from 'buble';

*/
export default function compileVueCodeForEvalFunction(code: string, config?: TransformOptions): EvaluableComponentWithSource;
export default function compileVueCodeForEvalFunction(code: string, config?: TransformOptions, scopeId?: string): EvaluableComponentWithSource;
export {};

@@ -225,6 +225,6 @@ 'use strict';

*/
function compileVueCodeForEvalFunction(code, config = {}) {
function compileVueCodeForEvalFunction(code, config = {}, scopeId) {
const nonCompiledComponent = prepareVueCodeForEvalFunction(code, config);
const target = typeof window !== 'undefined' ? getTargetFromBrowser() : {};
const compiledComponent = Object.assign(Object.assign({}, nonCompiledComponent), { script: buble.transform(nonCompiledComponent.script, Object.assign({ target }, config)).code });
const compiledComponent = Object.assign(Object.assign({}, nonCompiledComponent), { scopeId, script: buble.transform(nonCompiledComponent.script, Object.assign({ target }, config)).code });
vueInbrowserCompilerUtils.compileTemplateForEval(compiledComponent);

@@ -231,0 +231,0 @@ if (nonCompiledComponent.setup && vueInbrowserCompilerUtils.isVue3) {

@@ -217,6 +217,6 @@ import { isVue3, parseComponent, transformOneImport, compileTemplateForEval, compileTemplateForEvalSetup, isCodeVueSfc } from 'vue-inbrowser-compiler-utils';

*/
function compileVueCodeForEvalFunction(code, config = {}) {
function compileVueCodeForEvalFunction(code, config = {}, scopeId) {
const nonCompiledComponent = prepareVueCodeForEvalFunction(code, config);
const target = typeof window !== 'undefined' ? getTargetFromBrowser() : {};
const compiledComponent = Object.assign(Object.assign({}, nonCompiledComponent), { script: transform(nonCompiledComponent.script, Object.assign({ target }, config)).code });
const compiledComponent = Object.assign(Object.assign({}, nonCompiledComponent), { scopeId, script: transform(nonCompiledComponent.script, Object.assign({ target }, config)).code });
compileTemplateForEval(compiledComponent);

@@ -223,0 +223,0 @@ if (nonCompiledComponent.setup && isVue3) {

{
"name": "vue-inbrowser-compiler",
"version": "4.71.1",
"version": "4.72.0",
"description": "compile vue single file components right in your browser",

@@ -5,0 +5,0 @@ "module": "lib/vue-inbrowser-compiler.esm.js",

@@ -39,3 +39,4 @@ import { transform, TransformOptions } from 'buble'

code: string,
config: TransformOptions = {}
config: TransformOptions = {},
scopeId?: string
): EvaluableComponentWithSource {

@@ -47,2 +48,3 @@ const nonCompiledComponent = prepareVueCodeForEvalFunction(code, config)

...nonCompiledComponent,
scopeId,
script: transform(nonCompiledComponent.script, { target, ...config }).code

@@ -49,0 +51,0 @@ }

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