Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: webpack-contrib/terser-webpack-plugin
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 8ae4b807362e2a26c77cc453b7aedcdaabd47c01
Choose a base ref
...
head repository: webpack-contrib/terser-webpack-plugin
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 491b2fd25dd42723ba3368ff15a8aa32f647d8a4
Choose a head ref

Commits on Oct 13, 2020

  1. Copy the full SHA
    a80213f View commit details

Commits on Oct 14, 2020

  1. refactor: next

    BREAKING CHANGE: yes
    evilebottnawi authored Oct 14, 2020
    Copy the full SHA
    393f249 View commit details
  2. docs: update

    alexander-akait committed Oct 14, 2020
    Copy the full SHA
    937a314 View commit details
  3. chore(release): 5.0.0

    alexander-akait committed Oct 14, 2020
    Copy the full SHA
    e679881 View commit details

Commits on Oct 17, 2020

  1. refactor: code (#338)

    evilebottnawi authored Oct 17, 2020
    Copy the full SHA
    ddff508 View commit details

Commits on Oct 23, 2020

  1. Copy the full SHA
    a12730f View commit details
  2. Copy the full SHA
    3c50404 View commit details
  3. Copy the full SHA
    95f3418 View commit details
  4. chore(release): 5.0.1

    alexander-akait committed Oct 23, 2020
    Copy the full SHA
    0a8698b View commit details

Commits on Oct 24, 2020

  1. Copy the full SHA
    ee0c5e3 View commit details

Commits on Oct 26, 2020

  1. refactor: code

    evilebottnawi authored Oct 26, 2020
    Copy the full SHA
    c3078c8 View commit details
  2. test: new version

    evilebottnawi authored Oct 26, 2020
    Copy the full SHA
    69419c2 View commit details

Commits on Oct 27, 2020

  1. Copy the full SHA
    a79ea67 View commit details
  2. Copy the full SHA
    b944353 View commit details
  3. chore(release): 5.0.2

    alexander-akait committed Oct 27, 2020
    Copy the full SHA
    1330aef View commit details

Commits on Oct 28, 2020

  1. Copy the full SHA
    78d821b View commit details
  2. chore(release): 5.0.3

    alexander-akait committed Oct 28, 2020
    Copy the full SHA
    bececa0 View commit details

Commits on Oct 29, 2020

  1. Copy the full SHA
    661d1f8 View commit details

Commits on Oct 30, 2020

  1. test: updated (#355)

    cap-Bernardito authored Oct 30, 2020
    Copy the full SHA
    8ef95a6 View commit details

Commits on Nov 9, 2020

  1. Copy the full SHA
    562d121 View commit details

Commits on Dec 16, 2020

  1. Copy the full SHA
    809ef42 View commit details

Commits on Jan 8, 2021

  1. Copy the full SHA
    0633c9d View commit details
  2. Copy the full SHA
    e10b8b4 View commit details
  3. 1
    Copy the full SHA
    fea6f20 View commit details
  4. Copy the full SHA
    1859a92 View commit details

Commits on Jan 9, 2021

  1. Copy the full SHA
    3a3fe51 View commit details
  2. Copy the full SHA
    4320006 View commit details

Commits on Jan 15, 2021

  1. Copy the full SHA
    727ee60 View commit details

Commits on Jan 20, 2021

  1. Copy the full SHA
    ee1d938 View commit details

Commits on Mar 4, 2021

  1. Copy the full SHA
    bfbb68a View commit details

Commits on May 12, 2021

  1. Copy the full SHA
    a177425 View commit details
  2. chore(release): 5.1.2

    alexander-akait committed May 12, 2021
    Copy the full SHA
    0babc1b View commit details
  3. Copy the full SHA
    da8e166 View commit details

Commits on May 31, 2021

  1. Copy the full SHA
    772584a View commit details
  2. Copy the full SHA
    55adbdb View commit details
  3. chore(release): 5.1.3

    alexander-akait committed May 31, 2021
    Copy the full SHA
    b44a447 View commit details

Commits on Jun 7, 2021

  1. chore: fix typo (#401)

    snitin315 authored Jun 7, 2021
    Copy the full SHA
    7fb9f43 View commit details

Commits on Jun 12, 2021

  1. chore: update deps (#404)

    snitin315 authored Jun 12, 2021
    Copy the full SHA
    f8ce3bc View commit details

Commits on Jun 16, 2021

  1. Copy the full SHA
    ec65531 View commit details

Commits on Jun 25, 2021

  1. Copy the full SHA
    bc7580b View commit details
  2. chore(release): 5.1.4

    alexander-akait committed Jun 25, 2021
    Copy the full SHA
    491b2fd View commit details
Showing with 32,588 additions and 32,875 deletions.
  1. +4 −1 .eslintrc.js
  2. +1 −1 .github/ISSUE_TEMPLATE.md
  3. +3 −3 .github/workflows/nodejs.yml
  4. +1 −0 .husky/.gitignore
  5. +4 −0 .husky/commit-msg
  6. +4 −0 .husky/pre-commit
  7. +0 −1 .prettierrc.js
  8. +69 −0 CHANGELOG.md
  9. +24 −146 README.md
  10. +2 −2 babel.config.js
  11. +1 −1 commitlint.config.js
  12. +0 −6 husky.config.js
  13. +1 −2 jest.config.js
  14. +2 −2 lint-staged.config.js
  15. +20,272 −7,510 package-lock.json
  16. +37 −36 package.json
  17. +0 −130 src/Webpack4Cache.js
  18. +0 −35 src/Webpack5Cache.js
  19. +1 −1 src/cjs.js
  20. +402 −426 src/index.js
  21. +179 −96 src/minify.js
  22. +23 −38 src/options.json
  23. +853 −747 test/TerserPlugin.test.js
  24. +2,660 −0 test/__snapshots__/TerserPlugin.test.js.snap
  25. +0 −1,331 test/__snapshots__/TerserPlugin.test.js.snap.webpack4
  26. +0 −1,253 test/__snapshots__/TerserPlugin.test.js.snap.webpack5
  27. +369 −0 test/__snapshots__/cache-option.test.js.snap
  28. +0 −439 test/__snapshots__/cache-option.test.js.snap.webpack4
  29. +0 −369 test/__snapshots__/cache-option.test.js.snap.webpack5
  30. +48 −30 test/__snapshots__/{exclude-option.test.js.snap.webpack5 → exclude-option.test.js.snap}
  31. +0 −627 test/__snapshots__/exclude-option.test.js.snap.webpack4
  32. +6,047 −0 test/__snapshots__/extractComments-option.test.js.snap
  33. +0 −6,878 test/__snapshots__/extractComments-option.test.js.snap.webpack4
  34. +0 −5,904 test/__snapshots__/extractComments-option.test.js.snap.webpack5
  35. +48 −30 test/__snapshots__/{include-option.test.js.snap.webpack5 → include-option.test.js.snap}
  36. +0 −661 test/__snapshots__/include-option.test.js.snap.webpack4
  37. +8 −8 test/__snapshots__/{minify-option.test.js.snap.webpack5 → minify-option.test.js.snap}
  38. +0 −103 test/__snapshots__/minify-option.test.js.snap.webpack4
  39. +31 −31 test/__snapshots__/{parallel-option.test.js.snap.webpack5 → parallel-option.test.js.snap}
  40. +0 −104 test/__snapshots__/parallel-option.test.js.snap.webpack4
  41. +0 −848 test/__snapshots__/sourceMap-option.test.js.snap.webpack4
  42. +0 −446 test/__snapshots__/sourceMap-option.test.js.snap.webpack5
  43. +149 −64 test/__snapshots__/{terserOptions-option.test.js.snap.webpack5 → terserOptions-option.test.js.snap}
  44. +0 −645 test/__snapshots__/terserOptions-option.test.js.snap.webpack4
  45. +136 −98 test/__snapshots__/{test-option.test.js.snap.webpack5 → test-option.test.js.snap}
  46. +0 −1,259 test/__snapshots__/test-option.test.js.snap.webpack4
  47. +18 −40 test/__snapshots__/{validate-options.test.js.snap.webpack5 → validate-options.test.js.snap}
  48. +0 −200 test/__snapshots__/validate-options.test.js.snap.webpack4
  49. 0 test/__snapshots__/{worker.test.js.snap.webpack4 → worker.test.js.snap}
  50. +0 −177 test/__snapshots__/worker.test.js.snap.webpack5
  51. +350 −828 test/cache-option.test.js
  52. +4 −4 test/cjs.test.js
  53. +25 −30 test/exclude-option.test.js
  54. +182 −191 test/extractComments-option.test.js
  55. +2 −0 test/fixtures/import-export/entry.js
  56. +2 −0 test/fixtures/minify/es6.js
  57. +4 −7 test/helpers/BrokenCodePlugin.js
  58. +31 −0 test/helpers/EmitNewAsset.js
  59. +3 −8 test/helpers/ExistingCommentsFile.js
  60. +8 −12 test/helpers/ModifyExistingAsset.js
  61. +2 −3 test/helpers/compile.js
  62. +4 −4 test/helpers/execute.js
  63. +0 −9 test/helpers/getCacheDirectory.js
  64. +9 −15 test/helpers/getCompiler.js
  65. +2 −4 test/helpers/getErrors.js
  66. +2 −4 test/helpers/getWarnings.js
  67. +14 −16 test/helpers/index.js
  68. +7 −8 test/helpers/normalizeErrors.js
  69. +3 −3 test/helpers/readAsset.js
  70. +1 −1 test/helpers/readAssets.js
  71. +0 −11 test/helpers/removeCache.js
  72. +8 −8 test/helpers/snapshotResolver.js
  73. +25 −30 test/include-option.test.js
  74. +93 −99 test/minify-option.test.js
  75. +82 −71 test/parallel-option.test.js
  76. +0 −438 test/sourceMap-option.test.js
  77. +179 −150 test/terserOptions-option.test.js
  78. +40 −53 test/test-option.test.js
  79. +16 −52 test/validate-options.test.js
  80. +80 −87 test/worker.test.js
  81. +13 −0 tsconfig.json
5 changes: 4 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
module.exports = {
root: true,
extends: ['@webpack-contrib/eslint-config-webpack', 'prettier'],
extends: ["@webpack-contrib/eslint-config-webpack", "prettier"],
rules: {
"import/no-namespace": "off",
},
};
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
You arrived at this template because you felt none of the other options
matched the kind of issue you'd like to report. Please use this opportunity to
tell us about your particular type of issue so we can try to accomodate
tell us about your particular type of issue so we can try to accommodate
similar issues in the future.
PLEASE do note, if you're using this to report an issue already covered by the
6 changes: 3 additions & 3 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -29,10 +29,10 @@ jobs:
with:
fetch-depth: 0

- name: Use Node.js ${{ env.node-version }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ env.node-version }}
node-version: ${{ matrix.node-version }}

- name: Use latest NPM
run: sudo npm i -g npm
@@ -56,7 +56,7 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [10.x, 12.x, 14.x]
webpack-version: [latest, next]
webpack-version: [latest]

runs-on: ${{ matrix.os }}

1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install commitlint --edit $1
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
1 change: 0 additions & 1 deletion .prettierrc.js

This file was deleted.

69 changes: 69 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -2,6 +2,75 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

### [5.1.4](https://github.com/webpack-contrib/terser-webpack-plugin/compare/v5.1.3...v5.1.4) (2021-06-25)

* update `serialize-javascript`

### [5.1.3](https://github.com/webpack-contrib/terser-webpack-plugin/compare/v5.1.2...v5.1.3) (2021-05-31)

### Chore

* update `jest-worker`

### [5.1.2](https://github.com/webpack-contrib/terser-webpack-plugin/compare/v5.1.1...v5.1.2) (2021-05-12)


### Bug Fixes

* don't crash in non-parallel mode ([#395](https://github.com/webpack-contrib/terser-webpack-plugin/issues/395)) ([a177425](https://github.com/webpack-contrib/terser-webpack-plugin/commit/a1774257f7ccedafa15a58aaeba6186c47daea8a))

### [5.1.1](https://github.com/webpack-contrib/terser-webpack-plugin/compare/v5.1.0...v5.1.1) (2021-01-09)


### Bug Fixes

* remove verbose console log ([#374](https://github.com/webpack-contrib/terser-webpack-plugin/issues/374)) ([3a3fe51](https://github.com/webpack-contrib/terser-webpack-plugin/commit/3a3fe516c10799d65f41b1572c25a9e6e9cacfe5))

## [5.1.0](https://github.com/webpack-contrib/terser-webpack-plugin/compare/v5.0.3...v5.1.0) (2021-01-08)


### Features

* optimize JS assets added later by plugins ([#373](https://github.com/webpack-contrib/terser-webpack-plugin/issues/373)) ([fea6f20](https://github.com/webpack-contrib/terser-webpack-plugin/commit/fea6f201488d5abc5aa695085ea329353adca547))

### [5.0.3](https://github.com/webpack-contrib/terser-webpack-plugin/compare/v5.0.2...v5.0.3) (2020-10-28)


### Bug Fixes

* performance ([#351](https://github.com/webpack-contrib/terser-webpack-plugin/issues/351)) ([78d821b](https://github.com/webpack-contrib/terser-webpack-plugin/commit/78d821b0f8d610a44aab19bb27310c1d05951872))

### [5.0.2](https://github.com/webpack-contrib/terser-webpack-plugin/compare/v5.0.0...v5.0.2) (2020-10-27)


### Bug Fixes

* compatibility with the `format` option for `terser` ([b944353](https://github.com/webpack-contrib/terser-webpack-plugin/commit/b944353b40c831779dd989854a4dbc81f47d4a55))

### [5.0.1](https://github.com/webpack-contrib/terser-webpack-plugin/compare/v5.0.0...v5.0.1) (2020-10-23)


### Bug Fixes

* improved performance (we strongly recommend using latest LTS releases) ([#345](https://github.com/webpack-contrib/terser-webpack-plugin/issues/345)) ([95f3418](https://github.com/webpack-contrib/terser-webpack-plugin/commit/95f3418201f8c8e3d31ac03ac71ddc58f46e006b))
* used `worker_thread` where is it possible ([#344](https://github.com/webpack-contrib/terser-webpack-plugin/issues/344)) ([3c50404](https://github.com/webpack-contrib/terser-webpack-plugin/commit/3c50404b46795348dc44b5c8a6291f8d9ba5983a))
* fixed terser options for es module ([a12730f](https://github.com/webpack-contrib/terser-webpack-plugin/commit/a12730f6c251d4a17afd51e6f700530c62d091ca))

## [5.0.0](https://github.com/webpack-contrib/terser-webpack-plugin/compare/v4.2.3...v5.0.0) (2020-10-14)


### ⚠ BREAKING CHANGES

* webpack@4 no longer supported
* removed the `cache` option
* removed the `cacheKeys` option
* removed the `sourceMap` option (respect the `devtool` option by default)

### Bug Fixes

* reduce deps
* performance improvement

### [4.2.3](https://github.com/webpack-contrib/terser-webpack-plugin/compare/v4.2.2...v4.2.3) (2020-10-07)


Loading