Socket
Socket
Sign inDemoInstall

terser-webpack-plugin

Package Overview
Dependencies
290
Maintainers
1
Versions
77
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.2 to 1.1.0

15

CHANGELOG.md

@@ -5,2 +5,17 @@ # Change Log

<a name="1.1.0"></a>
# [1.1.0](https://github.com/webpack-contrib/terser-webpack-plugin/compare/v1.0.1...v1.1.0) (2018-09-14)
### Bug Fixes
* extract comment conditions is case insensitivity ([19e1e43](https://github.com/webpack-contrib/terser-webpack-plugin/commit/19e1e43))
### Features
* full coverage schema options validation ([#8](https://github.com/webpack-contrib/terser-webpack-plugin/issues/8)) ([68e531e](https://github.com/webpack-contrib/terser-webpack-plugin/commit/68e531e))
<a name="1.0.2"></a>

@@ -7,0 +22,0 @@ ## [1.0.2](https://github.com/webpack-contrib/terser-webpack-plugin/compare/v1.0.1...v1.0.2) (2018-08-16)

4

dist/minify.js

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

// Use /^\**!|@preserve|@license|@cc_on/ RegExp
// Use /^\**!|@preserve|@license|@cc_on/i RegExp
if (typeof options.extractComments === 'boolean') {
condition.preserve = commentsOpts;
condition.extract = /^\**!|@preserve|@license|@cc_on/;
condition.extract = /^\**!|@preserve|@license|@cc_on/i;
} else if (typeof options.extractComments === 'string' || options.extractComments instanceof RegExp) {

@@ -66,0 +66,0 @@ // extractComments specifies the extract condition and commentsOpts specifies the preserve condition

{
"type": "object",
"additionalProperties": false,
"definitions": {
"file-conditions": {
"anyOf": [
{
"instanceof": "RegExp"
},
{
"type": "string"
}
]
}
},
"properties": {
"test": {},
"include": {},
"exclude": {},
"test": {
"anyOf": [
{
"$ref": "#/definitions/file-conditions"
},
{
"items": {
"anyOf": [
{
"$ref": "#/definitions/file-conditions"
}
]
},
"type": "array"
}
]
},
"include": {
"anyOf": [
{
"$ref": "#/definitions/file-conditions"
},
{
"items": {
"anyOf": [
{
"$ref": "#/definitions/file-conditions"
}
]
},
"type": "array"
}
]
},
"exclude": {
"anyOf": [
{
"$ref": "#/definitions/file-conditions"
},
{
"items": {
"anyOf": [
{
"$ref": "#/definitions/file-conditions"
}
]
},
"type": "array"
}
]
},
"cache": {
"oneOf": [{ "type": "boolean" }, { "type": "string" }]
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
}
]
},

@@ -14,3 +81,10 @@ "cacheKeys": {

"parallel": {
"oneOf": [{ "type": "boolean" }, { "type": "integer" }]
"anyOf": [
{
"type": "boolean"
},
{
"type": "integer"
}
]
},

@@ -27,3 +101,63 @@ "sourceMap": {

},
"extractComments": {},
"extractComments": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"instanceof": "RegExp"
},
{
"instanceof": "Function"
},
{
"additionalProperties": false,
"properties": {
"condition": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"instanceof": "RegExp"
},
{
"instanceof": "Function"
}
]
},
"filename": {
"anyOf": [
{
"type": "string"
},
{
"instanceof": "Function"
}
]
},
"banner": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"instanceof": "Function"
}
]
}
},
"type": "object"
}
]
},
"warningsFilter": {

@@ -33,3 +167,3 @@ "instanceof": "Function"

},
"additionalProperties": false
"type": "object"
}

@@ -33,9 +33,4 @@ 'use strict';

