Socket
Socket
Sign inDemoInstall

rollup-pluginutils

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rollup-pluginutils - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

4

CHANGELOG.md
# rollup-pluginutils changelog
## 2.0.1
* Don't add extension to file with trailing dot ([#14](https://github.com/rollup/rollup-pluginutils/issues/14))
## 2.0.0

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

14

dist/pluginutils.cjs.js

@@ -7,20 +7,10 @@ 'use strict';

var path = require('path');
var estreeWalker = require('estree-walker');
var path = require('path');
var mm = _interopDefault(require('micromatch'));
function basename ( path$$1 ) {
return path$$1.split( /(\/|\\)/ ).pop();
}
function extname ( path$$1 ) {
var match = /\.[^\.]+$/.exec( basename( path$$1 ) );
if ( !match ) { return ''; }
return match[0];
}
function addExtension ( filename, ext ) {
if ( ext === void 0 ) ext = '.js';
if ( !extname( filename ) ) { filename += ext; }
if ( !path.extname( filename ) ) { filename += ext; }
return filename;

@@ -27,0 +17,0 @@ }

@@ -0,15 +1,5 @@

import { extname, resolve, sep } from 'path';
import { walk } from 'estree-walker';
import { resolve, sep } from 'path';
import mm from 'micromatch';
function basename ( path$$1 ) {
return path$$1.split( /(\/|\\)/ ).pop();
}
function extname ( path$$1 ) {
var match = /\.[^\.]+$/.exec( basename( path$$1 ) );
if ( !match ) { return ''; }
return match[0];
}
function addExtension ( filename, ext ) {

@@ -16,0 +6,0 @@ if ( ext === void 0 ) ext = '.js';

{
"name": "rollup-pluginutils",
"description": "Functionality commonly needed by Rollup plugins",
"version": "2.0.0",
"version": "2.0.1",
"main": "dist/pluginutils.cjs.js",

@@ -6,0 +6,0 @@ "module": "dist/pluginutils.es.js",

@@ -1,11 +0,3 @@

function basename ( path ) {
return path.split( /(\/|\\)/ ).pop();
}
import { extname } from 'path';
function extname ( path ) {
const match = /\.[^\.]+$/.exec( basename( path ) );
if ( !match ) return '';
return match[0];
}
export default function addExtension ( filename, ext = '.js' ) {

@@ -12,0 +4,0 @@ if ( !extname( filename ) ) filename += ext;

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