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

vue-inbrowser-compiler

Package Overview
Dependencies
Maintainers
1
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 3.13.8 to 3.13.10

12

CHANGELOG.md

@@ -6,4 +6,16 @@ # Change Log

## [3.13.10](https://github.com/vue-styleguidist/vue-styleguidist/compare/v3.13.9...v3.13.10) (2019-06-04)
### Bug Fixes
* detect pure template no script as sfc ([e2a0a48](https://github.com/vue-styleguidist/vue-styleguidist/commit/e2a0a48))
* downgrade acorn ([40b60cb](https://github.com/vue-styleguidist/vue-styleguidist/commit/40b60cb))
## [3.13.8](https://github.com/vue-styleguidist/vue-styleguidist/compare/v3.13.7...v3.13.8) (2019-05-29)
**Note:** Version bump only for package vue-inbrowser-compiler

2

lib/isCodeVueSfc.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function isCodeVueSfc(code) {
return /\n\W*<script/.test(code);
return /\n\W*<script/.test(code) || /\n\W*<template/.test(code);
}
exports.default = isCodeVueSfc;
{
"name": "vue-inbrowser-compiler",
"version": "3.13.8",
"version": "3.13.10",
"description": "compile vue single file components right in your browser",

@@ -19,3 +19,3 @@ "main": "lib/index.js",

"dependencies": {
"acorn": "^6.1.1",
"acorn": "^5.7.3",
"buble": "^0.19.7",

@@ -30,3 +30,3 @@ "vue-template-compiler": "^2.6.10",

"license": "MIT",
"gitHead": "1d47e198a4705b38cf54a7d94efaa1bf93f6a7f6"
"gitHead": "a6393e296e3f0e4451e7a32a34b3d4fbef30fc97"
}

@@ -17,2 +17,11 @@ import isCodeVueSfc from '../isCodeVueSfc'

it('should detect a lonely template as SFC', () => {
expect(
isCodeVueSfc(`
<template>
<div/>
</template>`)
).toBeTruthy()
})
it('should return false if there is only javascript', () => {

@@ -19,0 +28,0 @@ expect(

export default function isCodeVueSfc(code: string) {
return /\n\W*<script/.test(code)
return /\n\W*<script/.test(code) || /\n\W*<template/.test(code)
}
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