{"id":26159360,"url":"https://github.com/zcfan/terser-bug-demo","last_synced_at":"2026-04-20T17:32:46.436Z","repository":{"id":281821917,"uuid":"946529582","full_name":"zcfan/terser-bug-demo","owner":"zcfan","description":"demo of a memory leaks bug cause by terser minifying.","archived":false,"fork":false,"pushed_at":"2025-03-11T09:48:31.000Z","size":53,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-11T10:41:15.088Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zcfan.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-11T09:33:16.000Z","updated_at":"2025-03-11T09:48:34.000Z","dependencies_parsed_at":"2025-03-11T10:41:17.850Z","dependency_job_id":"f653d18c-9945-4adc-aad9-e0f1c06da602","html_url":"https://github.com/zcfan/terser-bug-demo","commit_stats":null,"previous_names":["zcfan/terser-bug-demo"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zcfan/terser-bug-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zcfan%2Fterser-bug-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zcfan%2Fterser-bug-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zcfan%2Fterser-bug-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zcfan%2Fterser-bug-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zcfan","download_url":"https://codeload.github.com/zcfan/terser-bug-demo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zcfan%2Fterser-bug-demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32057634,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T11:35:06.609Z","status":"ssl_error","status_checked_at":"2026-04-20T11:34:48.899Z","response_time":94,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-11T11:21:52.700Z","updated_at":"2026-04-20T17:32:46.431Z","avatar_url":"https://github.com/zcfan.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Demo of memory leaks after terser minifying\n\nCredit to [this blog post](https://blog.meteor.com/an-interesting-kind-of-javascript-memory-leak-8b47d2e7f156).\n\nInput is not leaking, `--compress module=true,inline=false` is combination of safe options, but result in memory leaks.\n\n## `before.js` does not leak.\n\nTo verify it, run the following command:\n\n```\n$ node --inspect before.js\n```\n\nOpen `chrome://inspect` and record a memory timeline.\n\n## After minifying, the `after.js` leaks.\n\n```\n$ npm build\n$ node --inspect after.js\n```\n\nOpen `chrome://inspect` and record a memory timeline.\n\n![](leaks.png)\n\n## With `reduce_vars=false` the `after.js` does not leak.\n\n\n```\n$ npm build:fixed\n$ node --inspect after.js\n```\n\nOpen `chrome://inspect` and record a memory timeline.\n\n![](fixed.png)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzcfan%2Fterser-bug-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzcfan%2Fterser-bug-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzcfan%2Fterser-bug-demo/lists"}