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

webpack-manifest-plugin

Package Overview
Dependencies
Maintainers
2
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webpack-manifest-plugin - npm Package Compare versions

Comparing version 4.1.1 to 5.0.0

13

dist/helpers.d.ts

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

import webpack, { AssetInfo, Chunk } from 'webpack';
import { AssetInfo, Chunk, Asset, Compilation } from 'webpack';
import { InternalOptions, Manifest } from './';
export interface FileDescriptor {
chunk?: ProperChunk;
chunk?: Chunk;
isAsset: Boolean;

@@ -15,13 +15,10 @@ isChunk: Boolean;

}
export interface CompilationAsset extends webpack.compilation.Asset {
export interface CompilationAsset extends Asset {
chunks: any[];
info: CompilationAssetInfo;
}
export interface ProperChunk extends Chunk {
auxiliaryFiles: any[];
}
declare const generateManifest: (compilation: webpack.compilation.Compilation, files: FileDescriptor[], { generate, seed }: InternalOptions) => Manifest;
declare const generateManifest: (compilation: Compilation, files: FileDescriptor[], { generate, seed }: InternalOptions) => Manifest;
declare const reduceAssets: (files: FileDescriptor[], asset: CompilationAsset, moduleAssets: Record<any, any>) => FileDescriptor[];
declare const reduceChunk: (files: FileDescriptor[], chunk: ProperChunk, options: InternalOptions, auxiliaryFiles: Record<any, any>) => FileDescriptor[];
declare const reduceChunk: (files: FileDescriptor[], chunk: Chunk, options: InternalOptions, auxiliaryFiles: Record<any, any>) => FileDescriptor[];
declare const transformFiles: (files: FileDescriptor[], options: InternalOptions) => FileDescriptor[];
export { generateManifest, reduceAssets, reduceChunk, transformFiles };

@@ -1,2 +0,2 @@

import webpack, { Compiler, Module } from 'webpack';
import { Compiler, Module, Compilation, LoaderContext } from 'webpack';
import { EmitCountMap, InternalOptions } from './';

@@ -17,3 +17,3 @@ interface BeforeRunHookArgs {

declare const beforeRunHook: ({ emitCountMap, manifestFileName }: BeforeRunHookArgs, _: Compiler, callback: Function) => void;
declare const emitHook: ({ compiler, emitCountMap, manifestAssetId, manifestFileName, moduleAssets, options }: EmitHookArgs, compilation: webpack.compilation.Compilation) => void;
declare const emitHook: ({ compiler, emitCountMap, manifestAssetId, manifestFileName, moduleAssets, options }: EmitHookArgs, compilation: Compilation) => void;
interface LegacyModule extends Module {

@@ -24,3 +24,3 @@ userRequest?: any;

moduleAssets: Record<any, any>;
}, loaderContext: webpack.loader.LoaderContext, module: LegacyModule) => void;
}, loaderContext: LoaderContext<any>, module: LegacyModule) => void;
export { beforeRunHook, emitHook, getCompilerHooks, normalModuleLoaderHook };

@@ -8,3 +8,2 @@ "use strict";

const path_1 = require("path");
const webpack_1 = __importDefault(require("webpack"));
const NormalModule_1 = __importDefault(require("webpack/lib/NormalModule"));

@@ -38,3 +37,3 @@ const hooks_1 = require("./hooks");

apply(compiler) {
var _a, _b, _c;
var _a, _b;
const moduleAssets = {};

@@ -63,3 +62,3 @@ const manifestFileName = path_1.resolve(((_a = compiler.options.output) === null || _a === void 0 ? void 0 : _a.path) || './', this.options.fileName);

});
if (((_c = webpack_1.default.version) === null || _c === void 0 ? void 0 : _c.startsWith('4')) || this.options.useLegacyEmit === true) {
if (this.options.useLegacyEmit === true) {
compiler.hooks.emit.tap(hookOptions, emit);

@@ -72,4 +71,4 @@ }

}
compiler.hooks.run.tap(hookOptions, beforeRun);
compiler.hooks.watchRun.tap(hookOptions, beforeRun);
compiler.hooks.run.tapAsync(hookOptions, beforeRun);
compiler.hooks.watchRun.tapAsync(hookOptions, beforeRun);
}

@@ -76,0 +75,0 @@ }

{
"name": "webpack-manifest-plugin",
"version": "4.1.1",
"version": "5.0.0",
"description": "A Webpack Plugin for generating Asset Manifests",

@@ -22,12 +22,8 @@ "license": "MIT",

"lint:docs": "prettier --write README.md",
"lint:js": "eslint --cache --fix --cache scripts src test",
"lint:js": "eslint --cache --fix --cache src test",
"lint:json": "prettier --write codecov.yml package.json",
"posttest": "pnpm switch -- \"4\" && pnpm install",
"prepublishOnly": "pnpm lint && pnpm build",
"pretest": "pnpm build",
"security": "pnpm audit --audit-level=high --prod",
"switch": "cd scripts && ts-node --project ./tsconfig.json ./set-webpack-version.ts",
"test": "pnpm test:v4 && pnpm test:v5",
"test:v4": "ava",
"test:v5": "pnpm switch -- \"5\" && pnpm install && ava"
"test": "pnpm install && ava"
},

@@ -40,3 +36,3 @@ "files": [

"peerDependencies": {
"webpack": "^4.44.2 || ^5.47.0"
"webpack": "^5.47.0"
},

@@ -53,3 +49,3 @@ "dependencies": {

"@types/node": "^16.4.3",
"@types/webpack": "^4.41.26",
"@types/webpack": "^5.28.0",
"@types/webpack-sources": "^2.1.1",

@@ -60,7 +56,5 @@ "@wordpress/dependency-extraction-webpack-plugin": "^3.1.0",

"copy-webpack-plugin": "^6.2.1",
"css-loader": "^1.0.0",
"del": "^6.0.0",
"eslint-config-shellscape": "^4.2.0",
"extract-text-webpack-plugin": "^3.0.2",
"file-loader": "^2.0.0",
"file-loader": "^6.2.0",
"husky": "4.3.8",

@@ -78,3 +72,3 @@ "lint-staged": "11.1.1",

"typescript": "^4.3.5",
"webpack": "^4.44.2",
"webpack": "^5.47.0",
"webpack-merge": "^5.2.0"

@@ -115,13 +109,3 @@ },

},
"pre-commit": "lint-staged",
"webpack-versions": {
"4": {
"webpack": "^4.44.2",
"@types/webpack": "^4.41.26"
},
"5": {
"webpack": "latest",
"@types/webpack": "latest"
}
}
"pre-commit": "lint-staged"
}

@@ -27,3 +27,3 @@ [tests]: https://img.shields.io/circleci/project/github/shellscape/webpack-manifest-plugin.svg

This module requires an [Active LTS](https://github.com/nodejs/Release) Node version (v10.0.0+) and Webpack v4.44.0+.
This module requires an [Active LTS](https://github.com/nodejs/Release) Node version (v12.0.0+) and Webpack v5.0.0.

@@ -30,0 +30,0 @@ ## Contributing

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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