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.4.1 to 1.4.2

7

CHANGELOG.md

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

# 1.4.2 (May 15, 2020)
## Improved
- Little refactoring (related to English language, not information) of documentation and log messages. [#27](https://github.com/Amaimersion/remove-files-webpack-plugin/issues/27)
# 1.4.1 (April 25, 2020)

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

2

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

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

@@ -91,4 +91,4 @@ <h1 align="center">

| root | `string` | `.` | All | A root directory.<br>Not absolute paths will be appended to this.<br>Defaults to where `package.json` and `node_modules` are located. |
| include | `string[]` | `[]` | All | A folders and files for removing. |
| exclude | `string[]` | `[]` | All | A folders and files for excluding. |
| include | `string[]` | `[]` | All | A folders or files for removing. |
| exclude | `string[]` | `[]` | All | A folders or files for excluding. |
| test | `TestObject[]` | `[]` | All | A folders for testing. |

@@ -100,3 +100,3 @@ | TestObject.folder | `string` | Required | All | A path to the folder (relative to `root`). |

| afterRemove | `(`<br>`absoluteFoldersPaths: string[],`<br>`absoluteFilesPaths: string[]`<br>`) => void` | `undefined` | All | If specified, will be called after removing.<br>Absolute paths of folders and files<br>that have been removed will be passed into this function.<br>Will be not called if `emulate: true` or `skipFirstBuild: true`. |
| trash | `boolean` | `false` | All | Move folders and files to trash (recycle bin) instead of permanent removing.<br>Requires Windows 8+, macOS 10.12+ or Linux. |
| trash | `boolean` | `false` | All | Move folders and files to the trash (recycle bin) instead of permanent removing.<br>Requires Windows 8+, macOS 10.12+ or Linux. |
| log | `boolean` | `true` | All | Print messages of "info" level<br>(example: "Which folders or files have been removed"). |

@@ -162,5 +162,5 @@ | logWarning | `boolean` | `true` | All | Print messages of "warning" level<br>(example: "An items for removing not found"). |

/**
* After compilation removes both
* After compilation moves both
* `./dist/manifest.json` file and
* `./dist/maps` folder to trash.
* `./dist/maps` folder to the trash.
*/

@@ -322,4 +322,4 @@ after: {

* Once after "normal" compilation or every time
* after "watch" compilation removes `./dist/log.txt`
* file in trash.
* after "watch" compilation moves `./dist/log.txt`
* file to the trash.
*/

@@ -340,3 +340,3 @@ after: {

* for a file that is outside of the root directory.
* That file will be removed in trash in case of
* That file will be moved to the trash in case of
* not emulation.

@@ -343,0 +343,0 @@ */

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

* - don't throws an error if file not exists.
* - in case of removing in trash this becomes an
* - in case of moving to the trash this becomes an
* async function and you should use callbacks

@@ -210,6 +210,6 @@ * (consider `rightTrashCallbacks` parameter).

*
* - in case of removing in trash this becomes an
* - in case of moving to the trash this becomes an
* async function and you should use callbacks
* (consider `rightTrashCallbacks` parameter).
* - in case of removing in trash
* - in case of moving to the trash
* don't throws an error if folder not exists.

@@ -272,3 +272,3 @@ *

if (!stat) {
onFileError(`Skipped, because cannot get stat - "${item}"`);
onFileError(`Skipped, because unable to get stat - "${item}"`);

@@ -292,3 +292,3 @@ continue;

} else {
onFileError(`Skipped, because invalid stat – "${item}"`);
onFileError(`Skipped, because of invalid stat – "${item}"`);

@@ -358,3 +358,3 @@ continue;

if (!stat) {
onItemError(`Skipped, because cannot get stat - "${item}"`);
onItemError(`Skipped, because unable to get stat - "${item}"`);

@@ -406,3 +406,3 @@ continue;

} else {
onItemError(`Skipped, because invalid stat – "${item}"`);
onItemError(`Skipped, because of invalid stat – "${item}"`);

@@ -409,0 +409,0 @@ continue;

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

* @module RemoveFilesWebpackPlugin
* @version 1.4.1
* @version 1.4.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.4.1';
return '1.4.2';
}

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

@@ -206,3 +206,4 @@ 'use strict';

throw new Error(
'No "before", "watch" or "after" parameters specified. ' +
'Neither "before", "watch" or "after" parameters is specified. ' +
'At least one should be specified. ' +
'See https://github.com/Amaimersion/remove-files-webpack-plugin#parameters'

@@ -522,5 +523,4 @@ );

const message = (
'An items for ' +
`${params.trash ? 'removing in trash' : 'permanent removing'}` +
' not found'
'Could not find any items to ' +
`${params.trash ? 'move to the trash' : 'permanently remove'}`
);

@@ -536,5 +536,5 @@

const message = (
'Following items will be ' +
`${params.trash ? 'removed in trash' : 'permanently removed'}` +
' in case of not emulation:'
'The following items would have been ' +
`${params.trash ? 'moved to the trash' : 'permanently removed'}` +
' if it hadn\'t been an emulation:'
);

@@ -606,4 +606,4 @@

const message = (
'Following items have been ' +
`${params.trash ? 'removed in trash' : 'permanently removed'}` +
'The following items have been ' +
`${params.trash ? 'moved to the trash' : 'permanently removed'}` +
':'

@@ -790,3 +790,3 @@ );

debugName +
`skipped, because cannot get stat – "${item}"`
`skipped, because unable to get stat – "${item}"`
);

@@ -800,3 +800,3 @@

} else {
const message = `Skipped, because invalid stat – "${item}"`;
const message = `Skipped, because of invalid stat – "${item}"`;

@@ -891,3 +891,3 @@ this.loggerDebug.add(`${debugName}${message}`);

debugName +
`skipped, because cannot get stat – "${test.folder}"`
`skipped, because unable to get stat – "${test.folder}"`
);

@@ -969,7 +969,5 @@

debugName +
'File' +
`${toTrash ? '' : ' permanently'}` +
' removed' +
`${toTrash ? ' to trash' : ''}` +
` – ${pth}`
'File ' +
`${toTrash ? 'moved to the trash' : 'permanently removed'} ` +
`– ${pth}`
);

@@ -1015,7 +1013,5 @@ },

debugName +
'File' +
`${toTrash ? '' : ' permanently'}` +
' removed' +
`${toTrash ? ' to trash' : ''}` +
` – ${pth}`
'File ' +
`${toTrash ? 'moved to the trash' : 'permanently removed'} ` +
`– ${pth}`
);

@@ -1030,7 +1026,5 @@ },

debugName +
'Folder' +
`${toTrash ? '' : ' permanently'}` +
' removed' +
`${toTrash ? ' to trash' : ''}` +
` – ${pth}`
'Folder ' +
`${toTrash ? 'moved to the trash' : 'permanently removed'} ` +
`– ${pth}`
);

@@ -1037,0 +1031,0 @@ },

@@ -47,4 +47,4 @@ // Type definitions for remove-files-webpack-plugin 1.4

*
* Defaults to `.` (where package.json and
* node_modules are located).
* Defaults to `.` (where "package.json" and
* "node_modules" are located).
*

@@ -56,3 +56,3 @@ * Namespace: all.

/**
* A folders and files for removing.
* A folders or files for removing.
*

@@ -66,3 +66,3 @@ * Defaults to `[]`.

/**
* A folders and files for excluding.
* A folders or files for excluding.
*

@@ -118,3 +118,3 @@ * Defaults to `[]`.

/**
* Move folders and files to trash (recycle bin)
* Move folders and files to the trash (recycle bin)
* instead of permanent removing.

@@ -212,3 +212,3 @@ *

/**
* A folder for testing of items (folders and files) that should be removed.
* A folder for testing of items (folders or files) that should be removed.
*/

@@ -215,0 +215,0 @@ interface TestObject {

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