let workerFile = require.resolve('./worker');
const worker = require.resolve('./worker');
try {
// run test
workerFile = require.resolve('../dist/worker');
} catch (e) {} // eslint-disable-line no-empty
class TaskRunner {

@@ -63,3 +58,3 @@ constructor(options = {}) {

} : { maxConcurrentWorkers: this.maxConcurrentWorkers };
this.workers = (0, _workerFarm2.default)(workerOptions, workerFile);
this.workers = (0, _workerFarm2.default)(workerOptions, worker);
this.boundWorkers = (options, cb) => this.workers((0, _serializeJavascript2.default)(options), cb);

@@ -66,0 +61,0 @@ } else {

{
"name": "terser-webpack-plugin",
"version": "1.0.2",
"version": "1.1.0",
"description": "Terser plugin for webpack",

@@ -25,7 +25,7 @@ "license": "MIT",

"prebuild": "npm run clean",
"prepublish": "npm run build",
"prepare": "npm run build",
"release": "standard-version",
"release:ci": "conventional-github-releaser -p angular",
"release:validate": "commitlint --from=$(git describe --tags --abbrev=0) --to=$(git rev-parse HEAD)",
"security": "nsp check",
"security": "npm audit",
"test": "jest",

@@ -60,3 +60,3 @@ "test:watch": "jest --watch",

"babel-cli": "^6.26.0",
"babel-jest": "^22.4.3",
"babel-jest": "^23.4.2",
"babel-plugin-transform-object-rest-spread": "^6.26.0",

@@ -69,3 +69,3 @@ "babel-polyfill": "^6.26.0",

"del-cli": "^1.1.0",
"eslint": "^4.14.0",
"eslint": "^5.5.0",
"eslint-config-webpack": "^1.2.5",

@@ -75,6 +75,5 @@ "eslint-plugin-import": "^2.8.0",

"husky": "^0.14.3",
"jest": "^22.4.3",
"lint-staged": "^6.0.0",
"jest": "^23.5.0",
"lint-staged": "^7.2.2",
"memory-fs": "^0.4.1",
"nsp": "^3.1.0",
"pre-commit": "^1.2.2",

@@ -81,0 +80,0 @@ "prettier": "^1.14.0",

@@ -52,3 +52,3 @@ <div align="center">

Type: `Sting|RegExp|Array<RegExp>`
Type: `String|RegExp|Array<String|RegExp>`
Default: `/\.js(\?.*)?$/i`

@@ -67,3 +67,3 @@

Type: `Sting|RegExp|Array<RegExp>`
Type: `String|RegExp|Array<String|RegExp>`
Default: `undefined`

@@ -82,3 +82,3 @@

Type: `String|RegExp|Array<String,RegExp>`
Type: `String|RegExp|Array<String|RegExp>`
Default: `undefined`

@@ -268,7 +268,7 @@

Type: `Boolean|String|RegExp|Function<(node, comment) -> Boolean|Object>`
Type: `Boolean|String|RegExp|Function<(node, comment) -> Boolean|Object>|Object`
Default: `false`
Whether comments shall be extracted to a separate file, (see [details](https://github.com/webpack/webpack/commit/71933e979e51c533b432658d5e37917f9e71595a)).
By default extract only comments using `/^\**!|@preserve|@license|@cc_on/` regexp condition and remove remaining comments.
By default extract only comments using `/^\**!|@preserve|@license|@cc_on/i` regexp condition and remove remaining comments.
If the original file is named `foo.js`, then the comments will be stored to `foo.js.LICENSE`.

@@ -290,3 +290,3 @@ The `terserOptions.output.comments` option specifies whether the comment will be preserved, i.e. it is possible to preserve some comments (e.g. annotations) while extracting others or even preserving comments that have been extracted.

Extract `all` or `some` (use `/^\**!|@preserve|@license|@cc_on/` RegExp) comments.
Extract `all` or `some` (use `/^\**!|@preserve|@license|@cc_on/i` RegExp) comments.

@@ -336,3 +336,3 @@ ```js

extractComments: {
condition: /^\**!|@preserve|@license|@cc_on/,
condition: /^\**!|@preserve|@license|@cc_on/i,
filename(file) {

@@ -371,3 +371,3 @@ return `${file}.LICENSE`;

Type: `Regex|Function<(string) -> {String}>`
Type: `String|Function<(string) -> String>`
Default: `${file}.LICENSE`

@@ -382,3 +382,3 @@

extractComments: {
condition: /^\**!|@preserve|@license|@cc_on/,
condition: /^\**!|@preserve|@license|@cc_on/i,
filename: 'extracted-comments.js',

@@ -466,3 +466,3 @@ banner(licenseFile) {

Extract all legal comments (i.e. `/^\**!|@preserve|@license|@cc_on/`) and preserve `/@license/i` comments.
Extract all legal comments (i.e. `/^\**!|@preserve|@license|@cc_on/i`) and preserve `/@license/i` comments.

@@ -538,7 +538,7 @@ ```js

#### [CONTRIBUTING](./.github/CONTRIBUTING)
[CONTRIBUTING](./.github/CONTRIBUTING.md)
## License
#### [MIT](./LICENSE)
[MIT](./LICENSE)

@@ -545,0 +545,0 @@ [npm]: https://img.shields.io/npm/v/terser-webpack-plugin.svg

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc