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

@webextension-toolbox/webextension-toolbox

Package Overview
Dependencies
Maintainers
3
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@webextension-toolbox/webextension-toolbox - npm Package Compare versions

Comparing version 5.0.1 to 5.1.0

9

CHANGELOG.md

@@ -10,2 +10,11 @@ # Changelog

## [5.0.2] - 2021-04-11
### Fixed
- Target resolution was incorrect and thus detroying most of the built modules
### Changes
- In the past the `node` option was set to false in webpack config to prevent security issues with usage of eval (See https://github.com/webextension-toolbox/webextension-toolbox/pull/34). This was resolved at the end of life of webpack 4 and does not exist in webpack 5. This option is now set to true by default (not set). This means global is now set by webpack itself. If you want to disable this behavior you can set the `node` option to false in your webpack config. See: https://webpack.js.org/configuration/node/
- Clean webpack plugin was removed in favor of https://webpack.js.org/guides/output-management/#cleaning-up-the-dist-folder which is native in webpack 5.
## [5.0.1] - 2021-04-06

@@ -12,0 +21,0 @@ ### Changes

22

dist/common/webpack.js

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

const webpack_1 = require("webpack");
const clean_webpack_plugin_1 = require("clean-webpack-plugin");
const webpack_watched_glob_entries_plugin_1 = __importDefault(require("webpack-watched-glob-entries-plugin"));

@@ -49,2 +48,3 @@ const case_sensitive_paths_webpack_plugin_1 = __importDefault(require("case-sensitive-paths-webpack-plugin"));

}
const resolvedTarget = (0, path_1.resolve)(target.replace("[vendor]", vendor));
const mode = dev ? "development" : "production";

@@ -99,5 +99,6 @@ // Get some defaults

config.output = {
path: (0, path_1.resolve)(target.replace("[vendor]", vendor)),
path: resolvedTarget,
filename: "[name].js",
chunkFilename: "[id].chunk.js",
clean: true,
};

@@ -155,4 +156,2 @@ /** *************************** */

}
// Clear output directory
config.plugins.push(new clean_webpack_plugin_1.CleanWebpackPlugin());
// Watcher doesn't work well if you mistype casing in a path so we use

@@ -178,3 +177,3 @@ // a plugin that prints an error when you attempt to do this.

},
to: target,
to: resolvedTarget,
},

@@ -190,3 +189,3 @@ ];

from: resolvedFrom,
to: target,
to: resolvedTarget,
});

@@ -218,13 +217,2 @@ }

}
// Disable webpacks usage of eval & function string constructor
// @url https://github.com/webpack/webpack/blob/master/buildin/global.js
config.node = false;
// In order to still be able to use global we use window instead
/*
config.plugins.push(
new ProvidePlugin({
global: require.resolve('./utils/global.js')
})
)
*/
config.plugins.push(new webpackbar_1.default());

@@ -231,0 +219,0 @@ return config;

{
"name": "@webextension-toolbox/webextension-toolbox",
"version": "5.0.1",
"version": "5.1.0",
"description": "Framework for WebExtensions (Firefox, Chrome, Opera, Edge)",

@@ -45,3 +45,2 @@ "main": "./dist/index.js",

"case-sensitive-paths-webpack-plugin": "^2.4.0",
"clean-webpack-plugin": "^4.0.0",
"commander": "^9.1.0",

@@ -48,0 +47,0 @@ "copy-webpack-plugin": "^10.2.4",

@@ -15,5 +15,5 @@ [<img align="right" src="./assets/icon.svg?sanitize=true">](https://www.npmjs.com/package/@webextension-toolbox/webextension-toolbox)

- Chrome (`chrome`) (auto [polyfilled](https://github.com/mozilla/webextension-polyfill))
- Opera (`opera`) (auto [polyfilled](https://github.com/mozilla/webextension-polyfill))
- Edge (`edge`) (auto [polyfilled](https://github.com/mozilla/webextension-polyfill))
- Chrome (`chrome`)
- Opera (`opera`)
- Edge (`edge`)
- Firefox (`firefox`)

@@ -44,2 +44,7 @@ - Safari (`safari`)

## Typescript Support
Native typescript support (but not enforced!)
(see section [How do I use Typescript?](#how-do-i-use-typescript))
## Manifest vendor keys

@@ -49,6 +54,2 @@

## Typescript Support
Native typescript support (but not enforced!)
### Example

@@ -55,0 +56,0 @@

import { resolve } from "path";
import { Configuration, EnvironmentPlugin } from "webpack";
import { CleanWebpackPlugin } from "clean-webpack-plugin";
import GlobEntriesPlugin from "webpack-watched-glob-entries-plugin";

@@ -78,2 +77,3 @@ import CaseSensitivePathsPlugin from "case-sensitive-paths-webpack-plugin";

const resolvedTarget = resolve(target.replace("[vendor]", vendor));
const mode = dev ? "development" : "production";

@@ -138,5 +138,6 @@

config.output = {
path: resolve(target.replace("[vendor]", vendor)),
path: resolvedTarget,
filename: "[name].js",
chunkFilename: "[id].chunk.js",
clean: true,
};

@@ -200,5 +201,2 @@ /** *************************** */

// Clear output directory
config.plugins.push(new CleanWebpackPlugin());
// Watcher doesn't work well if you mistype casing in a path so we use

@@ -229,3 +227,3 @@ // a plugin that prints an error when you attempt to do this.

},
to: target,
to: resolvedTarget,
},

@@ -242,3 +240,3 @@ ];

from: resolvedFrom,
to: target,
to: resolvedTarget,
});

@@ -282,15 +280,2 @@ }

// Disable webpacks usage of eval & function string constructor
// @url https://github.com/webpack/webpack/blob/master/buildin/global.js
config.node = false;
// In order to still be able to use global we use window instead
/*
config.plugins.push(
new ProvidePlugin({
global: require.resolve('./utils/global.js')
})
)
*/
config.plugins.push(new WebpackBar());

@@ -297,0 +282,0 @@

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