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

copy-webpack-plugin

Package Overview
Dependencies
Maintainers
3
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

copy-webpack-plugin - npm Package Compare versions

Comparing version 12.0.1 to 12.0.2

5

dist/index.js

@@ -17,4 +17,3 @@ "use strict";

throttleAll,
memoize,
asyncMemoize
memoize
} = require("./utils");

@@ -34,3 +33,3 @@ const template = /\[\\*([\w:]+)\\*\]/i;

require("fast-glob"));
const getGlobby = asyncMemoize(async () => {
const getGlobby = memoize(async () => {
// @ts-ignore

@@ -37,0 +36,0 @@ const {

27

dist/utils.js

@@ -123,26 +123,2 @@ "use strict";

}
/**
* @template T
* @param fn {(function(): any) | undefined}
* @returns {function(): Promise<T>}
*/
function asyncMemoize(fn) {
let cache = false;
/** @type {T} */
let result;
return async () => {
if (cache) {
return result;
}
result = await /** @type {function(): any} */fn();
cache = true;
// Allow to clean up memory for fn
// and all dependent resources
// eslint-disable-next-line no-undefined, no-param-reassign
fn = undefined;
return result;
};
}
module.exports = {

@@ -152,4 +128,3 @@ stat,

throttleAll,
memoize,
asyncMemoize
memoize
};
{
"name": "copy-webpack-plugin",
"version": "12.0.1",
"version": "12.0.2",
"description": "Copy files && directories with webpack",

@@ -28,5 +28,5 @@ "license": "MIT",

"security": "npm audit --production",
"lint:prettier": "prettier --list-different .",
"lint:prettier": "prettier --cache --list-different .",
"lint:js": "eslint --cache .",
"lint:spelling": "cspell --cache --quiet \"**/*.*\"",
"lint:spelling": "cspell --cache --no-must-find-files --quiet \"**/*.*\"",
"lint:types": "tsc --pretty --noEmit",

@@ -33,0 +33,0 @@ "lint": "npm-run-all -l -p \"lint:**\"",

@@ -42,7 +42,1 @@ export type InputFileSystem = import("webpack").Compilation["inputFileSystem"];

export function memoize<T>(fn: (() => any) | undefined): () => T;
/**
* @template T
* @param fn {(function(): any) | undefined}
* @returns {function(): Promise<T>}
*/
export function asyncMemoize<T>(fn: (() => any) | undefined): () => Promise<T>;
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