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

rollup-plugin-svelte

Package Overview
Dependencies
Maintainers
1
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rollup-plugin-svelte - npm Package Compare versions

Comparing version 1.3.0 to 1.3.1

4

CHANGELOG.md
# rollup-plugin-svelte changelog
## 1.3.1
* Sanitize constructor names
## 1.3.0

@@ -4,0 +8,0 @@

@@ -7,2 +7,15 @@ 'use strict';

function sanitize ( input ) {
return path.basename( input )
.replace( path.extname( input ), '' )
.replace( /[^a-zA-Z_$0-9]+/g, '_' )
.replace( /^_/, '' )
.replace( /_$/, '' )
.replace( /^(\d)/, '_$1' );
}
function capitalize ( str ) {
return str[0] + str.slice( 1 );
}
function svelte$1 ( options ) {

@@ -22,4 +35,3 @@ if ( options === void 0 ) options = {};

var name = path.basename( id ).replace( path.extname( id ), '' );
name = "" + (name[0].toUpperCase()) + (name.slice( 1 ));
var name = capitalize( sanitize( id ) );

@@ -26,0 +38,0 @@ return svelte.compile( code, {

@@ -5,2 +5,15 @@ import { basename, extname } from 'path';

function sanitize ( input ) {
return basename( input )
.replace( extname( input ), '' )
.replace( /[^a-zA-Z_$0-9]+/g, '_' )
.replace( /^_/, '' )
.replace( /_$/, '' )
.replace( /^(\d)/, '_$1' );
}
function capitalize ( str ) {
return str[0] + str.slice( 1 );
}
function svelte$1 ( options ) {

@@ -20,4 +33,3 @@ if ( options === void 0 ) options = {};

var name = basename( id ).replace( extname( id ), '' );
name = "" + (name[0].toUpperCase()) + (name.slice( 1 ));
var name = capitalize( sanitize( id ) );

@@ -24,0 +36,0 @@ return compile( code, {

2

package.json
{
"name": "rollup-plugin-svelte",
"version": "1.3.0",
"version": "1.3.1",
"description": "Compile Svelte components with Rollup",

@@ -5,0 +5,0 @@ "main": "dist/rollup-plugin-svelte.cjs.js",

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