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

@teambit/webpack.modules.config-mutator

Package Overview
Dependencies
Maintainers
0
Versions
145
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@teambit/webpack.modules.config-mutator - npm Package Compare versions

Comparing version 0.0.167 to 0.0.168

dist/preview-1725542343103.js

14

config-mutator.ts

@@ -339,5 +339,5 @@ import { isObject, omit } from 'lodash';

htmlPlugins.forEach((htmlPlugin) => {
if(htmlPlugin.userOptions !== undefined) {
htmlPlugin.options.templateContent = htmlPlugin.userOptions.templateContent
}
if (htmlPlugin.userOptions !== undefined && htmlPlugin.userOptions?.templateContent !== undefined) {
if (htmlPlugin.options) htmlPlugin.options.templateContent = htmlPlugin.userOptions.templateContent;
}

@@ -351,4 +351,4 @@ const htmlContent =

htmlPlugin.options.templateContent = newHtmlContent;
htmlPlugin.userOptions.templateContent = newHtmlContent
if (htmlPlugin.options) htmlPlugin.options.templateContent = newHtmlContent;
htmlPlugin.userOptions.templateContent = newHtmlContent;
});

@@ -381,5 +381,5 @@ }

? htmlPlugin.options?.templateContent({})
: htmlPlugin.options.templateContent;
: htmlPlugin.options?.templateContent;
htmlPlugin.options.templateContent = (htmlContent as string).replace(element, '');
if (htmlPlugin.options) htmlPlugin.options.templateContent = (htmlContent as string).replace(element, '');

@@ -386,0 +386,0 @@ this.raw.plugins = this.raw.plugins.map((plugin) => {

@@ -306,11 +306,13 @@ "use strict";

htmlPlugins.forEach((htmlPlugin) => {
var _a, _b, _c;
if (htmlPlugin.userOptions !== undefined) {
htmlPlugin.options.templateContent = htmlPlugin.userOptions.templateContent;
var _a, _b, _c, _d;
if (htmlPlugin.userOptions !== undefined && ((_a = htmlPlugin.userOptions) === null || _a === void 0 ? void 0 : _a.templateContent) !== undefined) {
if (htmlPlugin.options)
htmlPlugin.options.templateContent = htmlPlugin.userOptions.templateContent;
}
const htmlContent = typeof ((_a = htmlPlugin.options) === null || _a === void 0 ? void 0 : _a.templateContent) === 'function'
? (_b = htmlPlugin.options) === null || _b === void 0 ? void 0 : _b.templateContent({})
: (_c = htmlPlugin.options) === null || _c === void 0 ? void 0 : _c.templateContent;
const htmlContent = typeof ((_b = htmlPlugin.options) === null || _b === void 0 ? void 0 : _b.templateContent) === 'function'
? (_c = htmlPlugin.options) === null || _c === void 0 ? void 0 : _c.templateContent({})
: (_d = htmlPlugin.options) === null || _d === void 0 ? void 0 : _d.templateContent;
const newHtmlContent = (0, html_modules_inject_html_element_1.inject)(htmlContent, element);
htmlPlugin.options.templateContent = newHtmlContent;
if (htmlPlugin.options)
htmlPlugin.options.templateContent = newHtmlContent;
htmlPlugin.userOptions.templateContent = newHtmlContent;

@@ -330,3 +332,3 @@ });

removeElementFromHtmlTemplate(element) {
var _a, _b, _c, _d;
var _a, _b, _c, _d, _e;
if (!this.raw.plugins) {

@@ -339,4 +341,5 @@ this.raw.plugins = [];

? (_d = htmlPlugin.options) === null || _d === void 0 ? void 0 : _d.templateContent({})
: htmlPlugin.options.templateContent;
htmlPlugin.options.templateContent = htmlContent.replace(element, '');
: (_e = htmlPlugin.options) === null || _e === void 0 ? void 0 : _e.templateContent;
if (htmlPlugin.options)
htmlPlugin.options.templateContent = htmlContent.replace(element, '');
this.raw.plugins = this.raw.plugins.map((plugin) => {

@@ -343,0 +346,0 @@ if (plugin.constructor.name === 'HtmlWebpackPlugin') {

{
"name": "@teambit/webpack.modules.config-mutator",
"version": "0.0.167",
"version": "0.0.168",
"homepage": "https://bit.cloud/teambit/webpack/modules/config-mutator",

@@ -9,8 +9,8 @@ "main": "dist/index.js",

"name": "modules/config-mutator",
"version": "0.0.167"
"version": "0.0.168"
},
"dependencies": {
"html-webpack-plugin": "5.3.2",
"lodash": "4.17.21",
"webpack-merge": "5.8.0",
"html-webpack-plugin": "5.3.2",
"webpack": "5.84.1",

@@ -17,0 +17,0 @@ "@teambit/html.modules.inject-html-element": "0.0.5"

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