New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

remove-files-webpack-plugin

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remove-files-webpack-plugin - npm Package Compare versions

Comparing version 1.2.1 to 1.2.2

7

CHANGELOG.md

@@ -0,1 +1,8 @@

# 1.2.2 (January 19, 2020)
## Fixed
- A bug when root path was escaped incorrectly. [#16](https://github.com/Amaimersion/remove-files-webpack-plugin/issues/16)
# 1.2.1 (December 25, 2019)

@@ -2,0 +9,0 @@

2

package.json
{
"name": "remove-files-webpack-plugin",
"version": "1.2.1",
"version": "1.2.2",
"description": "A plugin for webpack that removes files and folders before and after compilation.",

@@ -5,0 +5,0 @@ "main": "./src/index.js",

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

* @module RemoveFilesWebpackPlugin
* @version 1.2.1
* @version 1.2.2
* @file A plugin for webpack that removes files and folders before and after compilation.

@@ -9,0 +9,0 @@ * @author Sergey Kuznetsov <https://github.com/Amaimersion>

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

static get version() {
return '1.2.1';
return '1.2.2';
}

@@ -22,0 +22,0 @@

@@ -755,2 +755,6 @@ 'use strict';

* Returns - false
*
* root = 'D:/te)st-tes(t and te[s]t {df} df+g.df^g&t'
* pth = 'D:/te)st-tes(t and te[s]t {df} df+g.df^g&t/chromium'
* Returns – true
*/

@@ -793,2 +797,10 @@ isSave(root, pth) {

// in order to keep `\\` as string in a path.
// this should go before actual escaping.
if (replaceDoubleSlash) {
string = string.replace(/\\/g, '\\\\');
}
// we need to escape special regexp characters
// in order to treat them as string.
if (escape) {

@@ -798,6 +810,2 @@ string = Utils.escape(string);

if (replaceDoubleSlash) {
string = string.replace(/\\/g, '\\\\');
}
result.string = string;

@@ -809,4 +817,8 @@ result.continue = true;

/**
* We should escape root because this will be pasted in RegExp.
* We shouldn't escape pth because this will be compared as a plain string.
*/
const rootFormat = format(root, true, true);
const pthFormat = format(pth, false, true); // we shouldn't escape.
const pthFormat = format(pth, false, true);

@@ -813,0 +825,0 @@ if (

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