Skip to content

Commit

Permalink
feature: @putout/minify: @putout/printer v9.0.0 (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
coderaiser committed Jun 7, 2024
1 parent 7053bad commit a8210ab
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"@putout/plugin-reuse-duplicate-init": "^5.0.0",
"@putout/plugin-simplify-ternary": "^7.0.0",
"@putout/plugin-types": "^4.0.0",
"@putout/printer": "^8.47.0",
"@putout/printer": "^9.0.0",
"@rollup/plugin-alias": "^5.0.0",
"@rollup/plugin-commonjs": "^25.0.1",
"@rollup/plugin-json": "^6.0.0",
Expand Down
2 changes: 1 addition & 1 deletion test/fixture/convert-return-to-sequence-expression-fix.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
()=>{d();return 1};
()=>(d(),1);
1 change: 1 addition & 0 deletions test/fixture/sequence-expressions-fix.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
for(const e of l){e.o=w(e.o);e.l=w(e.l)}()=>{try{return 1}catch(e){console.log(e);return 2}};
11 changes: 11 additions & 0 deletions test/fixture/sequence-expressions.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
for (const e of l) {
e.o = w(e.o);e.l = w(e.l);
}

() => {
try{
return 1;
} catch(e) {
return console.log(e), 2;
}
};
5 changes: 5 additions & 0 deletions test/minify.js
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,11 @@ test('@putout/minify: reuse-duplicate-init', (t) => {
t.end();
});

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

test('@putout/minify: overlap', (t) => {
t.minify('overlap');
t.end();
Expand Down

0 comments on commit a8210ab

Please sign in to comment.