Skip to content

Commit

Permalink
fix: @putout/minify: call-expression: parens (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
coderaiser committed Sep 29, 2024
1 parent 6861444 commit d9737c9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"@putout/plugin-reuse-duplicate-init": "^5.0.0",
"@putout/plugin-simplify-ternary": "^7.0.0",
"@putout/plugin-types": "^5.0.0",
"@putout/printer": "^9.6.0",
"@putout/printer": "^9.18.0",
"@rollup/plugin-alias": "^5.0.0",
"@rollup/plugin-commonjs": "^28.0.0",
"@rollup/plugin-json": "^6.0.0",
Expand Down
2 changes: 1 addition & 1 deletion test/fixture/parens-fix.js

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

4 changes: 4 additions & 0 deletions test/fixture/parens.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ const document = {
};
(p = document.createElement('script')).type = 'application/javascript', p.src = url;
console.log(p.type);

(function() {
console.log('hello');
}.call(this));
3 changes: 2 additions & 1 deletion test/minify.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ test('@putout/minify: comments', (t) => {

test('@putout/minify: parens', (t) => {
t.minify('parens', {
expected: 'application/javascript',
expected: ['application/javascript', 'hello'],
});
t.end();
});
Expand Down Expand Up @@ -547,3 +547,4 @@ test('@putout/minify: for-each-destructuring', (t) => {
});
t.end();
});

0 comments on commit d9737c9

Please sign in to comment.