Skip to content

Commit

Permalink
feature: @putout/minify: @putout/plugin-minify v8.8.1 (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
coderaiser committed Jun 6, 2024
1 parent 4599986 commit ae5220a
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"@putout/plugin-merge-destructuring-properties": "^8.0.0",
"@putout/plugin-merge-duplicate-functions": "^2.0.0",
"@putout/plugin-merge-duplicate-imports": "^11.0.0",
"@putout/plugin-minify": "^8.7.0",
"@putout/plugin-minify": "^8.8.1",
"@putout/plugin-new": "^3.0.1",
"@putout/plugin-promises": "^15.0.0",
"@putout/plugin-regexp": "^8.0.0",
Expand Down
2 changes: 1 addition & 1 deletion test/fixture/declare-fix.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
var{keys:A}=Object;let a,b,c,d;A(a);A(b);A(c);A(d);
const{keys:A}=Object;let a,b,c,d;A(a);A(b);A(c);A(d);
2 changes: 1 addition & 1 deletion test/fixture/for-each-ternary-fix.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/fixture/mangle-names-fix.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
var{hello:a}=world;fn(a);
const{hello:a}=world;fn(a);
2 changes: 1 addition & 1 deletion test/fixture/merge-destructuring-properties-fix.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
var{assign:A,keys:_}=Object;let a,b;_(x);A(a,b);
const{assign:A,keys:_}=Object;let a,b;_(x);A(a,b);
2 changes: 1 addition & 1 deletion test/fixture/overlap-fix.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
var{keys:A}=Object,a=A(LISTENERS.buttonClickHandlers);
const{keys:A}=Object,a=A(LISTENERS.buttonClickHandlers);
2 changes: 1 addition & 1 deletion test/fixture/reuse-duplicate-init-fix.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
var{a,b,operator:c}=require('putout'),{replaceWith:d}=c;
const{a,b,operator:c}=require('putout'),{replaceWith:d}=c;
1 change: 1 addition & 0 deletions test/fixture/var-overlap-fix.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
function A(){var n=a();n&&n();{const n=b();n&&n()}}export{A as mergeProps};
14 changes: 14 additions & 0 deletions test/fixture/var-overlap.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
export function mergeProps() {
const n = a();

if (n) {
n();
}

if (true) {
const n = b();

if (n)
n();
}
}
5 changes: 5 additions & 0 deletions test/minify.js
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,11 @@ test('@putout/minify: var', (t) => {
t.end();
});

test('@putout/minify: var: overlap', (t) => {
t.minify('var-overlap');
t.end();
});

test('@putout/minify: mangle: disabled', (t) => {
t.minify('mangle-disabled', {
mangle: false,
Expand Down

0 comments on commit ae5220a

Please sign in to comment.