{"action":"created","issue":{"url":"https://api.github.com/repos/terser-js/terser/issues/140","repository_url":"https://api.github.com/repos/terser-js/terser","labels_url":"https://api.github.com/repos/terser-js/terser/issues/140/labels{/name}","comments_url":"https://api.github.com/repos/terser-js/terser/issues/140/comments","events_url":"https://api.github.com/repos/terser-js/terser/issues/140/events","html_url":"https://github.com/terser-js/terser/pull/140","id":373532730,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI1NDQyMTQ0","number":140,"title":"Fix `keep_fnames` regex use in combination with `reduce_vars`","user":{"login":"mislav","id":887,"node_id":"MDQ6VXNlcjg4Nw==","avatar_url":"https://avatars2.githubusercontent.com/u/887?v=4","gravatar_id":"","url":"https://api.github.com/users/mislav","html_url":"https://github.com/mislav","followers_url":"https://api.github.com/users/mislav/followers","following_url":"https://api.github.com/users/mislav/following{/other_user}","gists_url":"https://api.github.com/users/mislav/gists{/gist_id}","starred_url":"https://api.github.com/users/mislav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mislav/subscriptions","organizations_url":"https://api.github.com/users/mislav/orgs","repos_url":"https://api.github.com/users/mislav/repos","events_url":"https://api.github.com/users/mislav/events{/privacy}","received_events_url":"https://api.github.com/users/mislav/received_events","type":"User","site_admin":true},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-10-24T15:07:45Z","updated_at":"2018-10-24T16:07:05Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/terser-js/terser/pulls/140","html_url":"https://github.com/terser-js/terser/pull/140","diff_url":"https://github.com/terser-js/terser/pull/140.diff","patch_url":"https://github.com/terser-js/terser/pull/140.patch"},"body":"Use case:\r\n\r\n```js\r\nminify(code, { keep_fnames: /regex/ })\r\n```\r\n\r\nThe regex gets forwarded to both `mangle` and `compress` options. Respecting the regex was implemented within `mangle`, but in other places the value was still treated like a boolean.\r\n\r\nThis resulted in functions which would otherwise be anonymized still having a name:\r\n\r\n```js\r\na.map(function n() { ... })\r\n```\r\n\r\nwhere in fact the correct compression should have been:\r\n\r\n```js\r\na.map(function() { ... })\r\n```\r\n\r\nFollowup to #125 /cc @koddsson "},"comment":{"url":"https://api.github.com/repos/terser-js/terser/issues/comments/432721508","html_url":"https://github.com/terser-js/terser/pull/140#issuecomment-432721508","issue_url":"https://api.github.com/repos/terser-js/terser/issues/140","id":432721508,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMjcyMTUwOA==","user":{"login":"kzc","id":11593452,"node_id":"MDQ6VXNlcjExNTkzNDUy","avatar_url":"https://avatars3.githubusercontent.com/u/11593452?v=4","gravatar_id":"","url":"https://api.github.com/users/kzc","html_url":"https://github.com/kzc","followers_url":"https://api.github.com/users/kzc/followers","following_url":"https://api.github.com/users/kzc/following{/other_user}","gists_url":"https://api.github.com/users/kzc/gists{/gist_id}","starred_url":"https://api.github.com/users/kzc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kzc/subscriptions","organizations_url":"https://api.github.com/users/kzc/orgs","repos_url":"https://api.github.com/users/kzc/repos","events_url":"https://api.github.com/users/kzc/events{/privacy}","received_events_url":"https://api.github.com/users/kzc/received_events","type":"User","site_admin":false},"created_at":"2018-10-24T16:07:05Z","updated_at":"2018-10-24T16:07:05Z","author_association":"CONTRIBUTOR","body":"Unfortunately master is not in a testable state as per #138 .\r\n\r\nPlease rebase this PR with https://github.com/terser-js/terser/commit/075a6f98ec71647c32ca9489afed3c3b34cb65ab, the last commit on master that passed all tests."}}
{"actor":{"display_login":"kzc"}}