René's URL Explorer Experiment


Title: Appears to be a scope resolution bug · Issue #1386 · javascript-obfuscator/javascript-obfuscator · GitHub

Open Graph Title: Appears to be a scope resolution bug · Issue #1386 · javascript-obfuscator/javascript-obfuscator

X Title: Appears to be a scope resolution bug · Issue #1386 · javascript-obfuscator/javascript-obfuscator

Description: Expected Behavior The obfuscated output should preserve the original binding semantics. A semantically correct result would be equivalent to: import { i as _imp } from './runtime.js'; function factory() { return 'factory-result'; } var P...

Open Graph Description: Expected Behavior The obfuscated output should preserve the original binding semantics. A semantically correct result would be equivalent to: import { i as _imp } from './runtime.js'; function fact...

X Description: Expected Behavior The obfuscated output should preserve the original binding semantics. A semantically correct result would be equivalent to: import { i as _imp } from './runtime.js'; funct...

Opengraph URL: https://github.com/javascript-obfuscator/javascript-obfuscator/issues/1386

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Appears to be a scope resolution bug","articleBody":"\u003c!-- Love javascript-obfuscator? Please consider supporting our collective:\n👉  https://opencollective.com/javascript-obfuscator/donate --\u003e\n\n\u003c!--- Provide a general summary of the issue in the Title above --\u003e\n\n## Expected Behavior\n\u003c!--- Tell us what should happen --\u003e\n\nThe obfuscated output should preserve the original binding semantics.\n\nA semantically correct result would be equivalent to:\n\n```js\nimport { i as _imp } from './runtime.js';\n\nfunction factory() {\n  return 'factory-result';\n}\n\nvar P = class _cls {\n  static instance;\n\n  static getInstance() {\n    return _cls.instance ||= new _cls(), _cls.instance;\n  }\n};\n\nvar x = _imp(factory(), 1);\n\nexport { P, x };\n```\n\nor:\n\n```js\nimport { i as _imp } from './runtime.js';\n\nfunction factory() {\n  return 'factory-result';\n}\n\nvar _P = class {\n  static instance;\n\n  static getInstance() {\n    return _P.instance ||= new _P(), _P.instance;\n  }\n};\n\nvar x = _imp(factory(), 1);\n\nexport { _P as P, x };\n```\n\n## Current Behavior\n\u003c!--- Tell us what happens instead of the expected behavior --\u003e\n\nThe obfuscated output rewrites the class self-reference to the imported binding.\n\nIt becomes effectively:\n\n```js\nimport { i as _0x48e620 } from './runtime.js';\n\nfunction factory() {\n    return 'factory-result';\n}\n\nvar P = class e {\n    static ['instance'];\n    static ['getInstance']() {\n        return _0x48e620['instance'] ||= new _0x48e620(), _0x48e620['instance'];\n    }\n};\n\nvar x = _0x48e620(factory(), 0x1);\n\nexport { P, x };\n```\n\nThis is incorrect because `_0x48e620` is the imported binding, not the class.\n\nIf the imported binding is a function or arrow function, runtime execution fails with:\n\n```text\nTypeError: function is not a constructor\n```\n\n## Steps to Reproduce\n\u003c!--- Provide a link to a live example, or an unambiguous set of steps to --\u003e\n\u003c!--- reproduce this bug. Include code to reproduce, if relevant --\u003e\n1. Open https://obfuscator.io/legacy-playground\n2. Paste `runtime.js` and the main module code below into the editor\n3. Use the obfuscator options listed below\n4. Run obfuscation\n5. Inspect the generated `getInstance()` method\n6. Notice that the class self-reference is rewritten to the imported binding\n\n## JavaScript Obfuscator Edition\n- JavaScript Obfuscator Open Source\n- JavaScript Obfuscator Pro via API or [http://obfuscator.io](http://obfuscator.io])\n\n## Your Environment\n\u003c!--- Include as many relevant details about the environment you experienced the bug in --\u003e\n- `javascript-obfuscator`: `4.2.2`\n  - Also reproduced after testing newer versions, including `5.3.0`\n- Node.js: `20.x`\n- OS: macOS\n\n# Stack trace\n\u003c!--- Include stack trace --\u003e\n\n## Minimal working example that will help to reproduce issue\n\u003c!--- Include code --\u003e\n\n```js\n// runtime.js\nexport const i = (value, flag) =\u003e ({ value, flag });\n```\n\n```js\nimport { i as e } from './runtime.js';\n\nfunction factory() {\n  return 'factory-result';\n}\n\nvar P = class e {\n  static instance;\n\n  static getInstance() {\n    return e.instance ||= new e(), e.instance;\n  }\n};\n\nvar x = e(factory(), 1);\n\nexport { P, x };\n```\n","author":{"url":"https://github.com/z0ffy","@type":"Person","name":"z0ffy"},"datePublished":"2026-03-19T16:47:11.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/1386/javascript-obfuscator/issues/1386"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:4ce749db-c3ae-9514-79c5-bb960bec30c3
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idA4AA:17D6AA:27D78AC:28D3217:6A62F628
html-safe-nonce6b3799514d7492952338c38c10c5d3208ba2ecd7b0ac025d3e906c820a1dbcbb
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNEFBOjE3RDZBQToyN0Q3OEFDOjI4RDMyMTc6NkE2MkY2MjgiLCJ2aXNpdG9yX2lkIjoiNTM2MjgyOTAzNjY3ODczOTQ5NiIsInJlZ2lvbl9lZGdlIjoic2VhIiwicmVnaW9uX3JlbmRlciI6InNlYSJ9
visitor-hmac61a0e7e9da5f56d524535b6c104616f3fc94d7b301c0799df8e0f6606f64da8f
hovercard-subject-tagissue:4102923063
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/javascript-obfuscator/javascript-obfuscator/1386/issue_layout
twitter:imagehttps://opengraph.githubassets.com/4f4d62ecf465caf1f38a294caaf9d23d81e0f89f417864671e515330fc6043cc/javascript-obfuscator/javascript-obfuscator/issues/1386
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/4f4d62ecf465caf1f38a294caaf9d23d81e0f89f417864671e515330fc6043cc/javascript-obfuscator/javascript-obfuscator/issues/1386
og:image:altExpected Behavior The obfuscated output should preserve the original binding semantics. A semantically correct result would be equivalent to: import { i as _imp } from './runtime.js'; function fact...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamez0ffy
hostnamegithub.com
expected-hostnamegithub.com
Noneb415018e190e73858133ddcaa36acce7b3f3572fe54dda84bd3b21a6ec714c30
turbo-cache-controlno-preview
go-importgithub.com/javascript-obfuscator/javascript-obfuscator git https://github.com/javascript-obfuscator/javascript-obfuscator.git
octolytics-dimension-user_id23015672
octolytics-dimension-user_loginjavascript-obfuscator
octolytics-dimension-repository_id58360147
octolytics-dimension-repository_nwojavascript-obfuscator/javascript-obfuscator
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id58360147
octolytics-dimension-repository_network_root_nwojavascript-obfuscator/javascript-obfuscator
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release22f98521e99f504294ab0812b66104d50eb75a70
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/javascript-obfuscator/javascript-obfuscator/issues/1386#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fjavascript-obfuscator%2Fjavascript-obfuscator%2Fissues%2F1386
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
Code QualityEnforce quality at mergehttps://github.com/features/code-quality
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fjavascript-obfuscator%2Fjavascript-obfuscator%2Fissues%2F1386
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=javascript-obfuscator%2Fjavascript-obfuscator
Reloadhttps://github.com/javascript-obfuscator/javascript-obfuscator/issues/1386
Reloadhttps://github.com/javascript-obfuscator/javascript-obfuscator/issues/1386
Reloadhttps://github.com/javascript-obfuscator/javascript-obfuscator/issues/1386
Please reload this pagehttps://github.com/javascript-obfuscator/javascript-obfuscator/issues/1386
javascript-obfuscator https://github.com/javascript-obfuscator
javascript-obfuscatorhttps://github.com/javascript-obfuscator/javascript-obfuscator
Please reload this pagehttps://github.com/javascript-obfuscator/javascript-obfuscator/issues/1386
Notifications https://github.com/login?return_to=%2Fjavascript-obfuscator%2Fjavascript-obfuscator
Fork 1.7k https://github.com/login?return_to=%2Fjavascript-obfuscator%2Fjavascript-obfuscator
Star 16.2k https://github.com/login?return_to=%2Fjavascript-obfuscator%2Fjavascript-obfuscator
Code https://github.com/javascript-obfuscator/javascript-obfuscator
Issues 15 https://github.com/javascript-obfuscator/javascript-obfuscator/issues
Pull requests 5 https://github.com/javascript-obfuscator/javascript-obfuscator/pulls
Discussions https://github.com/javascript-obfuscator/javascript-obfuscator/discussions
Actions https://github.com/javascript-obfuscator/javascript-obfuscator/actions
Projects https://github.com/javascript-obfuscator/javascript-obfuscator/projects
Security and quality 0 https://github.com/javascript-obfuscator/javascript-obfuscator/security
Insights https://github.com/javascript-obfuscator/javascript-obfuscator/pulse
Code https://github.com/javascript-obfuscator/javascript-obfuscator
Issues https://github.com/javascript-obfuscator/javascript-obfuscator/issues
Pull requests https://github.com/javascript-obfuscator/javascript-obfuscator/pulls
Discussions https://github.com/javascript-obfuscator/javascript-obfuscator/discussions
Actions https://github.com/javascript-obfuscator/javascript-obfuscator/actions
Projects https://github.com/javascript-obfuscator/javascript-obfuscator/projects
Security and quality https://github.com/javascript-obfuscator/javascript-obfuscator/security
Insights https://github.com/javascript-obfuscator/javascript-obfuscator/pulse
#1387https://github.com/javascript-obfuscator/javascript-obfuscator/pull/1387
Appears to be a scope resolution bughttps://github.com/javascript-obfuscator/javascript-obfuscator/issues/1386#top
#1387https://github.com/javascript-obfuscator/javascript-obfuscator/pull/1387
bughttps://github.com/javascript-obfuscator/javascript-obfuscator/issues?q=state%3Aopen%20label%3A%22bug%22
https://github.com/z0ffy
z0ffyhttps://github.com/z0ffy
on Mar 19, 2026https://github.com/javascript-obfuscator/javascript-obfuscator/issues/1386#issue-4102923063
https://obfuscator.io/legacy-playgroundhttps://obfuscator.io/legacy-playground
http://obfuscator.iohttp://obfuscator.io%5D
bughttps://github.com/javascript-obfuscator/javascript-obfuscator/issues?q=state%3Aopen%20label%3A%22bug%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.