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.45.0 to 4.46.0

6

CHANGELOG.md
# Change Log
## 4.46.0
### Minor Changes
- [#1359](https://github.com/vue-styleguidist/vue-styleguidist/pull/1359) [`6c9e7d50`](https://github.com/vue-styleguidist/vue-styleguidist/commit/6c9e7d50b59887c19c5ea536a99d05211c14cf71) Thanks [@elevatebart](https://github.com/elevatebart)! - Allow PrismJs Editor to render typescript in JSX AND in SFC
## 4.45.0

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

2

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

@@ -244,3 +244,3 @@ 'use strict';

function parseComponent(code) {
// reinintialize regexp after each tour
// reinitialize regexp after each tour
var partsRE = PARTS.reduce(function (ret, part) {

@@ -247,0 +247,0 @@ ret[part] = new RegExp("<".concat(part, "[^>]*>((.|\\n|\\r)+)</").concat(part, ">"), 'g');

@@ -237,3 +237,3 @@ import { resolveComponent, isVue3 } from 'vue-inbrowser-compiler-demi';

function parseComponent(code) {
// reinintialize regexp after each tour
// reinitialize regexp after each tour
var partsRE = PARTS.reduce(function (ret, part) {

@@ -240,0 +240,0 @@ ret[part] = new RegExp("<".concat(part, "[^>]*>((.|\\n|\\r)+)</").concat(part, ">"), 'g');

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

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

"browser",
"buble",
"acorn"

@@ -16,0 +15,0 @@ ],

@@ -166,2 +166,30 @@ import parseComponent from './parseComponent'

})
it('should parse simplest code properly', () => {
const comp = parseComponent(`
<template>
<div @click="foo()">bar</div>
</template>
<script lang="ts">
import type { Vue } from 'vue'
function foo(param: Vue) : { one: number, two: boolean } {
return 'bar'
}
</script>`)
expect(comp.template).toMatch(/<div/)
expect(comp.script).toMatchInlineSnapshot(`
"
import type { Vue } from 'vue'
function foo(param: Vue) : { one: number, two: boolean } {
return 'bar'
}
"
`)
})
})

@@ -14,3 +14,3 @@ interface VsgSFCDescriptorSimple {

export default function parseComponent(code: string): VsgSFCDescriptor {
// reinintialize regexp after each tour
// reinitialize regexp after each tour
const partsRE: { [partName: string]: RegExp } = PARTS.reduce(

@@ -17,0 +17,0 @@ (ret: { [partName: string]: RegExp }, part: string) => {

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